本文整理汇总了C#中HRSim.Minion.getDamageOrHeal方法的典型用法代码示例。如果您正苦于以下问题:C# Minion.getDamageOrHeal方法的具体用法?C# Minion.getDamageOrHeal怎么用?C# Minion.getDamageOrHeal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HRSim.Minion
的用法示例。
在下文中一共展示了Minion.getDamageOrHeal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: minionGetDamageOrHeal
public void minionGetDamageOrHeal(Minion m, int dmgOrHeal, bool dontDmgLoss = false)
{
m.getDamageOrHeal(dmgOrHeal, this, false, dontDmgLoss);
}
示例2: minionAttacksMinion
//minion attacks a minion
//dontcount = betrayal effect!
public void minionAttacksMinion(Minion attacker, Minion defender, bool dontcount = false)
{
if (attacker.isHero)
{
if (defender.isHero)
{
defender.getDamageOrHeal(attacker.Angr, this, true, false);
}
else
{
int enem_attack = defender.Angr;
defender.getDamageOrHeal(attacker.Angr, this, true, false);
if (!this.playerFirst.ownHero.immuneWhileAttacking)
{
int oldhp = attacker.Hp;
attacker.getDamageOrHeal(enem_attack, this, true, false);
if (!defender.silenced && oldhp > attacker.Hp)
{
if (defender.handcard.card.name == CardDB.cardName.waterelemental || defender.handcard.card.name == CardDB.cardName.snowchugger)
{
attacker.frozen = true;
}
this.triggerAMinionDealedDmg(defender, oldhp - attacker.Hp);
}
}
}
doDmgTriggers();
return;
}
if (!dontcount)
{
attacker.numAttacksThisTurn++;
attacker.stealth = false;
if ((attacker.windfury && attacker.numAttacksThisTurn == 2) || !attacker.windfury)
{
attacker.Ready = false;
}
}
if (logging) Helpfunctions.Instance.logg(".attck with" + attacker.name + " A " + attacker.Angr + " H " + attacker.Hp);
int attackerAngr = attacker.Angr;
int defAngr = defender.Angr;
//trigger attack ---------------------------
this.triggerAMinionIsGoingToAttack(attacker);
//------------------------------------------
if (defender.isHero)//target is enemy hero
{
int oldhp = defender.Hp;
defender.getDamageOrHeal(attacker.Angr, this, true, false);
if (!attacker.silenced && oldhp > defender.Hp) // attacker did dmg
{
if (attacker.handcard.card.name == CardDB.cardName.waterelemental || attacker.handcard.card.name == CardDB.cardName.snowchugger) defender.frozen = true;
this.triggerAMinionDealedDmg(attacker, oldhp - defender.Hp);
}
doDmgTriggers();
return;
}
//defender gets dmg
int oldHP = defender.Hp;
defender.getDamageOrHeal(attackerAngr, this, true, false);
if (!attacker.silenced && oldHP > defender.Hp && (attacker.handcard.card.name == CardDB.cardName.waterelemental || attacker.handcard.card.name == CardDB.cardName.snowchugger)) defender.frozen = true;
bool defenderGotDmg = oldHP > defender.Hp;
bool attackerGotDmg = false;
//attacker gets dmg
if (!dontcount)//betrayal effect :D
{
oldHP = attacker.Hp;
attacker.getDamageOrHeal(defAngr, this, true, false);
if (!defender.silenced && oldHP > attacker.Hp)
{
if (defender.handcard.card.name == CardDB.cardName.waterelemental || defender.handcard.card.name == CardDB.cardName.snowchugger) attacker.frozen = true;
this.triggerAMinionDealedDmg(defender, oldHP - attacker.Hp);
}
attackerGotDmg = oldHP > attacker.Hp;
}
//.........这里部分代码省略.........