Sharpee
Chord / Standard Library / Meta & System / Turns and undo

Turns and undo: waiting, sleeping, again, undoing

wait (wait, z) is the canonical "let a turn pass": a full, snapshot-taking, daemon-ticking turn in which nothing else happens. N waits let N rounds of scheduled behavior play out. One message, time_passes (the lang file's twelve wait variants are dead inventory, flagged). Stories react to waited, or gate things on turns passing.

sleep (sleep, nap, doze, rest, slumber, all five parse since ADR-230 D2/D4). Flavor-only: one message (slept), no turns skipped beyond its own, no health interaction. Give it story meaning with story logic if a story needs real sleep. z remains a wait.

again (again, g) re-runs the last successful non-meta command by re-parsing its original text, so the repeat is honest: it can fail where the original succeeded if the world changed. Meta commands (undo, save, again itself) never enter history, so they can't be repeated; nothing_to_repeat covers an empty history.

undo (undo) rolls back one full-world snapshot, taken before every substantive turn (looks, examines, inventory, and the metas don't burn a slot). Depth is an engine setting, default 10; consecutive undos work to that depth. There is no per-story undo veto, and no undo-after-death: once the defeat ending lands the game has stopped (the veto window is the story's one chance to intervene before the ending locks).

The player sees:

> wait
Time passes...

> sleep
You sleep for a while.

> take the flare
Taken.

> again
You already have the signal flare.

> undo
Previous turn undone.

> undo
Previous turn undone.

> score
You have scored 0 out of 10, earning you the rank of a Novice.

AGAIN's repeat is honest (the re-parsed take refuses where the original succeeded), and two UNDOs peel back first that failed repeat, then the take itself, the score award reverting with it. For Chord stories, everything the language tracks (states, occurrence counters, once flags, sequence progress, awards) lives in world state, so undo (and save/restore) cover it with no author effort (ADR-210 AC-6, transcript-pinned).

RefusalsSuccess
wait (waiting-*)time_passes (event waited)
sleep (sleeping-*)slept
again (again-*)nothing_to_repeatrenders whatever the repeated command renders
undo (undoing-*)nothing_to_undo · undo_failedundo_success