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


C# Playfield.drawACard方法代码示例

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


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

示例1: onCardPlay

//    erhaltet einen leeren manakristall.
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            if (ownplay)
            {
                if (p.playerFirst.ownMaxMana < 10)
                {
                    p.playerFirst.ownMaxMana++;
                }
                else
                {
                    p.drawACard(CardDB.cardName.excessmana, true, true);
                }

            }
            else
            {
                if (p.playerSecond.ownMaxMana < 10)
                {
                    p.playerSecond.ownMaxMana++;
                }
                else
                {
                    p.drawACard(CardDB.cardName.excessmana, false, true);
                }
            }
		}
开发者ID:shuyi3,项目名称:AIPJ,代码行数:27,代码来源:Sim_CS2_013.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

//    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

示例4: onCardIsGoingToBePlayed

        //    Whenever your opponent casts a spell, gain a copy of it and give them a Coin.

        public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (c.type == CardDB.cardtype.SPELL && c.name != CardDB.cardName.gallywixscoin && wasOwnCard != triggerEffectMinion.own)
            {
                p.drawACard(c.cardIDenum, triggerEffectMinion.own, true);
                p.drawACard(CardDB.cardName.gallywixscoin, wasOwnCard, true);
            }
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:10,代码来源:Sim_GvG_028.cs

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

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

示例7: getBattlecryEffect

//    kampfschrei:/ gebt eurem gegner 2 bananen.
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            p.drawACard(CardDB.cardName.bananas, !own.own, true);
            if (own.own)
            {
                p.playerSecond.owncarddraw -= 1;
            }
            p.drawACard(CardDB.cardName.bananas, !own.own, true);
            if (own.own)
            {
                p.playerSecond.owncarddraw -= 1;
            }
		}
开发者ID:shuyi3,项目名称:AIPJ,代码行数:14,代码来源:Sim_EX1_014.cs

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

示例9: onSecretPlay

        //todo secret
//    geheimnis:/ wenn ein befreundeter diener stirbt, erhaltet ihr 2 kopien dieses dieners auf eure hand.

        public override void onSecretPlay(Playfield p, bool ownplay, int number)
        {
            if (ownplay)
            {
                p.drawACard(p.playerFirst.revivingOwnMinion, ownplay, true);
                p.drawACard(p.playerFirst.revivingOwnMinion, ownplay, true);
            }
            else
            {
                p.drawACard(p.playerSecond.revivingOwnMinion, ownplay, true);
                p.drawACard(p.playerSecond.revivingOwnMinion, ownplay, true);
            }

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

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

示例11: onTurnEndsTrigger

//    zieht am ende eures zuges eine traumkarte.

        public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
        {
            if (triggerEffectMinion.own == turnEndOfOwner)
            {
                p.drawACard(CardDB.cardName.yseraawakens, turnEndOfOwner, true);
            }
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:9,代码来源:Sim_EX1_572.cs

示例12: onTurnStartTrigger

//    tauscht zu beginn eures zuges diesen diener gegen einen zufälligen diener auf eurer hand aus.

        public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
        {
            if (turnStartOfOwner && triggerEffectMinion.own == turnStartOfOwner)
            {
                List<Handmanager.Handcard> temp2 = new List<Handmanager.Handcard>();
                foreach (Handmanager.Handcard hc in p.playerFirst.owncards)
                {
                    if (hc.card.type == CardDB.cardtype.MOB) temp2.Add(hc);
                }
                temp2.Sort((a, b) => -a.card.Attack.CompareTo(b.card.Attack));//damage the stronges
                foreach (Handmanager.Handcard mins in temp2)
                {
                    CardDB.Card c = CardDB.Instance.getCardDataFromID(mins.card.cardIDenum);
                    p.minionTransform(triggerEffectMinion, c);
                    p.removeCard(mins, true);
                    p.drawACard(CardDB.cardName.alarmobot, true, true);
                    break;
                }
                return;
            }

            if (!turnStartOfOwner && triggerEffectMinion.own == turnStartOfOwner)
            {
                p.minionGetBuffed(triggerEffectMinion, 4, 4);
                triggerEffectMinion.Hp = triggerEffectMinion.maxHp;
            }
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:29,代码来源:Sim_EX1_006.cs

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

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

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


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