pkmn / randbats

Pokémon Showdown's Random Battle sets
https://pkmn.github.io/randbats/
MIT License
30 stars 13 forks source link

Show Zoroark levels in the calc #10

Closed livid-washed closed 9 months ago

livid-washed commented 10 months ago

Is your feature request related to a problem? Please describe:

The randbats calc has Zoroark levels listed as 0, instead of its actual level.

Describe the solution you'd like:

Zoroark levels are no longer variable from team to team, so they should be listed with their fixed levels.

Describe alternatives you've considered:

N/A.

Additional context:

Recently "Illusion Level Mod" was implemented, and along this, Zoroark (and Zoroark-Hisui in gen 9) now have fixed levels. For example, in Gen 9 Random Battle, Zoroark is level 84.

From my understanding, getting this to show in the stats involves editing this line: https://github.com/pkmn/randbats/blob/main/update#L255

For the extension, maybe this line also? I'm not too sure. https://github.com/pkmn/randbats/blob/2cd2e66025be697ec5c8e1b3ad76677ec681235a/extension/index.js#L76

scheibo commented 10 months ago

While allowing Zoroarks level to be included in the data is trivial (and would fix your issue with the calc) as you noticed, I'm pretty confident it would break the extension (and definitely backwards compatibility) as the levels would no longer match because the mod causes the server to lie about the level. I think you could possibly work around this by changing how Zoroark is special cased in the extension to just do a linear scan (very very ick) or some special case data table for just Zoroark being built during construction of DATA (or just like override its level to 0 coientside during the construction of DATA anyway?)

I'm happy to review any PRs here which solve those problems (and might just need to eat it on backwards compatibility, though thats really PSs fault), and might look into this if recent replays with Zoroark are provided for testing, but currently have decided not breaking the extension and having people type two digits into the calc is a better tradeoff wrt use of my time.

scheibo commented 10 months ago

We can wait a week or two so that most people have a chance to get the updated extension and then can remove the code in update overwriting Zoroark's level.

livid-washed commented 10 months ago

Sounds great, thank you!