本文整理汇总了C#中HREngine.Bots.Playfield.doDmgToRandomEnemyCLIENT2方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.doDmgToRandomEnemyCLIENT2方法的具体用法?C# Playfield.doDmgToRandomEnemyCLIENT2怎么用?C# Playfield.doDmgToRandomEnemyCLIENT2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HREngine.Bots.Playfield
的用法示例。
在下文中一共展示了Playfield.doDmgToRandomEnemyCLIENT2方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onCardPlay
// When you play or discard this, deal $4 damage to a random enemy.<
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int dmg = (ownplay) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);
if (p.isServer)
{
Minion choosen = p.getRandomMinionFromSide_SERVER(!ownplay, true);
if (choosen != null) p.minionGetDamageOrHeal(choosen, dmg);
return;
}
p.doDmgToRandomEnemyCLIENT2(dmg, true, ownplay);
}
示例2: onDeathrattle
// Deathrattle: Deal 1 damage to a random enemy.
public override void onDeathrattle(Playfield p, Minion m)
{
if (p.isServer)
{
int randdmg = 1;
Minion poortarget = p.getRandomMinionFromSide_SERVER(!m.own, true);
if (poortarget != null) p.minionGetDamageOrHeal(poortarget, randdmg);
return;
}
p.doDmgToRandomEnemyCLIENT2(1, true, m.own);
}
示例3: onCardIsGoingToBePlayed
//Whenever you target this minion with a spell, deal 3 damage to a random enemy.
public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion, Minion target, int choice)
{
if (triggerEffectMinion.own == wasOwnCard && c.type == CardDB.cardtype.SPELL && target!=null && target.entitiyID == triggerEffectMinion.entitiyID)
{
if (p.isServer)
{
Minion choosen = p.getRandomMinionFromSide_SERVER(!triggerEffectMinion.own, true);
if (choosen != null) p.minionGetDamageOrHeal(choosen, 3);
return;
}
p.doDmgToRandomEnemyCLIENT2(3, true, triggerEffectMinion.own);
}
}
示例4: onCardIsDiscarded
public override void onCardIsDiscarded(Playfield p, CardDB.Card card, bool own)
{
int dmg = (own) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);
if (p.isServer)
{
Minion choosen = p.getRandomMinionFromSide_SERVER(!own, true);
if (choosen != null) p.minionGetDamageOrHeal(choosen, dmg);
return;
}
p.doDmgToRandomEnemyCLIENT2(dmg, true, own);
}
示例5: onMinionIsSummoned
// Whenever you summon a Pirate, deal 2 damage to a random enemy.
public override void onMinionIsSummoned(Playfield p, Minion triggerEffectMinion, Minion summonedMinion)
{
if (triggerEffectMinion.own == summonedMinion.own && summonedMinion.handcard.card.race == TAG_RACE.PIRATE)
{
if (p.isServer)
{
Minion randomguy = p.getRandomMinionFromSide_SERVER(!triggerEffectMinion.own, true);
if (randomguy != null) p.minionGetDamageOrHeal(randomguy, 2, true);
return;
}
p.doDmgToRandomEnemyCLIENT2(2, true, triggerEffectMinion.own);
}
}
示例6: getBattlecryEffect
//Battlecry: Deal 1 damage to a random enemy.
public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
{
//Random minion!
if (p.isServer)
{
Minion choosen = p.getRandomMinionFromSide_SERVER(!own.own, true);
if (choosen != null) p.minionGetDamageOrHeal(choosen, 1);
return;
}
p.doDmgToRandomEnemyCLIENT2(1, true, own.own);
}
示例7: onSecretPlay
//todo secret
// geheimnis:/ wenn euer held schaden erleidet, wird dem feindlichen helden ebenso viel schaden zugefügt.
public override void onSecretPlay(Playfield p, bool ownplay, int number)
{
int dmg = 5;
p.doDmgToRandomEnemyCLIENT2(dmg, true, ownplay);
}