Exemplo n.º 1
0
        public ActionEconomy CastBuff(MagicInitiateSpell spell)
        {
            ValidateCastBuff(spell);

            ActionEconomy action = ActionEconomy.FreeAction;

            switch (spell)
            {
            case MagicInitiateSpell.Bless:
            {
                ValidateCastBless();
                action = CastBless();
                break;
            }

            case MagicInitiateSpell.Hex:
            {
                ValidateCastHex();
                action = CastHex();
                break;
            }

            default:
            {
                throw new ArgumentException();
            }
            }

            return(action);
        }
Exemplo n.º 2
0
        public override TurnStateEnum Execute(IPlayerStatus player, IEnemy enemy)
        {
            Validate(player, enemy);
            Assert.AreEqual(0, player.NumberOfTurnsPassed);

            ActionEconomy actionUsed = ActionEconomy.FreeAction;

            if (!CurrentlyConcentrating(player))
            {
                MagicInitiateSpell spell = DetermineSpellToCast(player.PlayerBase);
                if (spell != MagicInitiateSpell.None)
                {
                    actionUsed = player.CastBuff(spell);
                }
            }

            return(ActionUsedToTurnStateEnumMap[actionUsed]);
        }