-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: 'mewtwomegax' #3
Comments
Hey, thanks for bringing this up. I actually had this come up during development - I was just mostly testing the other metagames and ignored it (bad choice). This happens because of a poor design choice I made early on. Each side has an attribute called I will fix this - I'll just need to investigate the best way to go about refactoring the representation of the reserve pokemon. |
Hello, is this bug fixed yet? I made my own version way back to address this issue but it's not updated for gen8 so I was wondering if I needed to make changes again if I install the latest version. |
Ahh sorry about that, I started to look into this and realized it was far more work than I had originally thought. There's a lot of code in the engine built around the assumption that there can only be one of each Pokmon on each team. I still have this on a to-do list of mine, it has just dropped in priority and I'm not sure when it will (if ever) be addressed. |
can't you give the pokemon ids? like example (megamewtwo0, megamewtwo1, rotom0, regigas0, suntfisk0, mantine0). When needed it can remove the id and use it so it will avoid it. |
The bot crashes during the game if the bot uses a team with 2 or more of the same pokemon, specifically when it brings out said pokemon. Obviously, this is not a problem in metagames like OU where there is a species clause, but it is a problem for other metas like Balanced Hackmons where there is no species restriction. Sadly, I do not have much experience with python so I am having trouble fixing the issue..
Replays:
me vs the bot with 6 Mega-Mewtwo-X:
https://replay.pokemonshowdown.com/gen7balancedhackmons-897012029
error: (sorry for the Won currency signs, it is supposed to be \ but Korean Language)
me vs the bot with 2 Mega-Mewtwo-X: https://replay.pokemonshowdown.com/gen7balancedhackmons-897009410
(error is identical: everything seemed to be running fine until the Keyerror made the bot crash)
me vs the bot with no duplicate pokemon (Replaced Mega-Mewtwo-X with Mega-Mewtwo-Y):
https://replay.pokemonshowdown.com/gen7balancedhackmons-896857312
As you can see, the bot does not crash and battles until the end as expected.
The text was updated successfully, but these errors were encountered: