source
source: (TimedSearch) -> WorldPoint?The tile this flood was run from.
- Returns
nilwhen the source was off-scene.
scene:timedSearch(…)| Method | Returns | Description |
|---|---|---|
source() | WorldPoint? | The tile this flood was run from. |
reachable(WorldPoint) | boolean | Whether the tile was reached. |
pathLength(WorldPoint) | number? | Ground steps to a tile: the walking distance travelled, which a shortcut does not add to. |
cost(WorldPoint) | number? | Weighted cost to a tile. |
arrivalTicks(WorldPoint) | number? | How many ticks from the source you arrive at a tile. Add field:now() to ask the field about that tick: `field:blocked(tile, field:now() +… |
viaShortcut(WorldPoint) | boolean | Whether the tile is reached by traversing a shortcut as its final move. |
pathTo(WorldPoint) | { WorldPoint } | Landed tiles from the source to a tile, source excluded. |
pathToFull(WorldPoint) | { WorldPoint } | Every tile of the route, landed and passed over. Hazard checks want this one; a two-tile move is lethal if either of its tiles is. |
pathToward(WorldPoint) | { WorldPoint } | The walk toward a tile: the route to it, or when it cannot be reached the route to the closest tile the flood did reach. pathTo is the on… |
cameFrom(WorldPoint) | WorldPoint? | The tile stepped from to reach one tile. |
schedule(WorldPoint) | { TimedStep } | The route as an execution schedule: every tile with the tick of the move that covers it, its click-hop, and whether you stand on it. |
clickTile(WorldPoint) | WorldPoint? | The farthest tile on the route whose NATURAL walk still matches the plan: click it and the engine's own pathing follows the route you chose… |
bestOf({ WorldPoint }) | WorldPoint? | The cheapest reachable tile among several. A longer, safer way round can win, which is the point of asking rather than measuring distance. |
naturalPathLength(WorldPoint) | number? | The hazard-blind walking distance from the source: what the game would do if you clicked the tile yourself. For measuring how much a safer… |
| Method | Returns | Description |
|---|---|---|
SceneDomain.timedSearch | TimedSearch? | Flood against a hazard field, asking it about the tick you ARRIVE at each tile rather than the tick the flood was built. |
sourcesource: (TimedSearch) -> WorldPoint?The tile this flood was run from.
nil when the source was off-scene.reachablereachable: (TimedSearch, WorldPoint) -> booleanWhether the tile was reached.
tilepathLengthpathLength: (TimedSearch, WorldPoint) -> number?Ground steps to a tile: the walking distance travelled, which a shortcut does not add to.
tilenil when unreachable.costcost: (TimedSearch, WorldPoint) -> number?Weighted cost to a tile.
tilenil when unreachable.arrivalTicksarrivalTicks: (TimedSearch, WorldPoint) -> number?How many ticks from the source you arrive at a tile. Add field:now() to ask the field about that tick: field:blocked(tile, field:now() + ticks).
tilenil when unreachable.viaShortcutviaShortcut: (TimedSearch, WorldPoint) -> booleanWhether the tile is reached by traversing a shortcut as its final move.
tilepathTopathTo: (TimedSearch, WorldPoint) -> { WorldPoint }Landed tiles from the source to a tile, source excluded.
tilepathToFullpathToFull: (TimedSearch, WorldPoint) -> { WorldPoint }Every tile of the route, landed and passed over. Hazard checks want this one; a two-tile move is lethal if either of its tiles is.
tilepathTowardpathToward: (TimedSearch, WorldPoint) -> { WorldPoint }The walk toward a tile: the route to it, or when it cannot be reached the route to the closest tile the flood did reach. pathTo is the one that answers empty instead.
tilecameFromcameFrom: (TimedSearch, WorldPoint) -> WorldPoint?The tile stepped from to reach one tile.
tilenil at the source, or when unreachable.scheduleschedule: (TimedSearch, WorldPoint) -> { TimedStep }The route as an execution schedule: every tile with the tick of the move that covers it, its click-hop, and whether you stand on it.
tileclickTileclickTile: (TimedSearch, WorldPoint) -> WorldPoint?The farthest tile on the route whose NATURAL walk still matches the plan: click it and the engine's own pathing follows the route you chose, instead of its own.
tilenil when unreachable.bestOfbestOf: (TimedSearch, { WorldPoint }) -> WorldPoint?The cheapest reachable tile among several. A longer, safer way round can win, which is the point of asking rather than measuring distance.
goalsnil when none is reachable.naturalPathLengthnaturalPathLength: (TimedSearch, WorldPoint) -> number?The hazard-blind walking distance from the source: what the game would do if you clicked the tile yourself. For measuring how much a safer way round costs.
tilenil when unreachable.