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

Calc cannot handle multiple battles #44

Closed Shock3600 closed 2 years ago

Shock3600 commented 2 years ago

When multiple battles are started, the calc will get confused, possibly treating it as the same battle. Can result in one of your pokemon getting repeated in the calc, which is especially an issue since you can't manually change the Pokemon (known for Chrome)

doshidak commented 2 years ago

Hmm, that could be an issue with the Pokémon ID detection I described here on our Smogon Forums post. Apparently what I did in v1.0.2 to fix IDing of Pokémon with the same nickname will occasionally break IDing of others, leading to non-synced and even sometimes duplicate Pokémon.

The Calcdex shouldn't be confused by the battle though since each battle is given its own unique Calcdex (which references a single battle by its ID, like battle-gen7battlefactory-1673117881-j52mypllw...), so the fact that you're encountering that problem is definitely strange.

However, I think Showdown only sends battle updates to the battle tab you currently have open, so it's entirely possible that the Calcdexes you got in the back may receive the same battle updates as your current battle.

I'll take a look into this though. Thanks for letting me know!