Skip to content
jleclanche edited this page Dec 28, 2014 · 2 revisions

It is tempting to think that combat is a simple and straightforward "Entity hits target. Target hits back. The end.". However, the combat rules are very malleable in Hearthstone due to cards like Misdirection, Noble Sacrifice and Ogre Brute.

Attack phase

As soon as the player decides a character should hit another character, a PROPOSED_ATTACKER (the entity attacking) and a PROPOSED_DEFENDER (the entity defending) is set on the Game entity. The ATTACK event is then fired.

During the event, the proposed attackers and defender may change any number of times through various event listeners. Once the attack is ready to proceed, the PROPOSED tags are cleared, and the attacking and defending entities get ATTACKING and DEFENDING set, respectively.

If an entity dies before performing its attack, SHOULDEXITCOMBAT will be set and it will stop performing its attack.

After the attack, the attacking entity will then increase its NUM_ATTACKS_THIS_TURN and potentially become EXHAUSTED.

Damage phase

Damage does not happen during the attack itself, because event listeners can prevent the destruction of a character by healing it. Instead, PREDAMAGE is set on the entity. Once the predamage phase is complete, PREDAMAGE is cleared and the minion gets its DAMAGE set.

Should a minion die during the damage phase, IGNORE_DAMAGE will be set on it while it moves to the GRAVEYARD Zone.