本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}