Files
station-master/docs/home-deck.md
T
Jesse.MarkowitzandClaude Fable 5.1 04ca74c365 v0.8.5 — housekeeping from the audit, and the playtest line retired
The third release from the audit; nothing a player sees changes. CHANGELOG has the detail.

The 0.4.9 playtest line is no longer maintained (Jesse, 2026-09-29): the deploy rule that
existed for it is gone and #85 is moot. The table test (#39 #35 #42a #40) is closed — every
line of the checklist was met at a table. #46 is done and cannot regrow: the 36 unused
declarations are removed and `noUnusedLocals`/`noUnusedParameters` are on; two of them were
dead bot functions from rejected candidates the round said it had deleted. The documents no
longer teach `trainCapSlack` (a knob that throws), point at `as-built.md` (deleted in 0.8.2),
model `officeType` (the engine says `tier`) or describe `collisionOccurred` (never emitted);
the README's account of bot flags now matches the bot's. Five playtest saves committed in
`docs/` against the repository's own rule are in the ignored `playtests/`.

What the audit found and did not fix is written down as TODO #112-#117, each with its reason.
#112 is `docs/plans/structure.md`, the proposal for `http.ts`, `main.ts` and `check`. #117 —
`/api/save` hands a seat the seed mid-game — waits on a conversation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FrCWubm9GAftYCm2hWdKwK
2026-09-29 17:02:33 -04:00

399 lines
24 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Station Master — Home Deck
**Version 0.8.5** · 2026-09-29
**Scope:** the Home Office deck — how it is dealt, drawn, discarded and reshuffled, and what the
rules are for playing each kind of card out of it.
> **The card tables in this document are GENERATED from `src/engine/content.ts`** and checked by a
> test, so they cannot disagree with the game. `npm run build:cards` rebuilds them; do not edit a
> table by hand. The prose around them is how the deck WORKS; the tables are what is in it.
>
> **Card counts are not published.** Counts move with play balance, so a printed count answers a
> question that has a different answer
> after the next retune. Where a count matters it is rendered as a yes/no — whether the deck deals
> the card at all — which is a fact about the design.
## The piles
- **Home Office deck** — face down. The pile a Draw comes from.
- **Three Departments** — face-up discard piles. A discard goes onto one, which is precisely so a
rival may take it; a Draw may take the top card of a Department instead of the deck. **Taking the
last card off a Department refills it immediately** from the Home Office deck (§6.2), so there
are always three piles to choose from; see the Rules.
- **Salvage Yard** — where a played-out card ends up. An Extra's card goes here after its run.
When the Home Office deck runs out it is rebuilt from the Salvage Yard and **all three Departments
in full**, reshuffled from the seeded stream. A **spent timetabled train** is not collected — its
number is on the timetable and it cannot run twice — but a *discarded* train was never played and
is still runnable, so it comes back.
## Hand and turn
The hand limit is **three**, or four while you hold a Red Flag. You may not end a turn over the
limit: play a card or discard one to a Department. Some cards cannot be discarded at all — an Extra
never can, and a timetabled train cannot when the `discardTimetabled` house rule is off — so a hand
of nothing but those has exactly one way forward, which is to play one.
The opening deal is a house-rule choice made when the game is dealt. The default (`threeRandom`) is
three cards from one shuffled deck; `threeTrackThreeOther` deals three track and three others from
two separately shuffled piles, over the hand limit, so the first turn is spent choosing
which district you can afford to build.
Drawing is one of the three Local Operations options — see [Rules](rules.md)
§4.2. Taking the option lets you draw **and** play or discard within the same turn.
## Track cards
Track cards are ordinary Home Office cards, not a separate personal supply.
- A placed card must **connect to existing rail**: at least one neighbour must join it.
- The **Running Track** is the row from Limit to Limit. A card placed there must carry an east–west
through route, or it breaks the main.
- Placing track **on a Limit sign** extends the Running Track and moves that sign outward. The sign
is a physical card, so it moves rather than being left stranded mid-track.
- **Nothing may be placed outside your Limits** — track, industries and Modifiers alike. Your
district ends at its sign.
- Curves and turnouts are printed left- or right-handed. A card may be turned 180° but never flipped
over, so its 45° leg never changes diagonal.
- A **turnout may upgrade** an existing straight, or a curve whose arc is exactly the turnout's
diverging arc. An **industry may be built over a straight** off the Running Track, on the same
principle. Neither is allowed if the card holds standing cars or an Enhancement, and every other
occupied square is unavailable.
- A turnout may be **run through but not stopped on**: it is not Operational Rail, so a Move may not
end there.
<!-- BEGIN CARDS: track -->
| Track | Geometry | Hand | Operational rail | Move cost | Dealt |
| --- | --- | --- | :---: | ---: | :---: |
| Straight track | straight | none | yes | 1 | yes |
| Curved track (right) | curved | right | yes | 1 | yes |
| Curved track (left) | curved | left | yes | 1 | yes |
| Sharp Curved Track (right) | sharpCurved | right | yes | 2 | no |
| Sharp Curved Track (left) | sharpCurved | left | yes | 2 | no |
| Turnout (right) | turnout | right | — | 1 | yes |
| Turnout (left) | turnout | left | — | 1 | yes |
A row marked "no" is a shape the engine understands but the deck does not currently print.
<!-- END CARDS: track -->
## Office cards
Every player begins at a **Whistle Post**, which is not drawn from the deck: one A/D track, no
Porters, no passenger slots, and not a Control Point.
Office cards are **upgrades in strict sequence** — Whistle Post → Depot → Station → Terminal — and
each upgrades the Office in place rather than replacing its card or its attached track. Modifiers
already beside it are preserved. Each tier adds an A/D track, a Porter, and an outbound and inbound
passenger slot; a Depot and above is a Control Point and a Passenger Facility.
An upgrade takes no placement: the Office is where it already is.
<!-- BEGIN CARDS: office -->
Upgrades are strictly sequential — no skipping a tier — so a Terminal needs all three cards in
order. Green slots are outbound passengers, red are inbound, and the design gives slots **equal**
to Porters rather than one more.
| Office | Control point | Passenger facility | A/D tracks | Porters | Green | Red |
| --- | :---: | :---: | ---: | ---: | ---: | ---: |
| Whistle Post | — | — | 1 | 0 | 0 | 0 |
| Depot | yes | yes | 2 | 1 | 1 | 1 |
| Station | yes | yes | 3 | 2 | 2 | 2 |
| Terminal | yes | yes | 4 | 3 | 3 | 3 |
Whistle Posts are a fixed supply of 4 outside the deck, and Limits signs a
supply of 8.
<!-- END CARDS: office -->
## Freight facilities
An industry is placed on a connected straight **stub off the Running Track** — never on the Running
Track itself, and never outside the Limits. A Facility carries its own rails, so placing one places
track.
**It may also be built over a straight already laid**, in the same way a turnout may upgrade one, so
rail can go down before the industry that will serve it. Only a plain straight may be built over: a
Facility carries east–west track, so replacing a straight cannot break a neighbour's connection,
while a curve or a turnout carries rails the Facility does not. The square must be clear of standing
cars and carry no Enhancement — the replaced card leaves play.
Each begins with one Laborer and a three-box **MEN | AT | WORK** pipeline. No Office Area may hold a
duplicate industry, or both ends of a lockout pair — a producer and the consumer of the same
commodity cannot be built in one district.
**An industry track holds four cars, like any other card.** It is *not* sized by the industry's box
count. That distinction was a real bug: box count is how much WORK an industry can hold, not how
much RAIL it has, and conflating the two invented a printed siding no industry card carries.
<!-- BEGIN CARDS: facilities -->
Each lists the car types it works, which way its traffic flows, and the industries it may not sit
beside. **Every lockout pair is a producer and the consumer of the same commodity** — you may
build one end of a chain or the other, never both, which is what forces traffic to run between
districts rather than in circles inside one. No two of the same industry may share an Office Area,
and that rule is enforced for every kind rather than repeated in each row.
| Industry | Cars | Flow | Green | Red | Laborers | Locked out with |
| --- | --- | --- | ---: | ---: | ---: | --- |
| Freight House | boxcar | both | 1 | 1 | 1 | Grocer's Warehouse |
| Mine Tipple | hopper | outbound | 1 | 0 | 1 | Power Plant |
| Refinery | tank | outbound | 1 | 0 | 1 | Power Plant |
| Power Plant | hopper, tank | inbound | 0 | 1 | 1 | Mine Tipple, Refinery |
| Packing Sheds | reefer | outbound | 1 | 0 | 1 | Grocer's Warehouse |
| Grocer's Warehouse | boxcar, reefer | inbound | 0 | 1 | 1 | Packing Sheds, Freight House |
<!-- END CARDS: facilities -->
## Facility modifiers
A Modifier sits on an empty square **square against its host Facility — north, south, east or
west**. It may not go on a diagonal: touching at a corner is not touching. It must be **inside your
Limits**, like everything else, and may not stand in the Running Track row. One of each kind per
Office Area.
**A Modifier adds a BOX, never room for a car.** A Truck Dock beside a Grocer's Warehouse gives it a
second red box — somewhere for one more arriving load to be cleared to — and changes nothing about
how many cars may be spotted there.
**A passenger Modifier needs a Passenger Facility.** A Waiting Area, Restaurant or Hotel may not be
played at an Office that is still a **Whistle Post** — a Whistle Post is not a Passenger Facility, so
there is nothing for the card to add to. Upgrade the Office to a **Depot** or better first.
**A grant the host cannot use does nothing**, and the game says so rather than pretending. An
outbound bonus beside an inbound-only facility, or the Truck Dock's inbound bonus beside the
outbound-only Packing Sheds, is discarded — the latter leaving that card with no effect at all.
<!-- BEGIN CARDS: modifiers -->
Each sits beside a host and raises one of its capacities. `office` as a host means any Passenger
Facility — so a modifier that adds a green slot to an Office adds nothing to a Whistle Post, which
is not one.
| Modifier | Hosts | +Green | +Red | +Laborers | +Porters |
| --- | --- | ---: | ---: | ---: | ---: |
| Waiting area | any Passenger Facility | 1 | — | — | 1 |
| Restaurant | any Passenger Facility | 1 | — | — | 1 |
| Hotel | any Passenger Facility | 1 | — | — | 1 |
| Truck dock | Freight House, Packing Sheds, Grocer's Warehouse | — | 1 | — | — |
| Railroad Express Agency | Freight House | 1 | — | 1 | — |
| Forklifts | Freight House, Packing Sheds | 1 | — | 1 | — |
| Prep Plant | Mine Tipple | 1 | — | 1 | — |
| Coal Piles | Mine Tipple | 1 | — | 1 | — |
| Conveyor Belts | Mine Tipple | 1 | — | 1 | — |
| Pipelines | Refinery | 1 | — | 1 | — |
| Oil Depot | Refinery | 1 | — | 1 | — |
| Viscosity breakers | Refinery | 1 | — | 1 | — |
| Transmission lines | Power Plant | — | — | 1 | — |
| Rotary Dumps | Power Plant | — | — | 1 | — |
| Steam Turbines | Power Plant | — | — | 1 | — |
| Ice House | Packing Sheds, Grocer's Warehouse | 1 | — | 1 | — |
| Local small groceries | Grocer's Warehouse | — | — | 1 | — |
<!-- END CARDS: modifiers -->
## Train cards
Playing a **timetabled** train rolls the seeded D12 and puts its number in the first open timetable
slot at or after the result, wrapping around the 12-slot chart. It then runs at that Stage **every
Day**.
Playing an **Extra** queues it; it is made up when a Crew Tray comes free, and **the player who
played the card chooses where it starts and loads it as they choose** (§7). Where it may start is a
house rule — `divisionPointsOnly`, `ownOffice`, or `anyOffice` (the default) — and the Interchange is
also available, because it is the one Mainline card with a yard. An Extra runs once and its card
goes to the Salvage Yard.
The listed consist is a **maximum, not a minimum**. A train may depart with fewer cars, but not with
more, not of the wrong category, not with a car behind the caboose, and not with the engine buried
among its own cars. A Crew Tray holds four pieces, and a caboose counts toward the four.
A train made up short of what its card calls for is reported as such, with what it wanted and why
the yard could not supply it — see Rules §4.4.
**Per-train consists and printed rules are in the table under § Train cards below.** It
carries the `empties only`, `reefers only`, `drop only` and `pick up empties only` restrictions,
every one of which the engine enforces.
<!-- BEGIN CARDS: trains -->
### Timetabled
| # | Class | Speed | Runs | Consist | Printed rules |
| ---: | --- | --- | --- | --- | --- |
| 1 | Crack Limited | fast | west | 2 coaches (2 pieces) | terminals only; no switching; expedite; *"Stop at Terminals only."* |
| 2 | Crack Limited | fast | east | 2 coaches (2 pieces) | terminals only; no switching; expedite; *"Stop at Terminals only."* |
| 3 | Express | fast | west | 2 freight (2 pieces) | one freight per location; expedite; *"May drop or pick up one freight car at every location."* |
| 4 | Express | fast | east | 2 freight (2 pieces) | one freight per location; expedite; *"May drop or pick up one freight car at every location."* |
| 5 | The Sparrow | fast | west | 3 coaches (3 pieces) | no switching; expedite |
| 6 | The Sparrow | fast | east | 3 coaches (3 pieces) | no switching; expedite |
| 7 | Local | slow | west | 1 freight + 1 coach (2 pieces) | coach stays on station track; *"Maximum one freight, one coach."* |
| 8 | Local | slow | east | 1 freight + 1 coach (2 pieces) | coach stays on station track; *"Maximum one freight, one coach."* |
| 9 | Heavy Freight | slow | west | 3 freight + 1 caboose (4 pieces) | — |
| 10 | Heavy Freight | slow | east | 3 freight + 1 caboose (4 pieces) | — |
| 11 | Drag Freight | slow | west | 2 freight + 1 caboose (3 pieces) | — |
| 12 | Drag Freight | slow | east | 2 freight + 1 caboose (3 pieces) | — |
### Extras
| # | Class | Speed | Runs | Consist | Printed rules |
| ---: | --- | --- | --- | --- | --- |
| X13 | Appleseed Extra | slow | player's choice | 3 freight + 1 caboose (4 pieces), empties only | drop only; *"May drop MTs but not pick up anything."* |
| X14 | Fruit Growers Express | fast | player's choice | 2 reefers + 1 caboose (3 pieces) | expedite; *"Reefers only. May pick up one extra loaded reefer."* |
| X15 | Yard Xfer | slow | player's choice | 2 freight + 1 caboose (3 pieces) | — |
| X16 | Light Engine Move | fast | player's choice | engine only | no switching; *"No cars at all."* |
| X17 | Campaign Train | fast | player's choice | 1 coach (1 piece) | no switching; stop then expedite; stop earns point; must run loaded; *"One turn at station (speeches) then expedite. Earns a point per Office Area if the candidate is aboard."* |
| X18 | Circus Train | slow | player's choice | 2 freight + 1 coach + 1 caboose (4 pieces) | no switching; stop earns point; must run loaded; *"One turn stopped in an Office Area (circus set-up) earns 1 point, once per Area, if fully loaded."* |
| X19 | Military Train | slow | player's choice | 1 freight + 2 coaches (3 pieces) | no switching; no passenger work; expedite; must run loaded; *"Troops and materiel: runs loaded where the yard can supply it."* |
| X20 | Director's private car | slow | player's choice | 2 freight + 1 coach (3 pieces) | no passenger work |
| X21 | Freight Extra | slow | player's choice | 3 freight + 1 caboose (4 pieces) | — |
| X22 | Pee-Dee | slow | player's choice | 1 caboose (1 piece) | pick up empties only; *"Per-diem train. May only pick up MTs."* |
<!-- END CARDS: trains -->
## Enhancements, Mainline modifiers and Maneuvers
- **Enhancements** are played into your district and change what a square does — the **Small Yard**
(re-order a consist for one Move), **Interlocking**, **Yard Office** and the rest. The table below
marks each one `live`, `dormantSolo` or `unbuilt`, which is the part only the implementation
knows.
- **ABS Signals is the exception, and it matters.** It is dealt as an Enhancement but is **not
played into your district**: it goes onto a **Mainline card** — any one of them — and stops
trains there rear-ending each other. It takes no square and is not part of anybody's Office
Area. See [Mainline deck](mainline-deck.md).
- **Mainline modifiers** are played onto a Mainline card: the Heavy Grade helpers and Realignment.
See [Mainline deck](mainline-deck.md).
- **Maneuvers** are held and spent: **Red Flags** and **Flying Switch** have their own actions.
Poling is catalogued but its effect is recorded as "TBD in the source", so there is nothing to
implement.
<!-- BEGIN CARDS: enhancements -->
The column that only the implementation can fill in: **whether the printed effect actually
resolves yet.** `live` is read during play; `dormantSolo` is implemented at the point of attack
but the attack is an opponent-directed card held out of every deck, so nothing reaches it in a
solitaire game; `unbuilt` means the effect is recorded and nothing reads it. A transcription
cannot carry this column, which is the argument for generating the page rather than writing it.
| Enhancement | Placement | Requires | Effect resolves |
| --- | --- | --- | :---: |
| Interlocking | runningTrackStraight | — | **live** |
| Facing Point Locks | onCard | interlocking in the district | **dormantSolo** |
| Yard Office | secondaryTrackStraight | — | **live** |
| Small Yard | secondaryTrackStraight | — | **live** |
| Water Column | runningTrackStraight | — | **dormantSolo** |
| Overpass | onCard | — | **unbuilt** |
| Telegraph | runningTrackStraight | — | **live** |
| Telephone | onCard | telegraph on the same card | **live** |
| Radio | onCard | telephone on the same card | **live** |
| ABS Signals | mainlineCard | — | **live** |
<!-- END CARDS: enhancements -->
## Opponent-directed cards — not dealt
The **Action** and **Space-use** categories are opponent-directed and are **excluded from every
dealt deck**, because their play rules are not implemented. They are catalogued in
the table below so the composition is on record, and `check` refuses to play one. This is deliberate:
silently accepting them would make a card look playable while doing nothing.
<!-- BEGIN CARDS: opponent -->
**None of these is dealt in any deck today.** A card that can only be played at another player
has no legal target in a solitaire game, and a defence with nothing to defend against is as dead
a draw as the attack — so both halves are held out until the attacks are implemented. They are
listed because they are the design, and because what a defence answers is the only record of why
it exists.
### Action cards — opponent-directed
| Card | Played on | Effect | Answers |
| --- | --- | --- | --- |
| Derail | a moving train in the Local Phase | That train must stop for the remainder of the turn. | — |
| Broken coupler | a moving train in the Mainline Phase | That train must stop and not move. | — |
| Railroad crossing | any Secondary Track Straight | May not be used as a stop point for switching. May not become an Industry. | — |
| Per Diem inventory | another player | Lose one point per 2 empty cars on Secondary Tracks. | — |
| Demurrage charge | another player | Lose one point per 2 loaded freight cars on Secondary Tracks. | — |
| Customer complaints | another player | Lose one point per 2 coaches in loading boxes. | — |
| Vandalism | another player | A train passing a Hobo Jungle has a boxcar looted (converted to empty). | — |
| Hotbox | another player | A train just arrived must set one car (chooser’s pick) onto Secondary Track until it departs. | — |
| Outlawed | another player | A train just arrived may not depart for one turn — the crew’s hours have expired. | — |
### Space-use cards — opponent-directed
| Card | Played on | Effect | Answers |
| --- | --- | --- | --- |
| Bean house | adjacent to any straight, curve, turnout, Limit | Burns tablespace. | — |
| Flop house | adjacent to any straight, curve, turnout | Burns tablespace. | — |
| Watertower | adjacent to any straight, turnout on Running Track | Burns tablespace. | — |
| Hobo Jungle | adjacent to any straight, turnout, Limit on Running Track | Burns tablespace. Vandalism can loot a boxcar passing it. | — |
| Section House | adjacent to any straight, curve, turnout | Burns tablespace. | — |
| City blocks | adjacent to any straight, curve, turnout, Limit | Burns tablespace. | — |
| Engine Shops | adjacent to any straight, curve, turnout | Burns tablespace. | — |
| Tenderloin District | adjacent to any straight, curve, turnout, Limit | Burns tablespace. | — |
| Engineer cemetery | adjacent to any straight, curve, turnout, Limit | Burns tablespace. | — |
### Maneuver cards
| Card | Played on | Effect | Answers |
| --- | --- | --- | --- |
| Red Flags | any time | A stopped train is prevented from being hit; the approaching train is prevented from moving. | — |
| Flying Switch | any time | Break a cut of cars away from behind the engine and roll them into an industry. | — |
| Poling | any time | TBD in the source. | — |
Mainline modifier cards, for completeness — these ARE dealt:
| Card | Played on | Effect | Answers |
| --- | --- | --- | --- |
| Brakeman | a GRADE Mainline card | Faster passage downhill. | — |
| Airbrakes | a GRADE Mainline card | Faster passage downhill. Brakeman must be in effect. | — |
| Helpers | a GRADE Mainline card | Faster passage uphill. | — |
| Realignment | a Mainline card | Convert one Mainline type to another. Not while a train is on it. | — |
| Facing Point Locks | adjacent to Interlocking | Prevents Derail being played on you. | Derail |
<!-- END CARDS: opponent -->
## The Second Section card
**Ordering a Second Section costs the card.** Played on a train that is **due out this Stage**, it
sends a second, identical train out right behind the first. That second train needs a Crew Tray of
its own, so there has to be one free.
It is the one card that deliberately creates the **following-train** situation §8.1 makes the
Superintendent rule on — so playing it is choosing to put that question to them.
One copy in the deck, spent when it is played.
## Trains that pay for stopping
Two Extras pay for **standing still** rather than for running: the **Circus Train** (X18) and the
**Campaign Train** (X17). Their card is worth nothing if it is run like an ordinary train.
Three conditions, all of them required:
- **Stopped.** The train spent a whole Mainline Phase without moving. Switching around inside a
district does not break it — what breaks it is leaving before a Mainline Phase passes.
- **In an Office Area.** Any square in a player's district. Standing on the Mainline or at a
Division Point pays nothing. A **Whistle Post district counts** — the rule is about the area, not
the Office's tier.
- **Fully loaded.** Every car except the caboose is carrying something. A train made up short, or
carrying an empty, earns nothing however long it stands.
**One point per district**, and the point goes to whoever sits in the district it stopped in. A
Circus touring three districts is paid three times; one parked in the same district all game is paid
once. Neither train may switch, so it cannot load itself — it must be made up loaded before it goes.
## The Office you start on
Every district opens on a **Depot** unless the table chooses otherwise. A Depot has two A/D tracks
and is a Passenger Facility, so passengers earn from the first Stage and a second train can stand at
an Office without wrecking.
**"Players start with Whistle Posts, not Depots"** is the harder game, set when the game is created.
A Whistle Post has **one** A/D track and is not a Passenger Facility: no passenger earns anything
until somebody draws and plays a Depot upgrade, and a second train arriving is a collision unless an
Interlocking holds it at the Limits until the track frees.
The deck follows the choice. Starting on Depots, the **Depot upgrade cards are left out** — an
upgrade must be to the next tier up, so a Depot card at a table that already has Depots is a dead
draw. Station and Terminal are still upgrades and stay in.
## What a train may pick up
Coupling is mandatory, so a train forbidden to pick cars up may not make the move that would pick
them up — there is no "move but leave them". A square the rails reach but the train's card forbids
is shown as blocked, with the rule that forbids it.
**A train may always recover its own caboose.** A caboose at the far end is what makes a train
ready to leave, so a card that says "may drop but not pick up anything" would otherwise let a train
strand itself for good the moment it set its caboose down.