Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
#4615 added the ability to choose what damage rolls the AI uses when scoring its moves, which introduced the concept of having the pre-existing AI_FLAG_RISKY assume it gets high rolls and score accordingly. This prompted discussing a minor overhaul to AI_FLAG_RISKY, which is otherwise just a simple list of effects that the AI will score more highly.
After that initial discussion, we decided that a fun risky AI would:
The list of effects that should be prioritized is likely going to expand and change over time as we have more ideas, but as a starting point that list includes the following:
Strongly Prioritize (+3)
Moderately Prioritize (+2)
This list also included considerations for Destiny Bond initially, but it seems well covered elsewhere in the scoring AI as is in my opinion.
Lastly, I've written tests for the more complex behaviours, including Mirror Coat, Counter, Revenge, mid-battle switches, and prioritizing damage at the expense of accuracy.
People who collaborated with me in this PR
Feedback from @AlexOn1ine and @iriv24 in Discord
Discord contact info
@Pawkkie