public void OnAttack(IAttacker attacker, ITargetable defender) { AttackBattleAction action = attacker.Attack(defender); AttackBattleAction counterAction = null; if ((action.Type & AttackBattleAction.DamageType.CanBeCounter) != 0) { ITargetable a = attacker as ITargetable; if (a != null) { counterAction = defender.Counter(a); } } action.Execute(); if (counterAction != null) { counterAction.Execute(); } attacker.DeathCheck(); defender.DeathCheck(); }
public void OnAttacked(AttackBattleAction action) { }
public void OnAttack(AttackBattleAction action) { attacked = true; }