pokemon-showdown-client
pokemon-showdown-client copied to clipboard
Cannot use right arrow to increase EV if 4 more EVs would not increase stat
Tested on Firefox on Linux.
Example reproduction: Generation 2, Species Sunflora, Level 80. Set Attack EV to 240. Click on the slider bar bulb. Left arrow reduces EVs by 4, but right arrow does nothing.
I understand what's going on. Right increases by 4, and then the change handler rounds down:
https://github.com/smogon/pokemon-showdown-client/blob/d4f526eebab46ab96a713ce16f2c14265ee9611f/js/client-teambuilder.js#L2442-L2444
The change handler should round away from the previous value, instead. This would require grabbing the previous value but it can be grabbed directly from set
or the numeric input.
Although you do have to worry about the edge case where you don't have enough EVs left to be able to increase the stat.