This also adds an Allow Resist flag to determine whether the target's
Mage Spells or Priest Spells skill can reduce the amount drained.
Thanks to @fosnola for spotting this issue.
Since dialogs turn off whitespace condensing, and it's a global flag,
that caused scenarios to be read with the flag disabled.
The solution is for scenarios to directly turn the flag on before reading.
The fields array was fixed at 64x64, which is fine for all towns
supported in legacy BoE.
However, we intend to support even larger towns in the future,
and also it seems silly to hold so much extra space for a smaller town.
So now, the fields array is a 2D vector that matches the size of the terrain vector.
The setup array is similarly a list of 2D vectors.
This radically changes the format used to store the setup array in a saved game.
Older saves won't crash the game, but fields will be messed up or missing.
Resetting towns is recommended.
This adds several fields to the saved game format that were simply missing.
- Monster boolean flags (for summons)
- Some missing monster ability details (for summons)
- Special on talk (for creatures)
- Max SP and morale (for creatures)
- Source scenario (for encounter notes)
It also changes the default resist to 0 instead of 100, meaning that
resistances will be saved almost always, but should be loaded correctly.
The target location is no longer saved for creatures.
There was already code that nulled it out after loading,
so now that just happens during loading instead.
The town active flags (belt_present and quickfire_present)
are now set during loading instead of after loading.
This changes the save format, so there will be minor incompatibilities.
In particular, monster health won't be loaded correctly from older saves.
For weapons, negative bonus is now shown as "- 2" instead of as "+ -2".
For armour, the bonus is now accounted for and the numbers should match
what is actually calculated in damage_pc().
Thanks to @fosnola for noticing the armour discrepancy.