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


C# Playfield.allMinionsGetDamage方法代码示例

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


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

示例1: onCardPlay

        //    Deal $4-$5 damage to all minions. Overload: (5)

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            if (ownplay) { p.owedRecall += 5; } else { p.enemyRecall += 5; };
            if (p.isServer)
            {

                foreach (Minion m in p.ownMinions)
                {
                    int dmgr = p.getRandomNumber_SERVER(4, 5);
                    dmgr = (ownplay) ? p.getSpellDamageDamage(dmgr) : p.getEnemySpellDamageDamage(dmgr);
                    p.minionGetDamageOrHeal(m, dmgr);
                }

                foreach (Minion m in p.enemyMinions)
                {
                    int dmgr = p.getRandomNumber_SERVER(4, 5);
                    dmgr = (ownplay) ? p.getSpellDamageDamage(dmgr) : p.getEnemySpellDamageDamage(dmgr);
                    p.minionGetDamageOrHeal(m, dmgr);
                }

                return;
            }

            int dmg = (ownplay) ? p.getSpellDamageDamage(5) : p.getEnemySpellDamageDamage(5);
            p.allMinionsGetDamage(dmg);
            
        }
开发者ID:spanos123,项目名称:silverfish,代码行数:29,代码来源:Sim__AT_051.cs

示例2: onDeathrattle

        //Taunt , Deathrattle: If you're holding a Dragon, deal 3 damage to all minions.


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

            bool hasdragon = false;
            if (m.own)
            {
                foreach (Handmanager.Handcard hc in p.owncards)
                {
                    if (hc.card.race == TAG_RACE.DRAGON) hasdragon = true;
                }
            }
            else
            {
                hasdragon = true;
            }

            if (hasdragon)
            {
                p.allMinionsGetDamage(3);
            }


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

示例3: onCardPlay

        //    Deal $1 damage to all minions. If you have 12 or less Health, deal $3 damage instead.


        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            int dmg = (ownplay) ? p.getSpellDamageDamage(1) : p.getEnemySpellDamageDamage(1);
            if (ownplay && p.ownHero.Hp <= 12) dmg = p.getSpellDamageDamage(3);
            if (!ownplay && p.enemyHero.Hp <= 12) dmg = p.getSpellDamageDamage(3);

            p.allMinionsGetDamage(dmg);
        }
开发者ID:martdeboer,项目名称:silverfish,代码行数:11,代码来源:Sim_BRM_015.cs

示例4: onCardPlay

		// Deal 1 damage to all minions. If you have 12 or less Health, deal 3 damage instead.
		
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
			int dmg = 1;
			int heroHealth = (ownplay) ? p.ownHero.Hp : p.enemyHero.Hp;
			if(heroHealth <= 12) dmg = 3;
			
            dmg = (ownplay) ? p.getSpellDamageDamage(dmg) : p.getEnemySpellDamageDamage(dmg);
            p.allMinionsGetDamage(dmg);
		}
开发者ID:shuyi3,项目名称:AIPJ,代码行数:11,代码来源:Sim_BRM_015.cs

示例5: onCardPlay

        //   Deal $1 damage to a random minion. Repeat until a minion dies.

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

            if (p.isServer)
            {
                bool dodmg = true;
                while(dodmg)
                {
                    Minion poortarget = p.getRandomCharExcept_SERVER(null, false);

                    if (poortarget != null)
                    {
                        int hp = poortarget.Hp;
                        p.minionGetDamageOrHeal(poortarget, dmg);
                        int hp2 = poortarget.Hp;
                        if (hp2 <= 0 && hp >= 1)
                        {
                            dodmg = false;
                        }
                    }
                    else
                    {
                        dodmg = false;
                    }
                }
                return;
            }


            int minHp = 100000;
            foreach (Minion m in p.ownMinions)
            {
                int div = 0;
                if (m.divineshild) div = 1;
                if (m.Hp + div < minHp) minHp = m.Hp;
            }
            foreach (Minion m in p.enemyMinions)
            {
                int div = 0;
                if (m.divineshild) div = 1;
                if (m.Hp + div < minHp) minHp = m.Hp;
            }

            int dmgdone = (int)Math.Ceiling((double)minHp / (double)dmg) * dmg;
            for (int i = 0; i < dmgdone; i++)
            {
                p.allMinionsGetDamage(1);
            }
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:52,代码来源:Sim_GvG_050.cs

示例6: onCardPlay

		CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.NAX11_03);//Fallout Slime

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int dmg = (ownplay) ? p.getHeroPowerDamage(1) : p.getEnemyHeroPowerDamage(1);
			p.allMinionsGetDamage(dmg);
			
            int place = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count;
            foreach (Minion m in p.ownMinions)
            {
				if (m.Hp <= 0) p.callKid(kid, place, ownplay);
			}
            foreach (Minion m in p.enemyMinions)
            {
				if (m.Hp <= 0) p.callKid(kid, place, ownplay);
			}
		}
开发者ID:cookiezeater,项目名称:silverfish,代码行数:17,代码来源:Sim_NAX11_02.cs

示例7: onCardPlay

        //   Deal $1 damage to a random minion. Repeat until a minion dies.

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

            int minHp = 100000;
            foreach (Minion m in p.ownMinions)
            {
                if (m.Hp < minHp) minHp = m.Hp;
            }
            foreach (Minion m in p.enemyMinions)
            {
                if (m.Hp < minHp) minHp = m.Hp;
            }

            int dmgdone = (int)Math.Ceiling((double)minHp / (double)dmg) * dmg;

            p.allMinionsGetDamage(dmgdone);
        }
开发者ID:martdeboer,项目名称:silverfish,代码行数:20,代码来源:Sim_GvG_050.cs

示例8: onCardPlay

        //Deal $3 damage to all minions.Shuffle this card into your opponent's deck.


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

            if (p.isServer)
            {
                //TODO
                return;
            }

            if (ownplay)
            {
                p.enemyDeckSize++;
                
            }
            else
            {
                p.ownDeckSize++;
            }
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:24,代码来源:Sim__LOE_111.cs

示例9: onCardPlay

//    fügt allen dienern $1 schaden zu.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int dmg = (ownplay) ? p.getSpellDamageDamage(1) : p.getEnemySpellDamageDamage(1);
            p.allMinionsGetDamage(dmg);
		}
开发者ID:JayMansel,项目名称:silverfish,代码行数:7,代码来源:Sim_EX1_400.cs

示例10: onDeathrattle

 public override void onDeathrattle(Playfield p, Minion m)
 {
     p.allMinionsGetDamage(1);
 }
开发者ID:JayMansel,项目名称:silverfish,代码行数:4,代码来源:Sim_FP1_021.cs

示例11: onCardPlay

//    stellt bei allen dienern #4 leben wieder her.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int heal = (ownplay) ? p.getSpellHeal(4) : p.getEnemySpellHeal(4);
            p.allMinionsGetDamage(-heal);
		}
开发者ID:JayMansel,项目名称:silverfish,代码行数:7,代码来源:Sim_EX1_621.cs

示例12: onCardIsGoingToBePlayed

		// After you cast a spell, deal 1 damage to ALL minions.

		public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool ownplay, Minion m)
        {
            if (m.own == ownplay && c.type == CardDB.cardtype.SPELL) p.allMinionsGetDamage(1);
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:6,代码来源:Sim_NEW1_020.cs


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