-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Move] Fully implement Freeze Dry #4840
[Move] Fully implement Freeze Dry #4840
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like there's a cleaner way to do this. The Normalize and Electrify interactions kind of suggest that Freeze Dry directly sets the type multiplier to 2 against the Water type (while the normal type matchup still applies for the target's other types). The way it behaves in inverse battles seems to suggest the same.
I'm not totally sure if this is actually the case and, if so, how well the attribute's parent class supports this, but I'd rather avoid the individual ability checks if possible.
All other classes that have Example: Lines 4972 to 4978 in e5e3926
Lines 4952 to 4970 in e5e3926
Edit: I agree that this looks not so clean so I reinformed myself on how Freeze-Drys calculates its damage multiplier and rewrote |
What are the changes the user will see?
Freeze-Dry now does the correct amount of damage.
Why am I making these changes?
While I was working on the Bug Fix of Freeze-Dry interacting with a soaked wonder guard target I noticed that "Freeze-Dry" was not fully implemented and its interaction with "Electrify" as well as "Normalize" was faulty.
(#3503)
What are the changes from a developer perspective?
If the Player Pkm gets hit by
Electrify
before its attack the type ofFreeze-Dry
changes to electric. As a result the damage multiplier should change according to the Wiki.If the move is of type electric it naturally has a super effectiveness against water/flying type pokemon (e.g.Gyarados). After already having a 4x multiplier against Gyarados the
WaterSuperEffectTypeMultiplierAttr
was forcefully applied even though the multiplier was correct which resulted in a 16x damage multiplier at the end of the calculation.A similar thing happened with
Freeze-Dry
under the effect ofNormalize
.I have changed
WaterSuperEffectTypeMultiplierAttr
so it considers ifNormalize
is in effect or if the move has been affected byElectrify
.Screenshots/Videos
Note: If you look at the right hand side of the recording you can see the mulitplier value through
console.log
Before Changes Electrify + Freeze Dry (Multiplier should be 4x but is 16x after calculation)
Electrify.Before.Fix.mp4
Before Changes Normalize + Freeze Dry (Multiplier should be 2x but is 4x)
Normalize.Before.Fix.mp4
After Changes Electrify + Freeze Dry
Electrify.After.Fix.mp4
After Changes Normalize + Freeze Dry
Normalize.After.Fix.mp4
How to test the changes?
I used this to test Normalize:
as well as this for Electriy:
Also some automated tests have been added to
src/test/moves/freeze_dry.test.ts
in order to test 0.25x dmg multiplier as well as 4x dmgChecklist
beta
as my base branchnpm run test
)