コード例 #1
0
        public override void Execute(Entities.Entity Performer, List <Entities.Entity> Selection, CardGameState GS)
        {
            if (mUniqueEntity)
            {
                bool isUnique = true;
                if (mRange != Range.NA)
                {
                    foreach (Entity E in Performer.Owner.mBoard.RangeZones[(int)mRange].List.Cards)
                    {
                        if (E.Name == mSpawnEntityName)
                        {
                            isUnique = false;
                        }
                    }
                }
                else if (mZoneType == ZoneType.Effect)
                {
                    foreach (Effects.EffectNode EN in Performer.Owner.mEffects.Nodes)
                    {
                        if (EN.UniqueName == mSpawnEntityName)
                        {
                            isUnique = false;
                        }
                    }
                }
                if (!isUnique)
                {
                    return;
                }
            }

            Entities.Entity[] spawnedEnities = new Entities.Entity[mSpawnEntityNumber];
            CardZoneType      zoneToPlace    = new CardZoneType(mZoneType, mRange, Performer.GetOwnerIndex());

            for (int i = 0; i < mSpawnEntityNumber; i++)
            {
                spawnedEnities[i]       = Loading.CardLoading.ProduceCard(mSpawnEntityName, State.StateHolder.StateManager.CardPool);
                spawnedEnities[i].Owner = Performer.Owner;
                spawnedEnities[i].SetIsGeneratedEntity();
                GS.CardPlaced(zoneToPlace, spawnedEnities[i]);
            }
        }
コード例 #2
0
 public override void Execute(Entities.Entity Performer, List <Entities.Entity> Selection, CardGameState GS)
 {
     GS.CardPlaced(PlacedZone, PlacedCard);
 }