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); }
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]); }