aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/scripts.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-17 18:35:21 -0400
committerPaul Gilbert2018-03-17 18:35:21 -0400
commit46dc048c38cc11ec1c093ed402adfce7b6242366 (patch)
tree8657ceaad0477f68d81af2206b896a60f44a7c2e /engines/xeen/scripts.cpp
parent48dae64267f5909941432211a08a27a40561e907 (diff)
downloadscummvm-rg350-46dc048c38cc11ec1c093ed402adfce7b6242366.tar.gz
scummvm-rg350-46dc048c38cc11ec1c093ed402adfce7b6242366.tar.bz2
scummvm-rg350-46dc048c38cc11ec1c093ed402adfce7b6242366.zip
XEEN: Fix damaging characters from poisoned well
Diffstat (limited to 'engines/xeen/scripts.cpp')
-rw-r--r--engines/xeen/scripts.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index 8777cdc6e0..8bcc3bf035 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -990,7 +990,7 @@ bool Scripts::cmdDamage(ParamsIterator &params) {
int damage = params.readUint16LE();
DamageType damageType = (DamageType)params.readByte();
- combat.giveCharDamage(damage, damageType, _charIndex);
+ combat.giveCharDamage(damage, damageType, _charIndex - 1);
return true;
}
@@ -1114,7 +1114,7 @@ bool Scripts::cmdRndDamage(ParamsIterator &params) {
DamageType dmgType = (DamageType)params.readByte();
int max = params.readByte();
- combat.giveCharDamage(_vm->getRandomNumber(1, max), dmgType, _charIndex);
+ combat.giveCharDamage(_vm->getRandomNumber(1, max), dmgType, _charIndex - 1);
return true;
}