Ejemplo n.º 1
0
        //todo list
        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            if (p.isServer)
            {
                List<Minion> temp22 = (own.own) ? p.enemyMinions : p.ownMinions;
                List<Minion> temp23 = new List<Minion>();
                foreach (Minion enemy in temp22)
                {
                    if (enemy.Angr <= 2)
                    {
                        temp23.Add(enemy);
                    }
                }
                Minion choosen = p.getRandomMinionOfThatList(temp23);
                if (choosen != null) p.minionGetDestroyed(choosen);
                return;
            }
            List<Minion> temp2 = (own.own) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
            temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//destroys the weakest
            foreach (Minion enemy in temp2)
            {
                if (enemy.Angr <= 2)
                {
                    p.minionGetDestroyed(enemy);
                    break;
                }
            }

        }
Ejemplo n.º 2
0
        //Destroy 2 random enemy minions. Discard 2 random cards.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            if (p.isServer)
            {
                Minion choosen = p.getRandomMinionFromSide_SERVER(!ownplay, false);
                if (choosen != null) p.minionGetDestroyed(choosen);

                choosen = p.getRandomMinionFromSide_SERVER(!ownplay, false);
                if (choosen != null) p.minionGetDestroyed(choosen);

                p.discardRandomCard_SERVER(ownplay);
                p.discardRandomCard_SERVER(ownplay);
                return;
            }


            Minion choosen2 = p.searchRandomMinion(p.enemyMinions, Playfield.searchmode.searchLowestAttack);
            if (choosen2 != null) p.minionGetDestroyed(choosen2);

            choosen2 = p.searchRandomMinion(p.enemyMinions, Playfield.searchmode.searchLowestAttack);
            if (choosen2 != null) p.minionGetDestroyed(choosen2);

            p.disCardACard(ownplay);
            p.disCardACard(ownplay);
        }
Ejemplo n.º 3
0
		// Destroy all non-Skeleton minions.
		
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
			foreach (Minion m in p.ownMinions)
            {
                if (m.name != CardDB.cardName.skeleton) p.minionGetDestroyed(m);
            }
            foreach (Minion m in p.enemyMinions)
            {
                if (m.name != CardDB.cardName.skeleton) p.minionGetDestroyed(m);
            }
		}
Ejemplo n.º 4
0
        //Destroy all minions with 2 or less Attack.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            foreach (Minion m in p.enemyMinions)
            {
                if (m.Angr < 3) p.minionGetDestroyed(m);
            }
            foreach (Minion m in p.ownMinions)
            {
                if (m.Angr < 3) p.minionGetDestroyed(m);
            }
        }
Ejemplo n.º 5
0
        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if(turnStartOfOwner != triggerEffectMinion.own) return;
            List<Minion> temp = (turnStartOfOwner) ? p.ownMinions : p.enemyMinions;
            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.ownMinions.Count : p.enemyMinions.Count;
                p.callKid(kid, pos, triggerEffectMinion.own,false, true); // we allow to summon one minion more (because 3 are destroyed)
            }
        }
Ejemplo n.º 6
0
        //Vernichtet einen Diener. Stellt bei Eurem Helden #3 Leben wieder her.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            p.minionGetDestroyed(target);
            int heal = (ownplay) ? p.getSpellHeal(3) : p.getEnemySpellHeal(3);

            p.minionGetDamageOrHeal(ownplay ? p.ownHero : p.enemyHero, -heal);
        }
Ejemplo n.º 7
0
 //    If you're holding a Dragon, destroy a Legendary minion.
 //todo: if holding a dragon has to be done in carddb!
 public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
 {
     if (target != null && target.handcard.card.rarity >= 5) //requires legendary target
     {
         p.minionGetDestroyed(target);
     }
 }
Ejemplo n.º 8
0
//    ansturm/. vernichtet diesen diener am ende des zuges.


        public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
        {
            if (turnEndOfOwner == triggerEffectMinion.own)
            {
                p.minionGetDestroyed(triggerEffectMinion);
            }
        }
Ejemplo n.º 9
0
//    vernichtet einen zufälligen feindlichen diener.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            if (p.isServer)
            {
                Minion tempS = p.getRandomMinionFromSide_SERVER(!ownplay, false);
                if (tempS != null) p.minionGetDestroyed(tempS);
                return;
            }

            List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
            temp2.Sort((a, b) => a.Angr.CompareTo(b.Angr));
            foreach (Minion enemy in temp2)
            {
                p.minionGetDestroyed(enemy);
                break;
            }
		}
Ejemplo n.º 10
0
        //  At the end of each turn, destroy this minion if it's your only one. 

        public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
        {
            if (triggerEffectMinion.own)
            {
                if (p.ownMinions.Count == 1)
                {
                    p.minionGetDestroyed(triggerEffectMinion);
                }
            }
            else
            {
                if (p.enemyMinions.Count == 1)
                {
                    p.minionGetDestroyed(triggerEffectMinion);
                }
            }
        }
Ejemplo n.º 11
0
 public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
 {
     if (target != null)
     {
         p.minionGetDestroyed(target);
         p.minionGetBuffed(own, 2, 2);
     }
 } 
Ejemplo n.º 12
0
//    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);
		}
Ejemplo n.º 13
0
        //   Destroy a random enemy minion. Combo: And your opponent's weapon.


        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            if(p.isServer)
            {
                Minion choosen = p.getRandomMinionFromSide_SERVER(!ownplay, false);
                if (choosen != null) p.minionGetDestroyed(choosen);
                if (p.cardsPlayedThisTurn >= 1) p.lowerWeaponDurability(1000, !ownplay);
                return;
            }

            List<Minion> temp = (ownplay)? p.enemyMinions : p.ownMinions;
            if (temp.Count >= 1)
            {
                p.minionGetDestroyed(p.searchRandomMinion(temp, Playfield.searchmode.searchLowestHP));
                
            }
            if (p.cardsPlayedThisTurn >= 1) p.lowerWeaponDurability(1000, !ownplay);
        }
Ejemplo n.º 14
0
//    vernichtet einen befreundeten diener und fügt allen feindlichen dienern schaden zu, der seinem angriff entspricht.
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int damage1 = (ownplay) ? p.getSpellDamageDamage(target.Angr) : p.getEnemySpellDamageDamage(target.Angr);

            p.minionGetDestroyed(target);

            p.allMinionOfASideGetDamage(!ownplay, damage1);

		}
Ejemplo n.º 15
0
//    vernichtet zu beginn eures zuges diesen diener und zieht 3 karten.

        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if (turnStartOfOwner == triggerEffectMinion.own)
            {
                p.minionGetDestroyed(triggerEffectMinion);
                p.drawACard(CardDB.cardIDEnum.None, turnStartOfOwner);
                p.drawACard(CardDB.cardIDEnum.None, turnStartOfOwner);
                p.drawACard(CardDB.cardIDEnum.None, turnStartOfOwner);
            }
        }
Ejemplo n.º 16
0
//    vernichtet einen zufälligen feindlichen diener.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
            temp2.Sort((a, b) => a.Angr.CompareTo(b.Angr));
            foreach (Minion enemy in temp2)
            {
                p.minionGetDestroyed(enemy);
                break;
            }
		}
Ejemplo n.º 17
0
        //   Destroy a random enemy minion. Combo: And your opponent's weapon.


        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            List<Minion> temp = (ownplay)? p.enemyMinions : p.ownMinions;
            if (temp.Count >= 1)
            {
                p.minionGetDestroyed(p.searchRandomMinion(temp, Playfield.searchmode.searchLowestHP));
                
            }
            if (p.cardsPlayedThisTurn >= 1) p.lowerWeaponDurability(1000, !ownplay);
        }
Ejemplo n.º 18
0
//    vernichtet alle diener bis auf einen. (zufällige auswahl)

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{

            if (p.isServer)
            {
                Minion choosen = p.getRandomCharExcept_SERVER(null, false);

                foreach (Minion m in p.ownMinions)
                {
                    if (m == choosen) continue;
                    p.minionGetDestroyed(m);
                }
                foreach (Minion m in p.enemyMinions)
                {
                    if (m == choosen) continue;
                    p.minionGetDestroyed(m);
                }
            }

            p.allMinionsGetDestroyed();
		}
Ejemplo n.º 19
0
		//Battlecry: Destroy a minion. Add its Attack and Health to C'Thun's (wherever it is).
		
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            if(target != null)
			{
                if (own.own)
                {
                    p.anzOgOwnCThunHpBonus += target.Hp;
                    p.anzOgOwnCThunAngrBonus += target.Angr;
                }
				p.minionGetDestroyed(target);
			}
		}
Ejemplo n.º 20
0
        //   Destroy a minion. Add a random minion to your opponent's hand.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {

            if (target != null)
            {
                p.minionGetDestroyed(target);
            }
            if (p.isServer)
            {
                //TODO
                p.drawACard(CardDB.cardIDEnum.None, !ownplay, true);
                return;
            }
            p.drawACard(CardDB.cardIDEnum.None, !ownplay, true);
        }
Ejemplo n.º 21
0
        //todo list
        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {

            List<Minion> temp2 = (own.own) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
            temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//destroys the weakest
            foreach (Minion enemy in temp2)
            {
                if (enemy.Angr <= 2)
                {
                    p.minionGetDestroyed(enemy);
                    break;
                }
            }

        }
Ejemplo n.º 22
0
//    kampfschrei:/ vernichtet die benachbarten diener und verleiht ihm deren angriff und leben.
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            List<Minion> temp = (own.own) ? p.ownMinions : p.enemyMinions;

            int angr = 0;
            int hp = 0;
            foreach (Minion m in temp)
            {
                if (m.zonepos == own.zonepos || m.zonepos == own.zonepos - 1)
                {
                    angr += m.Angr;
                    hp += m.Hp;
                    p.minionGetDestroyed(m);
                }
            }
            p.minionGetBuffed(own, angr, hp);
		}
Ejemplo n.º 23
0
//    kampfschrei:/ vernichtet die benachbarten diener und verleiht ihm deren angriff und leben.
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            List<Minion> temp = (own.own) ? p.ownMinions : p.enemyMinions;

            int angr = 0;
            int hp = 0;
            foreach (Minion m in temp)
            {
                if (m.zonepos == own.zonepos || m.zonepos == own.zonepos - 1)
                {
                    angr += m.Angr;
                    hp += m.Hp;
                    if (m.Ready) p.evaluatePenality += m.Angr;//DIRTY Penalty-fix (cause i dont pass the place to penmanager->getplaycardpen())
                    //otherwise it would be a little bit more stuff to calculate
                    p.minionGetDestroyed(m);
                }
            }
            p.minionGetBuffed(own, angr, hp);
		}
Ejemplo n.º 24
0
        //   choose enemy minion, shuffle it in your deck

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            if (target != null)
            {
                p.minionGetDestroyed(target);
                if (ownplay)
                {
                    p.ownDeckSize++;
                }
                else
                {
                    p.enemyDeckSize++;
                }
            }
            if (p.isServer)
            {
                //TODO
            }
        }
Ejemplo n.º 25
0
//    zwingt einen feindlichen diener, seinen schaden benachbarten dienern zuzufügen.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            //attack right neightbor
            if (target.Angr>0)
            {
                int dmg = target.Angr;
                List<Minion> temp = (ownplay) ? p.enemyMinions : p.ownMinions;
                foreach (Minion m in p.enemyMinions)
                {
                    if (m.zonepos + 1 == target.zonepos || m.zonepos-1 == target.zonepos)
                    {
                        int oldhp = m.Hp;
                        p.minionGetDamageOrHeal(m, dmg);
                        if (!target.silenced && target.handcard.card.name == CardDB.cardName.waterelemental && m.Hp < oldhp) m.frozen=true;
                        if (!target.silenced && m.Hp < oldhp && target.poisonous) p.minionGetDestroyed(m);
                    }
                }

            }

		}
Ejemplo n.º 26
0
//    vernichtet einen diener. euer gegner zieht 2 karten.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            p.minionGetDestroyed(target);
            p.drawACard(CardDB.cardName.unknown, !ownplay);
            p.drawACard(CardDB.cardName.unknown, !ownplay);
		}
Ejemplo n.º 27
0
        //   Battlecry: Destroy a Beast.

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            if (target == null) return;

            p.minionGetDestroyed(target);
        }
Ejemplo n.º 28
0
		//Destroy a Frozen minion.
		
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
			if (target.frozen) p.minionGetDestroyed(target);
        }
Ejemplo n.º 29
0
        //todo secret
//    geheimnis:/ wenn ein diener euren helden angreift, wird er vernichtet.
        public override void onSecretPlay(Playfield p, bool ownplay, Minion target, int number)
        {
            p.minionGetDestroyed(target);
        }
Ejemplo n.º 30
0
        // Battlecry: If you're holding a Dragon, destroy a Legendary minion.

        public override void getBattlecryEffect(Playfield p, Minion m, Minion target, int choice)
        {
            if (target != null) p.minionGetDestroyed(target);
        }