Exemple #1
0
        private void OnTurnStarted(IFight fight, FightActor player)
        {
            if (player != Fighter)
            {
                return;
            }

            if (!(Fighter is SummonedMonster))
            {
                return;
            }

            var barrel = (SummonedMonster)Fighter;

            var spellBeuverie = barrel.Spells.FirstOrDefault(x => x.Value.Template.Id == (int)SpellIdEnum.BEUVERIE).Value;

            if (spellBeuverie == null)
            {
                return;
            }

            if (player.IsCarried())
            {
                return;
            }

            if (!barrel.Summoner.HasState((int)SpellStatesEnum.SAOUL_1) ||
                !barrel.Summoner.Position.Point.IsOnSameLine(barrel.Position.Point))
            {
                return;
            }

            var beuverieHandler = SpellManager.Instance.GetSpellCastHandler(Fighter, spellBeuverie, barrel.Summoner.Cell, false);

            using (Fighter.Fight.StartSequence(SequenceTypeEnum.SEQUENCE_SPELL))
                beuverieHandler.Execute();
        }
Exemple #2
0
 public override bool IsTargetValid(FightActor actor, SpellEffectHandler handler) => actor.IsCarried();