Pixelmon Mod - Bug tracker

[9.1.0] EV juices and wings can be consumed infinitely to no effect after reaching max fix completed for upcoming version

Ticket description:
You can use EV juices, vitamins, and wings to add EVs to a stat, up to 252 total IVs in a stat. However, once it reaches 252, the hard limit on EVs is reached, causing any additional EVs to remain at the 252 total. Vitamins increase by 10, wings by 1, and juices by one of several values.

Vitamins have a value in addEVsOfType capping the gains at 252, the true limit of EVs, so when you reach that value, the vitamins start failing to work.

However, for juices and wings, the addEVsOfType limit lets them get to 255 before it'll stop them, causing a cycle of comparing the total against 255, being less than it, adding the EVs up to 255, and the value being reset back to 252 by setStat() in EVStore.java. This cycle then repeats itself every time a juice or wing is used.

To fix this, in EVStore.java (in wingEVs()) and JuiceShoppeItem.java (in adjustEVs()), simply reduce the limit on addEVsOfType to 252 instead of 255. This will change them to the same behavior as the vitamins.

Comments

#29305 Posted by LordSamosa » 25 Feb 2023 12:42

Moved to internal

Ticket details

  • Ticket ID: 19625
  • Project: Pixelmon Mod
  • Status: Fix completed for upcoming version
  • Component: Other
  • Project version: 1.16.5-9.x.x
  • Priority: Normal
  • Severity: Normal
  • Forge/Sponge: (unknown)
  • What else would be useful to know?: (unknown)
  • Assigned to: LordSamosa
  • Reported by: Ordalca (Send PM)
  • Reporter's tickets: (List all tickets)
  • Reported on: 01 Dec 2022 23:46
  • Ticket last visited by: LordSamosa on 22 Apr 2023 23:26
JOIN THE TEAM