Receipts under resolved attacks; the cast line clears; the table holds still; teleport wraps
Each resolved attack now folds a receipt under its line, read off the engine's own record: the blow as it came in, what each counter left of it in the order they were weighed, what landed, and whose life moved. The resolution event carries the incoming damage and duration and the trail of counters for it. Hotseat chronicles carry the same. The line a cast was accepted on stayed on the board: its timer compared a reactive proxy to the object it held. Kept raw, it clears. The board jumped while walking. The "sending" note added a line beside End turn and took it away again, and the refusal toast stood in the flow above the table for five seconds; both now float and move nothing. Teleport reaches through the lettered openings in the engine, but the board dimmed the squares beyond them. The eligibility map follows the warps as the engine does. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
7d0c1c68a3
commit
648f6ab8cd
@@ -2,6 +2,7 @@
|
||||
|
||||
import type { Command, GameEvent, GameView, Side } from "@wizwar/engine";
|
||||
import { cardDef } from "@wizwar/engine";
|
||||
import { receiptFor } from "./receipt";
|
||||
|
||||
const SERVER_URL =
|
||||
import.meta.env.VITE_WIZWAR_SERVER ??
|
||||
@@ -242,6 +243,8 @@ export interface LogLine {
|
||||
/** The wizard acting, for the color mark beside the line: whoever
|
||||
* cast, struck, walked, or countered — otherwise the turn's owner. */
|
||||
actor?: string;
|
||||
/** A resolved attack's account, folded under its line. */
|
||||
receipt?: string[];
|
||||
}
|
||||
|
||||
/** Events whose `player` is the one acting rather than the one acted on. */
|
||||
@@ -578,6 +581,10 @@ class Net {
|
||||
(e.type === "gameWon" || TURN_BOUNDARY.has(e.type));
|
||||
this.log = [...this.log, { text: line, turn: this.turnCounter >= 0 ? this.turnCounter : null, notable, actor: actorOf(e, this.turnOwner) }];
|
||||
}
|
||||
const receipt = receiptFor(msg.events as GameEvent[], e);
|
||||
if (receipt) {
|
||||
this.log = [...this.log, { text: receipt.title, turn: this.turnCounter >= 0 ? this.turnCounter : null, notable: false, actor: actorOf(e, this.turnOwner), receipt: receipt.lines }];
|
||||
}
|
||||
}
|
||||
if (talk > 0) {
|
||||
this.chatCount += talk;
|
||||
|
||||
Reference in New Issue
Block a user