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


C# Playfield.getSpellDamageDamage方法代码示例

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


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

示例1: onCardPlay

//    fügt einem feind $4 schaden und allen anderen feinden $1 schaden zu.
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int dmg = (ownplay)? p.getSpellDamageDamage(1) : p.getEnemySpellDamageDamage(1);
            int dmg1 = (ownplay) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);

            List<Minion> temp = (ownplay) ? p.enemyMinions : p.ownMinions;
            p.minionGetDamageOrHeal(target, dmg1);
            foreach (Minion m in temp)
            {
                if (m.entitiyID != target.entitiyID)
                {
                    p.minionGetDamageOrHeal(m, dmg);
                }
            }
            if (ownplay)
            {
                if (p.enemyHero.entitiyID != target.entitiyID)
                {
                    p.minionGetDamageOrHeal(p.enemyHero, dmg);
                }
            }
            else
            {
                if (p.ownHero.entitiyID != target.entitiyID)
                {
                    p.minionGetDamageOrHeal(p.ownHero, dmg);
                }
                
            }
		}
开发者ID:JayMansel,项目名称:silverfish,代码行数:31,代码来源:Sim_CS2_012.cs

示例2: 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

示例3: onCardPlay

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

示例4: onCardPlay

        //    Deal $4 damage to a random enemy minion.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            if (p.isServer)
            {
                int dmg = (ownplay) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);
                Minion poortarget = p.getRandomMinionFromSide_SERVER(!ownplay, false);
                if (poortarget != null) p.minionGetDamageOrHeal(poortarget, dmg);
                return;
            }

            // optimistic

            List<Minion> temp = (ownplay) ? p.enemyMinions : p.ownMinions;
            int times = (ownplay) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);

            if (temp.Count >= 1)
            {
                //search Minion with lowest hp
                Minion enemy = temp[0];
                int minhp = 10000;
                foreach (Minion m in temp)
                {
                    if (m.Hp >= times + 1 && minhp > m.Hp)
                    {
                        enemy = m;
                        minhp = m.Hp;
                    }
                }

                p.minionGetDamageOrHeal(enemy, times);

            }
        }
开发者ID:peppert,项目名称:silverfish,代码行数:35,代码来源:Sim_GvG_001.cs

示例5: onCardPlay

//    fügt zwei zufälligen feindlichen dienern $2 schaden zu.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            if (p.isServer)
            {
                int damageS = (ownplay) ? p.getSpellDamageDamage(2) : p.getEnemySpellDamageDamage(2);
                List<Minion> temp22 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
                if (temp22.Count < 2) return;
                int random1 = p.getRandomNumber_SERVER(0, temp22.Count - 1);
                int random2 = p.getRandomNumber_SERVER(0, temp22.Count - 2);
                if (random2 >= random1) random2++;

                p.minionGetDamageOrHeal(temp22[random1], damageS);
                p.minionGetDamageOrHeal(temp22[random2], damageS);

                return;
            }

            //TODO delete new list
            int damage = (ownplay) ? p.getSpellDamageDamage(2) : p.getEnemySpellDamageDamage(2);
            List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions) ;
            temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));
            int i = 0;
            foreach (Minion enemy in temp2)
            {
                p.minionGetDamageOrHeal(enemy, damage);
                i++;
                if (i == 2) break;
            }


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

示例6: 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

示例7: onCardPlay

//    fügt einem diener $5 schaden und benachbarten dienern $2 schaden zu.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int dmg1 = (ownplay) ? p.getSpellDamageDamage(5) : p.getEnemySpellDamageDamage(5);
            int dmg2 = (ownplay) ? p.getSpellDamageDamage(2) : p.getEnemySpellDamageDamage(2);
            List<Minion> temp = (target.own) ? p.ownMinions : p.enemyMinions;
            p.minionGetDamageOrHeal(target, dmg1);
            foreach (Minion m in temp)
            {
                if (m.zonepos + 1 == target.zonepos || m.zonepos - 1 == target.zonepos) p.minionGetDamageOrHeal(m, dmg2);
            }
		}
开发者ID:JayMansel,项目名称:silverfish,代码行数:13,代码来源:Sim_EX1_537.cs

示例8: onCardPlay

//    verursacht $4 schaden. verursacht stattdessen $6 schaden, wenn euer held max. 12 leben hat.

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

            if (ownplay)
            {
                dmg = (p.ownHero.Hp <= 12) ? p.getSpellDamageDamage(6) : p.getSpellDamageDamage(4);
            }
            else
            {
                dmg = (p.enemyHero.Hp <= 12) ? p.getEnemySpellDamageDamage(6) : p.getEnemySpellDamageDamage(4);
            }
            p.minionGetDamageOrHeal(target, dmg);
		}
开发者ID:JayMansel,项目名称:silverfish,代码行数:16,代码来源:Sim_EX1_408.cs

示例9: onCardPlay

//    wählt aus:/ fügt einem diener $5 schaden zu; oder fügt allen feindlichen dienern $2 schaden zu.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            if (choice == 1)
            {
                int dmg = (ownplay) ? p.getSpellDamageDamage(5) : p.getEnemySpellDamageDamage(5);
                p.minionGetDamageOrHeal(target, dmg);
            }
            if (choice == 2)
            {
                int damage = (ownplay) ? p.getSpellDamageDamage(2) : p.getEnemySpellDamageDamage(2);
                p.allMinionOfASideGetDamage(!ownplay, damage);
            }

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

示例10: onCardPlay

        //    Deal $3-$6 damage.Overload: (1)

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            p.changeRecall(ownplay, 1);
            if (p.isServer)
            {
                int random = p.getRandomNumber_SERVER(3, 6);
                int dmgS = (ownplay) ? p.getSpellDamageDamage(random) : p.getEnemySpellDamageDamage(random);
                p.minionGetDamageOrHeal(target, dmgS);
                
                return;
            }

            int dmg = (ownplay) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);
            p.minionGetDamageOrHeal(target, dmg);
        }
开发者ID:noHero123,项目名称:silverfish,代码行数:17,代码来源:Sim_GvG_038.cs

示例11: onCardPlay

//    fügt einem diener $3 schaden zu.

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

            p.minionGetDamageOrHeal(target, damage);
        }
开发者ID:JayMansel,项目名称:silverfish,代码行数:9,代码来源:Sim_EX1_154a.cs

示例12: onCardPlay

//    verursacht $3 schaden, der zufällig auf feindliche charaktere verteilt wird.

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

            int i = 0;
            List<Minion> temp = (ownplay) ? p.enemyMinions : p.ownMinions;
            int times = (ownplay) ? p.getSpellDamageDamage(3) : p.getEnemySpellDamageDamage(3);

            if ((ownplay && p.enemyHero.Hp <= times) || (!ownplay && p.ownHero.Hp <= times))
            {
                if(ownplay) p.minionGetDamageOrHeal(p.enemyHero, p.enemyHero.Hp-1);
                else p.minionGetDamageOrHeal(p.ownHero, p.ownHero.Hp - 1);
            }
            else
            {
                while (i < times)
                {
                    if (temp.Count >= 1)
                    {
                        //search Minion with lowest hp
                        Minion enemy = temp[0];
                        int minhp = 10000;
                        bool found = false;
                        foreach (Minion m in temp)
                        {
                            if (m.name == CardDB.cardName.nerubianegg && enemy.Hp >= 2) continue; //dont attack nerubianegg!

                            if (m.Hp >= 1 && minhp > m.Hp)
                            {
                                enemy = m;
                                minhp = m.Hp;
                                found = true;
                            }
                        }

                        if (found)
                        {
                            p.minionGetDamageOrHeal(enemy, 1);
                        }
                        else
                        {
                            if (ownplay)
                                p.minionGetDamageOrHeal(p.enemyHero, 1);
                            else
                                p.minionGetDamageOrHeal(p.ownHero, 1);
                        }

                    }
                    else
                    {
                        if (ownplay)
                            p.minionGetDamageOrHeal(p.enemyHero, 1);
                        else
                            p.minionGetDamageOrHeal(p.ownHero, 1);
                    }

                    i++;
                }
            }
		}
开发者ID:JayMansel,项目名称:silverfish,代码行数:62,代码来源:Sim_EX1_277.cs

示例13: onCardPlay

        //   Deal $2 damage to a minion. This spell gets double bonus from Spell Damage;

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

            int dmg = (ownplay) ? 2+p.spellpower : 2+p.enemyspellpower;
            dmg = (ownplay) ? p.getSpellDamageDamage(dmg) : p.getEnemySpellDamageDamage(dmg);
            p.minionGetDamageOrHeal(target, dmg);
        }
开发者ID:cookiezeater,项目名称:silverfish,代码行数:9,代码来源:Sim_AT_004.cs

示例14: onCardPlay

        //    Deal $4 damage to a random enemy minion.

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

            List<Minion> temp = (ownplay) ? p.enemyMinions : p.ownMinions;
            int times = (ownplay) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);

            if (temp.Count >= 1)
            {
                //search Minion with lowest hp
                Minion enemy = temp[0];
                int minhp = 10000;
                foreach (Minion m in temp)
                {
                    if (m.Hp >= times + 1 && minhp > m.Hp)
                    {
                        enemy = m;
                        minhp = m.Hp;
                    }
                }

                p.minionGetDamageOrHeal(enemy, times);

            }
        }
开发者ID:martdeboer,项目名称:silverfish,代码行数:27,代码来源:Sim_GvG_001.cs

示例15: onCardPlay

        // todo ask the posibility manager!
//    zieht eine karte und verursacht schaden, der ihren kosten entspricht.
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            p.drawACard(CardDB.cardIDEnum.None, ownplay);

            int dmg = (ownplay) ? p.getSpellDamageDamage(3) : p.getEnemySpellDamageDamage(3);
            p.minionGetDamageOrHeal(target, dmg);
		}
开发者ID:cookiezeater,项目名称:silverfish,代码行数:9,代码来源:Sim_EX1_365.cs


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