Make the AI order the artifacts in the bag from worst to best #9208
Labels
AI
Artificial intelligence behaviour
improvement
New feature, request or improvement
logic
Things related to game logic
Milestone
Preliminary checks
Describe the problem requiring a solution
Currently if an AI hero has met up with another hero and exchanged artifacts, it will have its artifacts ordered from best to worst, and this means that when they lose a battle the winner will get the best artifacts first. It should be the opposite.
Describe the possible solution
Add logic for the AI to sort its artifacts from worst to best, both after it has met and exchanged artifacts and other situations when it gets artifacts. The latter could be the first turn because its possible that a hero starts with artifacts, in which case they should be sorted by the AI.
Additional info
I have not checked if this logic of transferring artifacts to the winner in fheroes2 is the same as in the original game. If the original game transfers artifacts over to the winner according to different rules, like according to artifactID, then we should discuss if we want to reimplement that.
The text was updated successfully, but these errors were encountered: