-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUGFIX] Fixed Super Fang interaction with Multi Lens #4914
Conversation
Seems fine to me (code-wise), just some style comments. |
…pokerogue into super-fang-multi-lens
I'm not a fan of hard-coding the fixed damage values like this. We just updated Multi-Lens to reduce its tech debt, and this change feels like we're going backwards on that. Also, the balance team has made comments implying that Multi-Lens' maximum stack count is subject to change, and this change could potentially get in the way of that. Some options that wouldn't increase tech debt:
|
This is what I prefer tbh.
This would be fine too. |
Appreciate the math and work done on this but will also echo the sentiment that hardcoding it is not the way to go |
Thanks for the feedback everyone. |
I think when it comes to an open-source project where development is largely based on "best effort," it's generally best to avoid stopgap fixes when possible. The cleanup for "temporary" fixes tends to fall into low priority, so it's likely that a stopgap sticks around until it ends up causing problems itself. |
I'll get started on reworking it then. |
pls tell me this isn't too much tech debt now (also RIP unnecessarily convoluted cube roots, you will be missed)
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.
Screenshots/Videos
oh god please no I'm not spending another hour filming these just for someone to tell me to refactor them 12 hours later
Approving - however, I do want to emphasize that even though providing screenshots/video proof is annoying and time-consuming, it is important and good practice to do so. The burden of proof is on the PR's creator... so please remember this in the future.
RIP funny math formula, you will be missed.
What are the changes the user will see?
Super Fang and company now deal correct damage with multi lens (ie 50%), split between the appropriate amount of hits linearly.
For an example of how it works: The 1st hit of super fang with 2 lenses does
(target.hp/2)*0.5=0.25*hp
damage, leaving the enemy down to 75% hp after the first hit. The remaining 2 multi lens hits each get half the difference between the leftover (75%) and the target (50%) amounts, for 12.5% damage each.Parental Bond works similarly, but it changes the target damage amount to 0.25 instead (the hp% the target would have left after 2 halvings).
Why am I making these changes?
BECAUSE I COULD.
What are the changes from a developer perspective?
Adds a check in
TargetHalfHpDamageAttr.apply()
for subsequent repeated hits that splits the damage of hits after the first one linearly to make them add up to the desired amount. The first hit is unaffected as the following strikes are intended to adjust for it appropriately.Also adds a check in pokemon.ts to skip multiplying the move damage for the subsequent hits of such moves because they're already pre computed and I really don't want to deal with reciprocals...
Screenshots/Videos
oh god please no I'm not spending another hour filming these just for someone to tell me to refactor them 12 hours later
How to test the changes?
npm run test multi_lens
Check the last few tests at the end.
Alternately use the following overrides:
and start a new game with a Koffing and literally any other starter without PB.
Checklist
beta
as my base branchIf I have text, did I make it translatable and add a key in the English locale file(s)?npm run test
)