fheroes2
fheroes2 copied to clipboard
Combat, auto combat mode, strange behavior "The enemy has fled!"
The first blue hero attacks the nearest green hero to the east.
In single mode, blue player. Click the "AUTO" button at the start of the combat. Click the "AUTO" button while the Dwarves are moving. In the next round, the player did not regain control of the Elementals. And as soon as a troop of Dwarves is decimated, the combat ends "The enemy has fled!".
In multiplayer mode, two players. Click the "AUTO" button at the start of the combat for the blue player. Click the "AUTO" button at the start of the combat for the green player. Click on the "AUTO" button while the Dwarves are moving to regain control. Click on the "AUTO" button to switch back to automatic mode and wait. As soon as a troop of Dwarves is decimated, the combat ends "The enemy has fled!".
In fheroes2:
Here is the test scenario file: The enemy has fled.zip
Hi @LeHerosInconnu , I cannot reproduce this issue anymore. Could you please check again?
Hello @ihhub,
Hi @LeHerosInconnu , I cannot reproduce this issue anymore. Could you please check again?
I redid some tests with version 0.9.6 4032.
The first blue hero attacks the nearest green hero to the east.
In single mode, blue player. Click the "AUTO" button at the start of the combat. Click the "AUTO" button while the Dwarves are moving. In the next round, the player did not regain control of the Elementals. And as soon as the second troop of Dwarves is decimated, the combat ends "The enemy has fled!".
In multiplayer mode, two players. Click the "AUTO" button at the start of the combat for the blue player. Click the "AUTO" button at the start of the combat for the green player. Click on the "AUTO" button while the Dwarves are moving to regain control. Click on the "AUTO" button to switch back to automatic mode and wait. The green hero does not flee.
In fheroes2:
I'm not sure what is wrong here. AI decided to flee after some losses, what's wrong with this?
Hello @oleg-derevenetz,
I'm not sure what is wrong here. AI decided to flee after some losses, what's wrong with this?
When the AI hero flees, all remaining troops in the hero's army are lost anyway. The AI should wait until the last moment to flee (but without risking the loss of his hero) in order to maximize the damage inflicted on the opposing troops (with spells and troop attacks). In the original case, the AI could wait a little longer before fleeing (although the dwarves wouldn't have done much more damage anyway (but I doubt that the hero's escape was intentional with that taken into account in the example)). If the AI troops and the hero's spells can't inflict damage to the opponent's troops, then the hero might as well run away from the start of the combat so as not to waste spell points or give experience to the opponent hero.
Now look at the result with a different version of the game than the original post (second test). The hero doesn't flee (same in the latest version (hero does not flee at start of combat)).
@LeHerosInconnu Ah OK, so this issue is related not to game logic itself, but to AI decisions. I couldn't figure out what was wrong with the logic of the game. I'll reclassify it then.