Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the AI order the artifacts in the bag from worst to best #9208

Open
1 task done
zenseii opened this issue Oct 17, 2024 · 2 comments
Open
1 task done

Make the AI order the artifacts in the bag from worst to best #9208

zenseii opened this issue Oct 17, 2024 · 2 comments
Labels
AI Artificial intelligence behaviour improvement New feature, request or improvement logic Things related to game logic

Comments

@zenseii
Copy link
Collaborator

zenseii commented Oct 17, 2024

Preliminary checks

Describe the problem requiring a solution

Currently if an AI hero has met up with another hero and exchanged artifacts, it will have its artifacts ordered from best to worst, and this means that when they lose a battle the winner will get the best artifacts first. It should be the opposite.

Describe the possible solution

Add logic for the AI to sort its artifacts from worst to best, both after it has met and exchanged artifacts and other situations when it gets artifacts. The latter could be the first turn because its possible that a hero starts with artifacts, in which case they should be sorted by the AI.

Additional info

I have not checked if this logic of transferring artifacts to the winner in fheroes2 is the same as in the original game. If the original game transfers artifacts over to the winner according to different rules, like according to artifactID, then we should discuss if we want to reimplement that.

@zenseii zenseii added improvement New feature, request or improvement logic Things related to game logic AI Artificial intelligence behaviour labels Oct 17, 2024
@zenseii zenseii added this to the Beyond OG scope milestone Oct 17, 2024
@zenseii
Copy link
Collaborator Author

zenseii commented Oct 17, 2024

Step 1 in this issue is to verify the artifact transfer logic of the original game. Note that in the original game it was not possible to reorder artifacts in the bag I've since learnt that you can reorder artifacts in the heroes meeting screen in the OG.

Also see: #1643

@PlatoHero
Copy link

PlatoHero commented Oct 17, 2024

I think that if this gets implemented, only the higher difficulties should use this tactic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI Artificial intelligence behaviour improvement New feature, request or improvement logic Things related to game logic
Projects
None yet
Development

No branches or pull requests

3 participants
@zenseii @PlatoHero and others