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

Exclude PARROT special attack from monster difficulty calculations #75716

Merged

Conversation

RenechCDDA
Copy link
Member

@RenechCDDA RenechCDDA commented Aug 15, 2024

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.

@github-actions github-actions bot added Game: Balance Balancing of (existing) in-game features. [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Aug 15, 2024
@RenechCDDA RenechCDDA force-pushed the monster_special_difficulty branch from d416721 to be528c0 Compare August 16, 2024 20:48
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Aug 17, 2024
@Maleclypse Maleclypse merged commit 150650e into CleverRaven:master Aug 17, 2024
27 checks passed
@RenechCDDA RenechCDDA deleted the monster_special_difficulty branch August 18, 2024 02:08
@RenechCDDA RenechCDDA mentioned this pull request Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Game: Balance Balancing of (existing) in-game features. json-styled JSON lint passed, label assigned by github actions Monsters Monsters both friendly and unfriendly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants