Skip to content

Commit

Permalink
Merge pull request #852 from danielzhang2001/DanielsBranch
Browse files Browse the repository at this point in the history
debugging for synchronize
  • Loading branch information
danielzhang2001 authored Sep 2, 2024
2 parents b9c41ff + ae1e75e commit 7c17c45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions showdown/replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def process_poison(
poison_found = True
break
elif re.search(
r"\|p(\d)a: ([^\|\n]+)\|ability: Synchronize\n|-status\|p(\d)a: "
r"\|p(\d)a: ([^\|\n]+)\|ability: Synchronize\n\|-status\|p(\d)a: "
+ re.escape(fainted_pokemon)
+ r"\|(tox|psn)",
action,
Expand All @@ -317,15 +317,15 @@ def process_poison(
if "-status" in action and ("tox" in action or "psn" in action):
print("status detected in synchronize!")
sync_match = re.search(
r"\|p(\d)a: ([^\|\n]+)\|ability: Synchronize\n|-status\|p(\d)a: "
r"\|p(\d)a: ([^\|\n]+)\|ability: Synchronize\n\|-status\|p(\d)a: "
+ re.escape(fainted_pokemon)
+ r"\|(tox|psn)",
action,
)
print(f"sync match is: {sync_match}")
if sync_match:
print("sync matched!")
sync_player, sync_pokemon, _ = sync_match.groups()
sync_player, sync_pokemon, status = sync_match.groups()
print(f"sync player is {sync_player}")
print(f"sync pokemon is {sync_pokemon}")
poison_starter = sync_pokemon.strip()
Expand Down

0 comments on commit 7c17c45

Please sign in to comment.