예제 #1
0
        public void SpecialSummonMonster(Monster monster, bool faceUp, bool atkPosition)
        {
            var zIndex = MonsterZones.ToList().FindIndex(z => z.Monster == null);

            MonsterZones[zIndex].Monster = monster;
            monster.Location             = CardLocation.MonsterZone;
            if (faceUp)
            {
                if (atkPosition)
                {
                    monster.Position = CardPosition.FaceUpAttack;
                }
                else
                {
                    monster.Position = CardPosition.FaceUpDefense;
                }
            }
            else
            {
                if (atkPosition)
                {
                    monster.Position = CardPosition.FaceDownAttack;
                }
                else
                {
                    monster.Position = CardPosition.FaceDownDefense;
                }
            }
        }
예제 #2
0
        public void SendMonsterToGrave(Monster monster, YugiohGamePlayer player)
        {
            var index = MonsterZones.ToList().FindIndex(z => z.Monster == monster);

            MonsterZones[index] = new MonsterZone();
            player.DiscardPile.Add(monster);
            monster.Location = CardLocation.Graveyard;
        }
예제 #3
0
        public void NormalSet(Monster monster)
        {
            if (HasFreeMonsterZone() == false)
            {
                throw new Exception("No free zones to set to");
            }
            var freeZone = MonsterZones.ToList().FindIndex(z => z.Monster == null);

            MonsterZones[freeZone].Monster = monster;
            monster.Location = CardLocation.MonsterZone;
            monster.Position = CardPosition.FaceDownDefense;
        }