本文整理汇总了C#中HRSim.Playfield.doDmgTriggers方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.doDmgTriggers方法的具体用法?C# Playfield.doDmgTriggers怎么用?C# Playfield.doDmgTriggers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HRSim.Playfield
的用法示例。
在下文中一共展示了Playfield.doDmgTriggers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 count = (ownplay) ? p.playerSecond.ownMinions.Count : p.playerFirst.ownMinions.Count;
if (count >= 1)
{
List<Minion> temp2 = (ownplay) ? new List<Minion>(p.playerSecond.ownMinions) : new List<Minion>(p.playerFirst.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.playerSecond.ownHero : p.playerFirst.ownHero, 8);
}
p.doDmgTriggers();
count = (ownplay) ? p.playerSecond.ownMinions.Count : p.playerFirst.ownMinions.Count;
if (count >= 1)
{
List<Minion> temp2 = (ownplay) ? new List<Minion>(p.playerSecond.ownMinions) : new List<Minion>(p.playerFirst.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.playerSecond.ownHero : p.playerFirst.ownHero, 8);
}
}