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

Combat, AI behavior, AI shooters tend to spread their shots over different troops (1.1.0 8733) #8783

Open LeHerosInconnu opened 1 month ago

LeHerosInconnu commented 1 month ago

Preliminary checks

Describe the problem requiring a solution

In fheroes2, during combat, AI shooters tend to spread their shots over different troops. This is a good tactic, when the result is creatures decimated in several groups. In the example, the shooters spread their shots over several groups of titans, and in the end, only inflict damage on them without decimating a single one. It would have been more appropriate, in this case, to concentrate fire on a single group of titans, with the aim of decimating at least one.

In fheroes2:

https://github.com/ihhub/fheroes2/assets/43583994/c03103e6-546c-469c-b5b2-c0a3f038330e

Here is the save file: AI split damage 02.zip

Describe the possible solution

Make AI shooters consider the damage inflicted and the creatures potentially decimated when selecting their targets.

Additional info

No response