diff --git a/src/sim/player.js b/src/sim/player.js index 461f4f7..8cb107f 100644 --- a/src/sim/player.js +++ b/src/sim/player.js @@ -26,6 +26,9 @@ function fromDescriptor(loc) { // target: { planetId } to fly to a planet in the current system, // or { laneId } to jump through a lane touching the current system. +// A { laneId } command is a COMMITTED flight: intent is stored and the +// lane jump auto-fires on reaching the gate (cleared only in startLane). +// Movement commands are rejected while in transit, so intent cannot go stale. export function goTo(world, target) { const p = world.player; if (!p.alive || p.won) return false; @@ -95,6 +98,8 @@ export function onPlayerArrive(world) { if (loc.kind === 'lane' && world.t >= loc.arriveT - 1e-9) { const lane = world.galaxy.lanes[loc.laneId]; const trip = ++p.tripCount; + // Player hazard odds are deliberately kinder than NPC hazardProbs + // (4% vs 6% destroyed, 15% vs 20% cargo-lost per unit hazard). const r = rollFor(`w:${world.seed}:player`, `trip${trip}`); if (r < lane.hazard * 0.04) { p.alive = false;