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


C# Playfield.doDmgTriggers方法代码示例

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


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

示例1: onCardPlay

        //   Hero Power: Deal 8 damage to a random enemy. TWICE.

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

            int dmg = 8;
            if (ownplay)
            {
                dmg += p.anzOwnFallenHeros;
                if (p.doublepriest >= 1) dmg *= (2 * p.doublepriest);
            }
            else
            {
                dmg += p.anzEnemyFallenHeros;
                if (p.enemydoublepriest >= 1) dmg *= (2 * p.enemydoublepriest);
            }

            if (p.isServer)
            {
                Minion poortarget = p.getRandomMinionFromSide_SERVER(!ownplay, true);
                if (poortarget != null) p.minionGetDamageOrHeal(poortarget, dmg);
                return;
            }




            int count = (ownplay) ? p.enemyMinions.Count : p.ownMinions.Count;
            if (count >= 1)
            {
                List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
                temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//damage the lowest
                foreach (Minion mins in temp2)
                {
                    p.minionGetDamageOrHeal(mins, dmg);
                    break;
                }
            }
            else
            {
                p.minionGetDamageOrHeal(ownplay ? p.enemyHero : p.ownHero, dmg);
            }

            p.doDmgTriggers();

            count = (ownplay) ? p.enemyMinions.Count : p.ownMinions.Count;
            if (count >= 1)
            {
                List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
                temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//damage the lowest
                foreach (Minion mins in temp2)
                {
                    p.minionGetDamageOrHeal(mins, dmg);
                    break;
                }
            }
            else
            {
                p.minionGetDamageOrHeal(ownplay ? p.enemyHero : p.ownHero, dmg);
            }

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

示例2: onCardIsGoingToBePlayed

 //    Whenever you cast a spell on another friendly minion, cast a copy of it on this one.
 public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion, Minion target, int choice)
 {
     if (target != null && target.own == wasOwnCard && triggerEffectMinion.own == wasOwnCard && target.entitiyID != triggerEffectMinion.entitiyID && c.type == CardDB.cardtype.SPELL)
     {
         c.sim_card.onCardPlay(p, wasOwnCard, triggerEffectMinion, choice);
         p.doDmgTriggers();
     }
 }
开发者ID:noHero123,项目名称:silverfish,代码行数:9,代码来源:Sim__LOE_053.cs

示例3: onCardPlay

        //   Hero Power: Deal 8 damage to a random enemy. TWICE.

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

            int count = (ownplay) ? p.enemyMinions.Count : p.ownMinions.Count;
            if (count >= 1)
            {
                List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
                temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//damage the lowest
                foreach (Minion mins in temp2)
                {
                    p.minionGetDamageOrHeal(mins, 8);
                    break;
                }
            }
            else
            {
                p.minionGetDamageOrHeal(ownplay ? p.enemyHero : p.ownHero, 8);
            }

            p.doDmgTriggers();

            count = (ownplay) ? p.enemyMinions.Count : p.ownMinions.Count;
            if (count >= 1)
            {
                List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
                temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//damage the lowest
                foreach (Minion mins in temp2)
                {
                    p.minionGetDamageOrHeal(mins, 8);
                    break;
                }
            }
            else
            {
                p.minionGetDamageOrHeal(ownplay ? p.enemyHero : p.ownHero, 8);
            }

        }
开发者ID:John4Jobs,项目名称:silverfish,代码行数:40,代码来源:Sim_BRM_027pH.cs


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