Example #1
0
    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();
    }
Example #2
0
 public void OnAttacked(AttackBattleAction action)
 {
 }
Example #3
0
 public void OnAttack(AttackBattleAction action)
 {
     attacked = true;
 }