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

Let AI choose healing promotions #12728

Merged
merged 3 commits into from
Jan 1, 2025
Merged

Conversation

EmperorPinguin
Copy link
Contributor

@EmperorPinguin EmperorPinguin commented Dec 31, 2024

It is currently filtering out the healing promotion from consideration it seems, even though it can be the best choice.

Note that 60hp treshold is a bit arbitrary, it may be worthwhile to test with a higher or lower treshold.

@EmperorPinguin
Copy link
Contributor Author

Simulation data:
Screenshot 2024-12-31 132923
Screenshot 2024-12-31 123433

Comment on lines +185 to +186
availablePromotions.filter { it.hasUnique(UniqueType.OneTimeUnitHeal) } //choose healing promotions only when beneficial
else availablePromotions.filterNot { it.hasUnique(UniqueType.SkipPromotion) }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we don't have any promotion with a one time heal? We should default to all

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, hadn't thought of that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this works.

@yairm210 yairm210 merged commit 5e5a9d7 into yairm210:master Jan 1, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants