[Scummvm-git-logs] scummvm master -> f75da6e410ad27199f37e96563d793050e7e34e9
Strangerke
noreply at scummvm.org
Sun Apr 30 17:30:00 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f75da6e410 EFH: Fix an original bug in attack reaction
Commit: f75da6e410ad27199f37e96563d793050e7e34e9
https://github.com/scummvm/scummvm/commit/f75da6e410ad27199f37e96563d793050e7e34e9
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2023-04-30T18:29:53+01:00
Commit Message:
EFH: Fix an original bug in attack reaction
Changed paths:
engines/efh/fight.cpp
diff --git a/engines/efh/fight.cpp b/engines/efh/fight.cpp
index abf16be6d89..37a88998719 100644
--- a/engines/efh/fight.cpp
+++ b/engines/efh/fight.cpp
@@ -345,11 +345,11 @@ void EfhEngine::handleFight_lastAction_A(int16 teamCharId) {
addReactionText(kEfhReactionCriesOut);
} else if (_mapMonsters[_techId][_teamMonster[groupId]._id]._hitPoints[ctrMobsterId] < hitPointsBefore / 4) {
addReactionText(kEfhReactionFalters);
- } else if (_mapMonsters[_techId][_teamMonster[groupId]._id]._hitPoints[ctrMobsterId] < hitPointsBefore / 2) {
- addReactionText(kEfhReactionWinces);
+ // The original checked /2 before /3, making the code in /3 unreachable. This fix allow the originally text to be displayed
} else if (_mapMonsters[_techId][_teamMonster[groupId]._id]._hitPoints[ctrMobsterId] < hitPointsBefore / 3) {
- // CHECKME: Doesn't make any sense to check /3 after /2... I don't get it. Looks like an original bug
addReactionText(kEfhReactionScreams);
+ } else if (_mapMonsters[_techId][_teamMonster[groupId]._id]._hitPoints[ctrMobsterId] < hitPointsBefore / 2) {
+ addReactionText(kEfhReactionWinces);
} else if (hitPointsBefore / 8 >= originalDamage) {
addReactionText(kEfhReactionChortles);
} else if (originalDamage == 0 && getRandom(100) < 35) {
More information about the Scummvm-git-logs
mailing list