예제 #1
0
        // Whenever your opponent casts a spell, add a Coin to your hand.

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (hc.card.Type == CardType.SPELL && wasOwnCard != triggerEffectMinion.own)
            {
                p.drawACard(CardIds.NonCollectible.Neutral.TheCoin, triggerEffectMinion.own);
            }
        }
예제 #2
0
//    erhaltet jedes mal einen „feuerball“-zauber auf eure hand, wenn ihr einen zauber wirkt.

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (wasOwnCard == triggerEffectMinion.own && hc.card.Type == CardType.SPELL)
            {
                p.drawACard(CardIds.Collectible.Mage.Fireball, wasOwnCard, true);
            }
        }
예제 #3
0
        SimCard d = CardIds.NonCollectible.Neutral.Xavius_XavianSatyrToken; //flameofazzinoth
//    beschwört jedes mal eine flamme von azzinoth (2/1), wenn ihr eine karte ausspielt.

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (wasOwnCard == triggerEffectMinion.own)
            {
                p.callKid(this.d, triggerEffectMinion.zonepos, triggerEffectMinion.own);
            }
        }
예제 #4
0
        //    Put a random minion from each player's hand into the battlefield.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            Handcard c   = null;
            var      sum = 10000;

            foreach (var hc in p.owncards)
            {
                if (hc.card.Type == CardType.MINION)
                {
                    var s = hc.card.Health + hc.card.Attack + (hc.card.Taunt ? 1 : 0) + (hc.card.DivineShield ? 1 : 0);
                    if (s < sum)
                    {
                        c   = hc;
                        sum = s;
                    }
                }
            }

            if (sum < 9999)
            {
                p.callKid(c.card, p.ownMinions.Count, true, false);
                p.removeCard(c);
                p.triggerCardsChanged(true);
            }

            if (p.enemyAnzCards >= 2)
            {
                p.callKid(c.card, p.enemyMinions.Count, false, false);
                p.enemyAnzCards--;
                p.triggerCardsChanged(false);
            }
        }
예제 #5
0
        // After you cast a spell, deal 1 damage to ALL minions.

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool ownplay, Minion m)
        {
            if (m.own == ownplay && hc.card.Type == CardType.SPELL)
            {
                p.allMinionsGetDamage(1);
            }
        }
예제 #6
0
        private void setCardChoices(List <CardDB.cardIDEnum> crdchcs)
        {
            this.handcardchoices.Clear();
            foreach (CardDB.cardIDEnum cid in crdchcs)
            {
                CardDB.Card cardc = CardDB.Instance.getCardDataFromID(cid);
                Handcard    nehc  = new Handcard(cardc)
                {
                    entity   = 54321,
                    manacost = cardc.cost
                };
                this.handcardchoices.Add(nehc);
                Helpfunctions.Instance.ErrorLog("choices " + cardc.name);
            }
            CardDB.Card tempcard = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.CS2_029);//=fireball, just to make sure its not a mob (movegen will ignore mobs if own minions >= 7)
            tempcard.name = CardDB.cardName.placeholdercard;
            Handcard newhc = new Handcard(tempcard)
            {
                entity       = 54321,
                isChoiceTemp = true,
                manacost     = 0
            };

            this.handCards.Add(newhc);
        }
예제 #7
0
//    wenn ein spieler einen zauber wirkt, erhält der andere spieler eine kopie desselben auf seine hand.

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (hc.card.Type == CardType.SPELL)
            {
                p.drawACard(hc.card.CardId, !wasOwnCard, true);
            }
        }
예제 #8
0
        // Copy the lowest Cost minion in your hand.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            if (ownplay)
            {
                Handcard hcCopy = null;
                foreach (var hc in p.owncards)
                {
                    if (hc.card.Type == CardType.MINION)
                    {
                        if (hcCopy == null)
                        {
                            hcCopy = hc;
                        }
                        else
                        {
                            if (hcCopy.manacost > hc.manacost)
                            {
                                hcCopy = hc;
                            }
                        }
                    }
                }

                if (hcCopy != null)
                {
                    p.drawACard(hcCopy.card.CardId, ownplay, true);
                }
            }
        }
예제 #9
0
//    zieht jedes mal eine karte, wenn ihr einen zauber wirkt.

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (hc.card.Type == CardType.SPELL && wasOwnCard == triggerEffectMinion.own)
            {
                p.drawACard(SimCard.None, wasOwnCard);
            }
        }
예제 #10
0
 public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
 {
     if (wasOwnCard == triggerEffectMinion.own && hc.card.Type == CardType.SPELL)
     {
         p.callKid(this.card, triggerEffectMinion.zonepos, wasOwnCard);
     }
 }
예제 #11
0
        public override bool onCardDicscard(Playfield p, Handcard hc, Minion own, int num, bool checkBonus)
        {
            if (checkBonus)
            {
                return(true);
            }

            var ownplay = true;

            if (own != null)
            {
                ownplay = own.own;
            }

            Minion target = null;
            var    dmg    = ownplay ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);

            if (ownplay)
            {
                target = p.getEnemyCharTargetForRandomSingleDamage(dmg);
            }
            else
            {
                target = p.searchRandomMinion(p.ownMinions, SearchMode.LowHealth); //(pessimistic)
                if (target == null)
                {
                    target = p.ownHero;
                }
            }

            p.minionGetDamageOrHeal(target, dmg);
            return(true);
        }
예제 #12
0
        private Minion createNewMinion(Handcard hc, int id)
        {
            var m = new Minion
            {
                handcard           = new Handcard(hc),
                zonepos            = id + 1,
                entitiyID          = hc.entity,
                Angr               = hc.card.Attack,
                Hp                 = hc.card.Health,
                maxHp              = hc.card.Health,
                name               = hc.card,
                playedThisTurn     = true,
                numAttacksThisTurn = 0
            };


            if (hc.card.Windfury)
            {
                m.windfury = true;
            }

            if (hc.card.Taunt)
            {
                m.taunt = true;
            }

            if (hc.card.Charge)
            {
                m.Ready  = true;
                m.charge = 1;
            }

            if (hc.card.DivineShield)
            {
                m.divineshild = true;
            }

            if (hc.card.Poisonous)
            {
                m.poisonous = true;
            }

            if (hc.card.Lifesteal)
            {
                m.lifesteal = true;
            }

            if (hc.card.Stealth)
            {
                m.stealth = true;
            }

            if (m.name == CardIds.Collectible.Priest.Lightspawn && !m.silenced)
            {
                m.Angr = m.Hp;
            }


            return(m);
        }
예제 #13
0
        //   Whenever your opponent casts a spell, gain +1 Attack.

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (hc.card.Type == CardType.SPELL && wasOwnCard != triggerEffectMinion.own)
            {
                p.minionGetBuffed(triggerEffectMinion, 1, 0);
            }
        }
예제 #14
0
//    erhält jedes mal +2 angriff in diesem zug, wenn ihr einen zauber wirkt.
        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (triggerEffectMinion.own == wasOwnCard && hc.card.Type == CardType.SPELL)
            {
                p.minionGetTempBuff(triggerEffectMinion, 2, 0);
            }
        }
예제 #15
0
 public Handcard(Handcard hc)
 {
     this.position = hc.position;
     this.entity   = hc.entity;
     this.manacost = hc.manacost;
     this.card     = hc.card;
 }
예제 #16
0
        //Spell Damage +1. After you cast a spell, give your C'Thun +1/+1 (wherever it is).

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool ownplay, Minion m)
        {
            if (m.own == ownplay && hc.card.Type == CardType.SPELL)
            {
                p.cthunGetBuffed(1, 1, 0);
            }
        }
예제 #17
0
        //Whenever you cast a spell, restore 3 Health to your hero.

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (triggerEffectMinion.own == wasOwnCard && hc.card.Type == CardType.SPELL)
            {
                var heal = wasOwnCard ? p.getMinionHeal(3) : p.getEnemyMinionHeal(3);
                p.minionGetDamageOrHeal(wasOwnCard ? p.ownHero : p.enemyHero, -heal);
            }
        }
예제 #18
0
        //Whenever your spells deal damage, restore that much Health to your hero.

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool ownplay, Minion m)
        {
            if (m.own == ownplay && hc.card.Type == CardType.SPELL)
            {
                var target = ownplay ? p.ownHero : p.enemyHero;
                p.minionGetDamageOrHeal(target, -p.prozis.penman.guessTotalSpellDamage(p, hc.card.CardId, ownplay));
            }
        }
예제 #19
0
        //Whenever you cast a spell, summon a random minion of the same Cost.

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (triggerEffectMinion.own == wasOwnCard && hc.card.Type == CardType.SPELL)
            {
                var pos = wasOwnCard ? p.ownMinions.Count : p.enemyMinions.Count;
                p.callKid(p.getRandomCardForManaMinion(hc.manacost), pos, wasOwnCard);
            }
        }
예제 #20
0
        // Whenever you summon a Battlecry minion while this is in your hand, gain +1/+1.

        //handled

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Handcard triggerhc)
        {
            if (hc.card.Battlecry && hc.card.Type == CardType.MINION)
            {
                hc.addattack++;
                hc.addHp++;
            }
        }
예제 #21
0
 public void setHCtoHC(Handcard hc)
 {
     this.manacost      = hc.manacost;
     this.addattack     = hc.addattack;
     this.addHp         = hc.addHp;
     this.card          = hc.card;
     this.elemPoweredUp = hc.elemPoweredUp;
 }
예제 #22
0
        SimCard kid = CardIds.Collectible.Rogue.SherazinCorpseFlower; //Sherazin, Corpse Flower

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            triggerEffectMinion.Angr++;
            triggerEffectMinion.cantAttack = true;
            if (triggerEffectMinion.Angr > 3)
            {
                p.minionTransform(triggerEffectMinion, this.kid);
            }
        }
예제 #23
0
 public Handcard(Handcard hc)
 {
     this.position  = hc.position;
     this.entity    = hc.entity;
     this.manacost  = hc.manacost;
     this.card      = hc.card;
     this.addattack = hc.addattack;
     this.addHp     = hc.addHp;
 }
예제 #24
0
        //    Whenever your opponent casts a spell, gain a copy of it and give them a Coin.

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            var c = hc.card;

            if (c.Type == CardType.SPELL && c.CardId != CardIds.NonCollectible.Neutral.TradePrinceGallywix_GallywixsCoinToken && wasOwnCard != triggerEffectMinion.own)
            {
                p.drawACard(c.CardId, triggerEffectMinion.own, true);
                p.drawACard(CardIds.NonCollectible.Neutral.TradePrinceGallywix_GallywixsCoinToken, wasOwnCard, true);
            }
        }
예제 #25
0
        //   Whenever you cast a 1-mana spell, add a random Mech to your hand.
        //(we have to use current cost)

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (triggerEffectMinion.own == wasOwnCard)
            {
                if (hc.card.Type == CardType.SPELL && hc.manacost == 1)
                {
                    p.drawACard(CardIds.Collectible.Paladin.ShieldedMinibot, wasOwnCard, true);
                }
            }
        }
예제 #26
0
 public void setHCtoHC(Handcard hc)
 {
     this.manacost            = hc.manacost;
     this.addattack           = hc.addattack;
     this.addHp               = hc.addHp;
     this.card                = hc.card;
     this.elemPoweredUp       = hc.elemPoweredUp;
     this.discardOnOwnTurnEnd = false;
     this.valanyr             = hc.valanyr;
 }
예제 #27
0
 public void updatePlayedCardFromHand(Handcard hc)
 {
     this.nextMobName = SimCard.None;
     this.nextMobId   = 0;
     if (hc != null && hc.card.Type == CardType.MINION)
     {
         this.nextMobName = hc.card.CardId;
         this.nextMobId   = hc.entity;
     }
 }
예제 #28
0
        //Whenever you cast a spell on another friendly minion, cast a copy of it on this one.

        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (hc.card.Type == CardType.SPELL && hc.target != null && hc.target.own == wasOwnCard)
            {
                if (hc.target.own == triggerEffectMinion.own && hc.target.entitiyID != triggerEffectMinion.entitiyID)
                {
                    hc.card.Simulator.onCardPlay(p, wasOwnCard, triggerEffectMinion, hc.extraParam2);
                }
            }
        }
예제 #29
0
        public override void onCardIsGoingToBePlayed(Playfield p, Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (triggerEffectMinion.own == wasOwnCard && hc.card.Type == CardType.SPELL)
            {
                SimCard kid;
                var     otherTotems = 0;
                var     wrath       = false;
                foreach (var m in wasOwnCard ? p.ownMinions : p.enemyMinions)
                {
                    switch (m.name.CardId)
                    {
                    case CardIds.NonCollectible.Shaman.SearingTotem:
                        otherTotems++;
                        continue;

                    case CardIds.NonCollectible.Shaman.StoneclawTotem:
                        otherTotems++;
                        continue;

                    case CardIds.NonCollectible.Shaman.HealingTotem:
                        otherTotems++;
                        continue;

                    case CardIds.NonCollectible.Shaman.WrathOfAirTotem:
                        wrath = true;
                        continue;
                    }
                }

                if (p.isLethalCheck)
                {
                    if (otherTotems == 3 && !wrath)
                    {
                        kid = this.wrathofair;
                    }
                    else
                    {
                        kid = this.healing;
                    }
                }
                else
                {
                    if (!wrath)
                    {
                        kid = this.wrathofair;
                    }
                    else
                    {
                        kid = this.searing;
                    }
                }

                p.callKid(kid, triggerEffectMinion.zonepos, wasOwnCard);
            }
        }
예제 #30
0
 public Handcard(Handcard hc)
 {
     this.position            = hc.position;
     this.entity              = hc.entity;
     this.manacost            = hc.manacost;
     this.card                = hc.card;
     this.addattack           = hc.addattack;
     this.addHp               = hc.addHp;
     this.elemPoweredUp       = hc.elemPoweredUp;
     this.discardOnOwnTurnEnd = hc.discardOnOwnTurnEnd;
     this.valanyr             = hc.valanyr;
 }