Beispiel #1
0
    public bool TryAttackEntity(IBattleEntity other)
    {
        bool canAttack = _owner.IsHostileTo(other) && CurrentAttack.CanTargetBeReached(_owner, other);

        if (canAttack)
        {
            PrepareAttack(CurrentAttack.FindAllReachableTargets(_owner));
        }
        var defeated = StartAttack();

        return(defeated.Contains(other));
    }