Files
turnstone/examples/door-game/understone/world/data/locations.json
T
Patrick Buckley 08d46f086f feat(examples): Understone v0.5 — ambushes, the inn mailbox, and dice
The social slice: the shared world gets teeth, letters, and a house game.

- Ambush (async PvP, classic door-game player-kill spirit): waylay an adventurer who has
  not yet begun their day. Ordered gates — known target, not yourself, the
  gatekeeper shields the young (both >= min level), level band +-2, the
  SLEEP RULE (acting today makes you watchful — an active-play defense),
  mercy for the downed (hp<=1 cannot be piled on: even bandits have
  standards), once per pair per UTC day. Win: capped gold cut transfers,
  victim wakes at the spawn-stone with a private note; lose: the sleeper
  wakes blade-in-hand and the Herald crows your shame. The attacker wears
  the counter-blows the combat log narrates (state matches story). Both
  players persist in one transaction.
- The inn mailbox: events carry a target ('' = public). door_log delivers
  private notes to the addressee only; the Watch and other players never
  see them. Mail is DURABLE past the in-memory tail (SQLite backfill for
  cursors older than the resident window) — the broadsheet is ephemeral,
  letters are not. Sanitized, daily-capped.
- Inn dice: 2d6 against the house, bet- and count-capped per day, big wins
  make the news.
- Six new banded settings; four day-counter columns join the shared lazy
  UTC reset; schema stamp stays 1 (pre-1.0 mutates in place by design).

Tests 184 -> 231; sleep rule, mercy gate, band boundary (exact/over),
refusal precedence, attacker wear, zero-gold robbery, mail eviction
survival, and Watch privacy all pinned; guards revert-verified.
2026-06-13 04:40:40 -07:00

52 lines
1.4 KiB
JSON

{
"inn": {
"kind": "inn",
"name": "The Sleeping Drake",
"glyph": "I",
"color": "town",
"actions": ["rest", "gamble", "leave"],
"flavor": [
"Lamplight pools on worn oak tables.",
"The innkeeper nods toward the hearth.",
"A night's rest restores you fully.",
"In the corner, a dice cup waits for a wager."
]
},
"shop": {
"kind": "shop",
"name": "Gravel & Sons Outfitters",
"glyph": "$",
"color": "town",
"actions": ["buy", "sell", "leave"],
"flavor": [
"Racks of steel and leather line the walls.",
"Buying a weapon or armour equips it at once.",
"Potions are quaffed on purchase (no pack to carry).",
"Old gear sells back for half its price."
]
},
"healer": {
"kind": "healer",
"name": "The Quiet Shrine",
"glyph": "+",
"color": "town",
"actions": ["heal", "leave"],
"flavor": [
"Incense curls beneath a still blue flame.",
"The keeper mends wounds for coin, per point of vigour."
]
},
"dungeon": {
"kind": "dungeon",
"name": "The Understone Deep",
"glyph": ">",
"color": "dungeon",
"actions": ["descend", "challenge", "leave"],
"flavor": [
"A cold throat of stone descends into dark.",
"To descend is to face a troll, then something worse.",
"Deeper still, the old tales say, the Wyrm Below coils and waits."
]
}
}