Пример #1
0
        //todo list
//    kampfschrei:/ falls euer gegner mind. 4 diener hat, übernehmt zufällig die kontrolle über einen davon.
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            if (own.own)
            {
                if (p.enemyMinions.Count >= 4)
                {
                    List<Minion> temp = new List<Minion>(p.enemyMinions);
                    temp.Sort((a, b) => a.Angr.CompareTo(b.Angr));//we take the weekest
                    Minion targett;
                    targett = temp[0];
                    if (targett.taunt && temp.Count >= 2 && !temp[1].taunt) targett = temp[1];
                    p.minionGetControlled(targett, true, false);

                }
            }
            else
            {
                if (p.ownMinions.Count >= 4)
                {
                    List<Minion> temp = new List<Minion>(p.ownMinions);
                    temp.Sort((a, b) => a.Angr.CompareTo(b.Angr));//we take the weekest
                    Minion targett;
                    targett = temp[0];
                    if (targett.taunt && temp.Count >= 2 && !temp[1].taunt) targett = temp[1];
                    p.minionGetControlled(targett, false, false);

                }
            }
		}
Пример #2
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);
                }

            
        }
Пример #3
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:
                    if (m.own)
                    {
                        foreach (Minion mnn in tmp)
                        {
                            if (mnn.Hp < value && mnn.Hp >= 1)
                            {
                                target = mnn;
                                value = target.Hp;
                                found = true;
                            }
                        }
                    }
                    else
                    {
                        //steal a minion with has not attacked or has taunt
                        value = -1000;
                        foreach (Minion mnn in tmp)
                        {
                            int special = (m.Ready) ? 10 : 0;
                            special += (m.taunt) ? 5 : 0;
                            special += mnn.Hp;
                            if (special > value)
                            {
                                
                                target = mnn;
                                value = special;
                                found = true;
                            }
                        }
                    }
                    if (found) p.minionGetControlled(target, m.own, false);
                }

            
        }
Пример #4
0
        //todo list
//    kampfschrei:/ falls euer gegner mind. 4 diener hat, übernehmt zufällig die kontrolle über einen davon.
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            if (p.isServer)
            {
                List<Minion> temp = (own.own) ? p.enemyMinions : p.ownMinions;
                if (temp.Count >= 4)
                {
                    Minion choosen = p.getRandomMinionFromSide_SERVER(!own.own, false);
                    if (choosen != null) p.minionGetControlled(choosen, own.own, false);
                }

                return;
            }

            if (own.own)
            {
                if (p.enemyMinions.Count >= 4)
                {
                    List<Minion> temp = new List<Minion>(p.enemyMinions);
                    temp.Sort((a, b) => a.Angr.CompareTo(b.Angr));//we take the weekest
                    Minion targett;
                    targett = temp[0];
                    if (targett.taunt && temp.Count >= 2 && !temp[1].taunt) targett = temp[1];
                    p.minionGetControlled(targett, true, false);

                }
            }
            else
            {
                if (p.ownMinions.Count >= 4)
                {
                    List<Minion> temp = new List<Minion>(p.ownMinions);
                    temp.Sort((a, b) => a.Angr.CompareTo(b.Angr));//we take the weekest
                    Minion targett;
                    targett = temp[0];
                    if (targett.taunt && temp.Count >= 2 && !temp[1].taunt) targett = temp[1];
                    p.minionGetControlled(targett, false, false);

                }
            }
		}
Пример #5
0
		// Hero Power: Take control of a random enemy minion until end of turn.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            List<Minion> temp = (ownplay) ? p.enemyMinions : p.ownMinions;
            if (temp.Count <= 0) return;
            Minion m = p.searchRandomMinion(temp, Playfield.searchmode.searchLowestHP);
            if (m != null)
			{
				m.shadowmadnessed = true;
				p.shadowmadnessed++;
				p.minionGetControlled(m, ownplay, false);
			}
		}
Пример #6
0
        //todo make it better
//    todesröcheln:/ übernehmt die kontrolle über einen zufälligen feindlichen diener.
        public override void onDeathrattle(Playfield p, Minion m)
        {
                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);
                }

            
        }
Пример #7
0
        public void becomeSilence(Playfield p)
        {
            p.minionGetOrEraseAllAreaBuffs(this, false);
            //buffs
            ancestralspirit = 0;
            destroyOnOwnTurnStart = false;
            destroyOnEnemyTurnStart = false;
            destroyOnOwnTurnEnd = false;
            destroyOnEnemyTurnEnd = false;
            concedal = false;
            souloftheforest = 0;
            ownBlessingOfWisdom = 0;
            enemyBlessingOfWisdom = 0;
            ownPowerWordGlory = 0;
            enemyPowerWordGlory = 0;

            cantBeTargetedBySpellsOrHeroPowers = false;

            charge = 0;
            taunt = false;
            divineshild = false;
            windfury = false;
            frozen = false;
            stealth = false;
            immune = false;
            poisonous = false;
            cantLowerHPbelowONE = false;


            if (own) p.spellpower -= spellpower;
            else p.enemyspellpower -= spellpower;

            spellpower = 0;

            //delete enrage (if minion is silenced the first time)
            if (wounded && handcard.card.Enrage && !silenced)
            {
                handcard.card.sim_card.onEnrageStop(p, this);
            }

            //reset attack
            Angr = handcard.card.Attack;
            tempAttack = 0;//we dont toutch the adjacent buffs!


            //reset hp and heal it
            if (maxHp < handcard.card.Health)//minion has lower maxHp as his card -> heal his hp
            {
                Hp += handcard.card.Health - maxHp; //heal minion
            }
            maxHp = handcard.card.Health;
            if (Hp > maxHp) Hp = maxHp;

            if (!silenced)//minion WAS not silenced, deactivate his aura
            {
                handcard.card.sim_card.onAuraEnds(p, this);
            }

            silenced = true;
            this.updateReadyness();
            p.minionGetOrEraseAllAreaBuffs(this, true);
            if (own)
            {
                p.tempTrigger.ownMinionsChanged = true;
            }
            else
            {
                p.tempTrigger.enemyMininsChanged = true;
            }
            if (this.shadowmadnessed)
            {
                this.shadowmadnessed = false;
                p.minionGetControlled(this, !own, false);
            }
        }
Пример #8
0
//    übernehmt die kontrolle über einen feindlichen diener.
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            p.minionGetControlled(target, ownplay, false);
		}
Пример #9
0
//    übernehmt bis zum ende des zuges die kontrolle über einen feindlichen diener mit max. 3 angriff.
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            target.shadowmadnessed = true;
            p.minionGetControlled(target, ownplay, true);
		}
Пример #10
0
//    kampfschrei:/ übernehmt die kontrolle über einen feindlichen diener mit max. 2 angriff.
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            if (target != null) p.minionGetControlled(target, own.own, false);
		}