feat(walls): one-way sight per-viewer filter and ONEWAY fault (#58)
The vision fan blocks a sight-blocking one-way wall only for a viewer on its blind side (sight_dir names it; left is the (-dy,dx) normal of a->b), one sign test inline after the radius cull, so the hoisted wall list stays viewer-independent. Movement never reads the direction: one-way walls block both ways. Explored and tiles therefore differ by side and only ever grow. - geometry: WallDir + Wall.sightDir + blindTo, filter in visibilityPolygon. - worldmap: sight_dir mapping (movement mapping unchanged). - vision: the ONEWAY leak-fault build drops sight_dir player-side. - leakcheck: own side test for the fan and the clear-segment oracle; ONEWAY class detected against the sight_dir-dropped fan. - leak scenario gains a one-way wall the subject sees across; fault test asserts exactly ONEWAY. - oneway.test.mjs: both sides, tile sweep with its own oracle, flip with fixed endpoints, monotone explored/tiles, restart, two-way movement. - docs: DESIGN 5.8 mechanism sentence corrected; TESTING #58 markers built. - nginx harness: temp dirs created recursively (restart on one state dir).
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
// - slice 7 (#22): props written into all three buckets on a token the subject can see, a
|
||||
// GM-sourced status, a walls-sourced stuck from a new wall, a resize, and a prop.unset — every
|
||||
// frame of the group is checked for the bucket and the `source` it must not carry
|
||||
// - Walls r1 (#58): a one-way wall the subject sees across (`sight_dir` names the token's side
|
||||
// blind), the ONEWAY fault's positive source and the blind-side oracle's control
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { spawnSync } from 'node:child_process'
|
||||
@@ -371,6 +373,16 @@ export async function runLeak({ origin, gmKey, stateDir, transcript, keepOpen =
|
||||
await group('A walks further south', async () => {
|
||||
expectAck(await move(A, ids.A, [560, 1300]), true)
|
||||
})
|
||||
// Walls r1 (#58): a one-way wall between the subject (west) and a token on its blind (east) side.
|
||||
// `sight_dir:"right"` names the east side blind, so the subject sees across; the ONEWAY fault
|
||||
// drops `sight_dir` and the same wall would hide E2 and shrink the subject's fan.
|
||||
await group('GM adds a one-way wall east of the subject', async () => {
|
||||
await addWall({ a: [700, 1200], b: [700, 1400], sight_dir: 'right' })
|
||||
})
|
||||
await group('GM puts a token behind the one-way wall (the subject sees across)', async () => {
|
||||
await createToken('E2', { kind: 'npc', pos: [800, 1300], descriptive_name: 'a sentry',
|
||||
actual_name: 'Sentry' })
|
||||
})
|
||||
await group('end', async () => { await sleep(0) })
|
||||
|
||||
// Let anything still queued arrive, then close politely.
|
||||
|
||||
Reference in New Issue
Block a user