Step 1
Flygon used Earthquake! (-6 EN, 67 left)
Roll to Crit (1/24 = Crit): 8/24 = Crit
(10 + 3 + 1) * 1.5 = 21 damage (33 HP left)
Luxray used Substitute! (-24 EN, 30 left)
Luxray made a substitute! (-25 HP, 8 left)
Step 2
Luxray used Quick Attack! (-3 EN, 27 left)
Roll to Crit (1/24 = Crit): 15/24 = No Crit
(4 + 3) - 2 = 5 damage (12 HP left)
Flygon used Earthquake! (-10 EN, 57 left)
Roll to Crit (1/24 = Crit): 9/24 = Crit
(10 + 3 + 1) * 1.5 = 21 damage (4 HP sub)
Step 3
Luxray used Quick Attack! (-7 EN, 20 left)
Roll to Crit (1/24 = Crit): 4/24 = No Crit
(4 + 3) - 2 = 5 damage (7 HP left)
Flygon used Macroseism! (-37 EN, 20 left)
Crit doesn't matter
More than 4 damage, sub breaks