Ejemplo n.º 1
0
    bool DoAttack()
    {
        Debug.Log("Attacking");

        if (currentActor.CanAttackAt(attackPosition) && !BoardUtils.IsPositionEmpty(attackPosition))
        {
            //TODO make objects take damage too
            BattleActor attackedObj = GameData.CurrentBattle.Board.GetActorAt(attackPosition);
            attackedObj.TakeDamage(currentActor.Type.Attack);
            performedAttack = true;

            NextAction = ThinkerActions.NONE;

            return(true);
        }

        return(false);
    }