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

Fix Reversal and Flail power calculation for Gen 4 #433

Merged
merged 1 commit into from
Apr 27, 2021
Merged

Fix Reversal and Flail power calculation for Gen 4 #433

merged 1 commit into from
Apr 27, 2021

Conversation

wartab
Copy link
Contributor

@wartab wartab commented Mar 2, 2021

After investigation in Generation 4 speedrunning (thanks minnow), it appears that the thresholds for Gen 4 are wrong when calculating the power of Flail and Reversal.

The calculation is correct for Gen 5+, though.

@AustinXII
Copy link
Member

can you fix travis?

@DaWoblefet
Copy link
Member

DaWoblefet commented Apr 23, 2021

Kris asked me to verify if this is actually the case. I loaded up my Gen 4 game to see (ENG SoulSilver vs. ENG Platinum; host SoulSilver) and had a Blissey with 23/714 HP use Flail on another target. If Flail were using a constant of 48, this should qualify as a BP of 200, because floor(23 * 48 / 714) = 1. If Flail was using a constant of 64, this should qualify as a BP of 150, because floor(23 * 64 / 714) = 2. Given this level 100 Blissey with 25 Attack and a target Dewgong with 185 Defense, I dealt 24 and 25 damage (150 BP). So this gets my seal of approval!

As an aside, I find this really bizarre; the Emerald disassembly uses identical scaling to both Gen 5) and Gen 7. I don't have access to the Gen 4 leaks so I can't see what's happening in there. I always thought the reason they used 48 was because there was 48 pixels on the HP bar - I wonder if that wasn't the case in Gen 4.

@KrisXV KrisXV merged commit 4e8116d into smogon:master Apr 27, 2021
@KrisXV
Copy link
Member

KrisXV commented Apr 27, 2021

Thanks for this!

GriffinLedingham added a commit to pikalytics/damage-calc that referenced this pull request Jun 7, 2021
* smogon-master:
  Update copyright year
  Update dependencies
  Gen 7/8: Fix -ate abilities, Reckless, and Iron Fist (smogon#446)
  Convert modifiers from hex to decimal (smogon#444)
  Fix broken link in README.md (smogon#431)
  Function modularization tweaks (gens 7, 8) and iron ball calculations (smogon#439)
  Fix Reversal and Flail power calculation for Gen 4 (smogon#433)
  Actually fix build
  Fix build
  Gen 3: Double Facade base power when poisoned, paralyzed or burned (smogon#412)
  Added Power Spot, Fixed Dauntless Shield, Made Competitive activate from Intimidate, Cleaned up EV and IV exporting (smogon#435)
  Fix Rivalry boost (smogon#440)
  Change BP limit from 999 to 65535 (smogon#442)
  Update packages and fix build
  Search for imported sets (smogon#428)
  Docker addition api (smogon#422)
  Modularize the Gen 7 & 8 mechanics page (smogon#429)
  New TextField for naming the imported sets (smogon#423)
  Export import bugfix (smogon#426)
  Support field-wide Fairy Aura, Dark Aura and Aura Break when neither Pokemon uses the ability (smogon#430)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants