当前位置: 首页>>代码示例>>C#>>正文


C# Playfield.getNextEntity方法代码示例

本文整理汇总了C#中HREngine.Bots.Playfield.getNextEntity方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.getNextEntity方法的具体用法?C# Playfield.getNextEntity怎么用?C# Playfield.getNextEntity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HREngine.Bots.Playfield的用法示例。


在下文中一共展示了Playfield.getNextEntity方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: getBattlecryEffect

        //Battlecry: Put one of each Secret from your deck into the battlefield

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            //if(p.isServer) 
            //TODO

            if (own.own)
            {
                if (p.ownHeroName == HeroEnum.mage)
                {
                    p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_289);
                }
                if (p.ownHeroName == HeroEnum.hunter)
                {
                    p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_554);
                }
                if (p.ownHeroName == HeroEnum.pala)
                {
                    p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_130); //noble sac
                    p.ownSecretsIDList.Add(CardDB.cardIDEnum.FP1_020); //avenge
                }
            }
            else
            {
                if (p.enemyHeroName == HeroEnum.mage || p.enemyHeroName == HeroEnum.hunter || p.enemyHeroName == HeroEnum.pala)
                {
                    if (p.enemySecretCount <= 4)
                    {
                        p.enemySecretCount++;
                        SecretItem si = Probabilitymaker.Instance.getNewSecretGuessedItem(p.getNextEntity(), p.enemyHeroName);
                        if (p.enemyHeroName == HeroEnum.pala)
                        {
                            si.canBe_redemption = false;
                        }
                        if (Settings.Instance.useSecretsPlayArround)
                        {
                            p.enemySecretList.Add(si);
                        }
                    }
                }
            }
            
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:44,代码来源:Sim_AT_079.cs

示例2: onDeathrattle

        //<deDE>Todesröcheln: Legt ein Geheimnis aus Eurem Deck auf das Schlachtfeld.

        public override void onDeathrattle(Playfield p, Minion m)
        {
            //if(p.isServer)

            if (m.own)
            {
                if (p.ownHeroName == HeroEnum.mage)
                {
                    p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_289);
                }
                if (p.ownHeroName == HeroEnum.hunter)
                {
                    p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_554);
                }
                if (p.ownHeroName == HeroEnum.pala)
                {
                    p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_130);
                }
            }
            else
            {
                if (p.enemyHeroName == HeroEnum.mage || p.enemyHeroName == HeroEnum.hunter || p.enemyHeroName == HeroEnum.pala)
                {
                    if (p.enemySecretCount <= 4)
                    {
                        p.enemySecretCount++;
                        SecretItem si = Probabilitymaker.Instance.getNewSecretGuessedItem(p.getNextEntity(), p.enemyHeroName);
                        if (p.enemyHeroName == HeroEnum.pala)
                        {
                            si.canBe_redemption = false;
                        }
                        if (Settings.Instance.useSecretsPlayArround)
                        {
                            p.enemySecretList.Add(si);
                        }
                    }
                }
            }
            
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:42,代码来源:Sim_FP1_004.cs

示例3: onDeathrattle

        // 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);
                        }
                    }
                }
            }
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:39,代码来源:Sim_FP1_004.cs

示例4: Sim_AT_079

        //Battlecry: Put one of each Secret from your deck into the battlefield
        /*Dictionary<CardDB.cardIDEnum, int> PaladinSecretDatabase = new Dictionary<CardDB.cardIDEnum, int>();
        private Sim_AT_079()
        {
            PaladinSecretList();
        }
        private void PaladinSecretList()
        {
            PaladinSecretDatabase.Add(CardDB.cardIDEnum.EX1_130, 0);
            PaladinSecretDatabase.Add(CardDB.cardName.biggamehunter, 0);
            PaladinSecretDatabase.Add(CardDB.cardName.ironbeakowl, 0);
        }*/

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            //if(p.isServer) 
            //TODO

            if (own.own)
            {
                if (p.ownHeroName == HeroEnum.mage)
                {
                    p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_289);
                }
                if (p.ownHeroName == HeroEnum.hunter)
                {
                    p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_554);
                }
                if (p.ownHeroName == HeroEnum.pala)
                {
                    int AT_073 = 0; //Competitive Spirit AT_073
                    int EX1_130 = 0; //Noble Sacrifice EX1_130
                    int EX1_136 = 0; //Redemption EX1_136
                    int FP1_020 = 0; //Avenge FP1_020
                    int EX1_379 = 0; //Repentance EX1_379                 
                    foreach (KeyValuePair<CardDB.cardIDEnum, int> e in Probabilitymaker.Instance.ownCardsPlayed)
                    {
                        if (e.Key == CardDB.cardIDEnum.AT_073) AT_073 = e.Value;//Competitive Spirit
                        if (e.Key == CardDB.cardIDEnum.EX1_130) EX1_130 = e.Value;//Noble Sacrifice
                        if (e.Key == CardDB.cardIDEnum.EX1_136) EX1_136 = e.Value;//Redemption
                        if (e.Key == CardDB.cardIDEnum.FP1_020) FP1_020 = e.Value;//Avenge
                        if (e.Key == CardDB.cardIDEnum.EX1_379) EX1_379 = e.Value;//Repentance
                    }
                    int AT_073inhand = 0;
                    int EX_130inhand = 0;
                    int EX1_136inhand = 0;
                    int FP1_020inhand = 0;
                    int EX1_379inhand = 0;
                    foreach (Handmanager.Handcard hcc in p.owncards)
                    {
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.AT_073) AT_073inhand++;
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.EX1_130) EX_130inhand++;
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.EX1_136) EX1_136inhand++;
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.FP1_020) FP1_020inhand++;
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.EX1_379) EX1_379inhand++;
                    }



                    if ((AT_073 + AT_073inhand < Settings.Instance.Competitive_Spirit_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.AT_073)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.AT_073); //Competitive Spirit
                    if ((EX1_130 + EX_130inhand < Settings.Instance.Noble_Sacrifice_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.EX1_130)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_130); //Noble Sacrifice
                    if ((EX1_136 + EX1_136inhand < Settings.Instance.Redemption_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.EX1_136)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_136); //Redemption
                    if ((FP1_020 + FP1_020inhand < Settings.Instance.Avenge_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.FP1_020)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.FP1_020); //Avenge
                    if ((EX1_379 + EX1_379inhand < Settings.Instance.Repentance_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.EX1_379)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_379); //Repentance


                }
            }
            else
            {
                if (p.enemyHeroName == HeroEnum.mage || p.enemyHeroName == HeroEnum.hunter || p.enemyHeroName == HeroEnum.pala)
                {
                    if (p.enemySecretCount <= 4)
                    {
                        p.enemySecretCount++;
                        SecretItem si = Probabilitymaker.Instance.getNewSecretGuessedItem(p.getNextEntity(), p.enemyHeroName);
                        if (p.enemyHeroName == HeroEnum.pala)
                        {
                            si.canBe_redemption = false;
                        }
                        if (Settings.Instance.useSecretsPlayArround)
                        {
                            p.enemySecretList.Add(si);
                        }
                    }
                }
            }
            
        }
开发者ID:ANAXRIDER,项目名称:custom,代码行数:89,代码来源:Sim__AT_079.cs

示例5: onDeathrattle


//.........这里部分代码省略.........
                        if (e.Key == CardDB.cardIDEnum.EX1_609) EX1_609 = e.Value;//Snipe EX1_609
                        if (e.Key == CardDB.cardIDEnum.EX1_610) EX1_610 = e.Value;//Explosive Trap EX1_610
                    }
                    int AT_060inhand = 0;
                    int EX1_533inhand = 0;
                    int EX1_554inhand = 0;
                    int EX1_611inhand = 0;
                    int EX1_609inhand = 0;
                    int EX1_610inhand = 0;
                    foreach (Handmanager.Handcard hcc in p.owncards)
                    {
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.AT_060) AT_060inhand++;
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.EX1_533) EX1_533inhand++;
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.EX1_554) EX1_554inhand++;
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.EX1_611) EX1_611inhand++;
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.EX1_609) EX1_609inhand++;
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.EX1_610) EX1_610inhand++;
                    }

                    //순서 : 나쁜순서
                    //눈속임 -> 스나 -> 뱀 -> 곰 -> 폭 -> 빙

                    //눈속
                    if ((EX1_533 + EX1_533inhand < Settings.Instance.Misdirection_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.EX1_533)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_533); //Misdirection EX1_533
                    //스나
                    else if ((EX1_609 + EX1_609inhand < Settings.Instance.Snipe_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.EX1_609)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_609); //Snipe EX1_609
                    //뱀
                    else if ((EX1_554 + EX1_554inhand < Settings.Instance.Snake_Trap_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.EX1_554)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_554); //Snake Trap EX1_554
                    //곰
                    else if ((AT_060 + AT_060inhand < Settings.Instance.Bear_Trap_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.AT_060)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.AT_060); //Bear Trap AT_060
                    //폭
                    else if ((EX1_610 + EX1_610inhand < Settings.Instance.Explosive_Trap_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.EX1_610)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_610); //Explosive Trap EX1_610
                    //빙
                    else if ((EX1_611 + EX1_611inhand < Settings.Instance.Freezing_Trap_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.EX1_611)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_611); //Freezing Trap EX1_611
                    
                    


                }
                if (p.ownHeroName == HeroEnum.pala)
                {
                    int AT_073 = 0; //Competitive Spirit AT_073
                    int EX1_130 = 0; //Noble Sacrifice EX1_130
                    int EX1_136 = 0; //Redemption EX1_136
                    int FP1_020 = 0; //Avenge FP1_020
                    int EX1_379 = 0; //Repentance EX1_379                 
                    foreach (KeyValuePair<CardDB.cardIDEnum, int> e in Probabilitymaker.Instance.ownCardsPlayed)
                    {
                        if (e.Key == CardDB.cardIDEnum.AT_073) AT_073 = e.Value;//Competitive Spirit
                        if (e.Key == CardDB.cardIDEnum.EX1_130) EX1_130 = e.Value;//Noble Sacrifice
                        if (e.Key == CardDB.cardIDEnum.EX1_136) EX1_136 = e.Value;//Redemption
                        if (e.Key == CardDB.cardIDEnum.FP1_020) FP1_020 = e.Value;//Avenge
                        if (e.Key == CardDB.cardIDEnum.EX1_379) EX1_379 = e.Value;//Repentance
                    }
                    int AT_073inhand = 0;
                    int EX_130inhand = 0;
                    int EX1_136inhand = 0;
                    int FP1_020inhand = 0;
                    int EX1_379inhand = 0;
                    foreach (Handmanager.Handcard hcc in p.owncards)
                    {
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.AT_073) AT_073inhand++;
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.EX1_130) EX_130inhand++;
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.EX1_136) EX1_136inhand++;
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.FP1_020) FP1_020inhand++;
                        if (hcc.card.cardIDenum == CardDB.cardIDEnum.EX1_379) EX1_379inhand++;
                    }

                    //순서 : 나쁜순서
                    //눈눈 -> 

                    if ((AT_073 + AT_073inhand < Settings.Instance.Competitive_Spirit_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.AT_073)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.AT_073); //Competitive Spirit
                    if ((EX1_130 + EX_130inhand < Settings.Instance.Noble_Sacrifice_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.EX1_130)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_130); //Noble Sacrifice
                    if ((EX1_136 + EX1_136inhand < Settings.Instance.Redemption_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.EX1_136)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_136); //Redemption
                    if ((FP1_020 + FP1_020inhand < Settings.Instance.Avenge_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.FP1_020)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.FP1_020); //Avenge
                    if ((EX1_379 + EX1_379inhand < Settings.Instance.Repentance_COUNT) && !p.ownSecretsIDList.Contains(CardDB.cardIDEnum.EX1_379)) p.ownSecretsIDList.Add(CardDB.cardIDEnum.EX1_379); //Repentance

                }
            }
            else
            {
                if (p.enemyHeroName == HeroEnum.mage || p.enemyHeroName == HeroEnum.hunter || p.enemyHeroName == HeroEnum.pala)
                {
                    if (p.enemySecretCount <= 4)
                    {
                        p.enemySecretCount++;
                        SecretItem si = Probabilitymaker.Instance.getNewSecretGuessedItem(p.getNextEntity(), p.enemyHeroName);
                        if (p.enemyHeroName == HeroEnum.pala)
                        {
                            si.canBe_redemption = false;
                        }
                        if (Settings.Instance.useSecretsPlayArround)
                        {
                            p.enemySecretList.Add(si);
                        }
                    }
                }
            }
            
        }
开发者ID:ANAXRIDER,项目名称:custom,代码行数:101,代码来源:Sim_FP1_004.cs


注:本文中的HREngine.Bots.Playfield.getNextEntity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。