Boobytrap tokens land where you can see them
The four placements accumulated invisibly until the last click cast the spell. Each token now marks its square as it is placed, numbered in click order — the 1 is the real trap — and tapping a placed token lifts it again, since the four must be distinct squares. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
04dc9bc750
commit
ee6a08f25c
@@ -470,7 +470,11 @@
|
||||
return;
|
||||
}
|
||||
if (selectedCard?.cardId === "boobytrap") {
|
||||
trapCells = [...trapCells, cell];
|
||||
// Tapping a placed token lifts it again; the four must be distinct.
|
||||
const already = trapCells.findIndex((c) => cellKey(c) === cellKey(cell));
|
||||
trapCells = already !== -1
|
||||
? trapCells.filter((_, i) => i !== already)
|
||||
: [...trapCells, cell];
|
||||
if (trapCells.length === 4) {
|
||||
dispatch({ type: "cast", instanceId: selectedCard.instanceId, params: { cells: trapCells } });
|
||||
clearSelection();
|
||||
@@ -1224,6 +1228,7 @@
|
||||
onCreatureClick={clickCreature}
|
||||
onWarpClick={clickWarp}
|
||||
markedCell={tradeFrom ?? pendingTeleport}
|
||||
markedCells={trapCells.length > 0 ? trapCells : null}
|
||||
markedSector={pendingSectorOrigin}
|
||||
ghostSlots={relocateGhosts}
|
||||
onGhostClick={clickGhostSlot}
|
||||
|
||||
Reference in New Issue
Block a user