diff --git a/packages/web/src/net.svelte.ts b/packages/web/src/net.svelte.ts index ced9c7f..2a72ca6 100644 --- a/packages/web/src/net.svelte.ts +++ b/packages/web/src/net.svelte.ts @@ -640,6 +640,11 @@ class Net { break; case "events": { let talk = 0; + // A replay is the whole chronicle from the deal, sent on every + // (re)join: it replaces what we hold, or a dropped socket's return + // would count each turn (and each line of talk) twice and the eyes + // would ask for turns the server has not reached. + if (msg.replayed) this.resetChronicle(); if (!msg.replayed) this.onFx?.(msg.events as GameEvent[]); for (const e of msg.events as GameEvent[]) { if (e.type === "tableTalk") { talk++; this.lastTalkBy = e.player; } @@ -1085,6 +1090,7 @@ class Net { private resetChronicle(): void { this.log = []; this.turnCounter = -1; + this.chatCount = 0; } /** Summon one turn's reel by its chronicle turn number. */