示例#1
0
 protected void ResolveDamage(Hero attacker, Hero defender, int damage, int criticalDamage, Combat.DuelResultStatus status)
 {
     if (status == Combat.DuelResultStatus.Hit)
         defender.Life -= damage;
     else if (status == Combat.DuelResultStatus.CriticalHit)
         defender.Life -= criticalDamage;
     else if (status == Combat.DuelResultStatus.CriticalError)
         attacker.Life -= damage;
 }
示例#2
0
 protected void ResolveDamage(Hero hero, Unit unit, int damage, int criticalDamage, Combat.DuelResultStatus status)
 {
     if (status == Combat.DuelResultStatus.Hit)
         unit.Life -= damage;
     else if (status == Combat.DuelResultStatus.CriticalHit)
         unit.Life -= criticalDamage;
     else if (status == Combat.DuelResultStatus.CriticalError)
         hero.Life -= damage;
 }