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


C# HRSim.Minion类代码示例

本文整理汇总了C#中HRSim.Minion的典型用法代码示例。如果您正苦于以下问题:C# Minion类的具体用法?C# Minion怎么用?C# Minion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: onCardPlay

//    ruft zwei diener (0/2) mit spott/ herbei.
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int posi = (ownplay) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
            
            p.callKid(kid, posi, ownplay);
            p.callKid(kid, posi, ownplay);
		}
开发者ID:shuyi3,项目名称:AIPJ,代码行数:8,代码来源:Sim_CS2_027.cs

示例2: onCardPlay

//    zieht 4 karten.
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            p.drawACard(p.getArandomCardFromDeck(ownplay), ownplay);
            p.drawACard(p.getArandomCardFromDeck(ownplay), ownplay);
            p.drawACard(p.getArandomCardFromDeck(ownplay), ownplay);
            p.drawACard(p.getArandomCardFromDeck(ownplay), ownplay);
		}
开发者ID:shuyi3,项目名称:AIPJ,代码行数:8,代码来源:Sim_CS2_077.cs

示例3: getBattlecryEffect

        CardDB.Card card2 = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_tk28); // squirrel
        //todo better
//    kampfschrei:/ verwandelt einen anderen zufälligen diener in einen teufelssaurier (5/5) oder ein eichhörnchen (1/1).
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            int oc = p.playerFirst.ownMinions.Count;
            int ec = p.playerSecond.ownMinions.Count;
            if (oc == 0 && ec == 0) return;
            if (oc > ec)
            {
                List<Minion> temp = new List<Minion>(p.playerFirst.ownMinions);
                temp.AddRange(p.playerSecond.ownMinions);
                temp.Sort((a, b) => a.Hp.CompareTo(b.Hp));//transform the weakest
                foreach (Minion m in temp)
                {
                    p.minionTransform(m, card1);
                    break;
                }
            }
            else
            {
                List<Minion> temp = new List<Minion>(p.playerFirst.ownMinions);
                temp.AddRange(p.playerSecond.ownMinions);
                temp.Sort((a, b) => -a.Hp.CompareTo(b.Hp));//transform the strongest
                foreach (Minion m in temp)
                {
                    p.minionTransform(m, card2);
                    break;
                }
            }
		}
开发者ID:shuyi3,项目名称:AIPJ,代码行数:31,代码来源:Sim_EX1_083.cs

示例4: onTurnStartTrigger

        //    At the start of your turn, deal 1 damage to your hero.

        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if (triggerEffectMinion.own == turnStartOfOwner)
            {
				p.minionGetDamageOrHeal(turnStartOfOwner ? p.playerFirst.ownHero : p.playerSecond.ownHero, 1);
            }
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:9,代码来源:Sim_NAX8_04t.cs

示例5: getBattlecryEffect

        CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.GVG_110t);//chillwind

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            int pos = (own.own) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
            p.callKid(kid, pos, own.own);
            pos = (own.own) ? p.playerFirst.ownMinions.Count : p.playerSecond.ownMinions.Count;
            p.callKid(kid, pos, own.own);
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:9,代码来源:Sim_GvG_110.cs

示例6: onTurnStartTrigger

//    verstohlenheit/. erhält zu beginn eures zuges +1/+1.

        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if (triggerEffectMinion.own == turnStartOfOwner)
            {
                p.minionGetBuffed(triggerEffectMinion,1,1);
            }
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:9,代码来源:Sim_FP1_005.cs

示例7: onCardIsGoingToBePlayed

 // erhält jedes Mal +1/+1, wenn Ihr eine Karte mit uberladung&lt; ausspielt.
 public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion)
 {
     if (wasOwnCard == triggerEffectMinion.own && c.Recall)
     {
         p.minionGetBuffed(triggerEffectMinion, 1, 1);
     }
 }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:8,代码来源:Sim_EX1_258.cs

示例8: 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 = p.getSpellDamageDamage(1, ownplay);
            int dmg1 = p.getSpellDamageDamage(4, ownplay);

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

示例9: onTurnEndsTrigger

        //   At the end of each player's turn, that player draws until they have 3 cards.

        public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
        {
            if (triggerEffectMinion.own == turnEndOfOwner)
            {
                Player mPlayer;
                if (turnEndOfOwner)
                {
                    mPlayer = p.playerFirst;
                }
                else
                {
                    mPlayer = p.playerSecond;
                }

                int cardstodraw = 0;
                if (mPlayer.owncards.Count <= 2)
                {
                    cardstodraw = 3 - mPlayer.owncards.Count;
                }

                for (int i = 0; i < cardstodraw; i++)
                {
                    p.drawACard(p.getArandomCardFromDeck(turnEndOfOwner), turnEndOfOwner);
                }
            }
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:28,代码来源:Sim_GvG_094.cs

示例10: onCardPlay

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

示例11: getBattlecryEffect

        //    Give each player a Mana Crystal.

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

            p.drawACard(p.getArandomCardFromDeck(true), true);
            p.drawACard(p.getArandomCardFromDeck(false), false);
           
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:9,代码来源:Sim_GvG_032b.cs

示例12: onMinionIsSummoned

//    jedes mal, wenn ihr einen diener mit max. 3 angriff herbeiruft, erhält dieser ansturm/.

        public override void onMinionIsSummoned(Playfield p, Minion triggerEffectMinion, Minion summonedMinion)
        {
            if (triggerEffectMinion.own == summonedMinion.own && summonedMinion.handcard.card.Attack <= 3 )
            {
                p.minionGetCharge(summonedMinion);
            }
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:9,代码来源:Sim_EX1_084.cs

示例13: onSecretPlay

        public override void onSecretPlay(Playfield p, bool ownplay, Minion attacker, Minion target, out int number)
        {
            number = 0;
            if (ownplay)
            {
                int posi = p.playerFirst.ownMinions.Count;
                p.callKid(kid, posi, true);
                if (p.playerFirst.ownMinions.Count >= 1)
                {
                    if (p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].name == CardDB.cardName.defender)
                    {
                        number = p.playerFirst.ownMinions[p.playerFirst.ownMinions.Count - 1].entitiyID;
                    }
                }
            }
            else
            {
                int posi = p.playerSecond.ownMinions.Count;
                p.callKid(kid, posi, false);

                if (p.playerSecond.ownMinions.Count >= 1)
                {
                    if (p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].name == CardDB.cardName.defender)
                    {
                        number = p.playerSecond.ownMinions[p.playerSecond.ownMinions.Count - 1].entitiyID;
                    }
                }
            }

        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:30,代码来源:Sim_EX1_130.cs

示例14: onAuraEnds

 public override void  onAuraEnds(Playfield p, Minion m)
 {
     if (m.own && p.playerFirst.ownHeroName == HeroEnum.hunter)
     {
         bool hasss = false;
         foreach (Minion mnn in p.playerFirst.ownMinions)
         {
             if (!mnn.silenced && m.name == CardDB.cardName.steamwheedlesniper)
             {
                 hasss = true;
             }
         }
         p.playerFirst.weHaveSteamwheedleSniper = hasss;
        
     }
     if (!m.own && p.playerSecond.ownHeroName == HeroEnum.hunter)
     {
         bool hasss = false;
         foreach (Minion mnn in p.playerSecond.ownMinions)
         {
             if (!mnn.silenced && m.name == CardDB.cardName.steamwheedlesniper)
             {
                 hasss = true;
             }
         }
         p.playerSecond.weHaveSteamwheedleSniper = hasss;
     }
 }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:28,代码来源:Sim_GvG_087.cs

示例15: onCardPlay

		// Hero PowerDeal 8 damage to a random enemy.
		
        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            int dmg = 8;
            if (ownplay)
            {
                if (p.playerFirst.doublepriest >= 1) dmg *= (2 * p.playerFirst.doublepriest);
				if (p.playerSecond.ownMinions.Count > 0)
				{
					target = p.searchRandomMinion(p.playerSecond.ownMinions, Playfield.searchmode.searchLowestHP); //damage the lowest (pessimistic variant)
				}
				else
				{
					target = p.playerSecond.ownHero;
				}
            }
            else
            {
                if (p.playerSecond.doublepriest >= 1) dmg *= (2 * p.playerSecond.doublepriest);
				if (p.playerFirst.ownMinions.Count > 0)
				{
					target = p.searchRandomMinion(p.playerFirst.ownMinions, Playfield.searchmode.searchHighestAttack); //damage the Highest (pessimistic variant)
				}
				else
				{
					target = p.playerFirst.ownHero;
				}
            }			
            p.minionGetDamageOrHeal(target, dmg);
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:31,代码来源:Sim_BRM_027p.cs


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