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,7 +2,7 @@
|
||||
// The server sends this after every state change; clients never see the
|
||||
// deck order or other players' hands.
|
||||
|
||||
import { SIDES, edgeKey, sightBetween, bentSightThroughGap, traceSight, type AssembledBoard, type Cell, type SightTrace } from "./board";
|
||||
import { neighbor, SIDES, edgeKey, sightBetween, bentSightThroughGap, traceSight, type AssembledBoard, type Cell, type SightTrace } from "./board";
|
||||
import { cardDef, type CardInstance } from "./cards";
|
||||
import {
|
||||
boardView,
|
||||
@@ -516,7 +516,9 @@ export function eligibleCellsFor(view: GameView, cardId: string, bentCorner = fa
|
||||
|
||||
if (cardId === "teleport") {
|
||||
// Up to four spaces, walls and objects ignored; not into solid stone.
|
||||
// BFS over existing cells, matching the engine's wallIgnoringDistance.
|
||||
// BFS over existing cells, matching the engine's wallIgnoringDistance —
|
||||
// the maze wraps for teleporters as it does for walkers, a warp mouth
|
||||
// being one step like any doorway.
|
||||
const out = new Set<string>();
|
||||
const dist = new Map<string, number>([[key(me.position.x, me.position.y), 0]]);
|
||||
const queue = [me.position];
|
||||
@@ -524,10 +526,15 @@ export function eligibleCellsFor(view: GameView, cardId: string, bentCorner = fa
|
||||
const cur = queue.shift()!;
|
||||
const d = dist.get(key(cur.x, cur.y))!;
|
||||
if (d >= 4) continue;
|
||||
for (const [dx, dy] of [[1, 0], [-1, 0], [0, 1], [0, -1]] as const) {
|
||||
const n = { x: cur.x + dx, y: cur.y + dy };
|
||||
for (const side of SIDES) {
|
||||
let n = neighbor(cur, side);
|
||||
if (!view.board.cells[key(n.x, n.y)]) {
|
||||
const w = view.board.warps.find((w) => w.from.cell.x === cur.x && w.from.cell.y === cur.y && w.from.side === side);
|
||||
if (!w) continue;
|
||||
n = w.to.cell;
|
||||
}
|
||||
const nk = key(n.x, n.y);
|
||||
if (!view.board.cells[nk] || dist.has(nk)) continue;
|
||||
if (dist.has(nk)) continue;
|
||||
dist.set(nk, d + 1);
|
||||
queue.push(n);
|
||||
if (view.squareContents[nk]?.kind !== "stone") out.add(nk);
|
||||
|
||||
Reference in New Issue
Block a user