Is there anywhere I can read a description of the earthquake bug? Did I understand correctly that the bug works when there is no castle, and it always kills the topmost unit of the enemy (or your own, when the defender casts it), if it hasn't been killed yet? Or are there any other tricks/limitations?
There is a 'bug' with Earthquake since it can target non-active arrow turrets (their hit points are not 0 even if the citadel/castle hasn't been built).
Catapult cannot target
Earthquake can still hit non-targets
If you hit one of these non-active turrets, the first creature in the defender's army gets hit with the creature flag CANNOT_MOVE (0x00200000), which is usually given to War Machines and Arrow Turrets - essentially, it is now a War Machine.
If it's the only creature in the defender's army, the battle ends immediately because you cannot survive with only War Machines.
RIP enemy
If there is more than one stack, then the first stack can become a War Machine, but the second+ still remain active.
Creature count gone