Andrettin / Wyrmsun

Strategy game based on history, mythology and fiction
http://andrettin.github.io/
GNU General Public License v2.0
307 stars 48 forks source link

[5.3.4] Heroes healed to full health when loading a saved game #207

Open SenhorFlibble opened 2 years ago

SenhorFlibble commented 2 years ago

Found another bug, easily reproduced:

All heroes (both starting heroes and anyone hired from the Town Hall) will be at full health after the game is loaded. This does not seem to affect regular units or buildings.

Tested this with both Dwarf and Germanic scenarios.

Andrettin commented 2 years ago

Thanks for letting me know :) When a game is loaded, characters have their persistent data applied, rather than what is in the save file (otherwise loading a game could screw up the persistent character data).

But this issue should be simple to fix, the HP (and mana) of the character unit in the save file should be applied as a percentage to that which it will have when the persistent data is applied.