Ejemplo n.º 1
0
    public override bool Application(BattleCharacter whoUsing, BattlePlacement battlePlacement)
    {
        List <BattleCharacter> enemies = battlePlacement.Search.AllEnemyLivingTeam(whoUsing);

        foreach (var enemy in enemies)
        {
            whoUsing.CreateAction(new CharacterActionEvent(new CharacterActionEvent.OnTarget(
                                                               whoUsing,
                                                               enemy,
                                                               CharacterActionEvent.ActionOnTarget.Attack,
                                                               whoUsing.Attack * _percentageOfAttack / 100)));
        }

        if (enemies.Count == 0)
        {
            whoUsing.CreateAction(new CharacterActionEvent(new CharacterActionEvent.System(CharacterActionEvent.ActionSystem.EndGame)));
        }

        return(true);
    }