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


C# Playfield.minionGetDestroyed方法代码示例

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


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

示例1: getBattlecryEffect

        //todo list
        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            if (p.isServer)
            {
                List<Minion> temp22 = (own.own) ? p.enemyMinions : p.ownMinions;
                List<Minion> temp23 = new List<Minion>();
                foreach (Minion enemy in temp22)
                {
                    if (enemy.Angr <= 2)
                    {
                        temp23.Add(enemy);
                    }
                }
                Minion choosen = p.getRandomMinionOfThatList(temp23);
                if (choosen != null) p.minionGetDestroyed(choosen);
                return;
            }
            List<Minion> temp2 = (own.own) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
            temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//destroys the weakest
            foreach (Minion enemy in temp2)
            {
                if (enemy.Angr <= 2)
                {
                    p.minionGetDestroyed(enemy);
                    break;
                }
            }

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

示例2: onCardPlay

        //Destroy 2 random enemy minions. Discard 2 random cards.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            if (p.isServer)
            {
                Minion choosen = p.getRandomMinionFromSide_SERVER(!ownplay, false);
                if (choosen != null) p.minionGetDestroyed(choosen);

                choosen = p.getRandomMinionFromSide_SERVER(!ownplay, false);
                if (choosen != null) p.minionGetDestroyed(choosen);

                p.discardRandomCard_SERVER(ownplay);
                p.discardRandomCard_SERVER(ownplay);
                return;
            }


            Minion choosen2 = p.searchRandomMinion(p.enemyMinions, Playfield.searchmode.searchLowestAttack);
            if (choosen2 != null) p.minionGetDestroyed(choosen2);

            choosen2 = p.searchRandomMinion(p.enemyMinions, Playfield.searchmode.searchLowestAttack);
            if (choosen2 != null) p.minionGetDestroyed(choosen2);

            p.disCardACard(ownplay);
            p.disCardACard(ownplay);
        }
开发者ID:protopenguin,项目名称:silverfish,代码行数:27,代码来源:Sim_AT_025.cs

示例3: onCardPlay

		// Destroy all non-Skeleton minions.
		
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
			foreach (Minion m in p.ownMinions)
            {
                if (m.name != CardDB.cardName.skeleton) p.minionGetDestroyed(m);
            }
            foreach (Minion m in p.enemyMinions)
            {
                if (m.name != CardDB.cardName.skeleton) p.minionGetDestroyed(m);
            }
		}
开发者ID:cookiezeater,项目名称:silverfish,代码行数:13,代码来源:Sim_NAX4_05.cs

示例4: onCardPlay

        //Destroy all minions with 2 or less Attack.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            foreach (Minion m in p.enemyMinions)
            {
                if (m.Angr < 3) p.minionGetDestroyed(m);
            }
            foreach (Minion m in p.ownMinions)
            {
                if (m.Angr < 3) p.minionGetDestroyed(m);
            }
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:13,代码来源:Sim_OG_100.cs

示例5: onTurnStartTrigger

        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if(turnStartOfOwner != triggerEffectMinion.own) return;
            List<Minion> temp = (turnStartOfOwner) ? p.ownMinions : p.enemyMinions;
            int anz =0;
            foreach (Minion m in temp)
            {
                if ((TAG_RACE)m.handcard.card.race == TAG_RACE.MECHANICAL && m.Hp >=1 )
                {
                    anz++;
                }
            }
            if (anz >= 3)
            {
                foreach (Minion m in temp)
                {
                    if ((TAG_RACE)m.handcard.card.race == TAG_RACE.MECHANICAL)
                    {
                        p.minionGetDestroyed(m);
                    }
                }

                int pos = (triggerEffectMinion.own) ? p.ownMinions.Count : p.enemyMinions.Count;
                p.callKid(kid, pos, triggerEffectMinion.own,false, true); // we allow to summon one minion more (because 3 are destroyed)
            }
        }
开发者ID:John4Jobs,项目名称:silverfish,代码行数:26,代码来源:Sim_GvG_111.cs

示例6: onCardPlay

        //Vernichtet einen Diener. Stellt bei Eurem Helden #3 Leben wieder her.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            p.minionGetDestroyed(target);
            int heal = (ownplay) ? p.getSpellHeal(3) : p.getEnemySpellHeal(3);

            p.minionGetDamageOrHeal(ownplay ? p.ownHero : p.enemyHero, -heal);
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:9,代码来源:Sim_EX1_309.cs

示例7: getBattlecryEffect

 //    If you're holding a Dragon, destroy a Legendary minion.
 //todo: if holding a dragon has to be done in carddb!
 public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
 {
     if (target != null && target.handcard.card.rarity >= 5) //requires legendary target
     {
         p.minionGetDestroyed(target);
     }
 }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:9,代码来源:Sim_BRM_029.cs

示例8: onTurnEndsTrigger

//    ansturm/. vernichtet diesen diener am ende des zuges.


        public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
        {
            if (turnEndOfOwner == triggerEffectMinion.own)
            {
                p.minionGetDestroyed(triggerEffectMinion);
            }
        }
开发者ID:JayMansel,项目名称:silverfish,代码行数:10,代码来源:Sim_EX1_tk9.cs

示例9: onCardPlay

//    vernichtet einen zufälligen feindlichen diener.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            if (p.isServer)
            {
                Minion tempS = p.getRandomMinionFromSide_SERVER(!ownplay, false);
                if (tempS != null) p.minionGetDestroyed(tempS);
                return;
            }

            List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
            temp2.Sort((a, b) => a.Angr.CompareTo(b.Angr));
            foreach (Minion enemy in temp2)
            {
                p.minionGetDestroyed(enemy);
                break;
            }
		}
开发者ID:noHero123,项目名称:silverfish,代码行数:19,代码来源:Sim_EX1_617.cs

示例10: onTurnEndsTrigger

        //  At the end of each turn, destroy this minion if it's your only one. 

        public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
        {
            if (triggerEffectMinion.own)
            {
                if (p.ownMinions.Count == 1)
                {
                    p.minionGetDestroyed(triggerEffectMinion);
                }
            }
            else
            {
                if (p.enemyMinions.Count == 1)
                {
                    p.minionGetDestroyed(triggerEffectMinion);
                }
            }
        }
开发者ID:martdeboer,项目名称:silverfish,代码行数:19,代码来源:Sim_GvG_077.cs

示例11: getBattlecryEffect

 public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
 {
     if (target != null)
     {
         p.minionGetDestroyed(target);
         p.minionGetBuffed(own, 2, 2);
     }
 } 
开发者ID:JayMansel,项目名称:silverfish,代码行数:8,代码来源:Sim_NEW1_017.cs

示例12: onCardPlay

//    vernichtet einen diener und bringt ihn dann mit vollem leben wieder auf das schlachtfeld zurück.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            bool own = target.own;
            int place = target.zonepos;
            CardDB.Card d = target.handcard.card;
            p.minionGetDestroyed(target);
            p.callKid(d, place, own);
		}
开发者ID:JayMansel,项目名称:silverfish,代码行数:10,代码来源:Sim_FP1_025.cs

示例13: onCardPlay

        //   Destroy a random enemy minion. Combo: And your opponent's weapon.


        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            if(p.isServer)
            {
                Minion choosen = p.getRandomMinionFromSide_SERVER(!ownplay, false);
                if (choosen != null) p.minionGetDestroyed(choosen);
                if (p.cardsPlayedThisTurn >= 1) p.lowerWeaponDurability(1000, !ownplay);
                return;
            }

            List<Minion> temp = (ownplay)? p.enemyMinions : p.ownMinions;
            if (temp.Count >= 1)
            {
                p.minionGetDestroyed(p.searchRandomMinion(temp, Playfield.searchmode.searchLowestHP));
                
            }
            if (p.cardsPlayedThisTurn >= 1) p.lowerWeaponDurability(1000, !ownplay);
        }
开发者ID:peppert,项目名称:silverfish,代码行数:21,代码来源:Sim_GvG_047.cs

示例14: onCardPlay

//    vernichtet einen befreundeten diener und fügt allen feindlichen dienern schaden zu, der seinem angriff entspricht.
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int damage1 = (ownplay) ? p.getSpellDamageDamage(target.Angr) : p.getEnemySpellDamageDamage(target.Angr);

            p.minionGetDestroyed(target);

            p.allMinionOfASideGetDamage(!ownplay, damage1);

		}
开发者ID:JayMansel,项目名称:silverfish,代码行数:10,代码来源:Sim_EX1_303.cs

示例15: onTurnStartTrigger

//    vernichtet zu beginn eures zuges diesen diener und zieht 3 karten.

        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if (turnStartOfOwner == triggerEffectMinion.own)
            {
                p.minionGetDestroyed(triggerEffectMinion);
                p.drawACard(CardDB.cardIDEnum.None, turnStartOfOwner);
                p.drawACard(CardDB.cardIDEnum.None, turnStartOfOwner);
                p.drawACard(CardDB.cardIDEnum.None, turnStartOfOwner);
            }
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:12,代码来源:Sim_Mekka1.cs


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