-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[battle, damage] refactor damage formula to match gen5+ #3196
[battle, damage] refactor damage formula to match gen5+ #3196
Conversation
Technically I think this is ready for review, but I'll leave it as draft until we figure out what to do with the failing tests. |
8d2c097
to
23dd7b6
Compare
I used exact values I obtained from a Smogon Calc for the 2 problematic tests. Ready for review :) |
a59c0d6
to
14fafe9
Compare
Please let me rebase before merging |
9320c72
to
64cfeb9
Compare
addressed Edus review and rebased. |
64cfeb9
to
8bd36ee
Compare
@SBird1337 would you like to rebase, should I squash merge, or should I do a regular merge commit? :) |
* [battle, damage] refactor damage formula to match gen5+ * [test] use exact values for dry skin, swarm tests * fixup: assume stats for dry-skin, swarm tests --------- Co-authored-by: sbird <[email protected]>
Refactors the damage calculation and fixes any (to my knowledge) inconsistancies to the calculation of later games.
Description
Key notes are:
Also fixes the contrary test against intimidate, which was using a wrong multiplier.
Adds tests for the basic damage calculation using an example from https://bulbapedia.bulbagarden.net/wiki/Damage#Example
Changes the test in
weather_snow.c
against solar blade fromKNOWN_FAILING
toPASS
.At the current state 2 old tests are failing with these changes:Dry Skin increases damage taken from Fire-type moves by 25%
Swarm boosts Bug-type moves in a pinch
Refactored the 2 problematic tests to use exact values.
this is due to numerical issues in the damage formula that also exist in the original games. I verfied both on showdown and accepted that as ground truth.
Discord contact info
karathan