Sight travels through the wraparound openings
"If casting a spell, or checking line of sight through the AUTO WARP, treat it as a straight line, and the two connected boards as though they were adjacent" — and the lettered openings reconnect edges the same way. hasWarpLineOfSight models it: the line must run straight down the corridor, out one mouth, and in through the paired mouth, with both corridor legs clear and neither mouth filled solid. The new sightBetween (direct or through-a-warp) is now the game's LOS check everywhere — spells, ambush triggers, Around The Corner, the visionstone sweep, and the targeting dim on the client. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
fce3adc340
commit
64454ffc3e
@@ -2,7 +2,7 @@
|
||||
// The server sends this after every state change; clients never see the
|
||||
// deck order or other players' hands.
|
||||
|
||||
import { hasLineOfSight, type AssembledBoard } from "./board";
|
||||
import { sightBetween, type AssembledBoard } from "./board";
|
||||
import { type CardInstance } from "./cards";
|
||||
import {
|
||||
boardView,
|
||||
@@ -164,7 +164,7 @@ export function sightedCellsFor(view: GameView): Set<string> {
|
||||
}
|
||||
for (const key of Object.keys(view.board.cells)) {
|
||||
const [x, y] = key.split(",").map(Number) as [number, number];
|
||||
if (hasLineOfSight(view.board, me.position, { x, y }, blockers)) out.add(key);
|
||||
if (sightBetween(view.board, me.position, { x, y }, blockers)) out.add(key);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user