fheroes2 icon indicating copy to clipboard operation
fheroes2 copied to clipboard

Combat, AI behavior, AI should take into account the spells cast by the opposing hero during the combat before moving its troops (0.9.3 3370)

Open LeHerosInconnu opened this issue 4 years ago • 3 comments

In fheroes2, the AI should take into account the spells cast by the opposing hero during the combat before moving its troops. In the example, the Peasants move closer to the Gargoyles in a hex where the opposing hero can hit the Peasants and Archers with the Cold Ring spell. If the Peasants had moved into the hex indicated by the red arrow, Falagar would not have been able to hit both troops and he certainly would not have won the combat.

In fheroes2:

vlcsnap-2021-05-15-22h14m39s619 flèche

vlcsnap-2021-05-15-22h15m44s889

https://user-images.githubusercontent.com/43583994/118378000-f9944180-b5d0-11eb-9e98-b90f9096b34c.mp4

Falagar attacks Sir Gallant.

Here is the save file: Before peasant move 01.zip

LeHerosInconnu avatar May 15 '21 21:05 LeHerosInconnu

I think, AI should act like this, if the opposing hero has proper area-spells in his book and enough mana to cast them.

Branikolog avatar May 17 '21 06:05 Branikolog

I'm making this issue as 1.0 milestone as the implementation won't be trivial.

ihhub avatar May 18 '21 09:05 ihhub

Hello @Branikolog and @ihhub,

I have opened a discussion about this subject here: https://github.com/ihhub/fheroes2/discussions/3444.

LeHerosInconnu avatar May 18 '21 14:05 LeHerosInconnu