Exclude PARROT special attack from monster difficulty calculations #75716
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.
Summary
Balance "Exclude PARROT special attack from monster difficulty calculations"
Purpose of change
#75532 recently ran into an unintuitive part of our difficulty calculations. Adding a harmless "special attack" to the base zombie increases its difficulty, and causes related tests to fail as they expect the base zombie's difficulty to stay the same. (specifically the test is checking the "exp" gained, and the exp is always equal to the difficulty of the monster)
Describe the solution
Exclude those harmless special attacks from the difficulty calculation.
Describe alternatives you've considered
-Just change the number in the test. Bleh.
-Make the test use a test-specific monster?
-Give the base zombie a -2 difficulty modifier, to bring it back down to 4? (Apparently this doesn't work)
Testing
Whipped it up to help out a fellow contributor, haven't tested it personally. Reviewers/mergers, please be sure to check it if you get here before I find time for it.Killed a mi-go without these changes, got 68 exp (mi-go had a difficulty of 68).
Killed a mi-go with these changes, got 65 exp. (The difference of 3 instead of 2 is because the value is further modified in the difficulty formula, but this proves that the changes worked as intended)
Additional context
This will actually reduce the difficulty of any existing monster which uses PARROT or PARROT_AT_DANGER, but I don't expect any real problems from that. Just noting it as a side effect.