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


C# Playfield.minionTransform方法代码示例

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


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

示例1: onTurnStartTrigger

//    verwandelt zu beginn eures zuges einen zufälligen diener in ein huhn (1/1).

        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if (triggerEffectMinion.own == turnStartOfOwner)
            {
                if (p.isServer)
                {
                    Minion choosen = p.getRandomCharExcept_SERVER(null, false);
                    if (choosen != null) p.minionTransform(choosen, c);
                    return;
                }

                Minion tm = null;
                int ges = 1000;
                foreach (Minion m in p.ownMinions)
                {
                    if (m.Angr + m.Hp < ges)
                    {
                        tm = m;
                        ges = m.Angr + m.Hp;
                    }
                }
                foreach (Minion m in p.enemyMinions)
                {
                    if (m.Angr + m.Hp < ges)
                    {
                        tm = m;
                        ges = m.Angr + m.Hp;
                    }
                }
                if (ges <= 999)
                {
                    p.minionTransform(tm, c);
                }
            }
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:37,代码来源:Sim_Mekka4.cs

示例2: getBattlecryEffect

        CardDB.Card card2 = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_tk28); // squirrel
        //todo better
//    kampfschrei:/ verwandelt einen anderen zufälligen diener in einen teufelssaurier (5/5) oder ein eichhörnchen (1/1).
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            int oc = p.ownMinions.Count;
            int ec = p.enemyMinions.Count;
            if (oc == 0 && ec == 0) return;
            if (oc > ec)
            {
                List<Minion> temp = new List<Minion>(p.ownMinions);
                temp.AddRange(p.enemyMinions);
                temp.Sort((a, b) => a.Hp.CompareTo(b.Hp));//transform the weakest
                foreach (Minion m in temp)
                {
                    p.minionTransform(m, card1);
                    break;
                }
            }
            else
            {
                List<Minion> temp = new List<Minion>(p.ownMinions);
                temp.AddRange(p.enemyMinions);
                temp.Sort((a, b) => -a.Hp.CompareTo(b.Hp));//transform the strongest
                foreach (Minion m in temp)
                {
                    p.minionTransform(m, card2);
                    break;
                }
            }
		}
开发者ID:JayMansel,项目名称:silverfish,代码行数:31,代码来源:Sim_EX1_083.cs

示例3: getBattlecryEffect

        CardDB.Card bear = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.BRM_010t2);//2/5 minion.
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            if (choice == 1)
            {
                p.minionTransform(own, cat);
            }
            if (choice == 2)
            {
                p.minionTransform(own, bear);
            }
		}
开发者ID:martdeboer,项目名称:silverfish,代码行数:12,代码来源:Sim_BRM_010.cs

示例4: getBattlecryEffect

		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            if (choice == 1)
            {
                p.minionTransform(own, fireCat52);
            }
            else if (choice == 2)
            {
                p.minionTransform(own, fireHawk25);
            }
		}
开发者ID:shuyi3,项目名称:AIPJ,代码行数:11,代码来源:Sim_BRM_010.cs

示例5: getBattlecryEffect

        CardDB.Card cTiger = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.OG_044c);// 3/2 stealth charge minion

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            if (p.anzOwnFandralStaghelm > 0 && own.own)
            {
                p.minionTransform(own, cTiger);
            }
            else if (choice == 1)
            {
                p.minionTransform(own, cCharge);
            }
            else if (choice == 2)
            {
                p.minionTransform(own, cStealth);
            }
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:17,代码来源:Sim_AT_042.cs

示例6: onTurnStartTrigger

//    tauscht zu beginn eures zuges diesen diener gegen einen zufälligen diener auf eurer hand aus.

        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if (turnStartOfOwner && triggerEffectMinion.own == turnStartOfOwner)
            {
                List<Handmanager.Handcard> temp2 = new List<Handmanager.Handcard>();
                foreach (Handmanager.Handcard hc in p.owncards)
                {
                    if (hc.card.type == CardDB.cardtype.MOB) temp2.Add(hc);
                }
                temp2.Sort((a, b) => -a.card.Attack.CompareTo(b.card.Attack));//damage the stronges
                foreach (Handmanager.Handcard mins in temp2)
                {
                    CardDB.Card c = CardDB.Instance.getCardDataFromID(mins.card.cardIDenum);
                    p.minionTransform(triggerEffectMinion, c);
                    p.removeCard(mins);
                    p.drawACard(CardDB.cardName.alarmobot, true, true);
                    break;
                }
                return;
            }

            if (!turnStartOfOwner && triggerEffectMinion.own == turnStartOfOwner)
            {
                p.minionGetBuffed(triggerEffectMinion, 4, 4);
                triggerEffectMinion.Hp = triggerEffectMinion.maxHp;
            }
        }
开发者ID:JayMansel,项目名称:silverfish,代码行数:29,代码来源:Sim_EX1_006.cs

示例7: onTurnStartTrigger

//    verwandelt zu beginn eures zuges einen zufälligen diener in ein huhn (1/1).

        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if (triggerEffectMinion.own == turnStartOfOwner)
            {
                Minion tm = null;
                int ges = 1000;
                foreach (Minion m in p.ownMinions)
                {
                    if (m.Angr + m.Hp < ges)
                    {
                        tm = m;
                        ges = m.Angr + m.Hp;
                    }
                }
                foreach (Minion m in p.enemyMinions)
                {
                    if (m.Angr + m.Hp < ges)
                    {
                        tm = m;
                        ges = m.Angr + m.Hp;
                    }
                }
                if (ges <= 999)
                {
                    p.minionTransform(tm, c);
                }
            }
        }
开发者ID:JayMansel,项目名称:silverfish,代码行数:30,代码来源:Sim_Mekka4.cs

示例8: onTurnStartTrigger

//    tauscht zu beginn eures zuges diesen diener gegen einen zufälligen diener auf eurer hand aus.

        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if (p.isServer && triggerEffectMinion.own == turnStartOfOwner)
            {
                List<Handmanager.Handcard> temp2 = new List<Handmanager.Handcard>();
                List<Handmanager.Handcard> hand = (turnStartOfOwner) ? p.owncards : p.EnemyCards;
                foreach (Handmanager.Handcard hc in hand)
                {
                    if (hc.card.type == CardDB.cardtype.MOB) temp2.Add(hc);
                }
                if (temp2.Count == 0) return;

                int random = p.getRandomNumber_SERVER(0, temp2.Count - 1);
                p.minionTransform(triggerEffectMinion, temp2[random].card);
                p.removeCard(temp2[random]);
                p.drawACard(CardDB.cardIDEnum.EX1_006, turnStartOfOwner, true);

                return;
            }


            if (turnStartOfOwner && triggerEffectMinion.own == turnStartOfOwner)
            {
                List<Handmanager.Handcard> temp2 = new List<Handmanager.Handcard>();
                foreach (Handmanager.Handcard hc in p.owncards)
                {
                    if (hc.card.type == CardDB.cardtype.MOB) temp2.Add(hc);
                }
                temp2.Sort((a, b) => -a.card.Attack.CompareTo(b.card.Attack));//damage the stronges
                foreach (Handmanager.Handcard mins in temp2)
                {
                    CardDB.Card c = CardDB.Instance.getCardDataFromID(mins.card.cardIDenum);
                    p.minionTransform(triggerEffectMinion, c);
                    p.removeCard(mins);
                    p.drawACard(CardDB.cardIDEnum.EX1_006, true, true);
                    break;
                }
                return;
            }

            if (!turnStartOfOwner && triggerEffectMinion.own == turnStartOfOwner)
            {
                p.minionGetBuffed(triggerEffectMinion, 4, 4);
                triggerEffectMinion.Hp = triggerEffectMinion.maxHp;
            }
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:48,代码来源:Sim_EX1_006.cs

示例9: getBattlecryEffect

        CardDB.Card card2 = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_tk28); // squirrel
        //todo better
//    kampfschrei:/ verwandelt einen anderen zufälligen diener in einen teufelssaurier (5/5) oder ein eichhörnchen (1/1).
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            if (p.isServer)
            {
                Minion choosen = p.getRandomCharExcept_SERVER(null, false);
                if (choosen != null)
                {
                    int rand = p.getRandomNumber_SERVER(0, 1);
                    if (rand == 0) p.minionTransform(choosen, card1);
                    if (rand == 1) p.minionTransform(choosen, card2);
                }
                return;
            }


            int oc = p.ownMinions.Count;
            int ec = p.enemyMinions.Count;
            if (oc == 0 && ec == 0) return;
            if (oc > ec)
            {
                List<Minion> temp = new List<Minion>(p.ownMinions);
                temp.AddRange(p.enemyMinions);
                temp.Sort((a, b) => a.Hp.CompareTo(b.Hp));//transform the weakest
                foreach (Minion m in temp)
                {
                    p.minionTransform(m, card1);
                    break;
                }
            }
            else
            {
                List<Minion> temp = new List<Minion>(p.ownMinions);
                temp.AddRange(p.enemyMinions);
                temp.Sort((a, b) => -a.Hp.CompareTo(b.Hp));//transform the strongest
                foreach (Minion m in temp)
                {
                    p.minionTransform(m, card2);
                    break;
                }
            }
		}
开发者ID:noHero123,项目名称:silverfish,代码行数:44,代码来源:Sim_EX1_083.cs

示例10: getBattlecryEffect

 public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
 {
     List<Minion> temp = (own.own) ? p.ownMinions : p.enemyMinions;
     bool hasbeast = false;
     foreach (Minion m in temp)
     {
         if ((TAG_RACE)m.handcard.card.race == TAG_RACE.PET)
         {
             hasbeast = true;
         }
     }
     if(hasbeast) p.minionTransform(own, betterguy);
 }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:13,代码来源:Sim_GvG_080.cs

示例11: getBattlecryEffect

 public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
 {
     p.minionTransform(own, hawk);
 }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:4,代码来源:Sim_BRM_010b.cs

示例12: onCardPlay

//    verwandelt einen diener in einen frosch (0/1) mit spott/.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            p.minionTransform(target, card);
		}
开发者ID:JayMansel,项目名称:silverfish,代码行数:6,代码来源:Sim_EX1_246.cs

示例13: getBattlecryEffect

        //Battlecry: Transform a friendly minion into a random one that costs (1) more.

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            if(target == null) return;
            p.minionTransform(target, p.getRandomCardForManaMinion(target.handcard.card.cost + 1));
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:7,代码来源:Sim_OG_328.cs

示例14: getBattlecryEffect

        //   Battlecry: Transform a friendly minion into a random minion with the same Cost.

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            if(target == null) return;
            p.minionTransform(target, target.handcard.card);
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:7,代码来源:Sim_GvG_108.cs


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