diff --git a/main.py b/main.py index dd44e85..bb65cbc 100755 --- a/main.py +++ b/main.py @@ -114,6 +114,18 @@ def parse_log(game: str, log: str, into: sqlite3.Connection): """, (game, player, name, specie.split(", ")[0]), ) + case ["faint", mon]: + player, mon = resolve_mon(mon) + conn.execute( + """ + INSERT INTO knockouts(game, turn, player, name) + VALUES(?, ?, ?, ?) + ON CONFLICT DO NOTHING + """, + (game, turn, player, mon), + ) + case _: + debug(f"unhandled message {chunks[0]}") @dataclass(frozen=True)