Skip to content

HoMM3 HD bug reports.

#477
Auto-translated
Regarding the two-hex creatures that approach a wall of fire, I once saw this happen and looked into the code to understand why. If the AI is attacking entire stacks or some powerful single units, this might be normal behavior for the original game. The AI can definitely see creatures right next to the wall of fire. But when it checks whether it wants to attack a stack, it has a check (if you're not playing on "peasant" difficulty): If the total value of the attack (taking into account damage from the wall of fire, but not considering that it damages before the attack is made) is less than 0, and if the attack will result in a bad "burn" for the AI or the enemy will retaliate and damage everyone around it significantly, then the AI will not attack. This is implemented as follows: when checking the "burn" and retaliation, the danger from these things is added to the danger of the hex that the creature wants to move to for the attack (the hex where the danger from the wall of fire is already stored). Then, the resulting danger of the hex is compared to the original danger, before these values were added. However, there is a bug here: if the creature is a 2-hex creature, then the hex that the creature wants to move to for the attack is the one of its 2 hexes that is more dangerous (the one that will be on the wall of fire). And the original danger is always taken from the rear hex of the creature – so if the "more dangerous" hex is the one where the creature's head will be, then the dangers of different hexes are being compared. Thus, if you place the wall right next to it, the 2-hex creature will see that the danger of the hex it wants to move to is high, but its original danger (which it took for its rear hex, which is not on the wall of fire) is low – and it will decide that the attack will result in a dangerous "burn" or retaliation against everyone around it, and it will not attack. At the same time, as I wrote above, not only the danger of the hexes is checked, but also the total value of the attack. If there is not a single unit behind the wall, but an entire stack (or maybe a powerful single unit), then the AI may decide that, even despite the damage from the wall of fire, it is more beneficial to attack the stack (especially since it does not know that the wall affects before the attack, not after). Then, the bug with the dangers of the hexes does not matter – and the AI will go to attack. However, if the AI is attacking single units like sprites, etc., then this is unlikely to be explained by the text above. --- Regarding magic in auto-combat, it is easy to verify that the AI can use it in principle – set up an AI hero in the editor with 1 Golden Dragon and Armageddon with 99 skill points, and attack it with a large army that will be decimated by Armageddon – in auto-combat, the AI will win, and this is only possible if it casts Armageddon. But I have also seen situations that are difficult to explain other than the fact that the AI is not casting spells in auto-combat. Perhaps it can only cast spells in some cases. Or auto-combat fights in a tricky way, forcing the AI to cast different spells or not cast spells at all.