Credibility pass: the fast-edit shavings swept from the ops-and-rev-13 batch
Server: turnFacts joins actingSeat's full priority order (a hanging ward or slow-death window now reads as the lobby's attention, stubs included), summarize and stubOf share one baseSummary, the stranded doc comment returns to summarize, the protocol contract names feedbackList, Sentry init moves below the imports it cannot precede, randomBytes joins its group, the feedback path hoists once with the operator-fields note. Engine: the safe's sight check trusts castSight alone, the locked-safe predicate becomes lockedSafeAt, the doomed-grab test drives both seats and must reach endTurn. Web: the twin safe handlers merge, paPoints joins the reset ritual with a derived burnable range, five decorative empty handlers and a dead class go, the hand earns real list semantics, fitHandCards cites Card.svelte's tokens, two wrap-sites reindent, feedbackReports moves home as a named type, and the chronicle's stay-mounted reason is stated. feedback-reply.sh adopts its siblings' set/usage conventions and speaks Node. Two test screenshots leave the repo root. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015RCWSTnb1KYTPyL4GmhGnF
This commit is contained in:
co-authored by
Claude Fable 5
parent
d37bc62c28
commit
afa0e17483
@@ -643,6 +643,14 @@ function pathToward(
|
||||
}
|
||||
|
||||
/** The treasure squares worth marching for. */
|
||||
/** A SAFE that stands between this wizard and the floor: not their own
|
||||
* box, and not opened this turn. */
|
||||
function lockedSafeAt(view: GameView, key: string): boolean {
|
||||
return view.squareContents[key]?.kind === "safe" &&
|
||||
view.squareContents[key]!.createdBy !== view.you &&
|
||||
!view.openSafes.includes(key);
|
||||
}
|
||||
|
||||
function treasureGoals(view: GameView): Set<string> {
|
||||
const self = me(view);
|
||||
const goals = new Set<string>();
|
||||
@@ -655,10 +663,7 @@ function treasureGoals(view: GameView): Set<string> {
|
||||
// A chest inside someone else's SAFE is no goal without a way in — a
|
||||
// lock card turns the combination, DISPEL CREATION removes the box.
|
||||
// Marching to an unopenable safe stalls the clockwork on it forever.
|
||||
const boxKey = cellKey(t.position);
|
||||
if (view.squareContents[boxKey]?.kind === "safe" &&
|
||||
view.squareContents[boxKey]!.createdBy !== view.you &&
|
||||
!view.openSafes.includes(boxKey) &&
|
||||
if (lockedSafeAt(view, cellKey(t.position)) &&
|
||||
!inHand(view, "pick-lock") && !inHand(view, "master-key") &&
|
||||
!inHand(view, "dispel-creation")) {
|
||||
continue;
|
||||
@@ -1332,8 +1337,7 @@ export function automatonCommand(
|
||||
if (prize) {
|
||||
// A SAFE over the prize: turn the combination (or dispel the box)
|
||||
// before reaching for the gold — the grab itself would be refused.
|
||||
const boxed = view.squareContents[here]?.kind === "safe" &&
|
||||
view.squareContents[here]!.createdBy !== you && !view.openSafes.includes(here);
|
||||
const boxed = lockedSafeAt(view, here);
|
||||
if (!boxed) return { type: "pickUpTreasure", treasureId: prize.id };
|
||||
const key = inHand(view, "pick-lock") ?? inHand(view, "master-key");
|
||||
if (key) return { type: "cast", instanceId: key.instanceId, target: { kind: "cell", cell: self.position } };
|
||||
|
||||
@@ -5252,9 +5252,9 @@ function doCast(prev: GameState, cmd: Extract<Command, { type: "cast" }>): Comma
|
||||
if (effect.sameSquare && cellKey(cell) !== cellKey(caster.position)) {
|
||||
return err("you must be in the same square");
|
||||
}
|
||||
if (effect.requiresLos && !(mods.aroundCorner
|
||||
? bentLos(state, caster, caster.position, cell)
|
||||
: castSight(state, caster, cmd, cell))) {
|
||||
// castSight carries the whole sight law: straight lines, the
|
||||
// VISIONSTONE's one-wall look, and the attached corner bend.
|
||||
if (effect.requiresLos && !castSight(state, caster, cmd, cell)) {
|
||||
return err("no line of sight to the safe");
|
||||
}
|
||||
const wandEvents: GameEvent[] = [];
|
||||
|
||||
Reference in New Issue
Block a user