doshidak / showdex

Pokémon Showdown extension that harnesses the power of parabolic calculus to strategically extract your opponents' Elo.
GNU Affero General Public License v3.0
104 stars 18 forks source link

Game confuses player and opponent's Mews and Mewtwos #141

Closed Tree69420 closed 1 year ago

Tree69420 commented 1 year ago

In RBY Ubers at least showdex confuses mews and mewtwos and switches mine and my opponents spots and a bunch of other wack stuff i genuinely do not know what is happening but its dumb and should be fixed image

Tree69420 commented 1 year ago

oh and it refuses to fix their sets when a move is revealed

doshidak commented 1 year ago

Hiya!

Sorry for getting back to you so late, but thanks for taking the time to submit this bug report! c:

Huh, that's certainly strange indeed. Calcdex generates unique internal IDs to keep track of each player's Pokémon, so it shouldn't matter if you had a team of all Arceus or Mew / Mewtwo (i.e., it doesn't care what the Pokémon actually is, as long as it has the unique ID).

Seems to me that there's something going on in your Gen 1 battle that's messing with the battle sync, which explains why all that wack stuff is happening.

... Actually, on closer inspection, it appears that the syncing most likely broke once your opponent's Chansey (assuming that's what "Oldperson Home" is) used Light Screen. I know Gen 1 has a completely different mechanism for screens (it applies to the Pokémon, instead of the field), so wouldn't surprise me to find that I might've broke something for Gen 1 with some of the syncing changes I've added.

Since the syncing broke, your opponent's Mew (aka. "Loves Golbat" lol) doesn't show up in the Calcdex, neither does any Pokémon you've switched into (hence why it's floating on your Mewtwo still, since that was right before your opponent's Chansey used Light Screen).

But thanks again for letting me know, I'll take a look! Should be a pretty straightforward fix c:

oh and it refuses to fix their sets when a move is revealed

Currently, we don't update the set for you based on any revealed properties (that's what the disabled "AUTO" button next to the "SET" header is supposed to indicate when blue). This feature is in the development pipeline, but won't be implemented in the upcoming patch.

For the time being, that's something you'll manually have to do for now, sadly :c

doshidak commented 1 year ago

Hey! Thought I'd send an update your way.

Looked into this & apparently, what you were originally saying was right (had nothing to do with the screens). The Calcdex was straight up confusing Mewtwo & Mew due to the internal IDing system I mentioned earlier. When figuring out untagged Pokémon (those without the unique ID), the Calcdex will perform a partial match against different fields such as its Showdown ID, name, species forme, etc.

When it comes to these two Pokémon, 'p1: Mewtwo' (Showdown ID of Mewtwo) must be initialized first for this bug to happen. Then, when you send out 'p1: Mew', it successfully partial matches against 'p1: Mewtwo', incorrectly assigning Mewtwo's unique ID to Mew. Once the unique IDs no longer line up, the sync completely breaks.

All of this to say tho that I was able to fix this issue! The fix will be bundled alongside this upcoming v1.1.6 release.

Thanks again for your help!!