A slime shows how many spells wait in it, and a peek names them

Every cast into the gel was seen at the table, so the count is public:
a badge on the slime, and the peek lists each spell with its caster.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
Eric Wagoner
2026-09-07 16:00:32 -05:00
co-authored by Claude Fable 5.1
parent 16fac5e6ca
commit 44c7ff8379
3 changed files with 30 additions and 3 deletions
+15 -3
View File
@@ -1003,10 +1003,21 @@
const atk = c.justCreated ? "no attack the turn it appears" : c.attackUsed ? "attack spent" : "attack ready";
return `${hp} · ${moves} · ${atk}`;
}
/** The square a peek is looking at, for notes the card alone cannot carry. */
let peekCell = $state<{ x: number; y: number } | null>(null);
const peekNote = $derived.by(() => {
if (!view || !peekCreatureId) return null;
const c = view.creatures.find((c) => c.id === peekCreatureId);
return c ? creatureStats(c) : null;
if (!view) return null;
if (peekCreatureId) {
const c = view.creatures.find((c) => c.id === peekCreatureId);
return c ? creatureStats(c) : null;
}
if (peekCell && view.squareContents[cellKey(peekCell)]?.kind === "slime") {
const waiting = view.slimeTraps?.[cellKey(peekCell)] ?? [];
if (waiting.length > 0) {
return `Waiting in the gel for the next wizard in: ${waiting.map((t) => `${cardDef(t.cardId).name} (${t.casterId})`).join(", ")}`;
}
}
return null;
});
/** Show the card behind whatever occupies this square (view-only). */
@@ -1026,6 +1037,7 @@
if (!cardId) return false;
peekCard = { instanceId: `peek-${cardId}`, cardId };
peekCreatureId = creature?.id ?? null;
peekCell = { ...cell };
peekToken =
creature && CREATURE_ART[creature.kind] ? tokenArt(CREATURE_ART[creature.kind]!, "creatures")
: content && TERRAIN_ART[content.kind] ? tokenArt(TERRAIN_ART[content.kind]!, "terrain")