Allow the AI to dig an Ultimate Artifact if it uncovered the whole puzzle map by visiting all obelisks
Preliminary checks
- [X] I've checked that there aren't other open issues on the same topic.
Describe the problem requiring a solution
The current AI cannot do this. However, we must not allow to do it if Ultimate Artifact is a winning condition for human player.
Describe the possible solution
We have to add logic for this.
Additional info
No response
I've heard many players say that the original AI knew how to dig for the UA. If this is the case then it would be interesting to see what happens if they find the UA in a map where the winning condition is to find the UA.
It's likely that it would be the same as if a human opponent finds it first?
Hello @ihhub and @zenseii,
In the original game, the AI can dig for the ultimate artifact even if this is a victory condition for the human player. In Roland's campaign, for example, it's possible to lose the campaign in the scenario where the Ultimate Crown must be recovered before the opponent. I think it's important to keep this possibility of losing for the human player if the AI recovers it before him, it's part of the game. The requirement for the AI to visit all the obelisks before digging is a sufficient constraint.
Hi @LeHerosInconnu
In the original game, the AI can dig for the ultimate artifact even if this is a victory condition for the human player. In Roland's campaign, for example, it's possible to lose the campaign in the scenario where the Ultimate Crown must be recovered before the opponent.
Are you sure? At least, in the original map editor, there is no way to set (or unset) the "Comp. also wins via Special VC" setting for "Find a particular artifact" victory condition (unlike, e.g., "Capture a particular castle" or "Accumulate gold" conditions).
P.S. It seems that this is indeed the case:
https://github.com/ihhub/fheroes2/assets/32623900/09e834fe-4f38-49e5-8fed-de3d03ae71e0
but IMHO it's not good that it can't be turned on/off, unlike other VCs.
Hello @oleg-derevenetz,
Hi @LeHerosInconnu
In the original game, the AI can dig for the ultimate artifact even if this is a victory condition for the human player. In Roland's campaign, for example, it's possible to lose the campaign in the scenario where the Ultimate Crown must be recovered before the opponent.
Are you sure? At least, in the original map editor, there is no way to set (or unset) the "Comp. also wins via Special VC" setting for "Find a particular artifact" victory condition (unlike, e.g., "Capture a particular castle" or "Accumulate gold" conditions).
P.S. It seems that this is indeed the case:
DOSBox.0.74-2.1.Cpu.speed_.max.100.cycles.Frameskip.0.Program_.HEROES2.2024-05-22.17-32-43.mp4 but IMHO it's not good that it can't be turned on/off, unlike other VCs.
Yes, I'm sure it is. When the AI digs and finds the ultimate artifact in a scenario where this is a victory condition for the human player, it's not the AI that wins, it's the human player who loses. :)
If the human player wouldn't be competing with the AI for the possession of the ultimate artifact, it would be a kind of challenge taken away from the game. It's part of the game to try and get the ultimate artifact before the AI, even if it's not a win/lose condition.
I've found this image:
source
This gives a clue to the loss message:
The enemy has found the %{name}. Your quest is a failure.
Where name changes similar to the win counterpart.
The problem is spawning location of UA. If it spawns near AI starting location and there is at least 1 easily accessible obelisk near his castle, hello instant loss on day 3! That is typical lucky case that can happen in Jebus Cross PvP tournament game. Even though even top player can miss 1-2 times, resulting in 1-2 extra days before discovery, AI knows the exact location of UA as soon as he finds 1 obelisk.
The problem is spawning location of UA. If it spawns near AI starting location and there is at least 1 easily accessible obelisk near his castle, hello instant loss on day 3! That is typical lucky case that can happen in Jebus Cross PvP tournament game. Even though even top player can miss 1-2 times, resulting in 1-2 extra days before discovery, AI knows the exact location of UA as soon as he finds 1 obelisk.
In my PR it should visit ALL obelisks on the map in order to get the exact UA location. This should soften the conditions for a human player.