本文整理汇总了C#中HREngine.Bots.Playfield.doDmgToRandomEnemyCLIENT方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.doDmgToRandomEnemyCLIENT方法的具体用法?C# Playfield.doDmgToRandomEnemyCLIENT怎么用?C# Playfield.doDmgToRandomEnemyCLIENT使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HREngine.Bots.Playfield
的用法示例。
在下文中一共展示了Playfield.doDmgToRandomEnemyCLIENT方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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.doDmgToRandomEnemyCLIENT(dmg, true, !ownplay);
}
示例2: onCardIsDiscarded
public virtual 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.doDmgToRandomEnemyCLIENT(dmg, true, !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)
{
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.doDmgToRandomEnemyCLIENT(3, true, !triggerEffectMinion.own);
}
}
示例4: 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.doDmgToRandomEnemyCLIENT(1, true, !own.own);
}