wavebeem / pkmn.help

pkmn.help remembers strengths/weaknesses of Pokémon for you
https://pkmn.help
MIT License
93 stars 49 forks source link

Incorrect type effectiveness calculation when using scrappy in the offense calculator #299

Closed keppya closed 3 months ago

keppya commented 3 months ago

In the offense type calculator, if the ability scrappy is selected, ghost-type pokemon will always be shown as taking 1x damage, even when this is not the case.

Steps:

  1. Go to the offense tab of the calculator.
  2. Select a type that ghost resists or is weak to. (for example poison)
  3. Select the ability "scrappy".
  4. Ghost is shown as taking neutral damage, despite resisting poison-type attacks.
wavebeem commented 3 months ago

I had to click a few more types to see what you're getting at, but now I totally see the bug haha. Just a really bad mistake in the code, not a misunderstanding or anything. Thanks for the report. I fixed this issue and #300 just now. Take a look when you get a chance. Thanks!