Example #1
0
        void OnTurnStopped(IFight fight, FightActor fighter)
        {
            if (!(fighter is CharacterFighter))
            {
                return;
            }

            var spell = fighter.GetSpell(m_spell);

            if (spell == null)
            {
                return;
            }

            if (fighter.SpellHistory.GetEntries(x => x.CastRound == fight.TimeLine.RoundNumber && x.Spell.SpellId == m_spell).Any())
            {
                return;
            }

            if (fighter.SpellHistory.CanCastSpell(spell.CurrentSpellLevel))
            {
                UpdateStatus(ChallengeStatusEnum.FAILED, fighter);
            }
        }