HearthBuddy炉石兄弟 格雷迈恩

Posted chucklu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了HearthBuddy炉石兄弟 格雷迈恩相关的知识,希望对你有一定的参考价值。

 

 getDecks(); 设置

 private void getDecks()
        
            Dictionary<string, int> tmpDeck = new Dictionary<string, int>(startDeck);
            List<GraveYardItem> graveYard = new List<GraveYardItem>();
            Dictionary<CardDB.cardIDEnum, int> og = new Dictionary<CardDB.cardIDEnum, int>();
            Dictionary<CardDB.cardIDEnum, int> eg = new Dictionary<CardDB.cardIDEnum, int>();
            int owncontroler = TritonHs.OurHero.GetTag(GAME_TAG.CONTROLLER);
            int enemycontroler = TritonHs.EnemyHero.GetTag(GAME_TAG.CONTROLLER);
            turnDeck.Clear();
            noDuplicates = false;

            List<HSCard> allcards = TritonHs.GetAllCards();

            int allcardscount = allcards.Count;
            for (int i = 0; i < allcardscount; i++)
            
                HSCard entity = allcards[i];
                if (entity.Id == null || entity.Id == "") continue;

                if (CardDB.Instance.cardIdstringToEnum(entity.Id) == CardDB.cardIDEnum.UNG_116t) ownMinionsCost0 = true;

                if (entity.GetZone() == Triton.Game.Mapping.TAG_ZONE.GRAVEYARD)
                
                    CardDB.cardIDEnum cide = CardDB.Instance.cardIdstringToEnum(entity.Id);
                    GraveYardItem gyi = new GraveYardItem(cide, entity.EntityId, entity.GetTag(GAME_TAG.CONTROLLER) == owncontroler);
                    graveYard.Add(gyi);

                    if (entity.GetTag(GAME_TAG.CONTROLLER) == owncontroler)
                    
                        if (og.ContainsKey(cide)) og[cide]++;
                        else og.Add(cide, 1);
                    
                    else if (entity.GetTag(GAME_TAG.CONTROLLER) == enemycontroler)
                    
                        if (eg.ContainsKey(cide)) eg[cide]++;
                        else eg.Add(cide, 1);
                    
                    if (cide == CardDB.cardIDEnum.UNG_067t1) ownCrystalCore = 5;
                

                string entityId = entity.Id;
                Triton.Game.Mapping.TAG_ZONE entZone =  entity.GetZone();
                if (i < 30)
                
                    if (entityId != "")
                    
                        if (entZone == Triton.Game.Mapping.TAG_ZONE.DECK) continue;
                        if (tmpDeck.ContainsKey(entityId)) tmpDeck[entityId]--;
                    
                
                else if (i >= 60 && entity.ControllerId == owncontroler)
                
                    if (extraDeck.ContainsKey(i))
                    
                        if (entityId != "" && entityId != extraDeck[i].id) extraDeck[i].setId(entityId);
                        if ((entZone == Triton.Game.Mapping.TAG_ZONE.DECK) != extraDeck[i].isindeck) extraDeck[i].setisindeck(entZone == Triton.Game.Mapping.TAG_ZONE.DECK);
                    
                    else if (entZone == Triton.Game.Mapping.TAG_ZONE.DECK)
                    
                        extraDeck.Add(i, new extraCard(entityId, true));
                    
                
            

            Action a = Ai.Instance.bestmove;
            foreach (var c in extraDeck)
            
                if (c.Value.isindeck == false) continue;
                CardDB.cardIDEnum ce;
                string entityId = c.Value.id;
                if (entityId == "")
                
                    if (a != null)
                    
                        switch (a.actionType)
                        
                            case actionEnum.playcard:
                                switch (a.card.card.cardIDenum)
                                
                                    case CardDB.cardIDEnum.LOE_104: goto case CardDB.cardIDEnum.BRM_007; 
                                    case CardDB.cardIDEnum.BRM_007: 
                                        if (a.target != null) entityId = a.target.handcard.card.cardIDenum.ToString();
                                        break;
                                    case CardDB.cardIDEnum.LOE_002: entityId = "LOE_002t"; break; 
                                    case CardDB.cardIDEnum.LOE_079: entityId = "LOE_019t"; break; 
                                    case CardDB.cardIDEnum.LOE_019t: entityId = "LOE_019t2"; break;
                                    case CardDB.cardIDEnum.LOE_110: entityId = "LOE_110t"; break; 
                                
                                break;
                        
                    
                    if (entityId == "")
                    
                        var oldCardsOut = Probabilitymaker.Instance.enemyCardsOut;
                        foreach (var tmp in eg)
                        
                            if (oldCardsOut.ContainsKey(tmp.Key) && tmp.Value == oldCardsOut[tmp.Key]) continue;
                            switch (tmp.Key)
                            
                                case CardDB.cardIDEnum.AT_035: entityId = "AT_035t"; break; 
                                case CardDB.cardIDEnum.GVG_031: entityId = "aiextra1"; break; 
                                case CardDB.cardIDEnum.LOE_111: entityId = "LOE_111"; break; 
                            
                        
                        if (entityId == "" && lastpf != null)
                        
                            int num = 0;
                            foreach (Minion m in this.enemyMinions)
                            
                                if (m.handcard.card.cardIDenum == CardDB.cardIDEnum.GVG_056) num++; 
                            
                            if (num > 0)
                            
                                foreach (Minion m in lastpf.enemyMinions)
                                
                                    if (m.handcard.card.cardIDenum == CardDB.cardIDEnum.GVG_056) num--;
                                
                            
                            if (num > 0) entityId = "GVG_056t";
                            else
                            
                                num = 0;
                                foreach (Minion m in lastpf.ownMinions)
                                
                                    if (m.handcard.card.cardIDenum == CardDB.cardIDEnum.GVG_035) num++; 
                                
                                if (num > 0)
                                
                                    foreach (Minion m in this.ownMinions)
                                    
                                        if (m.handcard.card.cardIDenum == CardDB.cardIDEnum.GVG_035) num--;
                                    
                                
                                if (num > 0) entityId = "GVG_035";
                            
                        
                    
                    if (entityId == "") entityId = "aiextra1";
                
                c.Value.setId(entityId);
                ce = CardDB.Instance.cardIdstringToEnum(entityId);
                if (turnDeck.ContainsKey(ce)) turnDeck[ce]++;
                else turnDeck.Add(ce, 1);
            
            foreach (var c in tmpDeck)
            
                if (c.Value < 1) continue;
                CardDB.cardIDEnum ce = CardDB.Instance.cardIdstringToEnum(c.Key);
                if (ce == CardDB.cardIDEnum.None) continue;
                if (turnDeck.ContainsKey(ce)) turnDeck[ce] += c.Value;
                else turnDeck.Add(ce, c.Value);
            

            Probabilitymaker.Instance.setOwnCardsOut(og);
            Probabilitymaker.Instance.setEnemyCardsOut(eg);
            bool isTurnStart = false;
            if (Ai.Instance.nextMoveGuess.mana == -100)
            
                isTurnStart = true;
                Ai.Instance.updateTwoTurnSim();
            
            Probabilitymaker.Instance.setGraveYard(graveYard, isTurnStart);

            if (startDeck.Count == 0) return;
            noDuplicates = true;
            foreach (int i in turnDeck.Values)
            
                if (i > 1)
                
                    noDuplicates = false;
                    break;
                
            
        

 

以上是关于HearthBuddy炉石兄弟 格雷迈恩的主要内容,如果未能解决你的问题,请参考以下文章

《奔跑吧兄弟》主题曲,筷子兄弟唱的,求mp3百度云!

jquery如何获取某一个兄弟节点,不是全部的,是指定的兄弟节点

黑马程序员的课程不如兄弟连兄弟会好

树的孩子兄弟表示法实例(C++实现的)

求解css相邻兄弟选择器该怎么去理解

兄弟组件怎么粘在一起css