Removes redundancy in AI_TryToFaint and tweaks to AI_CompareDamagingM… #3371
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
AI_TryToFaint
changes:AI_STRIKES_FIRST
withGetWhichBattlerFaster
to ignore the move. If the move is considered the AI might think it's naturally faster when it isn't. The function checks for priority later.Some minor tweaks to
AI_CompareDamagingMoves
AI_WhichMoveBetter
section decrease the score only if1
is returned.Removed:
All 4 are handled by damage calcs. If they get a damage boost the score increases will be handled appropriately.
And I also removed this small section:
Open to suggestions but I don't think the score should be increased randomly even though it is only on super effective.
Images
Cut was made a 70BP Steel type move and kept the 95% Accuracy. Compared to Smart Strike it each of them get a score decrease:
Both moves kill Typhlosion but a prio move will be chosen:
EQ and Drill Run have a kill with the same number of hits but EQ is more accurate:
Marill knows target can faint it so it prefers Aqua Jet
Issue(s) that this PR fixes
Fixes #3217