[Scummvm-git-logs] scummvm master -> 649b78c998e07ffa03f97e6185479026d82b632d
bluegr
noreply at scummvm.org
Tue Sep 9 08:02:40 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
649b78c998 WAGE: Make combat less broken (bug #16194)
Commit: 649b78c998e07ffa03f97e6185479026d82b632d
https://github.com/scummvm/scummvm/commit/649b78c998e07ffa03f97e6185479026d82b632d
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2025-09-09T11:02:36+03:00
Commit Message:
WAGE: Make combat less broken (bug #16194)
This works on the assumption that the PHYS_ and SPIR_ constants should
only be used with _statVariables, not _userVariables. Combats no longer
end on the first hit, and your experience goes up instead of down.
Changed paths:
engines/wage/combat.cpp
diff --git a/engines/wage/combat.cpp b/engines/wage/combat.cpp
index f3b6b43b442..bc548464115 100644
--- a/engines/wage/combat.cpp
+++ b/engines/wage/combat.cpp
@@ -296,20 +296,20 @@ bool WageEngine::attackHit(Chr *attacker, Chr *victim, Obj *weapon, int targetIn
}
if (causesPhysicalDamage) {
- victim->_context._userVariables[PHYS_HIT_CUR] -= weapon->_damage;
+ victim->_context._statVariables[PHYS_HIT_CUR] -= weapon->_damage;
/* Do it here to get the right order of messages in case of death. */
decrementUses(weapon);
usesDecremented = true;
- if (victim->_context._userVariables[PHYS_HIT_CUR] < 0) {
+ if (victim->_context._statVariables[PHYS_HIT_CUR] < 0) {
playSound(victim->_dyingSound);
appendText(victim->_dyingWords.c_str());
snprintf(buf, 512, "%s%s is dead!", victim->getDefiniteArticle(true), victim->_name.c_str());
appendText(buf);
attacker->_context._kills++;
- attacker->_context._experience += victim->_context._userVariables[SPIR_HIT_CUR] + victim->_context._userVariables[PHYS_HIT_CUR];
+ attacker->_context._experience += victim->_context._statVariables[SPIR_HIT_CUR] + victim->_context._statVariables[PHYS_HIT_CUR];
if (!victim->_playerCharacter && !victim->_inventory.empty()) {
Scene *currentScene = victim->_currentScene;
@@ -324,8 +324,8 @@ bool WageEngine::attackHit(Chr *attacker, Chr *victim, Obj *weapon, int targetIn
}
_world->move(victim, _world->_storageScene);
} else if (attacker->_playerCharacter && !receivedHitTextPrinted) {
- double physicalPercent = (double)victim->_context._userVariables[SPIR_HIT_CUR] /
- victim->_context._userVariables[SPIR_HIT_BAS];
+ double physicalPercent = (double)victim->_context._statVariables[SPIR_HIT_CUR] /
+ victim->_context._statVariables[SPIR_HIT_BAS];
snprintf(buf, 512, "%s%s's condition appears to be %s.",
victim->getDefiniteArticle(true), victim->_name.c_str(),
getPercentMessage(physicalPercent));
More information about the Scummvm-git-logs
mailing list