diff options
author | Paul Gilbert | 2018-01-30 19:12:55 -0500 |
---|---|---|
committer | Paul Gilbert | 2018-01-30 19:12:55 -0500 |
commit | cb022f39117765861effbe132b1f2a6885dfbf07 (patch) | |
tree | c93a5591174240a1ecb459445d37c232e8c59527 | |
parent | 3025257c6eaef735a4262cc8e566ec36e2116a29 (diff) | |
download | scummvm-rg350-cb022f39117765861effbe132b1f2a6885dfbf07.tar.gz scummvm-rg350-cb022f39117765861effbe132b1f2a6885dfbf07.tar.bz2 scummvm-rg350-cb022f39117765861effbe132b1f2a6885dfbf07.zip |
XEEN: Explicitly use DT_PHYSICAL in DamageType field comparisons
-rw-r--r-- | engines/xeen/combat.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp index c7adf54455..c60a55a278 100644 --- a/engines/xeen/combat.cpp +++ b/engines/xeen/combat.cpp @@ -286,7 +286,7 @@ void Combat::doCharDamage(Character &c, int charNum, int monsterDataIndex) { int fx = 29, frame = 0; - if (monsterData._attackType) { + if (monsterData._attackType != DT_PHYSICAL) { if (c.charSavingThrow(monsterData._attackType)) damage /= 2; @@ -491,7 +491,7 @@ void Combat::moveMonsters() { // Check for range attacks if (monsterData._rangeAttack && !_rangeAttacking[idx] && _attackMonsters[0] != idx && _attackMonsters[1] != idx - && _attackMonsters[2] != idx && !monster._damageType) { + && _attackMonsters[2] != idx && monster._damageType == DT_PHYSICAL) { // Setup monster for attacking setupMonsterAttack(monster._spriteId, pt); _rangeAttacking[idx] = true; @@ -727,7 +727,7 @@ void Combat::moveMonster(int monsterId, const Common::Point &moveDelta) { MazeMonster &monster = map._mobData._monsters[monsterId]; Common::Point newPos = monster._position + moveDelta; - if (_monsterMap[newPos.y][newPos.x] < 3 && !monster._damageType && _moveMonsters) { + if (_monsterMap[newPos.y][newPos.x] < 3 && monster._damageType == DT_PHYSICAL && _moveMonsters) { // Adjust monster's position ++_monsterMap[newPos.y][newPos.x]; --_monsterMap[monster._position.y][monster._position.x]; @@ -810,7 +810,7 @@ void Combat::doMonsterTurn(int monsterId) { assert(monsterIndex != -1); MazeMonster &monster = map._mobData._monsters[monsterIndex]; MonsterStruct &monsterData = *monster._monsterData; - if (monster._damageType) + if (monster._damageType != DT_PHYSICAL) return; monster._frame = 8; |