[Issue Report]: Amulet of Warding issue
Closed this issue · 9 comments
Operating System
Linux x64
DevilutionX version
Other (commit 1078598)
Describe
The hero had 80 hit points thanks to all sorts of improvements.
After he was equipped with the "Amulet of Warding" in town, the save game was broken after saving.
The hit points showed the number 1, although the amulet subtracts 100 from it.
So we are actually in the negative area of the hit points.
Despite this, the hero did not die in the town.
After saving and loading the game, the game is always crashing.
Save game:
warding.zip
To Reproduce
Load attached game
Expected Behavior
No crash when loading the game
Additional context
In vanilla the save game can be loaded flawlessly.
Attached is also a save game with the mentioned amulet in the inventory.
single_1.hsv.zip
Bisected and and found that the game cannot be loaded since commit 961866e.
Please also note that the game can be loaded between V. 1.4.0 and commit bd689e9, but the hero is invisible at first.
Only when the hero starts moving he become visible.
I cannot judge at this point whether the issue is related to the hero's invisibility.
What's the crash message? Maybe the game is confused as the player is Schrodinger's cat at this point?
I've seen this kind of issue before, where the game is treating the player as if they are in a death state due to <= 0 life, however they are still alive, and there is a conflict that causes the game to attempt to select a graphic that doesn't exist. The player having 1 life that you observed is a hack to prevent item changes from dropping the character's health enough to kill them. The issue could also be related to the fact you have negative max hp.
This is technically a duplicate. #6520
Duplicate of: #6520
Thanks for the fix. The game can be loaded.
After I loaded the game and went into the dungeon, I took off the amulet.
But after I put it back on, the hero died.
Since then, the game can no longer be loaded.
It crashes immediately.
But anyway, I will open a new issue and describe exactly.
I can't reproduce this thing anymore for now.