本文整理汇总了C#中HREngine.Bots.Playfield.doDmgTriggers方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.doDmgTriggers方法的具体用法?C# Playfield.doDmgTriggers怎么用?C# Playfield.doDmgTriggers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HREngine.Bots.Playfield
的用法示例。
在下文中一共展示了Playfield.doDmgTriggers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onCardPlay
// Hero Power: Deal 8 damage to a random enemy. TWICE.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int dmg = 8;
if (ownplay)
{
dmg += p.anzOwnFallenHeros;
if (p.doublepriest >= 1) dmg *= (2 * p.doublepriest);
}
else
{
dmg += p.anzEnemyFallenHeros;
if (p.enemydoublepriest >= 1) dmg *= (2 * p.enemydoublepriest);
}
if (p.isServer)
{
Minion poortarget = p.getRandomMinionFromSide_SERVER(!ownplay, true);
if (poortarget != null) p.minionGetDamageOrHeal(poortarget, dmg);
return;
}
int count = (ownplay) ? p.enemyMinions.Count : p.ownMinions.Count;
if (count >= 1)
{
List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//damage the lowest
foreach (Minion mins in temp2)
{
p.minionGetDamageOrHeal(mins, dmg);
break;
}
}
else
{
p.minionGetDamageOrHeal(ownplay ? p.enemyHero : p.ownHero, dmg);
}
p.doDmgTriggers();
count = (ownplay) ? p.enemyMinions.Count : p.ownMinions.Count;
if (count >= 1)
{
List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//damage the lowest
foreach (Minion mins in temp2)
{
p.minionGetDamageOrHeal(mins, dmg);
break;
}
}
else
{
p.minionGetDamageOrHeal(ownplay ? p.enemyHero : p.ownHero, dmg);
}
}
示例2: onCardIsGoingToBePlayed
// Whenever you cast a spell on another friendly minion, cast a copy of it on this one.
public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion, Minion target, int choice)
{
if (target != null && target.own == wasOwnCard && triggerEffectMinion.own == wasOwnCard && target.entitiyID != triggerEffectMinion.entitiyID && c.type == CardDB.cardtype.SPELL)
{
c.sim_card.onCardPlay(p, wasOwnCard, triggerEffectMinion, choice);
p.doDmgTriggers();
}
}
示例3: onCardPlay
// Hero Power: Deal 8 damage to a random enemy. TWICE.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int count = (ownplay) ? p.enemyMinions.Count : p.ownMinions.Count;
if (count >= 1)
{
List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//damage the lowest
foreach (Minion mins in temp2)
{
p.minionGetDamageOrHeal(mins, 8);
break;
}
}
else
{
p.minionGetDamageOrHeal(ownplay ? p.enemyHero : p.ownHero, 8);
}
p.doDmgTriggers();
count = (ownplay) ? p.enemyMinions.Count : p.ownMinions.Count;
if (count >= 1)
{
List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//damage the lowest
foreach (Minion mins in temp2)
{
p.minionGetDamageOrHeal(mins, 8);
break;
}
}
else
{
p.minionGetDamageOrHeal(ownplay ? p.enemyHero : p.ownHero, 8);
}
}