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


C# Playfield.doDmgToRandomEnemyCLIENT2方法代码示例

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


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

示例1: onCardPlay

        //   When you play or discard this, deal $4 damage to a random enemy.<

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

            int dmg = (ownplay) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);
            if (p.isServer)
            {
                Minion choosen = p.getRandomMinionFromSide_SERVER(!ownplay, true);
                if (choosen != null) p.minionGetDamageOrHeal(choosen, dmg);
                return;
            }
            p.doDmgToRandomEnemyCLIENT2(dmg, true, ownplay);
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:14,代码来源:Sim_AT_022.cs

示例2: onDeathrattle

        //  Deathrattle: Deal 1 damage to a random enemy.

        

        public override void onDeathrattle(Playfield p, Minion m)
        {
            if (p.isServer)
            {
                int randdmg = 1;
                Minion poortarget = p.getRandomMinionFromSide_SERVER(!m.own, true);
                if (poortarget != null) p.minionGetDamageOrHeal(poortarget, randdmg);
                return;
            }

            p.doDmgToRandomEnemyCLIENT2(1, true, m.own);

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

示例3: onCardIsGoingToBePlayed

        //Whenever you target this minion with a spell, deal 3 damage to a random enemy.

        public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion, Minion target, int choice)
        {
            if (triggerEffectMinion.own == wasOwnCard && c.type == CardDB.cardtype.SPELL && target!=null && target.entitiyID == triggerEffectMinion.entitiyID)
            {
                if (p.isServer)
                {
                    Minion choosen = p.getRandomMinionFromSide_SERVER(!triggerEffectMinion.own, true);
                    if (choosen != null) p.minionGetDamageOrHeal(choosen, 3);
                    return;
                }

                p.doDmgToRandomEnemyCLIENT2(3, true, triggerEffectMinion.own);
            }
        }
开发者ID:noHero123,项目名称:silverfish,代码行数:16,代码来源:Sim_AT_131.cs

示例4: onCardIsDiscarded

        public override void onCardIsDiscarded(Playfield p, CardDB.Card card, bool own)
        {

            int dmg = (own) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);

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

            p.doDmgToRandomEnemyCLIENT2(dmg, true, own);
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:14,代码来源:Sim_AT_022.cs

示例5: onMinionIsSummoned

        //   Whenever you summon a Pirate, deal 2 damage to a random enemy.

        public override void onMinionIsSummoned(Playfield p, Minion triggerEffectMinion, Minion summonedMinion)
        {
            if (triggerEffectMinion.own == summonedMinion.own && summonedMinion.handcard.card.race == TAG_RACE.PIRATE)
            {
                if (p.isServer)
                {
                    Minion randomguy = p.getRandomMinionFromSide_SERVER(!triggerEffectMinion.own, true);
                    if (randomguy != null) p.minionGetDamageOrHeal(randomguy, 2, true);
                    return;
                }

                p.doDmgToRandomEnemyCLIENT2(2, true, triggerEffectMinion.own);
            }
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:16,代码来源:Sim_GvG_075.cs

示例6: getBattlecryEffect

        //Battlecry: Deal 1 damage to a random enemy.


        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {

            //Random minion!


            if (p.isServer)
            {
                Minion choosen = p.getRandomMinionFromSide_SERVER(!own.own, true);
                if (choosen != null) p.minionGetDamageOrHeal(choosen, 1);
                return;
            }

            p.doDmgToRandomEnemyCLIENT2(1, true, own.own);
            
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:19,代码来源:Sim_AT_094.cs

示例7: onSecretPlay

 //todo secret
 //    geheimnis:/ wenn euer held schaden erleidet, wird dem feindlichen helden ebenso viel schaden zugefügt.
 public override void onSecretPlay(Playfield p, bool ownplay, int number)
 {
     int dmg = 5;
     p.doDmgToRandomEnemyCLIENT2(dmg, true, ownplay);
 }
开发者ID:noHero123,项目名称:silverfish,代码行数:7,代码来源:Sim__LOE_021.cs


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