Step 1

Darmanitan used Punch Full of Bricks*! (-20 EN)
*this is probably illegal
(8 + (14 - 5) + 2)*1.5 => 29
Darmanitan's Attack rose! (+1 Atk, next 2 turns)

Rampardos used Rock Slide! (-6 EN)
Miss (10, d10): 10 (Yes)
But it missed...
Step 2

Darmanitan used Earthquake! (-7 EN)
Crit (1, d24): 1 (Yes)
(10 + 3 + (14 - 5) + 2)*1.5 + (1 - 0)*4 = 40

Rampardos used Rock Slide! (-6 EN)
Miss (10, d10): 9 (No), Crit (1, d24): 10 (No), Flinch (No)
(8 + 3 + (18 - 4))*1.5 = 38
Step 3

Darmanitan used Earthquake! (-7 EN)
Crit (1, d24): 1 (Yes)
(10 + 3 + (14 - 5) + 3)*1.5 + (1 - 0)*4 => 42

Rampardos
fainted!
(Reminder: Darmanitan's Attack stage returns to normal.)

Darmanitan was buffeted by the sandstorm! (-2 HP)
Round Summary

Darmanitan HP: -38-2 = -40

Darmanitan EN: -20-7-7 = -34

Rampardos HP: -29-40-42 = -111

Rampardos EN: -6-6 = -12