Exemplo n.º 1
0
        public List <BattleAction> ReceiveAction(BattleAction action)
        {
            Result.NextTurn();
            var unit = CurrentActingUnit;

            if (unit != action.Unit)
            {
                action.Result           = new ActionResult();
                action.Result.Succeeded = false;
                return(null);
            }
            if (action is AttackAction)
            {
                var attack = (AttackAction)action;
                action.Result           = attack.Unit.Attack(attack.Defender);
                action.Result.Succeeded = true;
            }
            UpdateRT(unit);
            Result.AddAction(action);
            return(Result.CurrentTurn.Actions);
        }
Exemplo n.º 2
0
 public void AddAction(BattleAction action)
 {
     CurrentTurn.Actions.Add(action);
 }