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


C# Playfield.callKid方法代码示例

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


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

示例1: getBattlecryEffect

        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.GVG_110t);//chillwind

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            int pos = (own.own) ? p.ownMinions.Count : p.enemyMinions.Count;
            p.callKid(kid, pos, own.own);
            pos = (own.own) ? p.ownMinions.Count : p.enemyMinions.Count;
            p.callKid(kid, pos, own.own);
        }
开发者ID:John4Jobs,项目名称:silverfish,代码行数:9,代码来源:Sim_GvG_110.cs

示例2: onDeathrattle

        CardDB.Card c = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_301);//felguard
//    todesröcheln:/ legt einen zufälligen dämon aus eurer hand auf das schlachtfeld.

        public override void onDeathrattle(Playfield p, Minion m)
        {
            if (m.own)
            {
                List<Handmanager.Handcard> temp = new List<Handmanager.Handcard>();
                foreach (Handmanager.Handcard hc in p.owncards)
                {
                    if ((TAG_RACE)hc.card.race == TAG_RACE.DEMON)
                    {
                        temp.Add(hc);
                    }
                }

                temp.Sort((x, y) => x.card.Attack.CompareTo(y.card.Attack));

                foreach (Handmanager.Handcard mnn in temp)
                {
                    p.callKid(mnn.card, p.ownMinions.Count, true);
                    p.removeCard(mnn);
                    break;
                }

            }
            else
            {
                if (p.enemyAnzCards >= 1)
                {
                    p.callKid(c, p.enemyMinions.Count , false);
                }
            }
        }
开发者ID:JayMansel,项目名称:silverfish,代码行数:34,代码来源:Sim_FP1_022.cs

示例3: onCardPlay

        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.FP1_007t);//nerub

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            int pos = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count;
            if (p.isServer)
            {
                //TODO
                if (ownplay)
                {
                    p.enemyDeckSize += 3;
                }
                else
                {
                    p.ownDeckSize += 3;
                }
                p.callKid(kid, pos, ownplay);
                p.callKid(kid, pos, ownplay);
                return;
            }
            //hard to simulate
            if (ownplay)
            {
                p.enemyDeckSize += 3;
            }
            else
            {
                p.ownDeckSize += 3;
            }
            p.callKid(kid, pos, ownplay);
            p.callKid(kid, pos, ownplay);
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:32,代码来源:Sim_AT_035.cs

示例4: onCardPlay

		CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.FP1_007t);//4/4Nerubian

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
			if (p.ownDeckSize > 0)
            {
                p.callKid(kid, p.ownMinions.Count, true, false);
                p.ownDeckSize--;
            }
			
            if (p.enemyDeckSize > 0)
            {
                p.callKid(kid, p.enemyMinions.Count, false, false);
                p.enemyDeckSize--;
            }
			
			if (ownplay)
			{
				if (p.ownDeckSize > 0)
				{
                    p.callKid(kid, p.ownMinions.Count, true, false);
					p.ownDeckSize--;
				}
			}
			else
			{
				if (p.enemyDeckSize > 0)
				{
                    p.callKid(kid, p.enemyMinions.Count, false, false);
					p.enemyDeckSize--;
				}
			}
		}
开发者ID:cookiezeater,项目名称:silverfish,代码行数:33,代码来源:Sim_BRMA01_2H.cs

示例5: onCardPlay

        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.CS2_101t);//silverhandrecruit

        //    Summon two 1/1 Recruits.
        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            int posi = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count;

            p.callKid(kid, posi, ownplay);
            p.callKid(kid, posi, ownplay);
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:10,代码来源:Sim_AT_132_PALADIN.cs

示例6: onSecretPlay

        public override void onSecretPlay(Playfield p, bool ownplay, Minion attacker, Minion target, out int number)
        {
            number = 0;
            if (ownplay)
            {
                int posi = p.ownMinions.Count;
                p.callKid(kid, posi, true);
                if (p.ownMinions.Count >= 1)
                {
                    if (p.ownMinions[p.ownMinions.Count - 1].name == CardDB.cardName.spellbender)
                    {
                        number = p.ownMinions[p.ownMinions.Count - 1].entityID;
                    }
                }
            }
            else
            {
                int posi = p.enemyMinions.Count;
                p.callKid(kid, posi, false);

                if (p.enemyMinions.Count >= 1)
                {
                    if (p.enemyMinions[p.enemyMinions.Count - 1].name == CardDB.cardName.spellbender)
                    {
                        number = p.enemyMinions[p.enemyMinions.Count - 1].entityID;
                    }
                }
            }

        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:30,代码来源:Sim_tt_010.cs

示例7: onCardPlay

        CardDB.Card copymin = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.CS2_182); // we take a icewindjety :D

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{

            if (p.isServer)
            {
                List<Handmanager.Handcard> temp = new List<Handmanager.Handcard>();
                List<Handmanager.Handcard> cards = (ownplay)? p.enemyDeck : p.myDeck;

                foreach (Handmanager.Handcard hc in cards)
                {
                    if (hc.card.type == CardDB.cardtype.MOB)
                    {
                        temp.Add(hc);
                    }
                }

                if (temp.Count >= 1)
                {

                    int rand = p.getRandomNumber_SERVER(0, temp.Count - 1);
                    int posi = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count;
                    p.callKid(cards[rand].card, posi, true);
                }
                else
                {
                    int posi = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count;
                    p.callKid(shadow, posi, true);
                }
                return;
            }
            p.callKid(copymin, p.ownMinions.Count, true);
		}
开发者ID:cookiezeater,项目名称:silverfish,代码行数:34,代码来源:Sim_EX1_345.cs

示例8: onCardPlay

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            int dmg = (ownplay) ? p.getSpellDamageDamage(2) : p.getEnemySpellDamageDamage(2);
            p.minionGetDamageOrHeal(target, dmg);

            int posi = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count;
            p.callKid(kid, posi, ownplay);
            posi++;
            p.callKid(kid, posi, ownplay);
        }
开发者ID:martdeboer,项目名称:silverfish,代码行数:10,代码来源:Sim_GvG_045.cs

示例9: getBattlecryEffect

 CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.CS2_050);//searing
 public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
 {
     int pos = (own.own) ? p.ownMinions.Count : p.enemyMinions.Count;
     if (p.isServer)
     {
         //TODO
         p.callKid(kid, pos, own.own, true);
         return;
     }
     p.callKid(kid, pos, own.own, true);
 }
开发者ID:protopenguin,项目名称:silverfish,代码行数:12,代码来源:Sim_AT_046.cs

示例10: getBattlecryEffect

        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.GVG_110t);//chillwind

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            /*int pos = (own.own) ? p.ownMinions.Count : p.enemyMinions.Count;
            p.callKid(kid, pos, own.own);
            pos = (own.own) ? p.ownMinions.Count : p.enemyMinions.Count;
            p.callKid(kid, pos, own.own);*/
            int pos = own.zonepos;
            p.callKid(kid, pos, own.own, true);
            p.callKid(kid, pos, own.own, true);
            own.zonepos++;  // move Boom to the middle of our bots
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:13,代码来源:Sim_GvG_110.cs

示例11: getBattlecryEffect

 CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.CS2_050);//searing
 public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
 {
     int pos = own.zonepos;
     if (p.isServer)
     {
         //TODO
         p.callKid(kid, pos, own.own, true);
         return;
     }
     p.callKid(kid, pos, own.own, true);
 }
开发者ID:noHero123,项目名称:silverfish,代码行数:12,代码来源:Sim_AT_046.cs

示例12: onDeathrattle

        CardDB.Card c = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_301);//felguard
//    todesröcheln:/ legt einen zufälligen dämon aus eurer hand auf das schlachtfeld.

        public override void onDeathrattle(Playfield p, Minion m)
        {
            if (p.isServer)
            {
                List<Handmanager.Handcard> temp = new List<Handmanager.Handcard>();
                List<Handmanager.Handcard> cards = (m.own) ? p.owncards : p.EnemyCards;

                foreach (Handmanager.Handcard hc in cards)
                {
                    if ((TAG_RACE)hc.card.race == TAG_RACE.DEMON)
                    {
                        temp.Add(hc);
                    }
                }

                if (temp.Count == 0) return;

                int rand = p.getRandomNumber_SERVER(0, temp.Count - 1);

                p.callKid(cards[rand].card, p.ownMinions.Count, m.own);
                p.removeCard_SERVER(cards[rand], m.own);

                return;
            }

            if (m.own)
            {
                List<Handmanager.Handcard> temp = new List<Handmanager.Handcard>();
                foreach (Handmanager.Handcard hc in p.owncards)
                {
                    if ((TAG_RACE)hc.card.race == TAG_RACE.DEMON)
                    {
                        temp.Add(hc);
                    }
                }

                temp.Sort((x, y) => x.card.Attack.CompareTo(y.card.Attack));

                foreach (Handmanager.Handcard mnn in temp)
                {
                    p.callKid(mnn.card, p.ownMinions.Count, true);
                    p.removeCard(mnn);
                    break;
                }

            }
            else
            {
                if (p.enemyAnzCards >= 1)
                {
                    p.callKid(c, p.enemyMinions.Count , false);
                }
            }
        }
开发者ID:noHero123,项目名称:silverfish,代码行数:57,代码来源:Sim_FP1_022.cs

示例13: onInspire

        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_050); //coldlight oracle

        public override void onInspire(Playfield p, Minion m)
        {
            int pos = (m.own) ? p.ownMinions.Count : p.enemyMinions.Count;

            if (p.isServer)
            {
                //TODO
                p.callKid(kid, pos, m.own);
                return;
            }

            p.callKid(kid, pos, m.own);
        }
开发者ID:protopenguin,项目名称:silverfish,代码行数:15,代码来源:Sim_AT_076.cs

示例14: onInspire

        CardDB.Card warleader = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_507); //murloc warleader

        public override void onInspire(Playfield p, Minion m)
        {
            int pos = (m.own) ? p.ownMinions.Count : p.enemyMinions.Count;

            if (p.isServer)
            {
                //TODO
                p.callKid(kid, pos, m.own);
                return;
            }

            p.callKid((m.own ? kid : warleader), pos, m.own);  // assume worse scenario (warleader) for enemy vs average scenario (oracle) for us
        }
开发者ID:noHero123,项目名称:silverfish,代码行数:15,代码来源:Sim_AT_076.cs

示例15: onCardPlay

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {

            int pos = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count;
            p.callKid(kid, pos, ownplay, false);

            for (int i = 0; i < 2; i++)
            {
                pos = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count;
                p.callKid(kid, pos + 1, ownplay, true);  // spawnkid
            }
            p.equipWeapon(w, ownplay);
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:13,代码来源:Sim_GvG_061.cs


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