|
|
|
|
|
by jdmichal
4363 days ago
|
|
If I may, I would suggest thinking about things in a way very similar to how Magic: The Gathering does, which is as a "state-based effect" or "triggered effect". This models very well into programming as event handlers watching state-changes and acting appropriately. For instance, the most common state-based effect in MTG is death from damage. This is perhaps even easier to model in Hearthstone, as damage is persistent. Simply register event handlers on minions which get called whenever the health of a minion changes; if it's <= 0, trigger death. Death will then cause any "triggered effects" to fire, such as a deathrattle tigger. This is also easy; just a listener on the death event. |
|