Ejemplo n.º 1
0
 public override bool Apply(Fighter[] targets)
 {
     if (Source is CharacterFighter)
     {
         DoubleFighter fighter = new DoubleFighter((CharacterFighter)Source, Source.Team, CastPoint.CellId);
         Fight.AddSummon(fighter, (CharacterFighter)Source);
         return(true);
     }
     else
     {
         Fight.Reply("An non character fighter try to summon a double...");
         return(false);
     }
 }
Ejemplo n.º 2
0
        public override int ApplyEffect(EffectCast CastInfos)
        {
            // Possibilité de spawn une creature sur la case ?
            if (CastInfos.Caster.Fight.IsCellWalkable(CastInfos.CellId))
            {
                var ActorID   = getNextLowerFighterGuid(CastInfos.Caster.Fight);
                var Character = ClonePerso(((CharacterFighter)CastInfos.Caster).Character, ActorID);

                // Template de monstre existante
                if (Character != null)
                {
                    // Level de monstre existant
                    var Double = new DoubleFighter(CastInfos.Caster.Fight, Character, CastInfos.Caster);
                    Double.Fight.JoinFightTeam(Double, CastInfos.Caster.Team, false, CastInfos.CellId);
                    Double.Fight.RemakeTurns();
                    Double.Fight.SendToFight(new GameInformationCoordinateMessage(Double.Fight.Fighters));
                    Double.Fight.SendToFight(new GameTurnListMessage(Double.Fight.getWorkerFighters()));
                    Double.Fight.GetCell(CastInfos.CellId).GetObjects <FightGroundLayer>().ForEach(x => x.onWalkOnLayer(Double, Double.Fight.GetCell(CastInfos.CellId)));
                }
            }

            return(-1);
        }