public override bool Apply(Fighter[] targets)
        {
            if (targets.Count() > 0)
            {
                short[] cells = new short[targets.Length];

                for (int i = 0; i < targets.Length; i++)
                {
                    targets[i].Stats.CurrentLifePoints = 0;
                    cells[i] = targets[i].CellId;
                }


                this.Source.Fight.CheckDeads();


                foreach (var cell in cells)
                {
                    ControlableMonsterFighter fighter = this.CreateSummon(this.Source as CharacterFighter);
                    this.Fight.AddSummon(fighter, (CharacterFighter)this.Source);

                    return(true);
                }
            }

            return(true);
        }
        public static ControlableMonsterFighter MakeSummonControlable(CharacterFighter source, SummonedFighter target)
        {
            target.Die(source);

            ControlableMonsterFighter fighter = new ControlableMonsterFighter(target.Team, target.Template, target.GradeId, source, target.CellId);

            source.Fight.AddSummon(fighter, source);

            return(fighter);
        }
Exemplo n.º 3
0
        public override bool Apply(Fighter[] targets)
        {
            if (!(Source is CharacterFighter))
            {
                return(false);
            }
            foreach (var target in targets.OfType <SummonedFighter>())
            {
                ControlableMonsterFighter summoned = MakeControlableBuff.MakeSummonControlable((CharacterFighter)Source, target);
                MakeControlableBuff       buff     = new MakeControlableBuff(summoned.BuffIdProvider.Pop(), summoned, Source, SpellLevel, Effect, SpellId, Critical, FightDispellableEnum.REALLY_NOT_DISPELLABLE);
                summoned.AddAndApplyBuff(buff);
            }

            return(true);
        }