AI now has better (but not perfect) system for scoring artifacts.
All artifacts now have their base score, based on bonuses provided by
the artifact. For composite artifacts, AI will also consider bonuses
from its components.
When exploring, AI will now weight artifacts as min(base score, price /
5), meaning even artifacts that AI can't score will still have some
priority, if only to sell them or deny them to enemy
AI will now also consider what to equip when trading with heroes or on
the end of AI pass. When considering what to equip, hero will use base
score of an artifact, adjusted by how relevant particular bonus /
artifact for a hero. Some examples:
- Morale-bonusing artifacts have their score reduced based on percentage
of undeads in the army, all the way to 0 for undead-only troops
- Artifacts that give spells (books, hat) will have score reduced based
on how many of these spells are already known by hero
- Land movement artifacts have zero score while on water and vice versa
- Necromancy artifacts will have zero score if hero does not have
necromancy
- Archery artifacts are scaled by amount of ranged troops, and only used
if hero has archery skill
AI may still equip 'bad' artifact, however this should only happen if
hero has no other artifacts to equip into said slot.
TODO's for future PR's (although not sure if / when I will work on
these):
- avoid equipping duplicates of the same artifact. Most notably with
scrolls, but may happen with other misc artifacts or rings.
- consideration for various spell-immunity neclaces
- consideration for birectional artifacts, like Shackles of War, or some
Spheres - since these artifacts need consideration on what our expected
enemy is to correctly estimate whether
- equipping artifacts based on immediate need - for example, equipping
recovery artifacts before end of day, equipping legion pieces only in
town on day 7, preparing for strong / weak enemies (or even preparing
for specific enemy in advance)
- transferring resource-generating artifacts and such to scout heroes,
allowing main hero to focus on combat
- ensure that AI can equip combined artifacts even if non-primary slots
are in use - by considering whether score of combined artifact is higher
than score of all used slots
- Removed 'version' field from serialize() method
- Handler classes - Binary(De)Serializer now have 'version' field
- Serialization versioning now uses named enum
Save compatibility with 1.4.X saves should be intact
* Instead of [x][y][z] coordinates, map will be stored as [z][x][y].
* Nullkiller AI can get it too.
* Use boost::multi_array instead of nested vectors
* In MapHandler too
* Rotate foreach algorithms, too
* VCAI gets rotated, too