ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.58k stars 359 forks source link

Adventure map: AI ignores gold mine, that he could capture with no problem #8050

Open fheroes2bugs opened 7 months ago

fheroes2bugs commented 7 months ago

Preliminary checks

Describe the problem requiring a solution

Purple had captured a lot of castles, but near his necro-castle (which is safe from other players) he has a gold mine owned by red player. And as I end the turn, he has no will to capture it and give himself income after 3 days (hero cost 2500 gold, so on 3rd day you get hero compensate and additional 500 gold).

https://github.com/ihhub/fheroes2/assets/145407420/991bbecd-332c-4deb-86f5-94360bd62572

Describe the possible solution

AI should buy a hero and capture gold mine, if it is not far from the castle.

Additional info

version 1.0.10 save: ignoring gold mine.zip

zenseii commented 7 months ago

Hi, @fheroes2bugs. Are you sure they are not on the same team? Also I suppose that his heroes are further away.

oleg-derevenetz commented 7 months ago

Hi @zenseii

Also I suppose that his heroes are further away.

In fact, the essence of this issue is that AI doesn't hire a hero in a neighboring castle specifically to capture this very mine.

fheroes2bugs commented 7 months ago

@zenseii

Hi, @fheroes2bugs. Are you sure they are not on the same team? Also I suppose that his heroes are further away.

Yes, they are not in the same team. This map is all vs all.

image

Here you can see - purple captures red castle:

https://github.com/ihhub/fheroes2/assets/145407420/5b3a5b1f-7005-4bbd-b5f1-acc35ee55dc3