Fear's spaces are walked, not flown — warps carry the dread
The owner caught the metric: a wizard eight squares away as the crow flies stood three WALKED spaces away through a warp, and the manhattan check waved it through (while falsely blocking approaches manhattan- near through solid walls). fearRepels now measures walkingDistance — the same BFS the maze walks, warps included, walls respected. The board's aura follows suit: the diamond becomes a violet wash on every square within three walked spaces, computed by the same BFS, warp mouths included. No rev-32 ledger existed yet, so the metric corrects inside rev 32. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138A8CjeQRpvzKxuMfz1Bqc
This commit is contained in:
co-authored by
Claude Fable 5
parent
644d651ae0
commit
410ebc0135
@@ -3726,8 +3726,10 @@ function fearRepels(state: GameState, moverId: PlayerId | null, from: Cell, to:
|
||||
for (const other of state.players) {
|
||||
if (!other.alive || other.id === moverId) continue;
|
||||
if (sustainedOn(state, other.id, "fear").length === 0) continue;
|
||||
const d = Math.abs(other.position.x - to.x) + Math.abs(other.position.y - to.y);
|
||||
const dBefore = Math.abs(other.position.x - from.x) + Math.abs(other.position.y - from.y);
|
||||
// "Spaces" are counted through the maze — warps included, walls
|
||||
// respected — exactly as feet would walk them.
|
||||
const d = walkingDistance(state, other.position, to);
|
||||
const dBefore = walkingDistance(state, other.position, from);
|
||||
if (d <= 3 && d < dBefore) return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user