Example #1
0
//    erhaltet jedes mal einen „feuerball“-zauber auf eure hand, wenn ihr einen zauber wirkt.

        public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion, Minion target, int choice)
        {
            if (wasOwnCard == triggerEffectMinion.own && c.type == CardDB.cardtype.SPELL)
            {
                p.drawACard(CardDB.cardIDEnum.CS2_029, wasOwnCard, true);
            }
        }
Example #2
0
//    verursacht $4 schaden. werft eine zufällige karte ab.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int dmg = (ownplay) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);
            p.minionGetDamageOrHeal(target, dmg);

            if (p.isServer)
            {
                p.discardRandomCard_SERVER(ownplay);
                return;
            }

            if (ownplay)
            {
                p.owncarddraw -= Math.Min(1, p.owncards.Count);
                p.owncards.RemoveRange(0, Math.Min(1, p.owncards.Count));
                p.triggerCardsChanged(true);
            }
            else
            {
                if (p.enemyAnzCards >= 1)
                {
                    p.enemycarddraw--;
                    p.enemyAnzCards--;
                    p.triggerCardsChanged(false);
                }
            }
		}
Example #3
0
//    fügt einem diener $3 schaden zu.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            int damage = 0;
            damage = (ownplay) ? p.getSpellDamageDamage(3) : p.getEnemySpellDamageDamage(3);

            p.minionGetDamageOrHeal(target, damage);
        }
Example #4
0
        // Battlecry: Deal 4 damage to a random enemy minion.  

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            if (p.isServer)
            {
                Minion choosen = p.getRandomMinionFromSide_SERVER(!own.own, false);
                if (choosen != null) p.minionGetDamageOrHeal(choosen, 4);
                return;
            }

            List<Minion> temp = (own.own) ? p.enemyMinions : p.ownMinions;
            int times = 4;

            if (temp.Count >= 1)
            {
                //search Minion with lowest hp
                Minion enemy = temp[0];
                int minhp = 10000;
                foreach (Minion m in temp)
                {
                    if (m.Hp >= times + 1 && minhp > m.Hp)
                    {
                        enemy = m;
                        minhp = m.Hp;
                    }
                }

                p.minionGetDamageOrHeal(enemy, times);

            } 
        }
Example #5
0
//    verleiht euren dienern bis zu eurem nächsten zug verstohlenheit/.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            if (ownplay)
            {
                foreach (Minion m in p.ownMinions)
                {
                    if (!m.stealth)
                    {
                        m.stealth = true;
                        m.concedal = true;
                    }
                }
            }
            else
            {
                foreach (Minion m in p.enemyMinions)
                {
                    if (!m.stealth)
                    {
                        m.stealth = true;
                        m.concedal = true;
                    }
                }
            }
		}
Example #6
0
//    wenn ein spieler einen zauber wirkt, erhält der andere spieler eine kopie desselben auf seine hand.

        public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (c.type == CardDB.cardtype.SPELL)
            {
                p.drawACard(c.cardIDenum, !wasOwnCard, true);
            }
        }
Example #7
0
 public Minion(Minion m)
 {
     this.id = m.id;
     this.Posix = m.Posix;
     this.Posiy = m.Posiy;
     this.Hp = m.Hp;
     this.maxHp = m.maxHp;
     this.Angr = m.Angr;
     this.Ready = m.Ready;
     this.taunt = m.taunt;
     this.wounded = m.wounded;
     this.name = m.name;
     this.handcard = m.handcard;
     this.divineshild = m.divineshild;
     this.windfury = m.windfury;
     this.frozen = m.frozen;
     this.zonepos = m.zonepos;
     this.stealth = m.stealth;
     this.immune = m.immune;
     this.exhausted = m.exhausted;
     this.numAttacksThisTurn = m.numAttacksThisTurn;
     this.playedThisTurn = m.playedThisTurn;
     this.charge = m.charge;
     this.poisonous = m.poisonous;
     this.silenced = m.silenced;
     this.entitiyID = m.entitiyID;
     this.enchantments= new List<Enchantment>(m.enchantments);
     this.cantLowerHPbelowONE = m.cantLowerHPbelowONE;
 }
Example #8
0
        //Battlecry: Give all minions in your hand and deck +1/+1.

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            if (p.isServer)
            {
                if (own.own)
                {
                    foreach (Handmanager.Handcard hc in p.owncards)
                    {
                        if (hc.card.type == CardDB.cardtype.MOB)
                        {
                            hc.addattack++;
                            hc.addHp++;
                        }
                    }

                    foreach (Handmanager.Handcard hc in p.myDeck)
                    {
                        if (hc.card.type == CardDB.cardtype.MOB)
                        {
                            hc.addattack++;
                            hc.addHp++;
                        }
                    }
                }
                else
                {
                    foreach (Handmanager.Handcard hc in p.EnemyCards)
                    {
                        if (hc.card.type == CardDB.cardtype.MOB)
                        {
                            hc.addattack++;
                            hc.addHp++;
                        }
                    }

                    foreach (Handmanager.Handcard hc in p.enemyDeck)
                    {
                        if (hc.card.type == CardDB.cardtype.MOB)
                        {
                            hc.addattack++;
                            hc.addHp++;
                        }
                    }
                }
                return;
            }

            if (own.own)
            {
                foreach (Handmanager.Handcard hc in p.owncards)
                {
                    if (hc.card.type == CardDB.cardtype.MOB)
                    {
                        hc.addattack++;
                        hc.addHp++;
                    }
                }
            }

        }
Example #9
0
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            if (ownplay)
            {
                if (p.ownHeroAblility.card.cardIDenum == CardDB.cardIDEnum.CS1h_001) // lesser heal becomes mind spike
                {
                    p.ownHeroAblility.card = mindspike;
                    p.ownAbilityReady = true;
                }
                else
                {
                    p.ownHeroAblility.card = shatter;  // mindspike becomes mind shatter
                    p.ownAbilityReady = true;
                }
            }
            else
            {
                if (p.enemyHeroAblility.card.cardIDenum == CardDB.cardIDEnum.CS1h_001) // lesser heal becomes mind spike
                {
                    p.enemyHeroAblility.card = mindspike;
                }
                else
                {
                    p.enemyHeroAblility.card = shatter;  // mindspike becomes mind shatter
                }
            }
		}
Example #10
0
 public override void onAuraEnds(Playfield p, Minion own)
 {
     if (own.own)
     {
         p.anzOwnHorsemen--;
         if (p.anzOwnHorsemen < 1)
         {
             p.ownHero.immune = false;
             if (p.ownWeaponCard.name == CardDB.cardName.runeblade)
             {
                 int bonus = (p.ownWeaponCard.cardIDenum == CardDB.cardIDEnum.NAX9_05H) ? 6 : 3;
                 p.minionGetBuffed(p.ownHero, bonus, 0);
                 p.ownWeaponAttack += bonus;
             }
         }
     }
     else
     {
         p.anzEnemyHorsemen--;
         if (p.anzEnemyHorsemen < 1)
         {
             p.enemyHero.immune = false;
             if (p.enemyWeaponCard.name == CardDB.cardName.runeblade)
             {
                 int bonus = (p.enemyWeaponCard.cardIDenum == CardDB.cardIDEnum.NAX9_05H) ? 6 : 3;
                 p.minionGetBuffed(p.enemyHero, bonus, 0);
                 p.enemyWeaponAttack += bonus;
             }
         }
     }
 }
Example #11
0
        //Battlecry: Restore 4 Health to each hero

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
           
            int heal2 = (own.own) ? p.getMinionHeal(4) : p.getEnemyMinionHeal(4);
            p.minionGetDamageOrHeal(own.own ? p.ownHero : p.enemyHero, -heal2);
            p.minionGetDamageOrHeal(own.own ? p.enemyHero : p.ownHero, -heal2);
        }
Example #12
0
        //todo: what happens if the target is damaged?
       //Battlecry: Swap Health with another minion.

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

            int volMHp = own.maxHp;
            int tarMHp = target.maxHp;


            target.maxHp = volMHp;
            if (tarMHp < volMHp)//minion has lower maxHp as his card -> heal his hp
            {
                target.Hp += volMHp - tarMHp; //heal minion
            }
            if (target.Hp > target.maxHp) 
            {
                target.Hp = target.maxHp;
            }

            own.maxHp = tarMHp;
            if (volMHp < tarMHp)//minion has lower maxHp as his card -> heal his hp
            {
                own.Hp += tarMHp - volMHp; //heal minion
            }
            if (own.Hp > own.maxHp)
            {
                own.Hp = own.maxHp;
            }



        }
Example #13
0
        // Your hero is Immune.

        public override void onAuraStarts(Playfield p, Minion own)
        {
            if (own.own)
            {
                p.ownHero.immune = true;
                if (p.ownWeaponCard.name == CardDB.cardName.runeblade && p.anzOwnHorsemen < 1)
                {
                    int bonus = (p.ownWeaponCard.cardIDenum == CardDB.cardIDEnum.NAX9_05H) ? 6 : 3;
                    p.minionGetBuffed(p.ownHero, -1 * Math.Min(bonus, p.ownWeaponAttack - 1), 0);
                    p.ownWeaponAttack = Math.Min(1, p.ownWeaponAttack - bonus);
                }
                p.anzOwnHorsemen++;
            }
            else
            {
                p.enemyHero.immune = true;
                if (p.enemyWeaponCard.name == CardDB.cardName.runeblade && p.anzEnemyHorsemen < 1)
                {
                    int bonus = (p.enemyWeaponCard.cardIDenum == CardDB.cardIDEnum.NAX9_05H) ? 6 : 3;
                    p.minionGetBuffed(p.enemyHero, -1 * Math.Min(bonus, p.enemyWeaponAttack - 1), 0);
                    p.enemyWeaponAttack = Math.Min(1, p.enemyWeaponAttack - bonus);
                }
                p.anzEnemyHorsemen++;
            }
        }
Example #14
0
        public override void onSecretPlay(Playfield p, bool ownplay, Minion attacker, Minion target, out int number)
        {
            number = 0;
            if (ownplay)
            {
                int posi = p.ownMinions.Count;
                p.callKid(kid, posi, true);
                if (p.ownMinions.Count >= 1)
                {
                    if (p.ownMinions[p.ownMinions.Count - 1].name == CardDB.cardName.spellbender)
                    {
                        number = p.ownMinions[p.ownMinions.Count - 1].entityID;
                    }
                }
            }
            else
            {
                int posi = p.enemyMinions.Count;
                p.callKid(kid, posi, false);

                if (p.enemyMinions.Count >= 1)
                {
                    if (p.enemyMinions[p.enemyMinions.Count - 1].name == CardDB.cardName.spellbender)
                    {
                        number = p.enemyMinions[p.enemyMinions.Count - 1].entityID;
                    }
                }
            }

        }
Example #15
0
//    zieht am ende eures zuges eine karte.
        public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
        {
            if (turnEndOfOwner == triggerEffectMinion.own)
            {
                p.drawACard(CardDB.cardName.unknown, turnEndOfOwner);
            }
        }
Example #16
0
        //Battlecry: Give a friendly Beast Immune this turn.

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            if (target != null && target.handcard.card.race == TAG_RACE.PET)
            {
                target.immune = true;
            }
        }
Example #17
0
		public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
		{
            int pen = 0;
            foreach(Handmanager.Handcard hcc in p.owncards)
            {
                if (hcc.getManaCost(p) == 2 && hcc.card.type == CardDB.cardtype.MOB && hcc.card.type != CardDB.cardtype.HEROPWR && hcc.card.name != CardDB.cardName.ironbeakowl) pen += 2;
                //if (p.manaTurnEnd >= hcc.getManaCost(p)) pen -= 2;
            }
            bool ablilityready = false;
            foreach(Minion mnn in p.ownMinions)
            {
                if (mnn.name == CardDB.cardName.knifejuggler && p.ownHeroAblility.card.getManaCost(p, 2) <= p.manaTurnEnd) ablilityready = true;
            }
            bool targetready = false;
            foreach (Minion mnn in p.ownMinions)
            {
                if (mnn.name != CardDB.cardName.grimpatron && mnn.Hp == 1) targetready = true;
            }

            if (ablilityready && targetready) pen = 0;

            foreach (Minion mnn in p.enemyMinions)
            {
                if (mnn.Angr >= 2 && mnn.Hp == 1 && p.ownMaxMana <= 2 && p.enemyHeroName != HeroEnum.druid && p.enemyHeroName != HeroEnum.thief && p.enemyHeroName != HeroEnum.mage) return -5;
            }

			return pen;
		}
Example #18
0
        //Battlecry: The next time you use your Hero Power, it costs (2) less.

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {

            if (own.own) p.anzOwnFencingCoach++;
            else p.anzEnemyFencingCoach++;

        }
Example #19
0
//    wählt einen feindlichen diener aus. vernichtet ihn zu beginn eures zuges.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            //if ownplay == true -> destroyOnOwnturnstart =true   else  destroyonenemyturnstart
            target.destroyOnOwnTurnStart = target.destroyOnOwnTurnStart || ownplay;
            target.destroyOnEnemyTurnStart = target.destroyOnEnemyTurnStart || !ownplay;
            
		}
Example #20
0
        //todo make it better
//    todesröcheln:/ übernehmt die kontrolle über einen zufälligen feindlichen diener.
        public override void onDeathrattle(Playfield p, Minion m)
        {
            if (p.isServer)
            {
                Minion choosen = p.getRandomMinionFromSide_SERVER(!m.own, false);
                if (choosen != null) p.minionGetControlled(choosen, m.own, false);
                return;
            }

                List<Minion> tmp = (m.own) ? p.enemyMinions : p.ownMinions;
                if (tmp.Count >= 1)
                {
                    Minion target = null;
                    int value = 10000;
                    bool found = false;

                    //search smallest minion:
                    foreach (Minion mnn in tmp)
                    {
                        if (mnn.Hp < value && mnn.Hp >= 1)
                        {
                            target = mnn;
                            value = target.Hp;
                            found = true;
                        }
                    }
                    if (found) p.minionGetControlled(target, m.own, false);
                }

            
        }
Example #21
0
        // <deDE>Stellt zu Beginn Eures Zuges bei einem verletzten befreundeten Charakter 3 Leben wieder her.</deDE>
        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if (turnStartOfOwner == triggerEffectMinion.own)
            {
                int heal = (turnStartOfOwner) ? p.getMinionHeal(3) : p.getEnemyMinionHeal(3);
                List<Minion> temp = (turnStartOfOwner) ? p.ownMinions : p.enemyMinions;
                if (temp.Count >= 1)
                {
                    bool healed = false;
                    foreach (Minion mins in temp)
                    {
                        if (mins.wounded)
                        {
                            p.minionGetDamageOrHeal(mins, -heal);
                            healed = true;
                            break;
                        }
                    }

                    if (!healed)
                    {
                        if (turnStartOfOwner) p.minionGetDamageOrHeal(p.ownHero, -heal);
                        else p.minionGetDamageOrHeal(p.enemyHero, -heal);
                    }
                }
                else
                {
                    if (turnStartOfOwner) p.minionGetDamageOrHeal(p.ownHero, -heal);
                    else p.minionGetDamageOrHeal(p.enemyHero, -heal);
                }

            }
        }
Example #22
0
//    fügt einem feindlichen charakter $1 schaden zu und friert/ ihn ein.
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int dmg = (ownplay) ? p.getSpellDamageDamage(1) : p.getEnemySpellDamageDamage(1);
            target.frozen = true;
            p.minionGetDamageOrHeal(target, dmg);
            
		}
Example #23
0
        public override void onMinionIsSummoned(Playfield p, Minion triggerEffectMinion, Minion summonedMinion)
        {
            if ((TAG_RACE)summonedMinion.handcard.card.race == TAG_RACE.MECHANICAL)
            {
                List<Minion> temp = (triggerEffectMinion.own) ? p.ownMinions : p.enemyMinions;

                foreach (Minion m in temp)
                {
                    //if we have allready a mechanical, we are buffed
                    if ((TAG_RACE)m.handcard.card.race == TAG_RACE.MECHANICAL) return; 
                }

                //we had no mechanical, but now!
                if (triggerEffectMinion.own)
                {
                    p.ownWeaponAttack += 2;
                    p.minionGetBuffed(p.ownHero, 2, 0);
                }
                else
                {
                    p.enemyWeaponAttack += 2;
                    p.minionGetBuffed(p.enemyHero, 2, 0);
                }
            }
        }
Example #24
0
//    kampfschrei:/ fügt einem diener 1 schaden zu und verleiht ihm +2 angriff.
		public override int getPlayPenalty(Playfield p, Minion m, Minion target, int choice, bool isLethal)
		{
            if (target.own)
            {
                if (m.Hp == 1) return 50;
                if (!m.Ready)
                {
                    return 50;
                }
            }
            else
            {
                if (m.handcard.card.type == CardDB.cardtype.MOB && p.ownMinions.Count == 0) return 0;
                //allow it if you have biggamehunter
                foreach (Handmanager.Handcard hc in p.owncards)
                {
                    if (hc.card.name == CardDB.cardName.biggamehunter || hc.card.name == CardDB.cardName.shadowworddeath) return 0;
                }

                if (m.Hp == 1)
                {
                    return 0;
                }

                if (!m.wounded && (m.Angr >= 4 || m.Hp >= 5))
                {
                    foreach (Handmanager.Handcard hc in p.owncards)
                    {
                        if (hc.card.name == CardDB.cardName.execute) return 0;
                    }
                }
                return base.getValueOfMinion(4,5);
            }
            return 0;
		}
Example #25
0
        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            p.equipWeapon(w, ownplay);

            List<Minion> temp = (ownplay) ? p.ownMinions : p.enemyMinions;
            bool hasmech = false;
            foreach (Minion m in temp)
            {
                //if we have allready a mechanical, we are buffed
                if ((TAG_RACE)m.handcard.card.race == TAG_RACE.MECHANICAL) hasmech=true;
            }
            if (hasmech)
            {
                if (ownplay)
                {
                    p.ownWeaponAttack += 2;
                    p.minionGetBuffed(p.ownHero, 2, 0);
                }
                else
                {
                    p.enemyWeaponAttack += 2;
                    p.minionGetBuffed(p.enemyHero, 2, 0);
                }
            }


        }
Example #26
0
		// Hero PowerDeal 8 damage to a random enemy.
		
        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            int dmg = 8;
            if (ownplay)
            {
                if (p.doublepriest >= 1) dmg *= (2 * p.doublepriest);
				if (p.enemyMinions.Count > 0)
				{
					target = p.searchRandomMinion(p.enemyMinions, Playfield.searchmode.searchLowestHP); //damage the lowest (pessimistic variant)
				}
				else
				{
					target = p.enemyHero;
				}
            }
            else
            {
                if (p.enemydoublepriest >= 1) dmg *= (2 * p.enemydoublepriest);
				if (p.ownMinions.Count > 0)
				{
					target = p.searchRandomMinion(p.ownMinions, Playfield.searchmode.searchHighestAttack); //damage the Highest (pessimistic variant)
				}
				else
				{
					target = p.ownHero;
				}
            }			
            p.minionGetDamageOrHeal(target, dmg);
        }
        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.CS2_101t);//silverhandrecruit

        //    Summon two 1/1 Recruits.
        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            int posi = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count;

            p.callKid(kid, posi, ownplay);
            p.callKid(kid, posi, ownplay);
        }
Example #28
0
		public override void onMinionDiedTrigger(Playfield p, Minion m, Minion diedMinion)
        {
			int diedMinions = (m.own)? p.tempTrigger.ownMechanicDied : p.tempTrigger.enemyMechanicDied;
            if (diedMinions >= 1)
			{
				List<Minion> temp = (m.own) ? p.ownMinions : p.enemyMinions;
				bool hasmechanics = false;
                foreach (Minion mTmp in temp) //check if we have more mechanics, or debuff him
                {
                    if (mTmp.Hp >=1 && (TAG_RACE)mTmp.handcard.card.race == TAG_RACE.MECHANICAL) hasmechanics = true;
                }
				
                if (!hasmechanics)
                {
					if(m.own)
					{
						p.ownWeaponAttack -= 2;
						p.minionGetBuffed(p.ownHero, -2, 0);
					}
					else
					{
                        p.enemyWeaponAttack -= 2;
                        p.minionGetBuffed(p.enemyHero, -2, 0);
					}
                }
            }
        }
Example #29
0
 // erhält jedes Mal +1/+1, wenn Ihr eine Karte mit uberladung&lt; ausspielt.
 public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion, Minion target, int choice)
 {
     if (wasOwnCard == triggerEffectMinion.own && c.Recall)
     {
         p.minionGetBuffed(triggerEffectMinion, 1, 1);
     }
 }
Example #30
0
//    verursacht $5 schaden. zieht eine karte.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int dmg = (ownplay) ? p.getSpellDamageDamage(5) : p.getEnemySpellDamageDamage(5);
            p.minionGetDamageOrHeal(target, dmg);
            //this.owncarddraw++;
            p.drawACard(CardDB.cardName.unknown, ownplay);
		}
Example #31
0
        //Can't be targeted by spells or Hero Powers.

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            own.cantBeTargetedBySpellsOrHeroPowers = true;
        }
Example #32
0
 public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
 {
     p.drawACard(CardDB.cardName.unknown, ownplay, true);
 }
Example #33
0
 //    kampfschrei:/ fügt eurer hand einen zufälligen piraten aus eurem deck hinzu.
 public override int getPlayPenalty(Playfield p, Minion m, Minion target, int choice, bool isLethal)
 {
     return(0);
 }
Example #34
0
 public override void onDeathrattle(Playfield p, Minion m)
 {
     p.CallKid(kid, m.zonepos - 1, m.own);
 }
Example #35
0
 public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
 {
     return(0);
 }
Example #36
0
//    +4 leben und spott/.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            p.minionGetBuffed(target, 0, 4);
            target.taunt = true;
        }
Example #37
0
        //   Deathrattle: Add a Spare Part card to your hand.

        public override void onDeathrattle(Playfield p, Minion m)
        {
            p.drawACard(CardDB.cardIDEnum.PART_001, m.own, true);
        }
Example #38
0
        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.AT_019); //captain greenskin

        public override void onDeathrattle(Playfield p, Minion m)
        {
            int pos = (m.own) ? p.ownMinions.Count : p.enemyMinions.Count;

            p.callKid(kid, pos, m.own);
        }
Example #39
0
        //    fügt einem zufälligen feind 1 schaden zu, nachdem ihr einen diener herbeigerufen habt.
        public override void onMinionWasSummoned(Playfield p, Minion triggerEffectMinion, Minion summonedMinion)
        {
            if (triggerEffectMinion.entitiyID != summonedMinion.entitiyID && triggerEffectMinion.own == summonedMinion.own)
            {
                var temp = triggerEffectMinion.own ? p.enemyMinions : p.ownMinions;

                if (temp.Count >= 1)
                {
                    //search Minion with lowest hp
                    var enemy = temp[0];
                    var minhp = 10000;
                    var found = false;
                    foreach (var m in temp)
                    {
                        if (m.name == CardIds.Collectible.Neutral.NerubianEgg && m.Hp >= 2)
                        {
                            continue; //dont attack nerubianegg!
                        }

                        if (m.handcard.card.IsToken && m.Hp == 1)
                        {
                            continue;
                        }

                        if (m.name == CardIds.NonCollectible.Paladin.NobleSacrifice_Defender)
                        {
                            continue;
                        }

                        if (m.name == CardIds.Collectible.Mage.Spellbender)
                        {
                            continue;
                        }

                        if (m.Hp >= 2 && minhp > m.Hp)
                        {
                            enemy = m;
                            minhp = m.Hp;
                            found = true;
                        }
                    }

                    if (found)
                    {
                        p.minionGetDamageOrHeal(enemy, 1);
                    }
                    else
                    {
                        p.minionGetDamageOrHeal(triggerEffectMinion.own ? p.enemyHero : p.ownHero, 1);
                    }
                }
                else
                {
                    p.minionGetDamageOrHeal(triggerEffectMinion.own ? p.enemyHero : p.ownHero, 1);
                }

                triggerEffectMinion.stealth = false;
            }
        }
Example #40
0
 public override void onAMinionGotHealedTrigger(Playfield p, Minion triggerEffectMinion, bool ownerOfMinionGotHealed)
 {
     p.anzOgOwnCThunHpBonus++;
     p.anzOgOwnCThunAngrBonus++;
 }
Example #41
0
        //Battlecry: Reveal a minion in each deck. If yours costs more, gain +1/+1.


        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            //we assume we get the buff!
            p.minionGetBuffed(own, 1, 1);
        }
        //Deal 2 damage.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            int dmg = (ownplay) ? p.getSpellDamageDamage(2) : p.getEnemySpellDamageDamage(2);

            p.minionGetDamageOrHeal(target, dmg);
        }
Example #43
0
        public Action(string s, Playfield p)
        {
            if (s.StartsWith("play "))
            {
                this.actionType = actionEnum.playcard;

                int cardEnt   = Convert.ToInt32(s.Split(new string[] { "id " }, StringSplitOptions.RemoveEmptyEntries)[1].Split(' ')[0]);
                int targetEnt = -1;
                if (s.Contains("target "))
                {
                    targetEnt = Convert.ToInt32(s.Split(new string[] { "target " }, StringSplitOptions.RemoveEmptyEntries)[1].Split(' ')[0]);
                }
                int place = 0;
                if (s.Contains("pos "))
                {
                    place = Convert.ToInt32(s.Split(new string[] { "pos " }, StringSplitOptions.RemoveEmptyEntries)[1].Split(' ')[0]);
                }
                int choice = 0;
                if (s.Contains("choice "))
                {
                    choice = Convert.ToInt32(s.Split(new string[] { "choice " }, StringSplitOptions.RemoveEmptyEntries)[1].Split(' ')[0]);
                }

                this.own = null;

                this.card = new Handmanager.Handcard {
                    entity = cardEnt
                };

                if (targetEnt >= 0)
                {
                    Minion m = new Minion {
                        entityID = targetEnt
                    };
                    this.target = m;
                }
                else
                {
                    this.target = null;
                }

                this.place       = place;
                this.druidchoice = choice;
            }

            if (s.StartsWith("attack "))
            {
                this.actionType = actionEnum.attackWithMinion;

                int ownEnt    = Convert.ToInt32(s.Split(' ')[1].Split(' ')[0]);
                int targetEnt = Convert.ToInt32(s.Split(' ')[3].Split(' ')[0]);

                this.place       = 0;
                this.druidchoice = 0;

                this.card = null;

                Minion m = new Minion {
                    entityID = targetEnt
                };
                this.target = m;

                Minion o = new Minion {
                    entityID = ownEnt
                };
                this.own = o;
            }

            if (s.StartsWith("heroattack "))
            {
                this.actionType = actionEnum.attackWithHero;

                int targetEnt = Convert.ToInt32(s.Split(' ')[1].Split(' ')[0]);

                this.place       = 0;
                this.druidchoice = 0;

                this.card = null;

                Minion m = new Minion {
                    entityID = targetEnt
                };
                this.target = m;

                this.own = p.ownHero;
            }

            if (s.StartsWith("useability on target "))
            {
                this.actionType = actionEnum.useHeroPower;

                int targetEnt = Convert.ToInt32(s.Split(' ')[3].Split(' ')[0]);

                this.place       = 0;
                this.druidchoice = 0;

                this.card = null;

                Minion m = new Minion {
                    entityID = targetEnt
                };
                this.target = m;

                this.own = null;
            }

            if (s == "useability")
            {
                this.actionType  = actionEnum.useHeroPower;
                this.place       = 0;
                this.druidchoice = 0;
                this.card        = null;
                this.own         = null;
                this.target      = null;
            }

            if (s.Contains(" discover "))
            {
                string dc = s.Split(new string[] { " discover " }, StringSplitOptions.RemoveEmptyEntries)[1];
                this.tracking = Convert.ToInt32(dc);
            }
        }
Example #44
0
        //    Give each player a Mana Crystal.

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            p.drawACard(CardDB.cardIDEnum.None, true);
            p.drawACard(CardDB.cardIDEnum.None, false);
        }
Example #45
0
 public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
 {
     p.equipWeapon(this.w, true);
     p.equipWeapon(this.w, false);
 }
Example #46
0
        //Add 2 random class cards to your hand (From your opponent's class).

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            p.drawACard(CardDB.cardIDEnum.None, ownplay, true);
            p.drawACard(CardDB.cardIDEnum.None, ownplay, true);
        }
Example #47
0
        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            int dmg = (ownplay) ? p.getSpellDamageDamage(3) : p.getEnemySpellDamageDamage(3);

            p.allMinionOfASideGetDamage(!ownplay, dmg);
        }
Example #48
0
 public Action(actionEnum type, Handmanager.Handcard hc, Minion ownCardEntity, int place, Minion target, int pen, int choice, int track = 0)
 {
     this.actionType  = type;
     this.card        = hc;
     this.own         = ownCardEntity;
     this.place       = place;
     this.target      = target;
     this.penalty     = pen;
     this.druidchoice = choice;
     this.tracking    = track;
 }
Example #49
0
        // Restore 12 health to a friendly character.

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

            p.minionGetDamageOrHeal(target, -heal);
        }
Example #50
0
        //   Whenever your opponent casts a spell, gain +2 Attack.

        public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion, Minion target)
        {
            if (c.type == CardDB.cardtype.SPELL && wasOwnCard != triggerEffectMinion.own)
            {
                p.minionGetBuffed(triggerEffectMinion, 2, 0);
            }
        }
Example #51
0
        //Taunt. Enrage:+3 Attack.

        public override void onEnrageStart(Playfield p, Minion m)
        {
            m.Angr += 3;
        }
Example #52
0
        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.BOT_031); //地精炸弹

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            p.CallKid(kid, own.zonepos - 1, own.own); //1st left
            p.CallKid(kid, own.zonepos, own.own);
        }
        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.UNG_065); //Sherazin, Corpse Flower

        public override void onCardIsGoingToBePlayed(Playfield p, Handmanager.Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            triggerEffectMinion.Angr++;
            triggerEffectMinion.cantAttack = true;
            if (triggerEffectMinion.Angr > 3)
            {
                p.minionTransform(triggerEffectMinion, kid);
            }
        }
Example #54
0
 public override void onEnrageStop(Playfield p, Minion m)
 {
     m.Angr -= 3;
 }
Example #55
0
        public void updateHero(Weapon w, CardClass heron, SimCard ability, bool abrdy, int abCost, Minion hero, int enMaxMana = 10)
        {
            if (w.name == CardIds.Collectible.Warrior.FoolsBane)
            {
                w.cantAttackHeroes = true;
            }

            if (hero.own)
            {
                this.ownWeapon = new Weapon(w);

                this.ownHero           = new Minion(hero);
                this.ownHero.CardClass = heron;
                if (this.ownHeroStartClass == CardClass.INVALID)
                {
                    this.ownHeroStartClass = hero.CardClass;
                }

                this.ownHero.poisonous = this.ownWeapon.poisonous;
                this.ownHero.lifesteal = this.ownWeapon.lifesteal;
                if (this.ownWeapon.name == CardIds.Collectible.Hunter.GladiatorsLongbow)
                {
                    this.ownHero.immuneWhileAttacking = true;
                }

                this.heroAbility       = ability;
                this.ownHeroPowerCost  = abCost;
                this.ownAbilityisReady = abrdy;
            }
            else
            {
                this.enemyWeapon = new Weapon(w);
                this.enemyHero   = new Minion(hero);
                ;

                this.enemyHero.CardClass = heron;
                if (this.enemyHeroStartClass == CardClass.INVALID)
                {
                    this.enemyHeroStartClass = this.enemyHero.CardClass;
                }

                this.enemyHero.poisonous = this.enemyWeapon.poisonous;
                this.enemyHero.lifesteal = this.enemyWeapon.lifesteal;
                if (this.enemyWeapon.name == CardIds.Collectible.Hunter.GladiatorsLongbow)
                {
                    this.enemyHero.immuneWhileAttacking = true;
                }

                this.enemyAbility       = ability;
                this.enemyHeroPowerCost = abCost;

                this.enemyMaxMana = enMaxMana;
            }
        }
Example #56
0
        public Minion(Minion m)
        {
            //dont silence----------------------------
            this.anzGotDmg = m.anzGotDmg;
            this.isHero    = m.isHero;
            this.own       = m.own;

            this.name      = m.name;
            this.handcard  = m.handcard;//new?
            this.entitiyID = m.entitiyID;
            this.zonepos   = m.zonepos;

            this.allreadyAttacked = m.allreadyAttacked;


            this.playedThisTurn       = m.playedThisTurn;
            this.numAttacksThisTurn   = m.numAttacksThisTurn;
            this.immuneWhileAttacking = m.immuneWhileAttacking;
            this.cantBeTargetedBySpellsOrHeroPowers = m.cantBeTargetedBySpellsOrHeroPowers;
            //---------------------------------------
            this.shadowmadnessed = m.shadowmadnessed;

            this.ancestralspirit         = m.ancestralspirit;
            this.destroyOnOwnTurnStart   = m.destroyOnOwnTurnStart;   // depends on own!
            this.destroyOnEnemyTurnStart = m.destroyOnEnemyTurnStart; // depends on own!
            this.destroyOnOwnTurnEnd     = m.destroyOnOwnTurnEnd;     // depends on own!
            this.destroyOnEnemyTurnEnd   = m.destroyOnEnemyTurnEnd;   // depends on own!

            this.concedal        = m.concedal;
            this.souloftheforest = m.souloftheforest;

            this.ownBlessingOfWisdom   = m.ownBlessingOfWisdom;
            this.enemyBlessingOfWisdom = m.enemyBlessingOfWisdom;
            this.spellpower            = m.spellpower;

            this.Hp    = m.Hp;
            this.maxHp = m.maxHp;
            this.armor = m.armor;

            this.Angr         = m.Angr;
            this.AdjacentAngr = m.AdjacentAngr;
            this.tempAttack   = m.tempAttack;

            this.Ready = m.Ready;

            this.taunt   = m.taunt;
            this.wounded = m.wounded;

            this.divineshild = m.divineshild;
            this.windfury    = m.windfury;
            this.frozen      = m.frozen;
            this.stealth     = m.stealth;
            this.immune      = m.immune;
            this.exhausted   = m.exhausted;

            this.charge              = m.charge;
            this.poisonous           = m.poisonous;
            this.cantLowerHPbelowONE = m.cantLowerHPbelowONE;

            this.silenced = m.silenced;
        }
Example #57
0
		//Give a minion +2/+6 and Taunt. When it dies, summon a Stegodon.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            p.minionGetBuffed(target, 2, 6);
			target.stegodon++;
		}
        //Give your hero +6 Attack this turn.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            p.minionGetTempBuff(ownplay ? p.ownHero : p.enemyHero, 6, 0);
        }
Example #59
0
        //Battlecry: Deal 1 damage to all enemy minions

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            p.allMinionOfASideGetDamage(!own.own, 1);
        }
Example #60
0
 public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
 {
     p.equipWeapon(w, ownplay);
 }