[Scummvm-git-logs] scummvm master -> 4e54b5cdb9b3a22f98f9f1fd89072cc0a7bf752a

athrxx noreply at scummvm.org
Sat Jul 20 18:13:24 UTC 2024


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:
4e54b5cdb9 Fixed _hpIncrPerLevel table lookup


Commit: 4e54b5cdb9b3a22f98f9f1fd89072cc0a7bf752a
    https://github.com/scummvm/scummvm/commit/4e54b5cdb9b3a22f98f9f1fd89072cc0a7bf752a
Author: Vladimir Vrzić (vvrzic at gmail.com)
Date: 2024-07-20T20:13:21+02:00

Commit Message:
Fixed _hpIncrPerLevel table lookup

Changed paths:
    engines/kyra/engine/eobcommon.cpp


diff --git a/engines/kyra/engine/eobcommon.cpp b/engines/kyra/engine/eobcommon.cpp
index 8e786e90d12..21b6a234309 100644
--- a/engines/kyra/engine/eobcommon.cpp
+++ b/engines/kyra/engine/eobcommon.cpp
@@ -1040,10 +1040,10 @@ int EoBCoreEngine::generateCharacterHitpointsByLevel(int charIndex, int levelInd
 
 		int d = getCharacterClassType(c->cClass, i);
 
-		if (c->level[i] <= _hpIncrPerLevel[6 + i])
+		if (c->level[i] <= _hpIncrPerLevel[6 + d])
 			h += rollDice(1, (d >= 0) ? _hpIncrPerLevel[d] : 0);
 		else
-			h += _hpIncrPerLevel[12 + i];
+			h += _hpIncrPerLevel[12 + d];
 
 		h += m;
 	}




More information about the Scummvm-git-logs mailing list