track knockouts
This commit is contained in:
parent
83093f8c81
commit
5f9ae3e145
12
main.py
12
main.py
@ -114,6 +114,18 @@ def parse_log(game: str, log: str, into: sqlite3.Connection):
|
|||||||
""",
|
""",
|
||||||
(game, player, name, specie.split(", ")[0]),
|
(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)
|
@dataclass(frozen=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user