Skip to content

Commit

Permalink
UI: Fix HP IVs changing in SM+ for L100 Pokemon
Browse files Browse the repository at this point in the history
The if condition was checking if the `level` was `100` which
previously worked but the set import now elides level 100 to save
space so that condition broke which this commit fixes.
  • Loading branch information
thejetou committed Dec 8, 2023
1 parent 19308fd commit 7bba685
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/shared_controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,8 @@ $(".forme").change(function () {

function correctHiddenPower(pokemon) {
// After Gen 7 bottlecaps means you can have a HP without perfect IVs
if (gen >= 7 && pokemon.level >= 100) return pokemon;
// Level 100 is elided from sets so if its undefined its level 100
if (gen >= 7 && (!pokemon.level || pokemon.level >= 100)) return pokemon;

This comment has been minimized.

Copy link
@Karthik99999

Karthik99999 Dec 8, 2023

Contributor

This should be level 50 for Gen 9+


// Convert the legacy stats table to a useful one, and also figure out if all are maxed
var ivs = {};
Expand Down

0 comments on commit 7bba685

Please sign in to comment.