コード例 #1
0
ファイル: Sim_EX1_130.cs プロジェクト: shuyi3/AIPJ
        public override void onSecretPlay(Playfield p, bool ownplay, Minion attacker, Minion target, out int number)
        {
            number = 0;
            if (ownplay)
            {
                int posi = p.playerFirst.ownMinions.Count;
                p.callKid(kid, posi, true);
                if (p.playerFirst.ownMinions.Count >= 1)
                {
                    if (p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].name == CardDB.cardName.defender)
                    {
                        number = p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].entitiyID;
                    }
                }
            }
            else
            {
                int posi = p.playerSecond.ownMinions.Count;
                p.callKid(kid, posi, false);

                if (p.playerSecond.ownMinions.Count >= 1)
                {
                    if (p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].name == CardDB.cardName.defender)
                    {
                        number = p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].entitiyID;
                    }
                }
            }

        }
コード例 #2
0
ファイル: Sim_CS2_027.cs プロジェクト: shuyi3/AIPJ
//    ruft zwei diener (0/2) mit spott/ herbei.
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int posi = (ownplay) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
            
            p.callKid(kid, posi, ownplay);
            p.callKid(kid, posi, ownplay);
		}
コード例 #3
0
ファイル: Sim_GvG_110.cs プロジェクト: shuyi3/AIPJ
        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.GVG_110t);//chillwind

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            int pos = (own.own) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
            p.callKid(kid, pos, own.own);
            pos = (own.own) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
            p.callKid(kid, pos, own.own);
        }
コード例 #4
0
ファイル: Sim_GvG_029.cs プロジェクト: shuyi3/AIPJ
        //    Put a random minion from each player's hand into the battlefield.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            Handmanager.Handcard c = null;
            int sum = 10000;
            foreach (Handmanager.Handcard hc in p.playerFirst.owncards)
            {
                if (hc.card.type == CardDB.cardtype.MOB)
                {
                    int s = hc.card.Health + hc.card.Attack + ((hc.card.tank) ? 1 : 0) + ((hc.card.Shield) ? 1 : 0);
                    if (s < sum)
                    {
                        c = hc;
                        sum = s;
                    }
                }
            }
            if (sum < 9999)
            {
                p.callKid(c.card, p.playerFirst.ownMinions.Count, true);
                p.removeCard(c, true);
                p.triggerCardsChanged(true);
            }


            if (p.playerSecond.owncards.Count >= 2)
            {
                p.callKid(c.card, p.playerSecond.ownMinions.Count, false);
                p.removeCard(c, false);
                p.triggerCardsChanged(false);
            }
        }
コード例 #5
0
ファイル: Sim_GvG_045.cs プロジェクト: shuyi3/AIPJ
        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            int dmg = p.getSpellDamageDamage(2, ownplay);
            p.minionGetDamageOrHeal(target, dmg);

            int posi = (ownplay) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
            p.callKid(kid, posi, ownplay);
            posi++;
            p.callKid(kid, posi, ownplay);
        }
コード例 #6
0
ファイル: Sim_FP1_019.cs プロジェクト: shuyi3/AIPJ
//    vernichtet alle diener und ruft für jeden einen treant (2/2) als ersatz herbei.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int ownanz = p.playerFirst.ownMinions.Count;
            int enemanz = p.playerSecond.ownMinions.Count;
            p.allMinionsGetDestroyed();
            for (int i = 0; i < ownanz; i++)
            {
                p.callKid(d, 1, true);
            }
            for (int i = 0; i < enemanz; i++)
            {
                p.callKid(d, 1, false);
            }
		}
コード例 #7
0
ファイル: Sim_EX1_294.cs プロジェクト: shuyi3/AIPJ
        //todo secret
        //    geheimnis:/ wenn euer gegner einen diener ausspielt, beschwört ihr eine kopie desselben herbei.

        public override void onSecretPlay(Playfield p, bool ownplay, Minion target, int number)
        {

            int posi = (ownplay) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
            p.callKid(target.handcard.card, posi, ownplay);
            if (ownplay)
            {
                if (p.playerFirst.ownMinions.Count >= 1 && p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].name == target.handcard.card.name)
                {
                    int e = p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].entitiyID;
                    p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].setMinionTominion(target);
                    p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].entitiyID = e;
                    p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].own = true;
                }
            }
            else
            {
                if (p.playerSecond.ownMinions.Count >= 1 && p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].name == target.handcard.card.name)
                {
                    int e = p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].entitiyID;
                    p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].setMinionTominion(target);
                    p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].entitiyID = e;
                    p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].own = false;
                }
            }
        }
コード例 #8
0
ファイル: Sim_EX1_131.cs プロジェクト: shuyi3/AIPJ
//    combo:/ ruft einen banditen der defias (2/1) herbei.
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            if (p.playerFirst.cardsPlayedThisTurn >= 1)
            {
                p.callKid(card, own.zonepos, own.own);
            }
		}
コード例 #9
0
ファイル: Sim_GvG_111.cs プロジェクト: shuyi3/AIPJ
        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if(turnStartOfOwner != triggerEffectMinion.own) return;
            List<Minion> temp = (turnStartOfOwner) ? p.playerFirst.ownMinions : p.playerSecond.ownMinions;
            int anz =0;
            foreach (Minion m in temp)
            {
                if ((TAG_RACE)m.handcard.card.race == TAG_RACE.MECHANICAL && m.Hp >=1 )
                {
                    anz++;
                }
            }
            if (anz >= 3)
            {
                foreach (Minion m in temp)
                {
                    if ((TAG_RACE)m.handcard.card.race == TAG_RACE.MECHANICAL)
                    {
                        p.minionGetDestroyed(m);
                    }
                }

                int pos = (triggerEffectMinion.own) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
                p.callKid(kid, pos, triggerEffectMinion.own,false, true); // we allow to summon one minion more (because 3 are destroyed)
            }
        }
コード例 #10
0
ファイル: Sim_FP1_015.cs プロジェクト: shuyi3/AIPJ
        //    todesröcheln:/ ruft thaddius herbei, wenn feugen in diesem duell bereits gestorben ist.

        public override void onDeathrattle(Playfield p, Minion m)
        {
            if (p.stalaggDead)
            {
                p.callKid(thaddius, m.zonepos - 1, m.own);
            }
        }
コード例 #11
0
ファイル: Sim_NEW1_026.cs プロジェクト: shuyi3/AIPJ
 public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion)
 {
     if (wasOwnCard == triggerEffectMinion.own && c.type == CardDB.cardtype.SPELL)
     {
         int place = (wasOwnCard)? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
         p.callKid(card, place, wasOwnCard);
     }
 }
コード例 #12
0
ファイル: Sim_EX1_614.cs プロジェクト: shuyi3/AIPJ
        CardDB.Card d = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_614t);//flameofazzinoth
//    beschwört jedes mal eine flamme von azzinoth (2/1), wenn ihr eine karte ausspielt.

        public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (wasOwnCard == triggerEffectMinion.own)
            {
                    p.callKid(d, triggerEffectMinion.zonepos, triggerEffectMinion.own);

            }
        }
コード例 #13
0
ファイル: Sim_FP1_025.cs プロジェクト: shuyi3/AIPJ
//    vernichtet einen diener und bringt ihn dann mit vollem leben wieder auf das schlachtfeld zurück.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            bool own = target.own;
            int place = target.zonepos;
            CardDB.Card d = target.handcard.card;
            p.minionGetDestroyed(target);
            p.callKid(d, place, own);
		}
コード例 #14
0
ファイル: Sim_BRM_017.cs プロジェクト: shuyi3/AIPJ
		// Summon a random friendly minion that died this game.
		
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            if (p.playerFirst.ownMaxMana >= 6)
            {
                int posi = ownplay ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
                CardDB.Card kid = CardDB.Instance.getCardDataFromID((p.playerFirst.ownLastDiedMinion == CardDB.cardIDEnum.None) ? CardDB.cardIDEnum.EX1_345t : p.playerFirst.ownLastDiedMinion); // Shadow of Nothing 0:1 or ownMinion
                p.callKid(kid, posi, ownplay);
            }
		}
コード例 #15
0
ファイル: Sim_NEW1_040.cs プロジェクト: shuyi3/AIPJ
        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.NEW1_040t);//gnoll
//    ruft am ende eures zuges einen gnoll (2/2) mit spott/ herbei.

        public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
        {
            if (triggerEffectMinion.own == turnEndOfOwner)
            {
                int posi = triggerEffectMinion.zonepos;

                p.callKid(kid, posi, triggerEffectMinion.own);
            }
        }
コード例 #16
0
ファイル: Sim_GvG_061.cs プロジェクト: shuyi3/AIPJ
 public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
 {
     for (int i = 0; i < 3; i++)
     {
         int pos = (ownplay) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
         p.callKid(kid, pos, ownplay);
     }
     p.equipWeapon(w, ownplay);
 }
コード例 #17
0
ファイル: Sim_EX1_573.cs プロジェクト: shuyi3/AIPJ
        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_573t); //special treant
//    wählt aus:/ verleiht euren anderen dienern +2/+2; oder ruft zwei treants (2/2) mit spott/ herbei.
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            if (choice == 1)
            {
                List<Minion> temp = (own.own) ? p.playerFirst.ownMinions : p.playerSecond.ownMinions;
                foreach (Minion m in temp)
                {
                    p.minionGetBuffed(m, 2, 2);
                }
            }
            if (choice == 2)
            {

                int pos = (own.own) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
                p.callKid(kid, pos, own.own, true);
                p.callKid(kid, pos, own.own, true);
            }
		}
コード例 #18
0
ファイル: Sim_GvG_012.cs プロジェクト: shuyi3/AIPJ
 public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
 {
     int heal = p.getSpellHeal(3, ownplay);
     p.minionGetDamageOrHeal(target, -heal);
     if (target.Hp < target.maxHp)
     {
         int posi = (ownplay) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
         p.callKid(kid, posi, ownplay);
     }
 }
コード例 #19
0
ファイル: Sim_EX1_562.cs プロジェクト: shuyi3/AIPJ
        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_116t);//whelp

//    kampfschrei:/ ruft welplinge (1/1) herbei, bis eure seite des schlachtfelds voll ist.
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            int kids = 7 - p.playerFirst.ownMinions.Count;
           
            for (int i = 0; i < kids; i++)
            {
                p.callKid(kid, own.zonepos, own.own, true);
            }

		}
コード例 #20
0
ファイル: Sim_FP1_013.cs プロジェクト: shuyi3/AIPJ
//    ruft am ende jedes zuges alle befreundeten diener herbei, die in diesem zug gestorben sind.
        public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
        {
            foreach (GraveYardItem m in p.diedMinions.ToArray()) // toArray() because a knifejuggler could kill a minion due to the summon :D
            {
                if (triggerEffectMinion.own == m.own)
                {
                    CardDB.Card card = CardDB.Instance.getCardDataFromID(m.cardid);
                    p.callKid(card, p.playerFirst.ownMinions.Count, m.own);
                }
            }
        }
コード例 #21
0
ファイル: Sim_EX1_597.cs プロジェクト: shuyi3/AIPJ
        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_598);//imp

        public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
        {
            if (triggerEffectMinion.own == turnEndOfOwner)
            {
                int posi = triggerEffectMinion.zonepos;
                if (triggerEffectMinion.Hp == 1) posi--;
                p.minionGetDamageOrHeal(triggerEffectMinion, 1);
                p.callKid(kid, posi, triggerEffectMinion.own);
                triggerEffectMinion.stealth = false;
            }
        }
コード例 #22
0
ファイル: Sim_BRM_019.cs プロジェクト: shuyi3/AIPJ
		CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.BRM_019);//Grim Patron
		
        public override void onMinionGotDmgTrigger(Playfield p, Minion m, bool ownDmgdmin)
        {
            if (m.anzGotDmg>=1 && m.Hp > 0)
            {
                for (int i = 0; i < m.anzGotDmg; i++)
                {
                    p.callKid(kid, m.zonepos, m.own);
                }
                m.anzGotDmg = 0;
            }
        }
コード例 #23
0
ファイル: Sim_GvG_116.cs プロジェクト: shuyi3/AIPJ
		CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_029);//lepergnome
		
        public override void onMinionDiedTrigger(Playfield p, Minion m, Minion diedMinion)
        {
			int diedMinions = (m.own) ? p.tempTrigger.enemyMinionsDied : p.tempTrigger.ownMinionsDied;
			if (diedMinions >= 1)
			{
				for (int i = 0; i < diedMinions; i++)
				{
					int pos = (m.own) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
					p.callKid(kid, pos, m.own);
				}
            }
        }
コード例 #24
0
ファイル: Sim_CS2_049.cs プロジェクト: shuyi3/AIPJ
 CardDB.Card kid2 = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.CS2_052);//
 //    heldenfähigkeit/\nruft einen rekruten der silbernen hand (1/1) herbei.
 public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
 {
     int posi = (ownplay) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
     bool spawnspellpower = true;
     foreach (Minion m in (ownplay) ? p.playerFirst.ownMinions : p.playerSecond.ownMinions)
     {
         if (m.handcard.card.cardIDenum == CardDB.cardIDEnum.CS2_052)
         {
             spawnspellpower = false;
             break;
         }
     }
     p.callKid((spawnspellpower) ? kid2 : kid, posi, ownplay);
 }
コード例 #25
0
ファイル: Sim_FP1_003.cs プロジェクト: shuyi3/AIPJ
//    kampfschrei:/ beschwört am ende des zuges eine exakte kopie dieses dieners.
        public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
        {
            if (triggerEffectMinion.playedThisTurn && triggerEffectMinion.own == turnEndOfOwner)
            {
                p.callKid(triggerEffectMinion.handcard.card, triggerEffectMinion.zonepos, turnEndOfOwner);
                List<Minion> temp = (turnEndOfOwner) ? p.playerFirst.ownMinions : p.playerSecond.ownMinions;
                foreach (Minion mnn in temp)
                {
                    if (mnn.name == CardDB.cardName.echoingooze && triggerEffectMinion.entitiyID != mnn.entitiyID)
                    {
                        mnn.setMinionTominion(triggerEffectMinion);
                        break;
                    }
                }
            }
        }
コード例 #26
0
ファイル: Sim_EX1_160.cs プロジェクト: shuyi3/AIPJ
        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_160t);//panther

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            if (choice == 1)
            {
                List<Minion> temp = (ownplay) ? p.playerFirst.ownMinions : p.playerSecond.ownMinions;
                foreach (Minion m in temp)
                {
                    p.minionGetBuffed(m, 1, 1);
                }
            }
            if (choice == 2)
            {
                int posi = (ownplay) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
                p.callKid(kid, posi, true);
                
            }
		}
コード例 #27
0
ファイル: Sim_GvG_041.cs プロジェクト: shuyi3/AIPJ
 public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
 {
     if (choice == 1)
     {
         for (int i = 0; i < 5; i++)
         {
             int posi = (ownplay) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
             p.callKid(kid, posi, ownplay);
         }
     }
     if (choice == 2)
     {
         if (target != null)
         {
             p.minionGetBuffed(target, 5, 5);
             target.taunt = true;
         }
     }
 }
コード例 #28
0
ファイル: Sim_EX1_136.cs プロジェクト: shuyi3/AIPJ
        //todo secret
        //    geheimnis:/ wenn einer eurer diener stirbt, wird er mit 1 leben wiederbelebt.

        public override void onSecretPlay(Playfield p, bool ownplay, int number)
        {
            int posi = ownplay ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;

            CardDB.Card kid = CardDB.Instance.getCardDataFromID(ownplay ? p.playerFirst.revivingOwnMinion : p.playerSecond.revivingOwnMinion);

            p.callKid(kid, posi, ownplay);
            if (ownplay)
            {
                if (p.playerFirst.ownMinions.Count >= 1)
                {
                    if (p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].handcard.card.cardIDenum == kid.cardIDenum)
                    {
                        p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].Hp = 1;
                        p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].wounded = false;
                        if (p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].Hp < p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].maxHp)
                        {
                            p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].wounded = true;
                        }
                    }
                }
            }
            else
            {
                if (p.playerSecond.ownMinions.Count >= 1)
                {
                    if (p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].handcard.card.cardIDenum == kid.cardIDenum)
                    {
                        p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].Hp = 1;
                        p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].wounded = false;
                        if (p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].Hp < p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].maxHp)
                        {
                            p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].wounded = true;
                        }
                    }
                }
            }

        }
コード例 #29
0
ファイル: Sim_EX1_554.cs プロジェクト: shuyi3/AIPJ
        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_554t);//snake

        public override void onSecretPlay(Playfield p, bool ownplay, int number)
        {
            if (ownplay)
            {
                int posi = p.playerFirst.ownMinions.Count;
                p.callKid(kid, posi, true);
                p.callKid(kid, posi, true);
                p.callKid(kid, posi, true);
            }
            else
            {
                int posi = p.playerSecond.ownMinions.Count;
                p.callKid(kid, posi, false);
                p.callKid(kid, posi, false);
                p.callKid(kid, posi, false);
            }
        }
コード例 #30
0
ファイル: Sim_EX1_320.cs プロジェクト: shuyi3/AIPJ
        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.CS2_059);//bloodimp
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{


            int dmg = p.getSpellDamageDamage(2, ownplay);

            bool summondemon = false;

            if (!target.isHero && dmg >= target.Hp && !target.divineshild && !target.immune)
            {
                summondemon = true;
            }

            p.minionGetDamageOrHeal(target, dmg);

            if (summondemon)
            {
                int posi = (ownplay) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
                
                p.callKid(kid, posi, ownplay);
            }

		}