diff options
author | Paul Gilbert | 2018-03-26 20:35:45 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-03-26 20:35:45 -0400 |
commit | 76087929372e98b014cadd799f65230a8f463ae6 (patch) | |
tree | cc06df2207195af6b32936144336a0fdfb0a4829 /engines/xeen | |
parent | 53371ed2f7e30ce5940676be47cda033b685959b (diff) | |
download | scummvm-rg350-76087929372e98b014cadd799f65230a8f463ae6.tar.gz scummvm-rg350-76087929372e98b014cadd799f65230a8f463ae6.tar.bz2 scummvm-rg350-76087929372e98b014cadd799f65230a8f463ae6.zip |
XEEN: Fix non-physical monster attacks causing damage
Diffstat (limited to 'engines/xeen')
-rw-r--r-- | engines/xeen/combat.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp index 30ea94ee88..3a248e5942 100644 --- a/engines/xeen/combat.cpp +++ b/engines/xeen/combat.cpp @@ -324,7 +324,7 @@ void Combat::doCharDamage(Character &c, int charNum, int monsterDataIndex) { intf._charPowSprites.draw(0, frame, Common::Point(Res.CHAR_FACES_X[charNum], 150)); windows[33].update(); - damage -= party._powerShield; + damage = MAX(damage - party._powerShield, 0); if (damage > 0 && monsterData._specialAttack && !c.charSavingThrow(DT_PHYSICAL)) { switch (monsterData._specialAttack) { case SA_POISON: @@ -427,15 +427,15 @@ void Combat::doCharDamage(Character &c, int charNum, int monsterDataIndex) { default: break; } - - if (debugger._invincible) - // Invincibility mode is on, so reset conditions that were set - c.clearConditions(); - else - // Standard gameplay, deal out the damage - c.subtractHitPoints(damage); } + if (debugger._invincible) + // Invincibility mode is on, so reset conditions that were set + c.clearConditions(); + else + // Standard gameplay, deal out the damage + c.subtractHitPoints(damage); + events.ipause(2); intf.drawParty(true); } |