diff options
Diffstat (limited to 'engines/xeen')
-rw-r--r-- | engines/xeen/combat.cpp | 10 | ||||
-rw-r--r-- | engines/xeen/combat.h | 2 | ||||
-rw-r--r-- | engines/xeen/interface.cpp | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp index 4e32d431a8..fca7fcb3ee 100644 --- a/engines/xeen/combat.cpp +++ b/engines/xeen/combat.cpp @@ -1342,11 +1342,11 @@ void Combat::attack(Character &c, RangeType rangeType) { break; } - int numberOfAttacks = c.getCurrentLevel() / divisor; + int numberOfAttacks = c.getCurrentLevel() / divisor + 1; damage = 0; while (numberOfAttacks-- > 0) { - if (hitMonster(c, RT_0)) + if (hitMonster(c, RT_CLOSE)) damage += getMonsterDamage(c); } @@ -1593,7 +1593,7 @@ void Combat::quickFight() { switch (c->_quickOption) { case QUICK_ATTACK: - attack(*c, RT_0); + attack(*c, RT_CLOSE); break; case QUICK_SPELL: if (c->_currentSpell != -1) { @@ -1720,7 +1720,7 @@ void Combat::getWeaponDamage(Character &c, RangeType rangeType) { } int Combat::getMonsterDamage(Character &c) { - return (c.statBonus(c.getStat(MIGHT)) + _weaponDamage) < 1; + return MAX(c.statBonus(c.getStat(MIGHT)) + _weaponDamage, 1); } int Combat::getDamageScale(int v) { @@ -1739,7 +1739,7 @@ int Combat::getMonsterResistence(RangeType rangeType) { MonsterStruct &monsterData = *monster._monsterData; int resistence = 0, damage = 0; - if (rangeType != RT_0 && rangeType != RT_3) { + if (rangeType != RT_CLOSE && rangeType != RT_3) { switch (_damageType) { case DT_PHYSICAL: resistence = monsterData._phsyicalResistence; diff --git a/engines/xeen/combat.h b/engines/xeen/combat.h index 4783819c70..bf35ca819d 100644 --- a/engines/xeen/combat.h +++ b/engines/xeen/combat.h @@ -57,7 +57,7 @@ enum ElementalCategory { }; enum RangeType { - RT_0 = 0, RT_1 = 1, RT_2 = 2, RT_3 = 3 + RT_CLOSE = 0, RT_1 = 1, RT_2 = 2, RT_3 = 3 }; class XeenEngine; diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index 076437add6..01cd494eff 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -1963,7 +1963,7 @@ void Interface::doCombat() { case Common::KEYCODE_a: // Attack - combat.attack(*combat._combatParty[combat._whosTurn], RT_0); + combat.attack(*combat._combatParty[combat._whosTurn], RT_CLOSE); nextChar(); break; |