[Scummvm-git-logs] scummvm master -> 9ad078e3a7de1f10875082e9a25d3850f79fd1a5

Strangerke noreply at scummvm.org
Sun Apr 30 20:44:15 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:
9ad078e3a7 EFH: Fix two original bugs in attack code (reaction text)


Commit: 9ad078e3a7de1f10875082e9a25d3850f79fd1a5
    https://github.com/scummvm/scummvm/commit/9ad078e3a7de1f10875082e9a25d3850f79fd1a5
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2023-04-30T21:44:08+01:00

Commit Message:
EFH: Fix two original bugs in attack code (reaction text)

Changed paths:
    engines/efh/fight.cpp


diff --git a/engines/efh/fight.cpp b/engines/efh/fight.cpp
index 37a88998719..dc1c4c4cffb 100644
--- a/engines/efh/fight.cpp
+++ b/engines/efh/fight.cpp
@@ -352,8 +352,9 @@ void EfhEngine::handleFight_lastAction_A(int16 teamCharId) {
 						addReactionText(kEfhReactionWinces);
 					} else if (hitPointsBefore / 8 >= originalDamage) {
 						addReactionText(kEfhReactionChortles);
-					} else if (originalDamage == 0 && getRandom(100) < 35) {
-						// CHECKME: "originalDamage == 0" is always false as it's checked beforehand. Looks like another original bug
+					} else if (getRandom(100) < 35) {
+						// Note : The original had a bug as it was doing an (always false) check "originalDamage == 0".
+						// This check has been removed so that it behaves as originally expected
 						addReactionText(kEfhReactionLaughs);
 					}
 				}
@@ -593,8 +594,9 @@ void EfhEngine::handleFight_MobstersAttack(int groupId) {
 							addReactionText(kEfhReactionScreams);
 						} else if (_npcBuf[_teamChar[targetId]._id]._maxHP / 8 >= originalDamage) {
 							addReactionText(kEfhReactionChortles);
-						} else if (originalDamage == 0 && getRandom(100) < 35) {
-							// CHECKME: "originalDamage == 0" is always false as it's checked beforehand. Looks like another original bug
+						} else if (getRandom(100) < 35) {
+							// Note : The original had a bug as it was doing an (always false) check "originalDamage == 0".
+							// This check has been removed so that it behaves as originally expected
 							addReactionText(kEfhReactionLaughs);
 						}
 					}




More information about the Scummvm-git-logs mailing list