fheroes2
fheroes2 copied to clipboard
AI: improve the logic for army and artifact exchange between 2 AI heroes
We have a logic for meeting two AI heroes in void AIMeeting( Heroes & left, Heroes & right ) function.
The logic for army exchange could be described shortly as "Move the strongest monsters from one hero to another". It is noticeable that during this exchange if one of the heroes for example has only one stack of Dwarves while another hero has Peasants and Dwarves the first hero will keep 1 Dwarf instead of having 1 Peasant. This should be improved.
Artifact exchange won't take into account "bad" artifacts or artifacts that generate resources. For example, Endless Purse of Gold has the same value as Power Axe. For the stronger hero Power Axe makes more point in battles.