public static string GetBasicHeroCardIdFromClass(TAG_CLASS classTag)
    {
        switch (classTag)
        {
        case TAG_CLASS.DRUID:
            return("HERO_06");

        case TAG_CLASS.HUNTER:
            return("HERO_05");

        case TAG_CLASS.MAGE:
            return("HERO_08");

        case TAG_CLASS.PALADIN:
            return("HERO_04");

        case TAG_CLASS.PRIEST:
            return("HERO_09");

        case TAG_CLASS.ROGUE:
            return("HERO_03");

        case TAG_CLASS.SHAMAN:
            return("HERO_02");

        case TAG_CLASS.WARLOCK:
            return("HERO_07");

        case TAG_CLASS.WARRIOR:
            return("HERO_01");
        }
        UnityEngine.Debug.LogError(string.Format("GameUtils.GetBasicHeroCardIdFromClass() - unsupported class tag {0}", classTag));
        return(string.Empty);
    }
    private void SetInfo(string name, TAG_CLASS buttonClass, CardDef cardDef, int missionID, long deckID, bool flip)
    {
        this.SetMissionID(missionID);
        this.SetDeckID(deckID);
        this.SetButtonClass(buttonClass);
        Material practiceAIPortrait = cardDef.GetPracticeAIPortrait();

        if (flip)
        {
            this.GetHiddenNameMesh().Text = name;
            if (practiceAIPortrait != null)
            {
                this.SetHiddenMaterial(practiceAIPortrait);
            }
            this.Flip();
        }
        else
        {
            if (this.m_infoSet)
            {
                UnityEngine.Debug.LogWarning("PracticeAIButton.SetInfo() - button is being re-initialized!");
            }
            this.m_infoSet = true;
            if (practiceAIPortrait != null)
            {
                this.SetShowingMaterial(practiceAIPortrait);
            }
            this.GetShowingNameMesh().Text = name;
            base.SetOriginalLocalPosition();
        }
        this.m_covered = false;
        this.GetShowingCover().GetComponent <Renderer>().enabled = false;
    }
Exemplo n.º 3
0
 public void clearAllNewGame()
 {
     this.ownHeroStartClass   = TAG_CLASS.INVALID;
     this.enemyHeroStartClass = TAG_CLASS.INVALID;
     this.setGameRule         = false;
     this.clearAllRecalc();
 }
    public void SetBasicSetProgress(TAG_CLASS classTag)
    {
        int basicCardsIOwn = CollectionManager.Get().GetBasicCardsIOwn(classTag);
        int num2           = 20;

        if (basicCardsIOwn == num2)
        {
            this.m_classLabel.transform.position         = this.m_bones.m_classLabelOneLine.position;
            this.m_labelGradient.transform.parent        = this.m_bones.m_gradientOneLine;
            this.m_labelGradient.transform.localPosition = Vector3.zero;
            this.m_labelGradient.transform.localScale    = Vector3.one;
            this.m_setProgressLabel.gameObject.SetActive(false);
        }
        else
        {
            this.m_classLabel.transform.position  = this.m_bones.m_classLabelTwoLine.position;
            this.m_labelGradient.transform.parent = this.m_bones.m_gradientTwoLine;
            object[] args = new object[] { basicCardsIOwn, num2 };
            this.m_setProgressLabel.Text = GameStrings.Format((UniversalInputManager.UsePhoneUI == null) ? "GLUE_BASIC_SET_PROGRESS" : "GLUE_BASIC_SET_PROGRESS_PHONE", args);
            this.m_labelGradient.transform.localPosition = Vector3.zero;
            this.m_labelGradient.transform.localScale    = Vector3.one;
            this.m_setProgressLabel.gameObject.SetActive(true);
            this.m_setProgressLabel.TextColor = BASIC_SET_COLOR_IN_PROGRESS;
        }
    }
 public void UpdateDisplay(FullDef def, CardFlair cardFlair)
 {
     this.m_heroClass = def.GetEntityDef().GetClass();
     this.SetFullDef(def);
     this.SetClassname(GameStrings.GetClassName(this.m_heroClass));
     this.SetClassIcon(this.GetClassIconMaterial(this.m_heroClass));
     this.SetBasicSetProgress(this.m_heroClass);
     this.SetCardFlair(cardFlair);
 }
Exemplo n.º 6
0
        //Battlecry: Replace your starting Hero Power with a better one.

        public override void getBattlecryEffect(Playfield p, Minion m, Minion target, int choice)
        {
            TAG_CLASS HeroStartClass = (m.own) ? p.ownHeroStartClass : p.enemyHeroStartClass;

            CardDB.cardIDEnum tmp = CardDB.cardIDEnum.None;

            switch (HeroStartClass)
            {
            case TAG_CLASS.WARRIOR:
                tmp = CardDB.cardIDEnum.AT_132_WARRIOR;                         //Tank Up!
                break;

            case TAG_CLASS.WARLOCK:
                tmp = CardDB.cardIDEnum.AT_132_WARLOCK;                         //Soul Tap
                break;

            case TAG_CLASS.ROGUE:
                tmp = CardDB.cardIDEnum.AT_132_ROGUE;                         //Poisoned Daggers
                break;

            case TAG_CLASS.SHAMAN:
                tmp = CardDB.cardIDEnum.AT_132_SHAMAN;                         //Totemic Slam
                break;

            case TAG_CLASS.PRIEST:
                tmp = CardDB.cardIDEnum.AT_132_PRIEST;                         //Heal
                break;

            case TAG_CLASS.PALADIN:
                tmp = CardDB.cardIDEnum.AT_132_PALADIN;                         //The Silver Hand
                break;

            case TAG_CLASS.MAGE:
                tmp = CardDB.cardIDEnum.AT_132_MAGE;                         //Fireblast Rank 2
                break;

            case TAG_CLASS.HUNTER:
                tmp = CardDB.cardIDEnum.AT_132_HUNTER;                         //Ballista Shot
                break;

            case TAG_CLASS.DRUID:
                tmp = CardDB.cardIDEnum.AT_132_DRUID;                         //Dire Shapeshift
                break;
                //default:
            }
            if (tmp != CardDB.cardIDEnum.None)
            {
                if (m.own)
                {
                    p.ownHeroAblility.card = CardDB.Instance.getCardDataFromID(tmp);
                }
                else
                {
                    p.enemyHeroAblility.card = CardDB.Instance.getCardDataFromID(tmp);
                }
            }
        }
    private HEADER_CLASS TagClassToHeaderClass(TAG_CLASS classTag)
    {
        string str = classTag.ToString();

        if (Enum.IsDefined(typeof(HEADER_CLASS), str))
        {
            return((HEADER_CLASS)((int)Enum.Parse(typeof(HEADER_CLASS), str)));
        }
        return(HEADER_CLASS.INVALID);
    }
Exemplo n.º 8
0
    private string GetClassName()
    {
        TAG_CLASS tag = this.m_entityDef.GetClass();

        if (tag == TAG_CLASS.INVALID)
        {
            return(GameStrings.Get("GLUE_PACK_OPENING_ALL_CLASSES"));
        }
        return(GameStrings.GetClassName(tag));
    }
Exemplo n.º 9
0
        public List <CollectibleCard> GetHeroesIOwn(TAG_CLASS heroClass)
        {
            object[] objArray1 = new object[] { heroClass };
            Class267 <CollectibleCard> class2 = base.method_14 <Class267 <CollectibleCard> >("GetHeroesIOwn", objArray1);

            if (class2 != null)
            {
                return(class2.method_25());
            }
            return(null);
        }
Exemplo n.º 10
0
        public List <TemplateDeck> GetTemplateDecks(TAG_CLASS classType)
        {
            object[] objArray1             = new object[] { classType };
            Class267 <TemplateDeck> class2 = base.method_14 <Class267 <TemplateDeck> >("GetTemplateDecks", objArray1);

            if (class2 != null)
            {
                return(class2.method_25());
            }
            return(null);
        }
Exemplo n.º 11
0
 private int GetIndex(TAG_CLASS classTag)
 {
     for (int i = 0; i < this.m_classTags.Length; i++)
     {
         if (this.m_classTags[i] == classTag)
         {
             return(i);
         }
     }
     return(0);
 }
Exemplo n.º 12
0
        public List <CollectionDeck> GetDecksWithClass(TAG_CLASS classType, DeckType deckType)
        {
            object[] objArray1 = new object[] { classType, deckType };
            Class267 <CollectionDeck> class2 = base.method_14 <Class267 <CollectionDeck> >("GetDecksWithClass", objArray1);

            if (class2 != null)
            {
                return(class2.method_25());
            }
            return(null);
        }
Exemplo n.º 13
0
 public static bool ShouldSeeWeaponSocket(TAG_CLASS tagVal)
 {
     switch (tagVal)
     {
     case TAG_CLASS.DRUID:
     case TAG_CLASS.MAGE:
     case TAG_CLASS.PRIEST:
     case TAG_CLASS.WARLOCK:
         return(false);
     }
     return(true);
 }
Exemplo n.º 14
0
    private void InitRewardText()
    {
        CardRewardData data      = base.Data as CardRewardData;
        EntityDef      entityDef = DefLoader.Get().GetEntityDef(data.CardID);

        if (!entityDef.IsHero())
        {
            string       headline  = GameStrings.Get("GLOBAL_REWARD_CARD_HEADLINE");
            string       details   = string.Empty;
            string       source    = string.Empty;
            TAG_CARD_SET cardSet   = entityDef.GetCardSet();
            TAG_CLASS    tag       = entityDef.GetClass();
            string       className = GameStrings.GetClassName(tag);
            if (GameMgr.Get().IsTutorial())
            {
                details = GameUtils.GetCurrentTutorialCardRewardDetails();
            }
            else if (cardSet == TAG_CARD_SET.CORE)
            {
                int num            = 20;
                int basicCardsIOwn = CollectionManager.Get().GetBasicCardsIOwn(tag);
                if (data.Premium == TAG_PREMIUM.GOLDEN)
                {
                    details = string.Empty;
                }
                else
                {
                    if (num == basicCardsIOwn)
                    {
                        data.InnKeeperLine = CardRewardData.InnKeeperTrigger.CORE_CLASS_SET_COMPLETE;
                    }
                    else if (basicCardsIOwn == 4)
                    {
                        data.InnKeeperLine = CardRewardData.InnKeeperTrigger.SECOND_REWARD_EVER;
                    }
                    object[] args = new object[] { basicCardsIOwn, num, className };
                    details = GameStrings.Format("GLOBAL_REWARD_CORE_CARD_DETAILS", args);
                }
            }
            if (base.Data.Origin == NetCache.ProfileNotice.NoticeOrigin.LEVEL_UP)
            {
                TAG_CLASS          originData = (TAG_CLASS)((int)base.Data.OriginData);
                NetCache.HeroLevel heroLevel  = GameUtils.GetHeroLevel(originData);
                object[]           objArray2  = new object[] { heroLevel.CurrentLevel.Level.ToString(), GameStrings.GetClassName(originData) };
                source = GameStrings.Format("GLOBAL_REWARD_CARD_LEVEL_UP", objArray2);
            }
            else
            {
                source = string.Empty;
            }
            base.SetRewardText(headline, details, source);
        }
    }
Exemplo n.º 15
0
        // Battlecry: Add 2 random spells to your hand (from your opponent's class).

        public override void getBattlecryEffect(Playfield p, Minion m, Minion target, int choice)
        {
            TAG_CLASS opponentHeroClass = (m.own) ? p.enemyHeroStartClass : p.ownHeroStartClass;

            switch (opponentHeroClass)
            {
            case TAG_CLASS.WARRIOR:
                p.drawACard(CardDB.cardName.shieldblock, m.own, true);
                p.drawACard(CardDB.cardName.shieldblock, m.own, true);
                break;

            case TAG_CLASS.WARLOCK:
                p.drawACard(CardDB.cardName.baneofdoom, m.own, true);
                p.drawACard(CardDB.cardName.baneofdoom, m.own, true);
                break;

            case TAG_CLASS.ROGUE:
                p.drawACard(CardDB.cardName.sprint, m.own, true);
                p.drawACard(CardDB.cardName.sprint, m.own, true);
                break;

            case TAG_CLASS.SHAMAN:
                p.drawACard(CardDB.cardName.farsight, m.own, true);
                p.drawACard(CardDB.cardName.farsight, m.own, true);
                break;

            case TAG_CLASS.PRIEST:
                p.drawACard(CardDB.cardName.thoughtsteal, m.own, true);
                p.drawACard(CardDB.cardName.thoughtsteal, m.own, true);
                break;

            case TAG_CLASS.PALADIN:
                p.drawACard(CardDB.cardName.hammerofwrath, m.own, true);
                p.drawACard(CardDB.cardName.hammerofwrath, m.own, true);
                break;

            case TAG_CLASS.MAGE:
                p.drawACard(CardDB.cardName.frostnova, m.own, true);
                p.drawACard(CardDB.cardName.frostnova, m.own, true);
                break;

            case TAG_CLASS.HUNTER:
                p.drawACard(CardDB.cardName.cobrashot, m.own, true);
                p.drawACard(CardDB.cardName.cobrashot, m.own, true);
                break;

            case TAG_CLASS.DRUID:
                p.drawACard(CardDB.cardName.wildgrowth, m.own, true);
                p.drawACard(CardDB.cardName.wildgrowth, m.own, true);
                break;
                //default:
            }
        }
Exemplo n.º 16
0
        public void updateHero(Weapon w, string heron, CardDB.Card ability, bool abrdy, int abCost, Minion hero, int enMaxMana = 10)
        {
            if (w.name == CardDB.cardName.foolsbane)
            {
                w.cantAttackHeroes = true;
            }

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

                this.ownHero        = new Minion(hero);
                this.heroname       = this.heroNametoEnum(heron);
                this.heronameingame = heron;
                if (this.ownHeroStartClass == TAG_CLASS.INVALID)
                {
                    this.ownHeroStartClass = hero.cardClass;
                }
                this.ownHero.poisonous = this.ownWeapon.poisonous;
                this.ownHero.lifesteal = this.ownWeapon.lifesteal;
                if (this.ownWeapon.name == CardDB.cardName.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.enemyHeroname       = this.heroNametoEnum(heron);
                this.enemyHeronameingame = heron;
                if (this.enemyHeroStartClass == TAG_CLASS.INVALID)
                {
                    this.enemyHeroStartClass = enemyHero.cardClass;
                }
                this.enemyHero.poisonous = this.enemyWeapon.poisonous;
                this.enemyHero.lifesteal = this.enemyWeapon.lifesteal;
                if (this.enemyWeapon.name == CardDB.cardName.gladiatorslongbow)
                {
                    this.enemyHero.immuneWhileAttacking = true;
                }

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

                this.enemyMaxMana = enMaxMana;
            }
        }
Exemplo n.º 17
0
        public static List <Card> GetOfClassM(List <Card> list, TAG_CLASS cclass)
        {
            var r = new List <Card>();

            foreach (var card in list)
            {
                if (card.GetEntity().GetClass() == cclass)
                {
                    r.Add(card);
                }
            }
            return(r);
        }
Exemplo n.º 18
0
 private static Vector2 GetTextureOffset(TAG_CLASS classTag)
 {
     if (CollectionPageManager.s_classTextureOffsets.ContainsKey(classTag))
     {
         return(CollectionPageManager.s_classTextureOffsets[classTag]);
     }
     Debug.LogWarning(string.Format("CollectionClassTab.GetTextureOffset(): No class texture offsets exist for class {0}", classTag));
     if (CollectionPageManager.s_classTextureOffsets.ContainsKey(TAG_CLASS.INVALID))
     {
         return(CollectionPageManager.s_classTextureOffsets[TAG_CLASS.INVALID]);
     }
     return(Vector2.zero);
 }
 public void SetClass(TAG_CLASS classTag)
 {
     if (this.m_classIcon != null)
     {
         Vector2 offset = CollectionPageManager.s_classTextureOffsets[classTag];
         this.m_classIcon.GetComponent <Renderer>().material.SetTextureOffset("_MainTex", offset);
     }
     if (this.m_favoriteBannerText != null)
     {
         object[] args = new object[] { GameStrings.GetClassName(classTag) };
         this.m_favoriteBannerText.Text = GameStrings.Format("GLUE_COLLECTION_MANAGER_FAVORITE_DEFAULT_TEXT", args);
     }
 }
Exemplo n.º 20
0
        //Battlecry: Replace your starting Hero Power with a better one.

        public override void getBattlecryEffect(Playfield p, Minion m, Minion target, int choice)
        {
            TAG_CLASS HeroStartClass = (m.own) ? p.ownHeroStartClass : p.enemyHeroStartClass;

            CardDB.cardIDEnum tmp = CardDB.cardIDEnum.None;

            switch (HeroStartClass)
            {
            case TAG_CLASS.WARRIOR:
                tmp = CardDB.cardIDEnum.HERO_01bp2;                         //Tank Up!
                break;

            case TAG_CLASS.WARLOCK:
                tmp = CardDB.cardIDEnum.HERO_07bp2;                         //Soul Tap
                break;

            case TAG_CLASS.ROGUE:
                tmp = CardDB.cardIDEnum.HERO_03bp2;                         //Poisoned Daggers
                break;

            case TAG_CLASS.SHAMAN:
                tmp = CardDB.cardIDEnum.HERO_02bp2;                         //Totemic Slam
                break;

            case TAG_CLASS.PRIEST:
                tmp = CardDB.cardIDEnum.HERO_09bp2;                         //Heal
                break;

            case TAG_CLASS.PALADIN:
                tmp = CardDB.cardIDEnum.HERO_04bp2;                         //The Silver Hand
                break;

            case TAG_CLASS.MAGE:
                tmp = CardDB.cardIDEnum.HERO_08bp2;                         //Fireblast Rank 2
                break;

            case TAG_CLASS.HUNTER:
                tmp = CardDB.cardIDEnum.HERO_05bp2;                         //Ballista Shot
                break;

            case TAG_CLASS.DRUID:
                tmp = CardDB.cardIDEnum.HERO_06bp2;                         //Dire Shapeshift
                break;
                //default:
            }

            if (tmp != CardDB.cardIDEnum.None)
            {
                p.setNewHeroPower(tmp, m.own);
            }
        }
 public void SetClass(TAG_CLASS?classTag)
 {
     if (!classTag.HasValue)
     {
         this.SetClassNameText(string.Empty);
         this.ShowClassFlavorObjects(false);
     }
     else
     {
         TAG_CLASS tag = classTag.Value;
         this.SetClassNameText(GameStrings.GetClassName(tag));
         this.SetClassFlavorTextures(this.TagClassToHeaderClass(tag));
     }
 }
Exemplo n.º 22
0
 public void Init(TAG_CLASS?classTag)
 {
     if (classTag.HasValue)
     {
         this.m_classTag = classTag.Value;
     }
     this.SetClassIconsTextureOffset(base.gameObject.GetComponent <Renderer>());
     if (this.m_glowMesh != null)
     {
         this.SetClassIconsTextureOffset(this.m_glowMesh.GetComponent <Renderer>());
     }
     this.SetGlowActive(false);
     this.UpdateNewItemCount(0);
 }
Exemplo n.º 23
0
        public void updateEnemyHero(string weapon, int weaponAttack, int weaponDurability, string heron, int enemMaxMana, CardDB.Card eab, Minion enemyHero)
        {
            this.enemyHeroWeapon       = CardDB.Instance.cardNamestringToEnum(weapon);
            this.enemyWeaponAttack     = weaponAttack;
            this.enemyWeaponDurability = weaponDurability;

            this.enemyMaxMana = enemMaxMana;

            this.enemyHeroname       = this.heroNametoEnum(heron);
            this.enemyHeroStartClass = enemyHero.cardClass;

            this.enemyAbility = eab;

            this.enemyHero = new Minion(enemyHero);
        }
    private Material GetClassIconMaterial(TAG_CLASS classTag)
    {
        int num = 0;

        switch (classTag)
        {
        case TAG_CLASS.INVALID:
            num = 9;
            break;

        case TAG_CLASS.DRUID:
            num = 5;
            break;

        case TAG_CLASS.HUNTER:
            num = 4;
            break;

        case TAG_CLASS.MAGE:
            num = 7;
            break;

        case TAG_CLASS.PALADIN:
            num = 3;
            break;

        case TAG_CLASS.PRIEST:
            num = 8;
            break;

        case TAG_CLASS.ROGUE:
            num = 2;
            break;

        case TAG_CLASS.SHAMAN:
            num = 1;
            break;

        case TAG_CLASS.WARLOCK:
            num = 6;
            break;

        case TAG_CLASS.WARRIOR:
            num = 0;
            break;
        }
        return(this.CLASS_MATERIALS[num]);
    }
Exemplo n.º 25
0
        public void updateOwnHero(string weapon, int watt, int wdur, string heron, CardDB.Card hab, bool habrdy, Minion Hero)
        {
            this.ownHeroWeapon        = CardDB.Instance.cardNamestringToEnum(weapon);
            this.heroWeaponAttack     = watt;
            this.heroWeaponDurability = wdur;

            this.heroname = this.heroNametoEnum(heron);
            Helpfunctions.Instance.logg(this.heroname.ToString());
            this.ownHeroStartClass = Hero.cardClass;

            this.heroAbility       = hab;
            this.ownAbilityisReady = habrdy;

            this.ownHero = new Minion(Hero);
            this.ownHero.updateReadyness();
        }
Exemplo n.º 26
0
    public int GetRankedWinsForClass(TAG_CLASS heroClass)
    {
        int num = 0;

        foreach (NetCache.PlayerRecord record in NetCache.Get().GetNetObject <NetCache.NetCachePlayerRecords>().Records)
        {
            if (record.Data != 0)
            {
                EntityDef entityDef = DefLoader.Get().GetEntityDef(record.Data);
                if (((entityDef != null) && (entityDef.GetClass() == heroClass)) && (record.RecordType == GameType.GT_RANKED))
                {
                    num += record.Wins;
                }
            }
        }
        return(num);
    }
    public static string GetHistorySecretActor(Entity entity)
    {
        TAG_CLASS tag_class = entity.GetClass();

        switch (tag_class)
        {
        case TAG_CLASS.HUNTER:
            return("History_Secret_Hunter");

        case TAG_CLASS.MAGE:
            return("History_Secret_Mage");

        case TAG_CLASS.PALADIN:
            return("History_Secret_Paladin");
        }
        Debug.LogWarning(string.Format("ActorNames.GetHistorySecretActor() - No actor for class {0}. Returning {1} instead.", tag_class, "History_Secret_Mage"));
        return("History_Secret_Mage");
    }
Exemplo n.º 28
0
        // Hero Power: Put a random spell from your opponent's class into your hand.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            TAG_CLASS opponentHeroClass = ownplay ? p.enemyHeroStartClass : p.ownHeroStartClass;

            switch (opponentHeroClass)
            {
            case TAG_CLASS.WARRIOR:
                p.drawACard(CardName.shieldblock, ownplay, true);
                break;

            case TAG_CLASS.WARLOCK:
                p.drawACard(CardName.baneofdoom, ownplay, true);
                break;

            case TAG_CLASS.ROGUE:
                p.drawACard(CardName.sprint, ownplay, true);
                break;

            case TAG_CLASS.SHAMAN:
                p.drawACard(CardName.farsight, ownplay, true);
                break;

            case TAG_CLASS.PRIEST:
                p.drawACard(CardName.thoughtsteal, ownplay, true);
                break;

            case TAG_CLASS.PALADIN:
                p.drawACard(CardName.hammerofwrath, ownplay, true);
                break;

            case TAG_CLASS.MAGE:
                p.drawACard(CardName.frostnova, ownplay, true);
                break;

            case TAG_CLASS.HUNTER:
                p.drawACard(CardName.cobrashot, ownplay, true);
                break;

            case TAG_CLASS.DRUID:
                p.drawACard(CardName.wildgrowth, ownplay, true);
                break;
                //default:
            }
        }
Exemplo n.º 29
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;
                }
                Helpfunctions.Instance.logg("detect secret with id" + i);
                SecretItem sec = getNewSecretGuessedItem(i, enemyHeroStartClass);

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

            this.enemySecrets.Clear();
            this.enemySecrets.AddRange(newlist);
        }
Exemplo n.º 30
0
        public void updateOwnHero(CardDB.Card weapon, int watt, int wdur, string heron, CardDB.Card hab, bool habrdy, int habcost, Minion Hero)
        {
            this.ownWeaponCard        = weapon;
            this.heroWeaponAttack     = watt;
            this.heroWeaponDurability = wdur;

            this.heroname       = this.heroNametoEnum(heron);
            this.heronameingame = heron;
            if (this.ownHeroStartClass == TAG_CLASS.INVALID)
            {
                this.ownHeroStartClass = Hero.cardClass;
            }

            this.heroAbility       = hab;
            this.ownHeroPowerCost  = habcost;
            this.ownAbilityisReady = habrdy;

            this.ownHero = new Minion(Hero);
        }
Exemplo n.º 31
0
        public int EnemyCardPlaying(TAG_CLASS enemyHeroStrtClass, int currmana, int cardcount, int playAroundProb, int pap2)
        {
            int mana = currmana;
            if (cardcount == 0) return currmana;

            bool useAOE = false;
            int mobscount = 0;
            foreach (Minion min in this.ownMinions)
            {
                if (min.maxHp >= 2 && min.Angr >= 2) mobscount++;
            }

            if (mobscount >= 3) useAOE = true;

            if (enemyHeroStrtClass == TAG_CLASS.WARRIOR)
            {
                bool usewhirlwind = true;
                foreach (Minion m in this.enemyMinions)
                {
                    if (m.Hp == 1) usewhirlwind = false;
                }
                if (this.ownMinions.Count <= 3) usewhirlwind = false;

                if (usewhirlwind)
                {
                    mana = EnemyPlaysACard(CardDB.cardName.whirlwind, mana, playAroundProb, pap2);
                }
            }

            if (!useAOE) return mana;

            if (enemyHeroStrtClass == TAG_CLASS.MAGE)
            {
                mana = EnemyPlaysACard(CardDB.cardName.flamestrike, mana, playAroundProb, pap2);
                mana = EnemyPlaysACard(CardDB.cardName.blizzard, mana, playAroundProb, pap2);
            }

            if (enemyHeroStrtClass == TAG_CLASS.HUNTER)
            {
                mana = EnemyPlaysACard(CardDB.cardName.unleashthehounds, mana, playAroundProb, pap2);
            }

            if (enemyHeroStrtClass == TAG_CLASS.PRIEST)
            {
                mana = EnemyPlaysACard(CardDB.cardName.holynova, mana, playAroundProb, pap2);
            }

            if (enemyHeroStrtClass == TAG_CLASS.SHAMAN)
            {
                mana = EnemyPlaysACard(CardDB.cardName.lightningstorm, mana, playAroundProb, pap2);
            }

            if (enemyHeroStrtClass == TAG_CLASS.PALADIN)
            {
                mana = EnemyPlaysACard(CardDB.cardName.consecration, mana, playAroundProb, pap2);
            }

            if (enemyHeroStrtClass == TAG_CLASS.DRUID)
            {
                mana = EnemyPlaysACard(CardDB.cardName.swipe, mana, playAroundProb, pap2);
            }



            return mana;
        }
Exemplo n.º 32
0
 public void updateHeroStartClass(TAG_CLASS ownHSClass, TAG_CLASS enemyHSClass)
 {
     this.ownHeroStartClass = ownHSClass;
     this.enemyHeroStartClass = enemyHSClass;
 }
Exemplo n.º 33
0
        public void setMinionTominion(Minion m)
        {
            //dont silence----------------------------
            this.anzGotDmg = m.anzGotDmg;
            this.gotDmgRaw = m.gotDmgRaw;
            this.GotDmgValue = m.GotDmgValue;
            this.gotInspire = m.gotInspire;
            this.isHero = m.isHero;
            this.own = m.own;
            this.canAttackNormal = m.canAttackNormal;
            this.name = m.name;
            this.cardClass = m.cardClass;
            this.synergy = m.synergy;
            this.handcard = m.handcard;//new?
            this.deathrattle2 = m.deathrattle2;
            //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.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.explorershat = m.explorershat;
            this.infest = m.infest;

            this.ownBlessingOfWisdom = m.ownBlessingOfWisdom;
            this.enemyBlessingOfWisdom = m.enemyBlessingOfWisdom;
            this.ownPowerWordGlory = m.ownPowerWordGlory;
            this.enemyPowerWordGlory = m.enemyPowerWordGlory;
            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;

            this.cantBeTargetedBySpellsOrHeroPowers = m.cantBeTargetedBySpellsOrHeroPowers;

            if (m.deathrattles != null)
            {
                this.deathrattles = new List<int>();
                foreach (int dr in m.deathrattles)
                {
                    this.deathrattles.Add(dr);
                }
            }
        }
Exemplo n.º 34
0
        public Player(int player)
        {

            this.ownController = player;
 
            this.mana = (player == 0)? 1: 0;
            this.manaTurnEnd = this.mana;
            this.ownMaxMana = mana;
            this.evaluatePenality = 0;

            this.attackFaceHP = 15;

            //this.complete = false;

            this.ownHero = new Minion();
            this.ownHero.cardClass = TAG_CLASS.MAGE;

            //implementation
            this.ownHero.isHero = true;
            this.ownHero.own = (player == 0) ? true : false;
            this.ownHero.maxHp = 30;
            this.ownHero.entitiyID = player;

            this.ownHero.Angr = 0;
            this.ownHero.Hp = 30;
            this.ownHero.armor = 0;
            this.ownHero.frozen = false;
            this.ownHero.immuneWhileAttacking = false;
            this.ownHero.immune = false;
            this.ownHero.numAttacksThisTurn = 0;
            this.ownHero.windfury = false;

            //end of implementation

            //addCardsReal(homeHandManager.handCards);

            this.ownHeroName = HeroEnum.mage;
            this.ownHeroStartClass = TAG_CLASS.MAGE;
            /*
            this.enemyHeroHp = hrtprozis.enemyHp;
            this.ownHeroHp = hrtprozis.heroHp;
            this.ownHeroReady = hrtprozis.ownheroisread;
            this.ownHeroWindfury = hrtprozis.ownHeroWindfury;
            this.ownHeroNumAttackThisTurn = hrtprozis.ownHeroNumAttacksThisTurn;
            this.ownHeroFrozen = hrtprozis.herofrozen;
            this.enemyHeroFrozen = hrtprozis.enemyfrozen;
            this.ownheroAngr = hrtprozis.heroAtk;
            this.heroImmuneWhileAttacking = hrtprozis.heroImmuneToDamageWhileAttacking;
            this.ownHeroDefence = hrtprozis.heroDefence;
            this.enemyHeroDefence = hrtprozis.enemyDefence;
             */

            //####buffs#############################

            this.anzOwnRaidleader = 0;
            this.anzOwnStormwindChamps = 0;
            this.anzOwnTundrarhino = 0;
            this.anzOwnTimberWolfs = 0;
            this.anzMurlocWarleader = 0;
            this.anzGrimscaleOracle = 0;
            this.anzOwnAuchenaiSoulpriest = 0;
            this.anzOwnsorcerersapprentice = 0;
            //this.anzOwnsorcerersapprenticeStarted = 0;
            this.anzOwnSouthseacaptain = 0;
            //this.anzOwnDragonConsortStarted = 0;

            this.ownMinionsDiedTurn = 0;

            //this.feugenDead = false;
            //this.stalaggDead = false;

            this.doublepriest = 0;

            this.ownBaronRivendare = 0;
            //#########################################

            this.ownWeaponDurability = 0;
            this.ownWeaponAttack = 0;
            this.ownWeaponName = CardDB.cardName.unknown;
            this.owncarddraw = 0;

            this.ownAbilityReady = true;
            this.ownHeroAblility = new Handmanager.Handcard(CardDB.Instance.getCardData(CardDB.Instance.cardNamestringToEnum("fireblast")));

            this.mobsplayedThisTurn = 0;
            //this.startedWithMobsPlayedThisTurn = 0;// only change mobsplayedthisturm
            this.cardsPlayedThisTurn = 0;
            //todo:
            this.optionsPlayedThisTurn = 0;

            this.ueberladung = 0;

            this.ownHeroFatigue = 0;
            this.ownDeckSize = 30;

            //need the following for manacost-calculation
            //this.ownHeroHpStarted = this.ownHero.Hp;
            //this.ownWeaponAttackStarted = this.ownWeaponAttack;
            //this.ownCardsCountStarted = this.owncards.Count;
            //this.ownMobsCountStarted = this.ownMinions.Count + this.enemyMinions.Count;

            this.playedmagierinderkirintor = false;
            this.playedPreparation = false;

            this.winzigebeschwoererin = 0;
            this.managespenst = 0;
            this.soeldnerDerVenture = 0;
            this.beschwoerungsportal = 0;
            this.nerubarweblord = 0;

            //this.startedWithnerubarweblord = 0;
            //this.startedWithbeschwoerungsportal = 0;
            //this.startedWithManagespenst = 0;
            //this.startedWithWinzigebeschwoererin = 0;
            //this.startedWithsoeldnerDerVenture = 0;

            this.ownBaronRivendare = 0;

            //this.loatheb = false;
            this.spellpower = 0;

            //this.startedWithDamagedMinions = false;

            foreach (Minion m in this.ownMinions)
            {
                //if (m.Hp < m.maxHp && m.Hp >= 1) this.startedWithDamagedMinions = true;
                //if (m.playedThisTurn && m.name == CardDB.cardName.loatheb) this.loatheb = true;

                spellpower = spellpower + m.spellpower;
                if (m.silenced) continue;
                spellpower += m.handcard.card.spellpowervalue;
                if (m.name == CardDB.cardName.prophetvelen) this.doublepriest++;


                if (m.name == CardDB.cardName.pintsizedsummoner)
                {
                    this.winzigebeschwoererin++;
                    //this.startedWithWinzigebeschwoererin++;
                }

                if (m.name == CardDB.cardName.manawraith)
                {
                    this.managespenst++;
                    //this.startedWithManagespenst++;
                }
                if (m.name == CardDB.cardName.nerubarweblord)
                {
                    this.nerubarweblord++;
                    //this.startedWithnerubarweblord++;
                }
                if (m.name == CardDB.cardName.venturecomercenary)
                {
                    this.soeldnerDerVenture++;
                    //this.startedWithsoeldnerDerVenture++;
                }
                if (m.name == CardDB.cardName.summoningportal)
                {
                    this.beschwoerungsportal++;
                    //this.startedWithbeschwoerungsportal++;
                }

                if (m.handcard.card.name == CardDB.cardName.baronrivendare)
                {
                    this.ownBaronRivendare++;
                }
                if (m.handcard.card.name == CardDB.cardName.kelthuzad)
                {
                    //this.needGraveyard = true;
                }

                if (m.name == CardDB.cardName.raidleader) this.anzOwnRaidleader++;
                if (m.name == CardDB.cardName.malganis) this.anzOwnMalGanis++;
                if (m.name == CardDB.cardName.stormwindchampion) this.anzOwnStormwindChamps++;
                if (m.name == CardDB.cardName.tundrarhino) this.anzOwnTundrarhino++;
                if (m.name == CardDB.cardName.timberwolf) this.anzOwnTimberWolfs++;
                if (m.name == CardDB.cardName.murlocwarleader) this.anzMurlocWarleader++;
                if (m.name == CardDB.cardName.grimscaleoracle) this.anzGrimscaleOracle++;
                if (m.name == CardDB.cardName.auchenaisoulpriest) this.anzOwnAuchenaiSoulpriest++;
                if (m.name == CardDB.cardName.sorcerersapprentice)
                {
                    this.anzOwnsorcerersapprentice++;
                    //this.anzOwnsorcerersapprenticeStarted++;
                }
                if (m.name == CardDB.cardName.southseacaptain) this.anzOwnSouthseacaptain++;
                if (m.name == CardDB.cardName.chromaggus) this.anzOwnChromaggus++;
                //if (m.name == CardDB.cardName.dragonconsort && anzOwnDragonConsort > 0) this.anzOwnDragonConsortStarted++;
                if (m.name == CardDB.cardName.mechwarper)
                {
                    this.anzOwnMechwarper++;
                    //this.anzOwnMechwarperStarted++;
                }
                if (m.name == CardDB.cardName.steamwheedlesniper && this.ownHeroName == HeroEnum.hunter)
                {
                    this.weHaveSteamwheedleSniper = true;
                }

            }

            foreach (Handmanager.Handcard hc in this.owncards)
            {

                if (hc.card.name == CardDB.cardName.kelthuzad)
                {
                    //this.needGraveyard = true;
                }
            }
        }
Exemplo n.º 35
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;
        }
Exemplo n.º 36
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;
                Helpfunctions.Instance.logg("detect secret with id" + i);
                SecretItem sec = getNewSecretGuessedItem(i, enemyHeroStartClass);

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

            this.enemySecrets.Clear();
            this.enemySecrets.AddRange(newlist);
        }
Exemplo n.º 37
0
        public Playfield(Silverfish sf)
        {
            this.sf = sf;

            this.nextEntity = sf.hrtprozis.getMaxEntity();
            //this.simulateEnemyTurn = sf.Ai.simulateEnemyTurn;
            this.ownController = sf.Hrtprozis.getOwnController();

            //this.ownHeroEntity = sf.Hrtprozis.ownHeroEntity;
            //this.enemyHeroEntity = sf.Hrtprozis.enemyHeroEntitiy;

            this.mana = sf.Hrtprozis.currentMana;
            this.manaTurnEnd = this.mana;
            this.ownMaxMana = sf.Hrtprozis.ownMaxMana;
            this.enemyMaxMana = sf.Hrtprozis.enemyMaxMana;
            this.evaluatePenality = 0;
            this.ownSecretsIDList.AddRange(sf.Hrtprozis.ownSecretList);
            this.enemySecretCount = sf.Hrtprozis.enemySecretCount;


            this.attackFaceHP = sf.Hrtprozis.attackFaceHp;

            this.complete = false;

            addMinionsReal(sf.Hrtprozis.ownMinions, ownMinions);
            addMinionsReal(sf.Hrtprozis.enemyMinions, enemyMinions);
            this.ownHero = new Minion(sf.Hrtprozis.ownHero);
            this.enemyHero = new Minion(sf.Hrtprozis.enemyHero);
            addCardsReal(sf.Handmanager.handCards);

            this.enemySecretList.Clear();
            if (sf.Settings.useSecretsPlayArround)
            {
                foreach (SecretItem si in sf.Probabilitymaker.enemySecrets)
                {
                    this.enemySecretList.Add(new SecretItem(si));
                }
            }

            this.ownHeroName = sf.Hrtprozis.heroname;
            this.enemyHeroName = sf.Hrtprozis.enemyHeroname;
            this.ownHeroStartClass = sf.Hrtprozis.ownHeroStartClass;
            this.enemyHeroStartClass = sf.Hrtprozis.enemyHeroStartClass;

            /*
            this.enemyHeroHp = sf.Hrtprozis.enemyHp;
            this.ownHeroHp = sf.Hrtprozis.heroHp;
            this.ownHeroReady = sf.Hrtprozis.ownheroisread;
            this.ownHeroWindfury = sf.Hrtprozis.ownHeroWindfury;
            this.ownHeroNumAttackThisTurn = sf.Hrtprozis.ownHeroNumAttacksThisTurn;
            this.ownHeroFrozen = sf.Hrtprozis.herofrozen;
            this.enemyHeroFrozen = sf.Hrtprozis.enemyfrozen;
            this.ownheroAngr = sf.Hrtprozis.heroAtk;
            this.heroImmuneWhileAttacking = sf.Hrtprozis.heroImmuneToDamageWhileAttacking;
            this.ownHeroDefence = sf.Hrtprozis.heroDefence;
            this.enemyHeroDefence = sf.Hrtprozis.enemyDefence;
             */

            //####buffs#############################

            this.anzOwnRaidleader = 0;
            this.anzEnemyRaidleader = 0;
            this.anzOwnStormwindChamps = 0;
            this.anzEnemyStormwindChamps = 0;
            this.anzOwnTundrarhino = 0;
            this.anzEnemyTundrarhino = 0;
            this.anzOwnTimberWolfs = 0;
            this.anzEnemyTimberWolfs = 0;
            this.anzMurlocWarleader = 0;
            this.anzGrimscaleOracle = 0;
            this.anzOwnAuchenaiSoulpriest = 0;
            this.anzEnemyAuchenaiSoulpriest = 0;
            this.anzOwnsorcerersapprentice = 0;
            this.anzOwnsorcerersapprenticeStarted = 0;
            this.anzEnemysorcerersapprentice = 0;
            this.anzEnemysorcerersapprenticeStarted = 0;
            this.anzOwnSouthseacaptain = 0;
            this.anzEnemySouthseacaptain = 0;
            this.anzOwnDragonConsortStarted = 0;
            
            this.anzEnemyTaunt = 0;
            this.ownMinionsDiedTurn = 0;
            this.enemyMinionsDiedTurn = 0;

            this.feugenDead = sf.Probabilitymaker.feugenDead;
            this.stalaggDead = sf.Probabilitymaker.stalaggDead;

            this.weHavePlayedMillhouseManastorm = false;

            this.doublepriest = 0;
            this.enemydoublepriest = 0;

            this.ownBaronRivendare = 0;
            this.enemyBaronRivendare = 0;
            //#########################################

            this.ownWeaponDurability = sf.Hrtprozis.heroWeaponDurability;
            this.ownWeaponAttack = sf.Hrtprozis.heroWeaponAttack;
            this.ownWeaponName = sf.Hrtprozis.ownHeroWeapon;
            this.owncarddraw = 0;


            this.enemyWeaponAttack = sf.Hrtprozis.enemyWeaponAttack;//dont know jet
            this.enemyWeaponName = sf.Hrtprozis.enemyHeroWeapon;
            this.enemyWeaponDurability = sf.Hrtprozis.enemyWeaponDurability;
            this.enemycarddraw = 0;

            this.enemyAnzCards = sf.Handmanager.enemyAnzCards;

            this.ownAbilityReady = sf.Hrtprozis.ownAbilityisReady;
            this.ownHeroAblility = new Handmanager.Handcard(sf.Hrtprozis.heroAbility);
            this.enemyHeroAblility = new Handmanager.Handcard(sf.Hrtprozis.enemyAbility);
            this.enemyAbilityReady = false;


            this.mobsplayedThisTurn = sf.Hrtprozis.numMinionsPlayedThisTurn;
            this.startedWithMobsPlayedThisTurn = sf.Hrtprozis.numMinionsPlayedThisTurn;// only change mobsplayedthisturm
            this.cardsPlayedThisTurn = sf.Hrtprozis.cardsPlayedThisTurn;
            //todo:
            this.optionsPlayedThisTurn = sf.Hrtprozis.numOptionsPlayedThisTurn;

            this.ueberladung = sf.Hrtprozis.ueberladung;

            this.ownHeroFatigue = sf.Hrtprozis.ownHeroFatigue;
            this.enemyHeroFatigue = sf.Hrtprozis.enemyHeroFatigue;
            this.ownDeckSize = sf.Hrtprozis.ownDeckSize;
            this.enemyDeckSize = sf.Hrtprozis.enemyDeckSize;

            //need the following for manacost-calculation
            this.ownHeroHpStarted = this.ownHero.Hp;
            this.enemyHeroHpStarted = this.enemyHero.Hp;
            this.ownWeaponAttackStarted = this.ownWeaponAttack;
            this.ownCardsCountStarted = this.owncards.Count;
            this.enemyCardsCountStarted = this.enemyAnzCards;
            this.ownMobsCountStarted = this.ownMinions.Count + this.enemyMinions.Count;

            this.playedmagierinderkirintor = false;
            this.playedPreparation = false;

            this.winzigebeschwoererin = 0;
            this.managespenst = 0;
            this.soeldnerDerVenture = 0;
            this.beschwoerungsportal = 0;
            this.nerubarweblord = 0;

            this.startedWithnerubarweblord = 0;
            this.startedWithbeschwoerungsportal = 0;
            this.startedWithManagespenst = 0;
            this.startedWithWinzigebeschwoererin = 0;
            this.startedWithsoeldnerDerVenture = 0;

            this.ownBaronRivendare = 0;
            this.enemyBaronRivendare = 0;

            needGraveyard = false;
            this.loatheb = false;
            this.spellpower = 0;
            this.enemyspellpower = 0;

            this.startedWithDamagedMinions = false;

            foreach (Minion m in this.ownMinions)
            {
                if (m.Hp < m.maxHp && m.Hp >= 1) this.startedWithDamagedMinions = true;
                if (m.playedThisTurn && m.name == CardDB.cardName.loatheb) this.loatheb = true;

                spellpower = spellpower + m.spellpower;
                if (m.silenced) continue;
                spellpower += m.handcard.card.spellpowervalue;
                if (m.name == CardDB.cardName.prophetvelen) this.doublepriest++;


                if (m.name == CardDB.cardName.pintsizedsummoner)
                {
                    this.winzigebeschwoererin++;
                    this.startedWithWinzigebeschwoererin++;
                }

                if (m.name == CardDB.cardName.manawraith)
                {
                    this.managespenst++;
                    this.startedWithManagespenst++;
                }
                if (m.name == CardDB.cardName.nerubarweblord)
                {
                    this.nerubarweblord++;
                    this.startedWithnerubarweblord++;
                }
                if (m.name == CardDB.cardName.venturecomercenary)
                {
                    this.soeldnerDerVenture++;
                    this.startedWithsoeldnerDerVenture++;
                }
                if (m.name == CardDB.cardName.summoningportal)
                {
                    this.beschwoerungsportal++;
                    this.startedWithbeschwoerungsportal++;
                }

                if (m.handcard.card.name == CardDB.cardName.baronrivendare)
                {
                    this.ownBaronRivendare++;
                }
                if (m.handcard.card.name == CardDB.cardName.kelthuzad)
                {
                    this.needGraveyard = true;
                }

                if (m.name == CardDB.cardName.raidleader) this.anzOwnRaidleader++;
                if (m.name == CardDB.cardName.malganis) this.anzOwnMalGanis++;
                if (m.name == CardDB.cardName.stormwindchampion) this.anzOwnStormwindChamps++;
                if (m.name == CardDB.cardName.tundrarhino) this.anzOwnTundrarhino++;
                if (m.name == CardDB.cardName.timberwolf) this.anzOwnTimberWolfs++;
                if (m.name == CardDB.cardName.murlocwarleader) this.anzMurlocWarleader++;
                if (m.name == CardDB.cardName.grimscaleoracle) this.anzGrimscaleOracle++;
                if (m.name == CardDB.cardName.auchenaisoulpriest) this.anzOwnAuchenaiSoulpriest++;
                if (m.name == CardDB.cardName.sorcerersapprentice)
                {
                    this.anzOwnsorcerersapprentice++;
                    this.anzOwnsorcerersapprenticeStarted++;
                }
                if (m.name == CardDB.cardName.southseacaptain) this.anzOwnSouthseacaptain++;
                if (m.name == CardDB.cardName.chromaggus) this.anzOwnChromaggus++;
                if (m.name == CardDB.cardName.dragonconsort && anzOwnDragonConsort > 0) this.anzOwnDragonConsortStarted++;
                if (m.name == CardDB.cardName.mechwarper)
                {
                    this.anzOwnMechwarper++;
                    this.anzOwnMechwarperStarted++;
                }
                if (m.name == CardDB.cardName.steamwheedlesniper && this.ownHeroName == HeroEnum.hunter)
                {
                    this.weHaveSteamwheedleSniper = true;
                }

            }

            foreach (Handmanager.Handcard hc in this.owncards)
            {

                if (hc.card.name == CardDB.cardName.kelthuzad)
                {
                    this.needGraveyard = true;
                }
            }

            foreach (Minion m in this.enemyMinions)
            {
                this.enemyspellpower = this.enemyspellpower + m.spellpower;
                enemyspellpower += m.handcard.card.spellpowervalue;
                if (m.silenced) continue;
                if (m.taunt) anzEnemyTaunt++;
                if (m.name == CardDB.cardName.prophetvelen) this.enemydoublepriest++;
                if (m.name == CardDB.cardName.manawraith)
                {
                    this.managespenst++;
                    this.startedWithManagespenst++;
                }
                if (m.name == CardDB.cardName.nerubarweblord)
                {
                    this.nerubarweblord++;
                    this.startedWithnerubarweblord++;
                }
                if (m.handcard.card.name == CardDB.cardName.baronrivendare)
                {
                    this.enemyBaronRivendare++;
                }
                if (m.handcard.card.name == CardDB.cardName.kelthuzad)
                {
                    this.needGraveyard = true;
                }

                if (m.name == CardDB.cardName.raidleader) this.anzEnemyRaidleader++;
                if (m.name == CardDB.cardName.malganis) this.anzEnemyMalGanis++;
                if (m.name == CardDB.cardName.stormwindchampion) this.anzEnemyStormwindChamps++;
                if (m.name == CardDB.cardName.tundrarhino) this.anzEnemyTundrarhino++;
                if (m.name == CardDB.cardName.timberwolf) this.anzEnemyTimberWolfs++;
                if (m.name == CardDB.cardName.murlocwarleader) this.anzMurlocWarleader++;
                if (m.name == CardDB.cardName.grimscaleoracle) this.anzGrimscaleOracle++;
                if (m.name == CardDB.cardName.auchenaisoulpriest) this.anzEnemyAuchenaiSoulpriest++;
                if (m.name == CardDB.cardName.sorcerersapprentice)
                {
                    this.anzEnemysorcerersapprentice++;
                    this.anzEnemysorcerersapprenticeStarted++;
                }
                if (m.name == CardDB.cardName.southseacaptain) this.anzEnemySouthseacaptain++;
                if (m.name == CardDB.cardName.chromaggus) this.anzEnemyChromaggus++;
                if (m.name == CardDB.cardName.mechwarper)
                {
                    this.anzEnemyMechwarper++;
                    this.anzEnemyMechwarperStarted++;
                }
                if (m.name == CardDB.cardName.steamwheedlesniper && this.enemyHeroName == HeroEnum.hunter)
                {
                    this.enemyHaveSteamwheedleSniper = true;
                }
            }
            if (this.enemySecretCount >= 1) this.needGraveyard = true;
            if (this.needGraveyard) this.diedMinions = new List<GraveYardItem>(sf.Probabilitymaker.turngraveyard);

            this.tempanzOwnCards = this.owncards.Count;
            this.tempanzEnemyCards = this.enemyAnzCards;


        }
Exemplo n.º 38
0
        public Minion(Minion m)
        {
            //dont silence----------------------------
            this.anzGotDmg = m.anzGotDmg;
            this.isHero = m.isHero;
            this.own = m.own;

            this.name = m.name;
            this.cardClass = m.cardClass;
            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.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;

            // Drew: fixed
            this.cantBeTargetedBySpellsOrHeroPowers = m.cantBeTargetedBySpellsOrHeroPowers;
        }
Exemplo n.º 39
0
        public void updateOwnHero(string weapon, int watt, int wdur, string heron, CardDB.Card hab, bool habrdy, Minion Hero)
        {
            this.ownHeroWeapon = CardDB.Instance.cardNamestringToEnum(weapon);
            this.heroWeaponAttack = watt;
            this.heroWeaponDurability = wdur;

            this.heroname = this.heroNametoEnum(heron);
            Helpfunctions.Instance.logg(this.heroname.ToString());
            this.ownHeroStartClass = Hero.cardClass;

            this.heroAbility = hab;
            this.ownAbilityisReady = habrdy;

            this.ownHero = new Minion(Hero);
            this.ownHero.updateReadyness();
        }
Exemplo n.º 40
0
        public void updateEnemyHero(string weapon, int weaponAttack, int weaponDurability, string heron, int enemMaxMana, CardDB.Card eab, Minion enemyHero)
        {
            this.enemyHeroWeapon = CardDB.Instance.cardNamestringToEnum(weapon);
            this.enemyWeaponAttack = weaponAttack;
            this.enemyWeaponDurability = weaponDurability;

            this.enemyMaxMana = enemMaxMana;

            this.enemyHeroname = this.heroNametoEnum(heron);
            this.enemyHeroStartClass = enemyHero.cardClass;

            this.enemyAbility = eab;

            this.enemyHero = new Minion(enemyHero);

        }