Dispel Creation reaches every creation, and edge hints tell the truth
An opponent's wraith refused to be dispelled — the engine was willing all along (any controller's creature, sight required), but creature clicks never routed cell-target spells, so the cast never left the client. Clicking a creature with a cell spell selected now lands on its square. The dimming aid told the same lie twice over: it lit every created square including ones out of sight (a caster's own thornbush beyond the walls) and never lit creatures at all. It now mirrors the engine — anything created, whoever made it, in sight. And "click a wall line" stops standing in for every edge card: each now says what the click actually is — a locked door for the keys, a corridor line for the fire, the creation itself for the dispel — and attacks no longer show two hints for one wall. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
ee6a08f25c
commit
9493873b64
@@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest";
|
||||
import { applyCommand, activePlayer, boardView, gameLos } from "../src/game";
|
||||
import { cellKey, SIDES, stepTarget, type Cell } from "../src/board";
|
||||
import type { CardInstance } from "../src/cards";
|
||||
import { eligibleCellsFor, viewFor } from "../src/view";
|
||||
import { eligibleCellsFor, sightedCellsFor, viewFor } from "../src/view";
|
||||
import { newExpansionGame as newGame, must, giveCard, emptyNeighborCell } from "./helpers";
|
||||
|
||||
describe("expansion terrain", () => {
|
||||
@@ -191,4 +191,24 @@ describe("eligibility dimming mirrors the engine", () => {
|
||||
expect(held).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
it("dispel dimming lights creatures and demands sight, whoever made them", () => {
|
||||
let { state } = newGame();
|
||||
const caster = activePlayer(state);
|
||||
const other = state.players.find((p) => p.id !== caster.id)!;
|
||||
// An enemy wraith beside the caster: created by the OTHER wizard.
|
||||
state.creatures.push({
|
||||
id: "w1", kind: "wraith", controllerId: other.id,
|
||||
position: { x: caster.position.x, y: caster.position.y },
|
||||
damage: 0, maxDamage: Infinity, movesPerTurn: 3, movementUsed: 0,
|
||||
attackUsed: false, justCreated: false,
|
||||
wallPassesPerTurn: 1, wallPassUsed: 0, scorchedThisTurn: [],
|
||||
});
|
||||
const lit = eligibleCellsFor(viewFor(state, caster.id), "dispel-creation")!;
|
||||
expect(lit.has(cellKey(caster.position))).toBe(true);
|
||||
// Everything lit is created AND sighted.
|
||||
const view = viewFor(state, caster.id);
|
||||
const seen = sightedCellsFor(view);
|
||||
for (const k of lit) expect(seen.has(k)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user