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

Prevent negative action chance in diplomat battles #2084

Merged
merged 1 commit into from
Dec 25, 2023

Conversation

lmoureaux
Copy link
Contributor

The win probability could become negative or larger than one when Spy_Resistant effects were involved. Clip the probability between 0 and 1.

I think this is the only way #2035 can possibly have occurred so I would close it after this PR is merged.
Closes #2035.

The win probability could become negative or larger than one when Spy_Resistant
effects were involved. Clip the probability between 0 and 1.

See longturn#2035.
@lmoureaux lmoureaux requested a review from jwrober December 25, 2023 02:07
Copy link
Collaborator

@jwrober jwrober left a comment

Choose a reason for hiding this comment

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

LGTM

@lmoureaux lmoureaux merged commit a396561 into longturn:master Dec 25, 2023
18 of 19 checks passed
@lmoureaux lmoureaux deleted the bugfix/action-prob-negative branch December 25, 2023 18:59
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.

Assertion (action_prob_is_signal(chance) || chance.min >= ACTPROB_VAL_MIN) failed
2 participants