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


C# Playfield.getArandomCardFromDeck方法代码示例

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


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

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

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

示例3: onCardPlay

        // Both players draw 2 cards and gain a Mana Crystal.

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            p.drawACard(p.getArandomCardFromDeck(true), true);
            p.drawACard(p.getArandomCardFromDeck(false), false);
			
			p.playerFirst.mana = Math.Min(10, p.playerFirst.mana+1);
			p.playerFirst.ownMaxMana = Math.Min(10, p.playerFirst.ownMaxMana+1);
			p.playerSecond.ownMaxMana = Math.Min(10, p.playerSecond.ownMaxMana+1);
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:11,代码来源:Sim_NAX5_03.cs

示例4: onTurnStartTrigger

//    vernichtet zu beginn eures zuges diesen diener und zieht 3 karten.

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

示例5: getBattlecryEffect

 //Zieht 2 Karten; oder stellt 5 Leben wieder her
 public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
 {
     if (choice == 2)
     {
         int heal = p.getMinionHeal(5, own.own);
         p.minionGetDamageOrHeal(target, -heal);
     }
     else
     {
         p.drawACard(p.getArandomCardFromDeck(own.own), own.own);
         p.drawACard(p.getArandomCardFromDeck(own.own), own.own);
     }
 }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:14,代码来源:Sim_NEW1_008.cs

示例6: getBattlecryEffect

        //    Choose One - Give each player a Mana Crystal; or Each player draws a card.

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            if (choice == 1)
            {
				p.playerFirst.mana = Math.Min(10, p.playerFirst.mana+1);
				p.playerFirst.ownMaxMana = Math.Min(10, p.playerFirst.ownMaxMana+1);
				p.playerSecond.ownMaxMana = Math.Min(10, p.playerSecond.ownMaxMana+1);
            }

            if (choice == 2)//TODO: need order here?
            {
                p.drawACard(p.getArandomCardFromDeck(own.own), own.own);
                p.drawACard(p.getArandomCardFromDeck(!own.own), !own.own);
            }
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:17,代码来源:Sim_GvG_032.cs

示例7: onTurnEndsTrigger

//    zieht am ende eures zuges eine karte.
        public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
        {
            if (turnEndOfOwner == triggerEffectMinion.own)
            {
                p.drawACard(p.getArandomCardFromDeck(turnEndOfOwner), turnEndOfOwner);
            }
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:8,代码来源:Sim_EX1_575.cs

示例8: 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(p.getArandomCardFromDeck(ownplay), ownplay);

            int dmg = p.getSpellDamageDamage(3, ownplay);
            p.minionGetDamageOrHeal(target, dmg);
		}
开发者ID:shuyi3,项目名称:AIPJ,代码行数:9,代码来源:Sim_EX1_365.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 anz = (ownplay) ? p.playerSecond.owncards.Count : p.playerFirst.owncards.Count;
     if (anz >= 1)
     {
         p.drawACard(p.getArandomCardFromDeck(ownplay), ownplay, true);
     }
 }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:8,代码来源:Sim_CS2_003.cs

示例11: onTurnStartTrigger

//    zu beginn eures zuges besteht eine chance von 50%, dass ihr eine zusätzliche karte zieht.
        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if (triggerEffectMinion.own == turnStartOfOwner)
            {
                if (GameManager.getRNG().NextDouble() < 0.5)
                    p.drawACard(p.getArandomCardFromDeck(turnStartOfOwner), turnStartOfOwner);
            }
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:9,代码来源:Sim_EX1_557.cs

示例12: getBattlecryEffect

        //  Battlecry: Draw a card. If it's a minion, transform it into a Chicken. 

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            CardDB.Card randomCard = CardDB.Instance.getCardData(p.getArandomCardFromDeck(own.own));
            if (randomCard.type == CardDB.cardtype.MOB) {
                randomCard = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.Mekka4t);
            }
            p.drawACard(randomCard.name, own.own);
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:10,代码来源:Sim_GvG_092.cs

示例13: onCardIsGoingToBePlayed

//    zieht jedes mal eine karte, wenn ihr einen zauber wirkt.

        public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (c.type == CardDB.cardtype.SPELL && wasOwnCard == triggerEffectMinion.own)
            {
                p.drawACard(p.getArandomCardFromDeck(wasOwnCard), wasOwnCard);
            }

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

示例14: onCardPlay

		// Deal 3 damage. If your hand is empty, draw a card.
		
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int dmg = p.getSpellDamageDamage(3, ownplay);
            p.minionGetDamageOrHeal(target, dmg);
			
			int cardsCount = (ownplay) ? p.playerFirst.owncards.Count : p.playerSecond.owncards.Count;
            if (cardsCount <= 0) p.drawACard(p.getArandomCardFromDeck(ownplay), ownplay);
		}
开发者ID:shuyi3,项目名称:AIPJ,代码行数:10,代码来源:Sim_BRM_013.cs

示例15: onCardPlay

//    fügt einem diener $1 schaden zu. zieht eine karte.

        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
        {
            int damage = p.getSpellDamageDamage(1, ownplay);
            //this.owncarddraw++;

            p.minionGetDamageOrHeal(target, damage);
            p.drawACard(p.getArandomCardFromDeck(ownplay), ownplay);
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:10,代码来源:Sim_EX1_154b.cs


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