Пример #1
0
        public SecretItem(SecretItem sec)
        {
            this.triggered = sec.triggered;
            this.canbeTriggeredWithAttackingHero   = sec.canbeTriggeredWithAttackingHero;
            this.canbeTriggeredWithAttackingMinion = sec.canbeTriggeredWithAttackingMinion;
            this.canbeTriggeredWithPlayingMinion   = sec.canbeTriggeredWithPlayingMinion;

            this.canBe_avenge         = sec.canBe_avenge;
            this.canBe_counterspell   = sec.canBe_counterspell;
            this.canBe_duplicate      = sec.canBe_duplicate;
            this.canBe_explosive      = sec.canBe_explosive;
            this.canBe_eyeforaneye    = sec.canBe_eyeforaneye;
            this.canBe_freezing       = sec.canBe_freezing;
            this.canBe_icebarrier     = sec.canBe_icebarrier;
            this.canBe_iceblock       = sec.canBe_iceblock;
            this.canBe_mirrorentity   = sec.canBe_mirrorentity;
            this.canBe_missdirection  = sec.canBe_missdirection;
            this.canBe_noblesacrifice = sec.canBe_noblesacrifice;
            this.canBe_redemption     = sec.canBe_redemption;
            this.canBe_repentance     = sec.canBe_repentance;
            this.canBe_snaketrap      = sec.canBe_snaketrap;
            this.canBe_snipe          = sec.canBe_snipe;
            this.canBe_spellbender    = sec.canBe_spellbender;
            this.canBe_vaporize       = sec.canBe_vaporize;

            this.entityId = sec.entityId;
        }
Пример #2
0
        //todo better!
        //  Battlecry: Take control of a random enemy Secret;.

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            if (own.own)
            {
                if (p.enemySecretList.Count >= 1)
                {
                    if (p.enemyHeroStartClass == TAG_CLASS.HUNTER)
                    {
                        p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_610);
                    }
                    if (p.enemyHeroStartClass == TAG_CLASS.MAGE)
                    {
                        p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_594);
                    }
                    if (p.enemyHeroStartClass == TAG_CLASS.PALADIN)
                    {
                        p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_130);
                    }

                    if (p.enemyHeroStartClass != TAG_CLASS.HUNTER && p.enemyHeroStartClass != TAG_CLASS.MAGE && p.enemyHeroStartClass != TAG_CLASS.PALADIN)
                    {
                        p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_130);
                    }

                    p.enemySecretList.RemoveAt(0);
                }
            }
            else
            {
                if (p.ownSecretsIDList.Count >= 1)
                {
                    p.ownSecretsIDList.RemoveAt(0);
                    SecretItem s = new SecretItem();
                    s.canBe_avenge         = false;
                    s.canBe_counterspell   = false;
                    s.canBe_duplicate      = false;
                    s.canBe_explosive      = false;
                    s.canBe_eyeforaneye    = false;
                    s.canBe_freezing       = false;
                    s.canBe_icebarrier     = false;
                    s.canBe_iceblock       = false;
                    s.canBe_mirrorentity   = false;
                    s.canBe_missdirection  = false;
                    s.canBe_noblesacrifice = false;
                    s.canBe_redemption     = false;
                    s.canBe_repentance     = false;
                    s.canBe_snaketrap      = false;
                    s.canBe_snipe          = false;
                    s.canBe_spellbender    = false;
                    s.canBe_vaporize       = false;

                    s.entityId        = 1050;
                    s.canBe_explosive = true;

                    p.enemySecretList.Add(s);
                }
            }
        }
Пример #3
0
        public bool isEqual(SecretItem s)
        {
            bool result = this.entityId == s.entityId;

            result = result && this.canBe_avenge == s.canBe_avenge && this.canBe_counterspell == s.canBe_counterspell && this.canBe_duplicate == s.canBe_duplicate && this.canBe_explosive == s.canBe_explosive;
            result = result && this.canBe_eyeforaneye == s.canBe_eyeforaneye && this.canBe_freezing == s.canBe_freezing && this.canBe_icebarrier == s.canBe_icebarrier && this.canBe_iceblock == s.canBe_iceblock;
            result = result && this.canBe_mirrorentity == s.canBe_mirrorentity && this.canBe_missdirection == s.canBe_missdirection && this.canBe_noblesacrifice == s.canBe_noblesacrifice && this.canBe_redemption == s.canBe_redemption;
            result = result && this.canBe_repentance == s.canBe_repentance && this.canBe_snaketrap == s.canBe_snaketrap && this.canBe_snipe == s.canBe_snipe && this.canBe_spellbender == s.canBe_spellbender && this.canBe_vaporize == s.canBe_vaporize;

            return(result);
        }
Пример #4
0
        public void getEnemySecretGuesses(List <int> enemySecretIds, TAG_CLASS enemyHeroStartClass)
        {
            List <SecretItem> newlist = new List <SecretItem>();

            foreach (int i in enemySecretIds)
            {
                if (i >= 1000)
                {
                    continue;
                }
                sf.Helpfunctions.logg("detect secret with id" + i);
                SecretItem sec = getNewSecretGuessedItem(i, enemyHeroStartClass);

                newlist.Add(new SecretItem(sec));
            }

            this.enemySecrets.Clear();
            this.enemySecrets.AddRange(newlist);
        }
Пример #5
0
        public void updateSecretList(List <SecretItem> enemySecretl)
        {
            List <SecretItem> temp = new List <SecretItem>();

            foreach (SecretItem si in this.enemySecrets)
            {
                bool       add  = false;
                SecretItem seit = null;
                foreach (SecretItem sit in enemySecretl) // enemySecrets have to be updated to latest entitys
                {
                    if (si.entityId == sit.entityId)
                    {
                        seit = sit;
                        add  = true;
                    }
                }

                temp.Add(add ? new SecretItem(seit) : new SecretItem(si));
            }

            this.enemySecrets.Clear();
            this.enemySecrets.AddRange(temp);
        }
Пример #6
0
        // Deathrattle: Put a Secret: from your deck into the battlefield.

        public override void onDeathrattle(Playfield p, Minion m)
        {
            if (m.own)
            {
                if (p.ownHeroStartClass == TAG_CLASS.MAGE)
                {
                    p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_289);
                }
                if (p.ownHeroStartClass == TAG_CLASS.HUNTER)
                {
                    p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_554);
                }
                if (p.ownHeroStartClass == TAG_CLASS.PALADIN)
                {
                    p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_130);
                }
            }
            else
            {
                if (p.enemyHeroStartClass == TAG_CLASS.MAGE || p.enemyHeroStartClass == TAG_CLASS.HUNTER || p.enemyHeroStartClass == TAG_CLASS.PALADIN)
                {
                    if (p.enemySecretCount <= 4)
                    {
                        p.enemySecretCount++;
                        SecretItem si = p.sf.Probabilitymaker.getNewSecretGuessedItem(p.getNextEntity(), p.ownHeroStartClass);
                        if (p.enemyHeroStartClass == TAG_CLASS.PALADIN)
                        {
                            si.canBe_redemption = false;
                        }
                        if (p.sf.Settings.useSecretsPlayArround)
                        {
                            p.enemySecretList.Add(si);
                        }
                    }
                }
            }
        }
Пример #7
0
        public SecretItem getNewSecretGuessedItem(int entityid, TAG_CLASS enemyHeroStartClass)
        {
            foreach (SecretItem si in this.enemySecrets)
            {
                if (si.entityId == entityid && entityid < 1000)
                {
                    return(si);
                }
            }

            SecretItem sec = new SecretItem {
                entityId = entityid
            };

            if (enemyHeroStartClass == TAG_CLASS.HUNTER)
            {
                sec.canBe_counterspell = false;
                sec.canBe_icebarrier   = false;
                sec.canBe_iceblock     = false;
                sec.canBe_mirrorentity = false;
                sec.canBe_spellbender  = false;
                sec.canBe_vaporize     = false;
                sec.canBe_duplicate    = false;

                sec.canBe_eyeforaneye    = false;
                sec.canBe_noblesacrifice = false;
                sec.canBe_redemption     = false;
                sec.canBe_repentance     = false;
                sec.canBe_avenge         = false;

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_554) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_554] >= 2)
                {
                    sec.canBe_snaketrap = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_609) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_609] >= 2)
                {
                    sec.canBe_snipe = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_610) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_610] >= 2)
                {
                    sec.canBe_explosive = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_611) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_611] >= 2)
                {
                    sec.canBe_freezing = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_533) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_533] >= 2)
                {
                    sec.canBe_missdirection = false;
                }
            }

            if (enemyHeroStartClass == TAG_CLASS.MAGE)
            {
                sec.canBe_snaketrap     = false;
                sec.canBe_snipe         = false;
                sec.canBe_explosive     = false;
                sec.canBe_freezing      = false;
                sec.canBe_missdirection = false;

                sec.canBe_eyeforaneye    = false;
                sec.canBe_noblesacrifice = false;
                sec.canBe_redemption     = false;
                sec.canBe_repentance     = false;
                sec.canBe_avenge         = false;

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_287) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_287] >= 2)
                {
                    sec.canBe_counterspell = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_289) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_289] >= 2)
                {
                    sec.canBe_icebarrier = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_295) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_295] >= 2)
                {
                    sec.canBe_iceblock = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_294) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_294] >= 2)
                {
                    sec.canBe_mirrorentity = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.tt_010) && enemyCardsPlayed[CardDB.cardIDEnum.tt_010] >= 2)
                {
                    sec.canBe_spellbender = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_594) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_594] >= 2)
                {
                    sec.canBe_vaporize = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.FP1_018) && enemyCardsPlayed[CardDB.cardIDEnum.FP1_018] >= 2)
                {
                    sec.canBe_duplicate = false;
                }
            }

            if (enemyHeroStartClass == TAG_CLASS.PALADIN)
            {
                sec.canBe_snaketrap     = false;
                sec.canBe_snipe         = false;
                sec.canBe_explosive     = false;
                sec.canBe_freezing      = false;
                sec.canBe_missdirection = false;

                sec.canBe_counterspell = false;
                sec.canBe_icebarrier   = false;
                sec.canBe_iceblock     = false;
                sec.canBe_mirrorentity = false;
                sec.canBe_spellbender  = false;
                sec.canBe_vaporize     = false;
                sec.canBe_duplicate    = false;

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_132) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_132] >= 2)
                {
                    sec.canBe_eyeforaneye = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_130) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_130] >= 2)
                {
                    sec.canBe_noblesacrifice = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_136) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_136] >= 2)
                {
                    sec.canBe_redemption = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_379) && enemyCardsPlayed[CardDB.cardIDEnum.EX1_379] >= 2)
                {
                    sec.canBe_repentance = false;
                }

                if (enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.FP1_020) && enemyCardsPlayed[CardDB.cardIDEnum.FP1_020] >= 2)
                {
                    sec.canBe_avenge = false;
                }
            }

            return(sec);
        }