public void onDamage(Entity e) { if (onDamageHandler != null) { EffectHandler temp = onDamageHandler; onDamageHandler = null; temp.effect(e); onDamageHandler = temp; } }
public void onSpell(Entity e) { if (onSpellHandler != null) { EffectHandler temp = onSpellHandler; onSpellHandler = null; temp.effect(e); onSpellHandler = temp; } }
public EffectHandler onTurnEndHandler; // when a turn ends public void onGained(Entity e) { if (onGainedHandler != null) { EffectHandler temp = onBuffedHandler; onGainedHandler = null; temp.effect(e); onGainedHandler = temp; } }
public void onLeave(Cell c) { if (onTurnStartHandler != null) { EffectHandler temp = onTurnStartHandler; onTurnStartHandler = null; temp.effect(c); onTurnStartHandler = temp; } }
public void onTurnEnd(Cell c) { if (onTurnEndHandler != null) { EffectHandler temp = onTurnEndHandler; onTurnEndHandler = null; temp.effect(c); onTurnEndHandler = temp; } }
public void onTurnEnd(Entity e) { if (onTurnEndHandler != null) { EffectHandler temp = onTurnEndHandler; onTurnEndHandler = null; temp.effect(e); onTurnEndHandler = temp; } }