pmariglia / showdown

A Pokemon Showdown Battle Bot written in Python
GNU General Public License v3.0
263 stars 177 forks source link

Match does not end when saving replay #183

Closed Viitrexx closed 11 months ago

Viitrexx commented 12 months ago

The docker instance will never close/return because it does not detect a match has ended.

Maybe related to https://github.com/smogon/pokemon-showdown/commit/135e7ad6ec0b25aa6419d8171394edc5410dbc79

pmariglia commented 11 months ago

I tried to reproduce on the main branch, but the bot was able to detect the battle ending, no matter what I tried.

I tried:

Could you share your env file (credentials removed)? A dump of the logs towards the end of the fightmight be useful as well.

Viitrexx commented 11 months ago
"Env": [
            "WEBSOCKET_URI=sim.smogon.com:8000",
            "PS_USERNAME=PlayThirdStrike",
            "PS_PASSWORD=removed",
            "BOT_MODE=ACCEPT_CHALLENGE",
            "RUN_COUNT=1",
            "SAVE_REPLAY=True",
            "TEAM_NAME=denkonome/20",
            "POKEMON_MODE=gen9customgame",
            "BATTLE_BOT=most_damage",
            "AVATAR=veteran",
            "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "LANG=C.UTF-8",
            "GPG_KEY=removed",
            "PYTHON_VERSION=3.8.18",
            "PYTHON_PIP_VERSION=23.0.1",
            "PYTHON_SETUPTOOLS_VERSION=57.5.0",
            "PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/c6add47b0abf67511cdfb4734771cbab403af062/public/get-pip.py",
            "PYTHON_GET_PIP_SHA256=22b849a10f86f5ddf7ce148ca2a31214504ee6c83ef626840fde6e5dcd809d11",
            "PYTHONIOENCODING=utf-8"
        ],
2023-12-03 20:51:53 [DEBUG]    Logging in...
2023-12-03 20:51:53 [DEBUG]    Received message from websocket: |updateuser| Guest 908551|0|266|{"blockChallenges":false,"blockPMs":false,"ignoreTickets":false,"hideBattlesFromTrainerCard":false,"blockInvites":false,"doNotDisturb":false,"blockFriendRequests":false,"allowFriendNotifications":false,"displayBattlesToFriends":false,"hideLogins":false,"hiddenNextBattle":false,"inviteOnlyNextBattle":false,"language":null}
2023-12-03 20:51:53 |formats|,1|S/V Singles|[Gen 9] Random Battle,f|[Gen 9] Unrated Random Battle,b|[Gen 9] Free-For-All Random Battle,7|[Gen 9] Random Battle (Blitz),f|[Gen 9] Multi Random Battle,5|[Gen 9] OU,e|[Gen 9] Ubers,e|[Gen 9] UU,e|[Gen 9] RU,e|[Gen 9] NU,e|[Gen 9] PU,e|[Gen 9] LC,e|[Gen 9] Monotype,e|[Gen 9] CAP,e|[Gen 9] Battle Stadium Singles Regulation D,5c|[Gen 9] Battle Stadium Singles Regulation E,5e|[Gen 9] Dragon King Cup,1e|[Gen 9] Custom Game,c|,1|S/V Doubles|[Gen 9] Random Doubles Battle,f|[Gen 9] Doubles OU,e|[Gen 9] Doubles Ubers,e|[Gen 9] Doubles UU,e|[Gen 9] Doubles LC,c|[Gen 9] VGC 2023 Regulation D,5c|[Gen 9] VGC 2023 Regulation E,5e|[Gen 9] VGC 2023 Regulation E (Bo3),1a|[Gen 9] Doubles Custom Game,c|,1|Unofficial Metagames|[Gen 9] 1v1,e|[Gen 9] 2v2 Doubles,e|[Gen 9] Anything Goes,e|[Gen 9] Ubers UU,e|[Gen 9] ZU,e|[Gen 9] NFE,c|[Gen 9] Free-For-All,6|[Gen 9] LC UU,c|[Gen 9] Monothreat Steel,c|[Gen 9] Monotype CAP,c|[Gen 9] Monotype LC,c|,1|Pet Mods|[Gen 3] Hoenn Gaiden,e|[Gen 8] JolteMons Random Battle,f|[Gen 6] NEXT OU,8|,1|Draft|[Gen 9] Paldea Dex Draft,c|[Gen 9] Tera Preview Paldea Dex Draft,c|[Gen 9] 6v6 Doubles Draft,c|[Gen 9] 4v4 Doubles Draft,1c|[Gen 9] NatDex Draft,c|[Gen 9] Tera Preview NatDex Draft,c|[Gen 9] NatDex 6v6 Doubles Draft,c|[Gen 9] NatDex LC Draft,c|[Gen 8] Galar Dex Draft,c|[Gen 8] NatDex Draft,c|[Gen 8] NatDex 4v4 Doubles Draft,1c|[Gen 7] Draft,c|[Gen 6] Draft,c|,2|OM of the Month|[Gen 9] Tier Shift,e|[Gen 9] Sketchmons,e|[Gen 9] Partners in Crime,e|,2|Other Metagames|[Gen 9] Almost Any Ability,e|[Gen 9] Balanced Hackmons,e|[Gen 9] Godly Gift,e|[Gen 9] Inheritance,e|[Gen 9] Mix and Mega,e|[Gen 9] Shared Power,e|[Gen 9] STABmons,e|[Gen 6] Pure Hackmons,e|,2|Challengeable OMs|[Gen 9] Camomons,c|[Gen 9] Convergence,c|[Gen 9] Cross Evolution,c|[Gen 9] Fortemons,c|[Gen 9] Frantic Fusions,c|[Gen 9] Full Potential,c|[Gen 9] Pokebilities,c|[Gen 9] Pure Hackmons,c|[Gen 9] Revelationmons,c|[Gen 9] Sharing is Caring,c|[Gen 9] Tera Donation,c|[Gen 9] The Card Game,c|[Gen 9] The Loser's Game,c|[Gen 9] Trademarked,c|,2|National Dex|[Gen 9] National Dex,e|[Gen 9] National Dex Ubers,e|[Gen 9] National Dex UU,e|[Gen 9] National Dex RU,c|[Gen 9] National Dex Monotype,e|[Gen 9] National Dex Doubles,e|[Gen 9] National Dex AG,c|[Gen 9] National Dex BH,c|[Gen 8] National Dex,e|[Gen 8] National Dex UU,c|[Gen 8] National Dex Monotype,c|,3|Randomized Format Spotlight|[Gen 9] Partners in Crime Random Battle,f|[Gen 9] Random Roulette,d|,3|Randomized Metas|[Gen 9] Monotype Random Battle,f|[Gen 9] Random Battle Mayhem,f|[Gen 9] Computer-Generated Teams,f|[Gen 9] Hackmons Cup,f|[Gen 9] Doubles Hackmons Cup,d|[Gen 9] Broken Cup,d|[Gen 9] Challenge Cup 1v1,f|[Gen 9] Challenge Cup 2v2,f|[Gen 9] Challenge Cup 6v6,d|[Gen 9] Metronome Battle,e|[Gen 8] Random Battle,f|[Gen 8] Random Doubles Battle,f|[Gen 8] Free-For-All Random Battle,7|[Gen 8] Multi Random Battle,5|[Gen 8] Battle Factory,f|[Gen 8] BSS Factory,1d|[Gen 8] Super Staff Bros 4,f|[Gen 8] Hackmons Cup,f|[Gen 8] Metronome Battle,c|[Gen 8] CAP 1v1,d|[Gen 8 BDSP] Random Battle,d|[Gen 7] Random Battle,f|[Gen 7] Random Doubles Battle,9|[Gen 7] Battle Factory,f|[Gen 7] BSS Factory,1d|[Gen 7] Hackmons Cup,d|[Gen 7 Let's Go] Random Battle,d|[Gen 6] Random Battle,f|[Gen 6] Battle Factory,9|[Gen 5] Random Battle,f|[Gen 4] Random Battle,f|[Gen 3] Random Battle,f|[Gen 2] Random Battle,f|[Gen 1] Random Battle,f|[Gen 1] Challenge Cup,9|[Gen 1] Hackmons Cup,9|,4|RoA Spotlight|[Gen 7] Ubers,e|[Gen 1] UU,e|[Gen 4] Doubles OU,e|,4|Past Gens OU|[Gen 8] OU,e|[Gen 7] OU,e|[Gen 6] OU,e|[Gen 5] OU,e|[Gen 4] OU,e|[Gen 3] OU,e|[Gen 2] OU,e|[Gen 1] OU,e|,4|Past Gens Doubles OU|[Gen 8] Doubles OU,e|[Gen 7] Doubles OU,e|[Gen 6] Doubles OU,e|[Gen 5] Doubles OU,c|[Gen 3] Doubles OU,c|,4|Sw/Sh Singles|[Gen 8] Ubers,c|[Gen 8] UU,c|[Gen 8] RU,c|[Gen 8] NU,c|[Gen 8] PU,c|[Gen 8] LC,c|[Gen 8] Monotype,c|[Gen 8] 1v1,c|[Gen 8] Anything Goes,c|[Gen 8] ZU,c|[Gen 8] CAP,c|[Gen 8] Battle Stadium Singles,5c|[Gen 8 BDSP] OU,c|[Gen 8] Custom Game,c|,4|Sw/Sh Doubles|[Gen 8] Doubles Ubers,c|[Gen 8] Doubles UU,c|[Gen 8] VGC 2022,5c|[Gen 8] VGC 2021,5c|[Gen 8] VGC 2020,5c|[Gen 8 BDSP] Doubles OU,c|[Gen 8 BDSP] Battle Festival Doubles,1c|[Gen 8] Doubles Custom Game,c|,4|US/UM Singles|[Gen 7] UU,c|[Gen 7] RU,c|[Gen 7] NU,c|[Gen 7] PU,c|[Gen 7] LC,c|[Gen 7] Monotype,c|[Gen 7] 1v1,c|[Gen 7] Anything Goes,c|[Gen 7] ZU,c|[Gen 7] CAP,c|[Gen 7] Battle Spot Singles,5c|[Gen 7 Let's Go] OU,1c|[Gen 7] Custom Game,c|,4|US/UM Doubles|[Gen 7] Doubles UU,c|[Gen 7] VGC 2019,5c|[Gen 7] VGC 2018,5c|[Gen 7] VGC 2017,5c|[Gen 7] Battle Spot Doubles,5c|[Gen 7 Let's Go] Doubles OU,c|[Gen 7] Doubles Custom Game,c|,4|OR/AS Singles|[Gen 6] UU,c|[Gen 6] Ubers,c|[Gen 6] RU,c|[Gen 6] NU,c|[Gen 6] PU,c|[Gen 6] LC,c|[Gen 6] Monotype,c|[Gen 6] 1v1,c|[Gen 6] Anything Goes,c|[Gen 6] ZU,c|[Gen 6] CAP,c|[Gen 6] Battle Spot Singles,5c|[Gen 6] Custom Game,c|,4|OR/AS Doubles/Triples|[Gen 6] VGC 2016,5c|[Gen 6] VGC 2015,5c|[Gen 6] VGC 2014,5c|[Gen 6] Battle Spot Doubles,5c|[Gen 6] Doubles Custom Game,c|[Gen 6] Battle Spot Triples,1c|[Gen 6] Triples Custom Game,c|,4|B2/W2 Singles|[Gen 5] Ubers,c|[Gen 5] UU,c|[Gen 5] RU,c|[Gen 5] NU,c|[Gen 5] PU,c|[Gen 5] LC,c|[Gen 5] Monotype,c|[Gen 5] 1v1,c|[Gen 5] ZU,c|[Gen 5] CAP,c|[Gen 5] GBU Singles,5c|[Gen 5] Custom Game,c|,4|B2/W2 Doubles|[Gen 5] VGC 2013,5c|[Gen 5] VGC 2012,5c|[Gen 5] VGC 2011,5c|[Gen 5] Doubles Custom Game,c|[Gen 5] Triples Custom Game,c|,4|DPP Singles|[Gen 4] Ubers,c|[Gen 4] UU,c|[Gen 4] NU,c|[Gen 4] PU,c|[Gen 4] LC,c|[Gen 4] Anything Goes,c|[Gen 4] 1v1,c|[Gen 4] ZU,c|[Gen 4] CAP,c|[Gen 4] Custom Game,c|,4|DPP Doubles|[Gen 4] VGC 2010,1c|[Gen 4] VGC 2009,1c|[Gen 4] Doubles Custom Game,c|,4|Past Generations|[Gen 3] Ubers,c|[Gen 3] UU,c|[Gen 3] NU,c|[Gen 3] PU,c|[Gen 3] ZU,c|[Gen 3] LC,c|[Gen 3] 1v1,c|[Gen 3] Custom Game,c|[Gen 3] Doubles Custom Game,c|[Gen 2] Ubers,c|[Gen 2] UU,c|[Gen 2] NU,c|[Gen 2] 1v1,c|[Gen 2] Nintendo Cup 2000,c|[Gen 2] Stadium OU,c|[Gen 2] Custom Game,c|[Gen 1] Ubers,c|[Gen 1] NU,c|[Gen 1] PU,c|[Gen 1] 1v1,c|[Gen 1] Japanese OU,c|[Gen 1] Stadium OU,c|[Gen 1] Tradebacks OU,c|[Gen 1] Nintendo Cup 1997,c|[Gen 1] Custom Game,c
2023-12-03 20:51:53 [DEBUG]    Received message from websocket: |challstr|4|17b783196921516288f431cfe5132776cff3dafdf4c8c662d8c0b59c1e6d240723c2ccbd41065804bc3b4e8a3d9c37199d8f8f288e6c622c92cc2f26d20e59dea7dc2d47c61ed4033d65d8e1ce3b0f00de6eec5411115f0f6f2e9a5bd185c85fde7be6ccbec239176e1a1e868e4ff364fdfdc6896b9e4b3301fd1531d06d43d9
2023-12-03 20:51:53 [DEBUG]    Successfully logged in
2023-12-03 20:51:53 [DEBUG]    Sending message to websocket: |/trn PlayThirdStrike,0,17b783196921516288f431cfe5132776cff3dafdf4c8c662d8c0b59c1e6d240723c2ccbd41065804bc3b4e8a3d9c37199d8f8f288e6c622c92cc2f26d20e59dea7dc2d47c61ed4033d65d8e1ce3b0f00de6eec5411115f0f6f2e9a5bd185c85fde7be6ccbec239176e1a1e868e4ff364fdfdc6896b9e4b3301fd1531d06d43d9,playthirdstrike,2,1701633112,sim3.psim.us,0ef753cccc82e5631701633112,8b8c3b2a6d3b9dbe,;38fbfdc68bfee5ecc347e1a451ae7a226ab5746c4319b54af61359dcb7ba90b41f41d80a8861de7ecb5aa3dd1ca31e2e39c336b4a655283da8bf045e3a706f2c560e46cedeab5dd71ee89b5b99496e1a6d559e3fdb466aa60c9562352202b9ba2a51bd1d552ded5e6c8563849d92cd8ae0399442c82399aca6927901319b657b145ad7ca5aa6dc33a354b75a1c6177ee8776252b8ac984235b70e5702302300b11ffd413a0d43feacca957fe7fad1af058f1cc385e9a4879670d8ec4b3406704fff513e5d95679f46b67b6df575d0f3250e3c5f9a095f19df4b7610807e9839c76312376de24e1aab508374a17196e84b4b6a577f1a051454ed2d08c1545d9820edb3149fd3ca170f23979fbb002d5a379a0171afeff8b760fc58b54f3ab4e68be09b7b1e974c495c6198f3d1d8635419f5ea2c229fbf23d7b84f73a1d2420bdc996c98c51176700cedf8bf7bf3d1791910340cd1a52337db495a759c169e8dd440df6c1c280a28a2fc6047b36f1c23e8fee92165e9ca3910966a8a9c8684af9daf1406f4c9af319566b8b7ea2a8382374353a3de0791a0cb6103be3a5fda219c1070752a46997ecbb10d825dd2b3872bcd8c80e1b10f4b8b33d3800b73ded17021c35dc531aa2afb5e97abc2104b5cae64dead0880824cc01116e3ca8ca818244c8156d7ee8a354e266181ce106bd05a24123a1994dd67520fe8b1202cde2bb
2023-12-03 20:51:53 [DEBUG]    Sending message to websocket: |/avatar veteran
2023-12-03 20:51:53 [DEBUG]    Waiting for a gen9customgame challenge
2023-12-03 20:51:53 [DEBUG]    Sending message to websocket: |/utm morpeko||choiceband|hungerswitch|metronome||1,,,,,|||||,,,,,
2023-12-03 20:51:53 [DEBUG]    Received message from websocket: |updatesearch|{"searching":[],"games":null}
2023-12-03 20:51:53 [DEBUG]    Received message from websocket: |updateuser| PlayThirdStrike|1|266|{"blockChallenges":false,"blockPMs":false,"ignoreTickets":false,"hideBattlesFromTrainerCard":false,"blockInvites":false,"doNotDisturb":false,"blockFriendRequests":false,"allowFriendNotifications":false,"displayBattlesToFriends":false,"hideLogins":false,"hiddenNextBattle":false,"inviteOnlyNextBattle":false,"language":null}
2023-12-03 20:51:54 [DEBUG]    Received message from websocket: |pm|!PlayThirdStrike|~|/text Avatar changed to:
2023-12-03 20:51:54 |pm|!PlayThirdStrike|~|/raw <img src="https://play.pokemonshowdown.com/sprites/trainers/veteran.png" alt="veteran" width="80" height="80" class="pixelated" style="vertical-align: middle;" />
2023-12-03 20:52:05 [DEBUG]    Received message from websocket: |pm| SMETStayInSchool|!PlayThirdStrike|/challenge gen9customgame|gen9customgame|||
2023-12-03 20:52:05 [DEBUG]    Sending message to websocket: |/accept SMETStayInSchool
2023-12-03 20:52:05 [DEBUG]    Received message from websocket: |pm| SMETStayInSchool|!PlayThirdStrike|/log SMETStayInSchool wants to battle!
2023-12-03 20:52:05 [DEBUG]    Received message from websocket: |pm|!PlayThirdStrike| SMETStayInSchool|/challenge
2023-12-03 20:52:05 [DEBUG]    Received message from websocket: |updatesearch|{"searching":[],"games":null}
2023-12-03 20:52:05 [DEBUG]    Received message from websocket: |updatesearch|{"searching":[],"games":{"battle-gen9customgame-2003985166":"[Gen 9] Custom Game Battle"}}
2023-12-03 20:52:05 [DEBUG]    Received message from websocket: |updatesearch|{"searching":[],"games":{"battle-gen9customgame-2003985166":"[Gen 9] Custom Game Battle"}}
2023-12-03 20:52:05 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:05 |init|battle
2023-12-03 20:52:05 |title|SMETStayInSchool vs. PlayThirdStrike
2023-12-03 20:52:05 |j|☆SMETStayInSchool
2023-12-03 20:52:05 |j|☆PlayThirdStrike
2023-12-03 20:52:05 
2023-12-03 20:52:05 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:05 |request|
2023-12-03 20:52:05 [DEBUG]    Received message from websocket: |pm|!PlayThirdStrike| SMETStayInSchool|/nonotify PlayThirdStrike accepted the challenge, starting &laquo;<a href="/battle-gen9customgame-2003985166">battle-gen9customgame-2003985166</a>&raquo;
2023-12-03 20:52:05 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:05 |t:|1701633124
2023-12-03 20:52:05 |gametype|singles
2023-12-03 20:52:05 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:05 |player|p1|SMETStayInSchool|unknown|
2023-12-03 20:52:05 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:05 |request|{"teamPreview":true,"side":{"name":"PlayThirdStrike","id":"p2","pokemon":[{"ident":"p2: Morpeko","details":"Morpeko, M","condition":"257/257","active":true,"stats":{"atk":226,"def":152,"spa":176,"spd":152,"spe":230},"moves":["metronome"],"baseAbility":"hungerswitch","item":"choiceband","pokeball":"pokeball","ability":"hungerswitch","commanding":false,"reviving":false,"teraType":"Electric","terastallized":""}]},"rqid":3}
2023-12-03 20:52:06 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:06 |player|p2|PlayThirdStrike|veteran|
2023-12-03 20:52:06 |teamsize|p1|1
2023-12-03 20:52:06 |teamsize|p2|1
2023-12-03 20:52:06 |gen|9
2023-12-03 20:52:06 |tier|[Gen 9] Custom Game
2023-12-03 20:52:06 |clearpoke
2023-12-03 20:52:06 |poke|p1|Bewear, M|
2023-12-03 20:52:06 |poke|p2|Morpeko, M|
2023-12-03 20:52:06 |teampreview
2023-12-03 20:52:06 [DEBUG]    Making HTTP request for ALL usage stats
2023-12-03 20:52:06 please wait...
2023-12-03 20:52:08 [DEBUG]    Adding morpeko to sets lookup for this battle
2023-12-03 20:52:13 [DEBUG]    Adding morpeko to sets lookup for this battle
2023-12-03 20:52:15 [DEBUG]    Adding morpeko to sets lookup for this battle
2023-12-03 20:52:17 [DEBUG]    Adding morpeko to sets lookup for this battle
2023-12-03 20:52:18 [DEBUG]    Adding morpeko to sets lookup for this battle
2023-12-03 20:52:20 [DEBUG]    Adding morpeko to sets lookup for this battle
2023-12-03 20:52:22 [DEBUG]    Sending message to websocket: battle-gen9customgame-2003985166|/team 1|3
2023-12-03 20:52:22 [DEBUG]    Sending message to websocket: battle-gen9customgame-2003985166|hf
2023-12-03 20:52:22 [DEBUG]    Sending message to websocket: battle-gen9customgame-2003985166|/timer on
2023-12-03 20:52:22 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:22 |request|{"active":[{"moves":[{"move":"Metronome","id":"metronome","pp":16,"maxpp":16,"target":"self","disabled":false}],"canTerastallize":"Electric"}],"side":{"name":"PlayThirdStrike","id":"p2","pokemon":[{"ident":"p2: Morpeko","details":"Morpeko, M","condition":"257/257","active":true,"stats":{"atk":226,"def":152,"spa":176,"spd":152,"spe":230},"moves":["metronome"],"baseAbility":"hungerswitch","item":"choiceband","pokeball":"pokeball","ability":"hungerswitch","commanding":false,"reviving":false,"teraType":"Electric","terastallized":""}]},"rqid":5}
2023-12-03 20:52:22 [DEBUG]    Received battle JSON from server: {'active': [{'moves': [{'move': 'Metronome', 'id': 'metronome', 'pp': 16, 'maxpp': 16, 'target': 'self', 'disabled': False}], 'canTerastallize': 'Electric'}], 'side': {'name': 'PlayThirdStrike', 'id': 'p2', 'pokemon': [{'ident': 'p2: Morpeko', 'details': 'Morpeko, M', 'condition': '257/257', 'active': True, 'stats': {'atk': 226, 'def': 152, 'spa': 176, 'spd': 152, 'spe': 230}, 'moves': ['metronome'], 'baseAbility': 'hungerswitch', 'item': 'choiceband', 'pokeball': 'pokeball', 'ability': 'hungerswitch', 'commanding': False, 'reviving': False, 'teraType': 'Electric', 'terastallized': ''}]}, 'rqid': 5}
2023-12-03 20:52:22 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:22 |
2023-12-03 20:52:22 |t:|1701633141
2023-12-03 20:52:22 |start
2023-12-03 20:52:22 |switch|p1a: Bewear|Bewear, M|381/381
2023-12-03 20:52:22 |switch|p2a: Morpeko|Morpeko, M|257/257
2023-12-03 20:52:22 |turn|1
2023-12-03 20:52:22 [DEBUG]    Opponent has switched - clearing the last used move
2023-12-03 20:52:22 [DEBUG]    Sending message to websocket: battle-gen9customgame-2003985166|/choose move metronome|5
2023-12-03 20:52:22 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:22 |c|☆SMETStayInSchool|hf
2023-12-03 20:52:22 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:22 |c|☆PlayThirdStrike|hf
2023-12-03 20:52:23 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:23 |inactive|Battle timer is ON: inactive players will automatically lose when time's up. (requested by SMETStayInSchool)
2023-12-03 20:52:23 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:23 |inactive|Time left: 300 sec this turn | 300 sec total | 60 sec grace
2023-12-03 20:52:23 [DEBUG]    Time left: 300
2023-12-03 20:52:23 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:23 |inactive|PlayThirdStrike also wants the timer to be on.
2023-12-03 20:52:24 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:24 |request|{"active":[{"moves":[{"move":"Metronome","id":"metronome","pp":15,"maxpp":16,"target":"self","disabled":false}],"canTerastallize":"Electric"}],"side":{"name":"PlayThirdStrike","id":"p2","pokemon":[{"ident":"p2: Morpeko","details":"Morpeko, M","condition":"257/257","active":true,"stats":{"atk":226,"def":152,"spa":176,"spd":152,"spe":230},"moves":["metronome"],"baseAbility":"hungerswitch","item":"choiceband","pokeball":"pokeball","ability":"hungerswitch","commanding":false,"reviving":false,"teraType":"Electric","terastallized":""}]},"rqid":7}
2023-12-03 20:52:24 [DEBUG]    Received battle JSON from server: {'active': [{'moves': [{'move': 'Metronome', 'id': 'metronome', 'pp': 15, 'maxpp': 16, 'target': 'self', 'disabled': False}], 'canTerastallize': 'Electric'}], 'side': {'name': 'PlayThirdStrike', 'id': 'p2', 'pokemon': [{'ident': 'p2: Morpeko', 'details': 'Morpeko, M', 'condition': '257/257', 'active': True, 'stats': {'atk': 226, 'def': 152, 'spa': 176, 'spd': 152, 'spe': 230}, 'moves': ['metronome'], 'baseAbility': 'hungerswitch', 'item': 'choiceband', 'pokeball': 'pokeball', 'ability': 'hungerswitch', 'commanding': False, 'reviving': False, 'teraType': 'Electric', 'terastallized': ''}]}, 'rqid': 7}
2023-12-03 20:52:24 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:24 |
2023-12-03 20:52:24 |t:|1701633142
2023-12-03 20:52:24 |move|p2a: Morpeko|Metronome|p2a: Morpeko
2023-12-03 20:52:24 |move|p2a: Morpeko|Pin Missile|p1a: Bewear|[from]move: Metronome
2023-12-03 20:52:24 |-resisted|p1a: Bewear
2023-12-03 20:52:24 |-damage|p1a: Bewear|363/381
2023-12-03 20:52:24 |-resisted|p1a: Bewear
2023-12-03 20:52:24 |-damage|p1a: Bewear|347/381
2023-12-03 20:52:24 |-hitcount|p1a: Bewear|2
2023-12-03 20:52:24 |move|p1a: Bewear|Metronome|p1a: Bewear
2023-12-03 20:52:24 |move|p1a: Bewear|Sand Attack|p2a: Morpeko|[from]move: Metronome
2023-12-03 20:52:24 |-unboost|p2a: Morpeko|accuracy|1
2023-12-03 20:52:24 |
2023-12-03 20:52:24 |-formechange|p2a: Morpeko|Morpeko-Hangry||[from] ability: Hunger Switch
2023-12-03 20:52:24 |upkeep
2023-12-03 20:52:24 |turn|2
2023-12-03 20:52:24 [DEBUG]    morpeko already has the move metronome. Decrementing the PP by 1
2023-12-03 20:52:24 [DEBUG]    morpeko used a status-move. Setting can_have_assultvest to False
2023-12-03 20:52:24 [DEBUG]    Setting morpeko's last used move: metronome
2023-12-03 20:52:24 [DEBUG]    bewear used a status-move. Setting can_have_assultvest to False
2023-12-03 20:52:24 [DEBUG]    Setting bewear's last used move: metronome
2023-12-03 20:52:24 [DEBUG]    Sending message to websocket: battle-gen9customgame-2003985166|/choose move metronome|7
2023-12-03 20:52:24 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:24 |inactive|Time left: 300 sec this turn | 300 sec total
2023-12-03 20:52:24 [DEBUG]    Time left: 300
2023-12-03 20:52:24 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:24 |request|{"active":[{"moves":[{"move":"Metronome","id":"metronome","pp":14,"maxpp":16,"target":"self","disabled":false}],"canTerastallize":"Electric"}],"side":{"name":"PlayThirdStrike","id":"p2","pokemon":[{"ident":"p2: Morpeko","details":"Morpeko, M","condition":"229/257","active":true,"stats":{"atk":226,"def":152,"spa":176,"spd":152,"spe":230},"moves":["metronome"],"baseAbility":"hungerswitch","item":"choiceband","pokeball":"pokeball","ability":"hungerswitch","commanding":false,"reviving":false,"teraType":"Electric","terastallized":""}]},"rqid":9}
2023-12-03 20:52:24 [DEBUG]    Received battle JSON from server: {'active': [{'moves': [{'move': 'Metronome', 'id': 'metronome', 'pp': 14, 'maxpp': 16, 'target': 'self', 'disabled': False}], 'canTerastallize': 'Electric'}], 'side': {'name': 'PlayThirdStrike', 'id': 'p2', 'pokemon': [{'ident': 'p2: Morpeko', 'details': 'Morpeko, M', 'condition': '229/257', 'active': True, 'stats': {'atk': 226, 'def': 152, 'spa': 176, 'spd': 152, 'spe': 230}, 'moves': ['metronome'], 'baseAbility': 'hungerswitch', 'item': 'choiceband', 'pokeball': 'pokeball', 'ability': 'hungerswitch', 'commanding': False, 'reviving': False, 'teraType': 'Electric', 'terastallized': ''}]}, 'rqid': 9}
2023-12-03 20:52:24 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:24 |
2023-12-03 20:52:24 |t:|1701633143
2023-12-03 20:52:24 |move|p2a: Morpeko|Metronome|p2a: Morpeko
2023-12-03 20:52:24 |move|p2a: Morpeko|Yawn|p1a: Bewear|[from]move: Metronome
2023-12-03 20:52:24 |-start|p1a: Bewear|move: Yawn|[of] p2a: Morpeko
2023-12-03 20:52:24 |move|p1a: Bewear|Metronome|p1a: Bewear
2023-12-03 20:52:24 |move|p1a: Bewear|Peck|p2a: Morpeko|[from]move: Metronome
2023-12-03 20:52:24 |-resisted|p2a: Morpeko
2023-12-03 20:52:24 |-damage|p2a: Morpeko|229/257
2023-12-03 20:52:24 |
2023-12-03 20:52:24 |-formechange|p2a: Morpeko|Morpeko||[from] ability: Hunger Switch
2023-12-03 20:52:24 |upkeep
2023-12-03 20:52:24 |turn|3
2023-12-03 20:52:24 [DEBUG]    morpekohangry already has the move metronome. Decrementing the PP by 1
2023-12-03 20:52:24 [DEBUG]    morpekohangry used a status-move. Setting can_have_assultvest to False
2023-12-03 20:52:24 [DEBUG]    Setting morpekohangry's last used move: metronome
2023-12-03 20:52:24 [DEBUG]    Starting the volatile status yawn on bewear
2023-12-03 20:52:24 [DEBUG]    bewear already has the move metronome. Decrementing the PP by 1
2023-12-03 20:52:24 [DEBUG]    bewear used a status-move. Setting can_have_assultvest to False
2023-12-03 20:52:24 [DEBUG]    Setting bewear's last used move: metronome
2023-12-03 20:52:24 [DEBUG]    bewear did 10.89% damage to morpekohangry with peck
2023-12-03 20:52:24 [DEBUG]    Sending message to websocket: battle-gen9customgame-2003985166|/choose move metronome|9
2023-12-03 20:52:24 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:24 |inactive|Time left: 300 sec this turn | 300 sec total
2023-12-03 20:52:24 [DEBUG]    Time left: 300
2023-12-03 20:52:25 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:25 |request|{"active":[{"moves":[{"move":"Metronome","id":"metronome","pp":13,"maxpp":16,"target":"self","disabled":false}],"canTerastallize":"Electric"}],"side":{"name":"PlayThirdStrike","id":"p2","pokemon":[{"ident":"p2: Morpeko","details":"Morpeko, M","condition":"229/257","active":true,"stats":{"atk":226,"def":152,"spa":176,"spd":152,"spe":230},"moves":["metronome"],"baseAbility":"hungerswitch","item":"choiceband","pokeball":"pokeball","ability":"hungerswitch","commanding":false,"reviving":false,"teraType":"Electric","terastallized":""}]},"rqid":11}
2023-12-03 20:52:25 [DEBUG]    Received battle JSON from server: {'active': [{'moves': [{'move': 'Metronome', 'id': 'metronome', 'pp': 13, 'maxpp': 16, 'target': 'self', 'disabled': False}], 'canTerastallize': 'Electric'}], 'side': {'name': 'PlayThirdStrike', 'id': 'p2', 'pokemon': [{'ident': 'p2: Morpeko', 'details': 'Morpeko, M', 'condition': '229/257', 'active': True, 'stats': {'atk': 226, 'def': 152, 'spa': 176, 'spd': 152, 'spe': 230}, 'moves': ['metronome'], 'baseAbility': 'hungerswitch', 'item': 'choiceband', 'pokeball': 'pokeball', 'ability': 'hungerswitch', 'commanding': False, 'reviving': False, 'teraType': 'Electric', 'terastallized': ''}]}, 'rqid': 11}
2023-12-03 20:52:25 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:25 |
2023-12-03 20:52:25 |t:|1701633144
2023-12-03 20:52:25 |move|p2a: Morpeko|Metronome|p2a: Morpeko
2023-12-03 20:52:25 |move|p2a: Morpeko|Wing Attack|p1a: Bewear|[from]move: Metronome
2023-12-03 20:52:25 |-supereffective|p1a: Bewear
2023-12-03 20:52:25 |-damage|p1a: Bewear|266/381
2023-12-03 20:52:25 |move|p1a: Bewear|Metronome|p1a: Bewear
2023-12-03 20:52:25 |move|p1a: Bewear|Mega Kick|p2a: Morpeko|[from]move: Metronome|[miss]
2023-12-03 20:52:25 |-miss|p1a: Bewear|p2a: Morpeko
2023-12-03 20:52:25 |
2023-12-03 20:52:25 |-end|p1a: Bewear|move: Yawn|[silent]
2023-12-03 20:52:25 |-status|p1a: Bewear|slp
2023-12-03 20:52:25 |-formechange|p2a: Morpeko|Morpeko-Hangry||[from] ability: Hunger Switch
2023-12-03 20:52:25 |upkeep
2023-12-03 20:52:25 |turn|4
2023-12-03 20:52:25 [DEBUG]    morpeko already has the move metronome. Decrementing the PP by 1
2023-12-03 20:52:25 [DEBUG]    morpeko used a status-move. Setting can_have_assultvest to False
2023-12-03 20:52:25 [DEBUG]    Setting morpeko's last used move: metronome
2023-12-03 20:52:25 [DEBUG]    bewear already has the move metronome. Decrementing the PP by 1
2023-12-03 20:52:25 [DEBUG]    bewear used a status-move. Setting can_have_assultvest to False
2023-12-03 20:52:25 [DEBUG]    Setting bewear's last used move: metronome
2023-12-03 20:52:25 [DEBUG]    bewear used two different moves - it cannot have a choice item
2023-12-03 20:52:25 [DEBUG]    Setting bewear's last used move: megakick
2023-12-03 20:52:25 [DEBUG]    bewear used a damaging move - not guessing lifeorb anymore
2023-12-03 20:52:25 [DEBUG]    Removing the volatile status yawn from bewear
2023-12-03 20:52:25 [DEBUG]    bewear got status: slp
2023-12-03 20:52:25 [DEBUG]    Sending message to websocket: battle-gen9customgame-2003985166|/choose move metronome|11
2023-12-03 20:52:25 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:25 |inactive|Time left: 300 sec this turn | 300 sec total
2023-12-03 20:52:25 [DEBUG]    Time left: 300
2023-12-03 20:52:25 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:25 |request|{"active":[{"moves":[{"move":"Metronome","id":"metronome","pp":12,"maxpp":16,"target":"self","disabled":false}],"canTerastallize":"Electric"}],"side":{"name":"PlayThirdStrike","id":"p2","pokemon":[{"ident":"p2: Morpeko","details":"Morpeko, M","condition":"229/257","active":true,"stats":{"atk":226,"def":152,"spa":176,"spd":152,"spe":230},"moves":["metronome"],"baseAbility":"hungerswitch","item":"choiceband","pokeball":"pokeball","ability":"hungerswitch","commanding":false,"reviving":false,"teraType":"Electric","terastallized":""}]},"rqid":13}
2023-12-03 20:52:25 [DEBUG]    Received battle JSON from server: {'active': [{'moves': [{'move': 'Metronome', 'id': 'metronome', 'pp': 12, 'maxpp': 16, 'target': 'self', 'disabled': False}], 'canTerastallize': 'Electric'}], 'side': {'name': 'PlayThirdStrike', 'id': 'p2', 'pokemon': [{'ident': 'p2: Morpeko', 'details': 'Morpeko, M', 'condition': '229/257', 'active': True, 'stats': {'atk': 226, 'def': 152, 'spa': 176, 'spd': 152, 'spe': 230}, 'moves': ['metronome'], 'baseAbility': 'hungerswitch', 'item': 'choiceband', 'pokeball': 'pokeball', 'ability': 'hungerswitch', 'commanding': False, 'reviving': False, 'teraType': 'Electric', 'terastallized': ''}]}, 'rqid': 13}
2023-12-03 20:52:25 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:25 |
2023-12-03 20:52:25 |t:|1701633144
2023-12-03 20:52:25 |move|p2a: Morpeko|Metronome|p2a: Morpeko
2023-12-03 20:52:25 |move|p2a: Morpeko|Psych Up|p1a: Bewear|[from]move: Metronome
2023-12-03 20:52:25 |-copyboost|p2a: Morpeko|p1a: Bewear|[from] move: Psych Up
2023-12-03 20:52:25 |cant|p1a: Bewear|slp
2023-12-03 20:52:25 |
2023-12-03 20:52:25 |-formechange|p2a: Morpeko|Morpeko||[from] ability: Hunger Switch
2023-12-03 20:52:25 |upkeep
2023-12-03 20:52:25 |turn|5
2023-12-03 20:52:25 [INFO]     Updated bewear's max speed to 230
2023-12-03 20:52:25 [DEBUG]    morpekohangry already has the move metronome. Decrementing the PP by 1
2023-12-03 20:52:25 [DEBUG]    morpekohangry used a status-move. Setting can_have_assultvest to False
2023-12-03 20:52:25 [DEBUG]    Setting morpekohangry's last used move: metronome
2023-12-03 20:52:25 [DEBUG]    Sending message to websocket: battle-gen9customgame-2003985166|/choose move metronome|13
2023-12-03 20:52:25 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:25 |inactive|Time left: 300 sec this turn | 300 sec total
2023-12-03 20:52:25 [DEBUG]    Time left: 300
2023-12-03 20:52:26 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:26 |request|{"active":[{"moves":[{"move":"Metronome","id":"metronome","pp":11,"maxpp":16,"target":"self","disabled":false}],"canTerastallize":"Electric"}],"side":{"name":"PlayThirdStrike","id":"p2","pokemon":[{"ident":"p2: Morpeko","details":"Morpeko, M","condition":"229/257","active":true,"stats":{"atk":226,"def":152,"spa":176,"spd":152,"spe":230},"moves":["metronome"],"baseAbility":"hungerswitch","item":"choiceband","pokeball":"pokeball","ability":"hungerswitch","commanding":false,"reviving":false,"teraType":"Electric","terastallized":""}]},"rqid":15}
2023-12-03 20:52:26 [DEBUG]    Received battle JSON from server: {'active': [{'moves': [{'move': 'Metronome', 'id': 'metronome', 'pp': 11, 'maxpp': 16, 'target': 'self', 'disabled': False}], 'canTerastallize': 'Electric'}], 'side': {'name': 'PlayThirdStrike', 'id': 'p2', 'pokemon': [{'ident': 'p2: Morpeko', 'details': 'Morpeko, M', 'condition': '229/257', 'active': True, 'stats': {'atk': 226, 'def': 152, 'spa': 176, 'spd': 152, 'spe': 230}, 'moves': ['metronome'], 'baseAbility': 'hungerswitch', 'item': 'choiceband', 'pokeball': 'pokeball', 'ability': 'hungerswitch', 'commanding': False, 'reviving': False, 'teraType': 'Electric', 'terastallized': ''}]}, 'rqid': 15}
2023-12-03 20:52:26 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:26 |
2023-12-03 20:52:26 |t:|1701633145
2023-12-03 20:52:26 |move|p2a: Morpeko|Metronome|p2a: Morpeko
2023-12-03 20:52:26 |move|p2a: Morpeko|Imprison|p2a: Morpeko|[from]move: Metronome
2023-12-03 20:52:26 |-start|p2a: Morpeko|move: Imprison
2023-12-03 20:52:26 |-curestatus|p1a: Bewear|slp|[msg]
2023-12-03 20:52:26 |cant|p1a: Bewear|move: Imprison|Metronome
2023-12-03 20:52:26 |
2023-12-03 20:52:26 |-formechange|p2a: Morpeko|Morpeko-Hangry||[from] ability: Hunger Switch
2023-12-03 20:52:26 |upkeep
2023-12-03 20:52:26 |turn|6
2023-12-03 20:52:26 [INFO]     Updated bewear's max speed to 230
2023-12-03 20:52:26 [DEBUG]    morpeko already has the move metronome. Decrementing the PP by 1
2023-12-03 20:52:26 [DEBUG]    morpeko used a status-move. Setting can_have_assultvest to False
2023-12-03 20:52:26 [DEBUG]    Setting morpeko's last used move: metronome
2023-12-03 20:52:26 [DEBUG]    Starting the volatile status imprison on morpeko
2023-12-03 20:52:26 [DEBUG]    Sending message to websocket: battle-gen9customgame-2003985166|/choose move metronome|15
2023-12-03 20:52:26 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:26 |inactive|Time left: 300 sec this turn | 300 sec total
2023-12-03 20:52:26 [DEBUG]    Time left: 300
2023-12-03 20:52:27 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:27 |request|{"active":[{"moves":[{"move":"Metronome","id":"metronome","pp":10,"maxpp":16,"target":"self","disabled":false}],"canTerastallize":"Electric"}],"side":{"name":"PlayThirdStrike","id":"p2","pokemon":[{"ident":"p2: Morpeko","details":"Morpeko, M","condition":"190/257","active":true,"stats":{"atk":226,"def":152,"spa":176,"spd":152,"spe":230},"moves":["metronome"],"baseAbility":"hungerswitch","item":"choiceband","pokeball":"pokeball","ability":"hungerswitch","commanding":false,"reviving":false,"teraType":"Electric","terastallized":""}]},"rqid":17}
2023-12-03 20:52:27 [DEBUG]    Received battle JSON from server: {'active': [{'moves': [{'move': 'Metronome', 'id': 'metronome', 'pp': 10, 'maxpp': 16, 'target': 'self', 'disabled': False}], 'canTerastallize': 'Electric'}], 'side': {'name': 'PlayThirdStrike', 'id': 'p2', 'pokemon': [{'ident': 'p2: Morpeko', 'details': 'Morpeko, M', 'condition': '190/257', 'active': True, 'stats': {'atk': 226, 'def': 152, 'spa': 176, 'spd': 152, 'spe': 230}, 'moves': ['metronome'], 'baseAbility': 'hungerswitch', 'item': 'choiceband', 'pokeball': 'pokeball', 'ability': 'hungerswitch', 'commanding': False, 'reviving': False, 'teraType': 'Electric', 'terastallized': ''}]}, 'rqid': 17}
2023-12-03 20:52:27 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:27 |
2023-12-03 20:52:27 |t:|1701633145
2023-12-03 20:52:27 |move|p2a: Morpeko|Metronome|p2a: Morpeko
2023-12-03 20:52:27 |move|p2a: Morpeko|Lava Plume|p1a: Bewear|[from]move: Metronome
2023-12-03 20:52:27 |-damage|p1a: Bewear|132/381
2023-12-03 20:52:27 |-status|p1a: Bewear|brn
2023-12-03 20:52:27 |-activate|p1a: Bewear|move: Struggle
2023-12-03 20:52:27 |move|p1a: Bewear|Struggle|p2a: Morpeko
2023-12-03 20:52:27 |-damage|p2a: Morpeko|190/257
2023-12-03 20:52:27 |-damage|p1a: Bewear|37/381 brn|[from] recoil
2023-12-03 20:52:27 |
2023-12-03 20:52:27 |-damage|p1a: Bewear|14/381 brn|[from] brn
2023-12-03 20:52:27 |-formechange|p2a: Morpeko|Morpeko||[from] ability: Hunger Switch
2023-12-03 20:52:27 |upkeep
2023-12-03 20:52:27 |turn|7
2023-12-03 20:52:27 [DEBUG]    morpekohangry already has the move metronome. Decrementing the PP by 1
2023-12-03 20:52:27 [DEBUG]    morpekohangry used a status-move. Setting can_have_assultvest to False
2023-12-03 20:52:27 [DEBUG]    Setting morpekohangry's last used move: metronome
2023-12-03 20:52:27 [DEBUG]    bewear got status: brn
2023-12-03 20:52:27 [DEBUG]    bewear used two different moves - it cannot have a choice item
2023-12-03 20:52:27 [DEBUG]    Setting bewear's last used move: struggle
2023-12-03 20:52:27 [DEBUG]    bewear used a damaging move - not guessing lifeorb anymore
2023-12-03 20:52:27 [DEBUG]    bewear did 15.18% damage to morpekohangry with struggle
2023-12-03 20:52:27 [DEBUG]    Sending message to websocket: battle-gen9customgame-2003985166|/choose move metronome|17
2023-12-03 20:52:27 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:27 |inactive|Time left: 300 sec this turn | 300 sec total
2023-12-03 20:52:27 [DEBUG]    Time left: 300
2023-12-03 20:52:27 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:27 |
2023-12-03 20:52:27 |t:|1701633146
2023-12-03 20:52:27 |move|p2a: Morpeko|Metronome|p2a: Morpeko
2023-12-03 20:52:27 |move|p2a: Morpeko|Thunderbolt|p1a: Bewear|[from]move: Metronome
2023-12-03 20:52:27 |-damage|p1a: Bewear|0 fnt
2023-12-03 20:52:27 |faint|p1a: Bewear
2023-12-03 20:52:27 |
2023-12-03 20:52:27 |win|PlayThirdStrike
2023-12-03 20:52:27 [DEBUG]    Winner: PlayThirdStrike
2023-12-03 20:52:27 [DEBUG]    Sending message to websocket: battle-gen9customgame-2003985166|gg
2023-12-03 20:52:27 [DEBUG]    Sending message to websocket: battle-gen9customgame-2003985166|/savereplay
2023-12-03 20:52:27 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:27 |inactive|Time left: 300 sec this turn | 300 sec total
2023-12-03 20:52:27 [DEBUG]    Received message from websocket: |updatesearch|{"searching":[],"games":null}
2023-12-03 20:52:28 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:28 |c|☆SMETStayInSchool|gg
2023-12-03 20:52:28 [DEBUG]    Received message from websocket: >battle-gen9customgame-2003985166
2023-12-03 20:52:28 |c|☆PlayThirdStrike|gg
2023-12-03 20:52:28 [DEBUG]    Received message from websocket: |popup||html|<p>Your replay has been uploaded! It's available at:</p><p> <a class="no-panel-intercept" href="https://replay.pokemonshowdown.com/gen9customgame-2003985166" target="_blank">https://replay.pokemonshowdown.com/gen9customgame-2003985166</a>
Viitrexx commented 11 months ago

@pmariglia Root cause is the difference in message that is expected at https://github.com/pmariglia/showdown/blob/5fb8adcc5f9e96de44e49bde6b178995bc6dfbf0/showdown/websocket_client.py#L168. The laziest fix that seems to work for me is simply checking for the new message and breaking immediately.

            if msg.startswith("|popup||html|<p>Your replay has been uploaded!"):
                break
pmariglia commented 11 months ago

Sorry for the delay. The problem was with saving the replay, yes - the PokemonShowdown server changed the way the client specifies how to save a replay.

What you have does work, but it seems like that entire code block isn't necessary anymore and the /savereplay command is enough to save a replay.

Should be fixed in 1d283121d2b85e44738b0ec6416607a9196e2db6.