Status: done (2026-11-10) Priority: 2 Size: S Arch: life Phase: implement Design ref: Vision and scope (Which pawn: Decided, 3 Nov); The player and what they see (After a death: Proposed, VB-079). Goal: When the player’s pawn dies, the player goes on with another (Decided, 3 Nov): among the pawn’s kin by blood or marriage, its household and its close ties, the heir first; if none is alive, any adult, and the break is recorded. Acceptance criteria:
Sim.successors(st, id): the living, in this order without repeats:
heirRanking, src/sim/heirs.js:19);kinDegree, src/sim/records.js:193), kin of any age;relationsOf, src/sim/relations.js:259, at most 150).Each entry has {id, why} (heir, son, wife’s brother, household, friend). The list is empty when none is alive. It reads no full list of pawns or records.
st.player keeps it, with an empty queue, until the player chooses; the world does not wait. The page pauses (page state) and offers the list, or any living adult when it is empty. The choice inhabits the successor with a player record event naming the link (“went on as the heir, Erik Olofsson”), or “a break in the line” when the list was empty.Implementation (10 Nov 2026): a death drops the pawn’s ties and opinions and ends its marriage, and its farm passes on, so what the succession needs is noted when the played pawn dies: playerDied (src/sim/commands.js, called by killPawn before those) empties the queue and sets st.player.left = {t, held, spouse, ties} (the household it held, its spouse, up to 12 of those it thought friends, opinion 0.25 and up, best first; Kim, 10 Nov). successors(st, id) and succeed(st, id) are in src/sim/opportunities.js (they need heirRanking, which loads after sim/commands); the write is goOnAs in sim/commands, the owner of st.player. Order: who holds the farm now and then heirRanking, as heir; kin by blood to civil degree 4, first cousins (Kim, 10 Nov), and by marriage (the spouse, the spouse’s kin to degree 2, the living spouses of its own kin to degree 2), nearest first, blood before marriage at a degree, then the oldest, each with its word (son, wife's brother, brother's wife; kin beyond the named ones); the household; the friends. At most 40. For a living pawn, or one the player does not play, the farm, spouse and friends are read as they are now. The chosen link is written to the dead pawn’s events (“The player went on as the heir, Erik Olofsson”, “… as its wife’s brother, …”, “A break in the line: the player went on as …”), and the successor gets “Played by the player”. With successors alive only they may be chosen; with none, any living adult. Page: offerSuccession (src/page/play.js, each frame, the list read twice a second) pauses once at the death and shows the list in a box; a successor’s card, or any adult’s when the list is empty, offers “Go on as”.
Impact note: one new state field, st.player.left, written only in sim/commands, saved with the player (older saves load with null); invariants in tests/lib/invariants.js. New coupling: sim/lifecycle’s killPawn calls sim/commands’ playerDied; sim/commands reads sim/relations for the friends. No new module.
Cost: playerDied is one comparison a death unless the played pawn dies. successors is asked by the page only, while a choice is open: it walks the pawn’s ancestors to 4 generations and their descendants within degree 4, one heir ranking, the household and at most 12 ties; no list of all pawns or records.
Not built: kin through a spouse who died before the pawn (the union has ended, and finding it would scan the unions); a pawn the player leaves by choice has no succession.
Validation (10 Nov 2026): npm run verify passes (99 scripts), with the new tests/succession.js (the heir first; kin by blood and by marriage with their links, nearest first; friends last; an empty list gives a break; saved and loaded; another pawn’s death is the same with a player as without). Golden file: the behaviour entries are unchanged; apiKeys: Sim changes, for Sim.successors and Sim.succeed. tests/browser.js kills the played holder from the debug drawer, sees the page pause and offer the heir first, and goes on as it. No numbers before and after: with no player a run is unchanged.