Log inGet started
World

Kobayashi Maru

Branchmain
Branchesmain
Commit692be99dbc

README.md

km.scenario

The rules of KOBAYASHI MARU — pure Luau, no engine calls, so km.tests.scenario runs them headless.

API (contract in /source/design/spec.md): newRun(opts?), nightChoose, nightEnterLab, nightEdit, nightSeen, beginTest, availableOrders(run, limit?) (the dealt hand, up to 8 cards), allOrders, reports, advice, loudest, opposition, apply(run, orderId, args?), stall, advance, isOver, evaluate, confess.

  • Orders (S.ORDERS): every KM.ORDERS id with label, blurb, icon, colour, minutes, visibility, preconditions (reason when disabled), cost and costText, and an effect that writes officer lines, viewscreen/alert events and a command-log entry with its cause.
  • Officers: six distinct voices (lines in km.scenario.lines); each beat every officer reports, recommends an order (advisedBy) and objects to others (opposedBy). Going against an objection costs trust; low trust makes officers hesitate (+30 s) or refuse; trust 0 is mutiny. Low morale brings panic events.
  • The rig: honest runs face unbounded cruiser arrivals (alert shortens the interval; fighting pulls the next one closer) and an overwhelm clause once they outnumber hostilesFatal; 8:00 of life support is shorter than any honest full rescue. Each simulator edit breaks exactly its matching rule.
  • Debrief (km.scenario.debrief): six virtues from marks that each name the night choice or log entry that caused them, 16 endings, stamps, notes, timeline, outcome line, confession.

Runtime driver: km.director. Tests: require("km.tests.scenario").run().