Files
TheLadder/content/frontier/events/routine.js
T
JesseMarkowitzandClaude Opus 5 112e558dbb Fix repayments that overcharged, and act on the first Frontier playtest
A debt repayment took its whole instalment even when less was owed: four
dollars owed at the store cost twenty. Content could not express "pay what is
owed", so an add effect's amount may now be read from state, with a cap. Five
repayments across both packs use it, and a conformance test holds every pack to
it. The turn record now says which options were hidden, so the analyser stops
counting doors nobody saw, and it reads only feedback logs.

From the same session: wages are labelled as wages, a clamped change says where
it stopped, two unreadable option labels are rewritten, the sale barn no longer
offers what the player already owns, Ward hints at what the promotion waits for,
and the office has five more events. DECISIONS #38-40.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C6UDQ9o6L6Ey173U7XVou6
2026-09-15 10:23:15 -04:00

433 lines
16 KiB
JavaScript
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.
// Ordinary days in the yard.
//
// `stage_day`, `ridge_road` and `yard_work` carry no conditions, no cooldown
// and no `once`, which makes them this stage's floor: whatever else is
// excluded, there is always a turn to play.
//
// Note what the ungated options give. Corporate Ladder put four of its best
// negotiation gains behind a negotiation gate, and its logs show players
// bouncing off that wall for thirty turns. Every gate in this pack has ungated
// repeatable growth underneath it — see DECISIONS.md #32.
export const routine = [
{
id: 'first_morning',
stage: 'hand',
weight: 99999,
once: true,
description:
'Hollis Vane looks at your hands rather than your face, says the pay is ' +
'twenty-four dollars a run, the room at the Cordwood is eight and the ' +
'feed is what it is, and lets you do that arithmetic yourself. Dutch ' +
'Rennels is already harnessing.',
options: [
{
id: 'ask_the_rate',
label: 'Ask what a man makes on top of the twenty-four.',
result:
'He says that depends entirely on you, and goes inside. It is the ' +
'most useful thing anybody tells you all week.',
effects: [
{ path: 'skills.trade', op: 'add', value: 3 },
{ path: 'relationships.hollis.trusts_you', op: 'add', value: 2 },
{ path: 'notable', op: 'push', value: 'Asked Vane what the work was really worth.' },
],
},
{
id: 'get_to_work',
label: 'Say nothing and pick up a harness.',
result:
'Dutch watches you do it wrong, then watches you do it right, and ' +
'does not offer a word either time.',
effects: [
{ path: 'skills.nerve', op: 'add', value: 2 },
{ path: 'relationships.hollis.trusts_you', op: 'add', value: 4 },
{ path: 'relationships.dutch.wary_of_you', op: 'add', value: 3 },
],
},
{
id: 'ask_dutch',
label: 'Ask Dutch which of these animals bites.',
result:
'He tells you. He also tells you he has driven the Ridge road two ' +
'years, which is not an answer to the question you asked.',
effects: [
{ path: 'skills.trade', op: 'add', value: 1 },
{ path: 'relationships.dutch.trusts_you', op: 'add', value: 5 },
{ path: 'relationships.dutch.wary_of_you', op: 'add', value: -5 },
],
},
],
},
{
id: 'stage_day',
stage: 'hand',
weight: 100,
description:
'The stage is in and there are nine crates on the platform for a wagon ' +
'that holds seven. The driver wants to be gone inside the hour and is ' +
'saying so at length.',
options: [
{
id: 'two_trips',
label: 'Run it twice. Nobody has to know it took all day.',
result: 'It takes all day. Everybody knows.',
effects: [
{ path: 'money', op: 'add', value: 4 },
{ path: 'skills.trade', op: 'add', value: 2 },
{ path: 'relationships.hollis.trusts_you', op: 'add', value: 2 },
],
},
{
id: 'load_high',
label: 'Stack it high and rope it down.',
result:
'Seven crates and two more where a man would sit. It holds as far as ' +
'the creek crossing, which is farther than you expected.',
effects: [
{ path: 'money', op: 'add', value: 8 },
{ path: 'skills.nerve', op: 'add', value: 2 },
{ path: 'standing', op: 'add', value: -2 },
],
},
{
id: 'talk_the_driver',
label: 'Talk the driver into leaving two for the next stage.',
requires: [{ path: 'skills.trade', op: '>=', value: 12 }],
result:
'He leaves two. He also mentions your name at the far end of the ' +
'line, favourably, which you will not hear about for a month.',
effects: [
{ path: 'money', op: 'add', value: 6 },
{ path: 'skills.trade', op: 'add', value: 3 },
{ path: 'standing', op: 'add', value: 3 },
],
},
],
},
{
id: 'ridge_road',
stage: 'hand',
weight: 100,
description:
'A load for the Ridge camp, out and back in a day if the weather holds. ' +
'The last mile is the one with the bad turn on it, and everybody knows ' +
'which mile that is.',
options: [
{
id: 'drive_it',
label: 'Take it out yourself.',
result:
'The bad turn is exactly as advertised. You come back with the wagon ' +
'and the animals and most of your composure.',
effects: [
{ path: 'money', op: 'add', value: 9 },
{ path: 'skills.nerve', op: 'add', value: 3 },
{ path: 'relationships.hollis.trusts_you', op: 'add', value: 2 },
],
},
{
id: 'go_with_dutch',
label: 'Ask Dutch to take the reins and ride along.',
result:
'He drives it in silence and points at the bad turn without slowing. ' +
'You learn the road. You do not learn much else.',
effects: [
{ path: 'money', op: 'add', value: 4 },
{ path: 'skills.trade', op: 'add', value: 2 },
{ path: 'relationships.dutch.trusts_you', op: 'add', value: 4 },
{ path: 'relationships.dutch.owes_you', op: 'add', value: -2 },
],
},
{
id: 'take_the_gun',
label: 'Ask Hollis for the scattergun and go alone.',
requires: [{ path: 'skills.nerve', op: '>=', value: 12 }],
result:
'He hands it over without a word, which is the first time he has ' +
'agreed to anything you asked for.',
effects: [
{ path: 'money', op: 'add', value: 14 },
{ path: 'skills.nerve', op: 'add', value: 3 },
{ path: 'flags.carries_iron', op: 'set', value: true },
{ path: 'relationships.hollis.trusts_you', op: 'add', value: 5 },
{ path: 'standing', op: 'add', value: 2 },
],
},
],
},
{
id: 'yard_work',
stage: 'hand',
weight: 100,
description:
'No stage, no run, and a yard full of things that are nearly broken. ' +
'Hollis is in the office with the ledger and the door shut.',
options: [
{
id: 'mend_harness',
label: 'Mend the harness that keeps parting.',
result:
'You find where it parts. It is not where anybody has been mending ' +
'it, which explains the last two years.',
effects: [
{ path: 'skills.trade', op: 'add', value: 2 },
{ path: 'relationships.hollis.trusts_you', op: 'add', value: 3 },
{ path: 'relationships.dutch.wary_of_you', op: 'add', value: 2 },
],
},
{
id: 'shoe_the_team',
label: 'Walk the team down to the smith and stand for the bill.',
result:
'Eleven dollars of your own money on Vane’s animals. The smith ' +
'writes your name in his book, and so, eventually, does Vane.',
effects: [
{ path: 'money', op: 'add', value: -11 },
{ path: 'skills.trade', op: 'add', value: 2 },
{ path: 'relationships.hollis.owes_you', op: 'add', value: 12 },
{ path: 'relationships.hollis.trusts_you', op: 'add', value: 4 },
],
},
{
id: 'idle',
label: 'Sit in the shade until something needs doing.',
result:
'Nothing needs doing. It is the first hour of the week that has been ' +
'yours, and you notice it going.',
effects: [
{ path: 'skills.nerve', op: 'add', value: 1 },
{ path: 'relationships.hollis.trusts_you', op: 'add', value: -3 },
{ path: 'relationships.dutch.trusts_you', op: 'add', value: 2 },
],
},
],
},
{
id: 'broken_axle',
stage: 'hand',
weight: 55,
cooldown: 5,
description:
'The near wagon comes back with a cracked axle and a driver who says it ' +
'was cracked when he took it. Dutch says it was not.',
options: [
{
id: 'fix_it',
label: 'Get under it and put a splint on.',
result:
'It will hold for a season, which is longer than the last three ' +
'repairs on the same wagon.',
effects: [
{ path: 'money', op: 'add', value: 3 },
{ path: 'skills.trade', op: 'add', value: 3 },
{ path: 'relationships.hollis.trusts_you', op: 'add', value: 3 },
],
},
{
id: 'back_dutch',
label: 'Say Dutch is right, because Dutch is right.',
result:
'The driver takes it badly and the yard takes note. Dutch says ' +
'nothing, and writes something in his book.',
effects: [
{ path: 'standing', op: 'add', value: -3 },
{ path: 'skills.nerve', op: 'add', value: 2 },
{ path: 'relationships.dutch.trusts_you', op: 'add', value: 8 },
{ path: 'relationships.dutch.owes_you', op: 'add', value: 6 },
],
},
{
id: 'stay_out',
label: 'Stay out of it, and take neither side about the axle.',
result: 'Both of them decide, separately, that you are no use to them.',
effects: [
{ path: 'relationships.dutch.trusts_you', op: 'add', value: -4 },
{ path: 'relationships.hollis.trusts_you', op: 'add', value: -2 },
{ path: 'skills.trade', op: 'add', value: 1 },
],
},
],
},
{
id: 'the_store',
stage: 'hand',
weight: 60,
cooldown: 4,
description:
'Everything in Cold Fork that is not freight is in this one building, ' +
'and the book on the counter is where the town keeps its real accounts.',
options: [
{
id: 'buy_plain',
label: 'Buy what you need and pay for it.',
result: 'Coffee, a shirt, and a second blanket. The nights are turning.',
effects: [
{ path: 'money', op: 'add', value: -6 },
{ path: 'standing', op: 'add', value: 2 },
],
},
{
id: 'on_credit',
label: 'Put it on the book.',
result:
'He writes it without looking up. Being in the book is not a ' +
'disgrace here; being in it a long time is.',
effects: [
{ path: 'owed', op: 'add', value: 14 },
{ path: 'flags.owes_the_store', op: 'set', value: true },
{ path: 'standing', op: 'add', value: -1 },
],
},
{
id: 'haggle',
label: 'Argue the price of the coffee on principle.',
result:
'You win eleven cents and an hour of your life goes into it. He ' +
'enjoys it more than you do, and remembers you afterwards.',
effects: [
{ path: 'money', op: 'add', value: -4 },
{ path: 'skills.trade', op: 'add', value: 3 },
{ path: 'standing', op: 'add', value: 1 },
],
},
{
id: 'pay_down',
label: 'Pay the book down, up to twenty dollars.',
// Hidden rather than greyed out when there is nothing owed. A locked
// door is worth showing when it is a door the player could open later
// by playing differently; "pay down what you owe" shown to a man who
// owes nothing is not that. It was the most-locked option in a real
// 181-turn session, six times, and told the player nothing each time.
whenLocked: 'hide',
requires: [
{ path: 'owed', op: '>', value: 0 },
{ path: 'money', op: '>=', value: 20 },
],
result: 'He crosses a line through it and turns the page back over.',
// What is owed, up to twenty, and never more. A flat -20 against a
// four-dollar balance took sixteen dollars for nothing in a real
// session. Money comes first: both effects read `owed` before it moves.
// See DECISIONS #38.
effects: [
{ path: 'money', op: 'add', value: { from: 'owed', times: -1, cap: 20 } },
{ path: 'owed', op: 'add', value: { from: 'owed', times: -1, cap: 20 } },
{ path: 'standing', op: 'add', value: 2 },
],
},
],
},
{
id: 'weather',
stage: 'hand',
weight: 45,
cooldown: 6,
description:
'It has been raining since the small hours and the creek crossing is ' +
'four feet up. There is a load for the camp that was wanted yesterday.',
options: [
{
id: 'wait_it_out',
label: 'Nothing moves today.',
result:
'The creek is down by evening and the camp waits a day. It is the ' +
'right call, which is not the same as a popular one.',
effects: [
{ path: 'skills.trade', op: 'add', value: 2 },
{ path: 'relationships.hollis.trusts_you', op: 'add', value: -2 },
{ path: 'standing', op: 'add', value: 1 },
],
},
{
id: 'ford_it',
label: 'Ford it.',
result:
'The wagon floats for about six feet, which is six feet more than a ' +
'wagon should. The load gets there wet and on time.',
effects: [
{ path: 'money', op: 'add', value: 16 },
{ path: 'skills.nerve', op: 'add', value: 4 },
{ path: 'standing', op: 'add', value: 3 },
{ path: 'relationships.dutch.wary_of_you', op: 'add', value: 6 },
],
},
{
id: 'long_way',
label: 'Take the long road round the head of the creek.',
requires: [{ path: 'skills.trade', op: '>=', value: 12 }],
result:
'Eleven extra miles and a dry load. Dutch did not know that road was ' +
'passable, and now has to know that you did.',
effects: [
{ path: 'money', op: 'add', value: 11 },
{ path: 'skills.trade', op: 'add', value: 2 },
{ path: 'relationships.hollis.trusts_you', op: 'add', value: 4 },
{ path: 'relationships.dutch.wary_of_you', op: 'add', value: 4 },
],
},
],
},
{
id: 'road_agents',
stage: 'hand',
weight: 30,
cooldown: 8,
requires: [{ path: 'turn', op: '>=', value: 8 }],
description:
'Two riders come out of the rocks a mile short of the camp and sit their ' +
'horses across the road. Neither of them looks like he has done this ' +
'often enough to be calm about it.',
options: [
{
id: 'hand_it_over',
label: 'Give them the box and remember the horses.',
result:
'They take it and go. You give Marshal Ward a description of two ' +
'horses that is better than anything he has had in a year.',
effects: [
{ path: 'money', op: 'add', value: -8 },
{ path: 'skills.nerve', op: 'add', value: 2 },
{ path: 'relationships.ward.trusts_you', op: 'add', value: 8 },
{ path: 'notable', op: 'push', value: 'Was stopped on the Ridge road, and gave Ward the horses.' },
],
},
{
id: 'talk_them_down',
label: 'Tell them what is actually in the box.',
result:
'It is a crate of hinges and forty pounds of nails. The older one ' +
'laughs. They let you by, which is worse for them than it is for you.',
effects: [
{ path: 'skills.trade', op: 'add', value: 4 },
{ path: 'standing', op: 'add', value: 4 },
{ path: 'notable', op: 'push', value: 'Talked two road agents out of a crate of hinges.' },
],
},
{
id: 'bring_it_up',
label: 'Bring the scattergun up off the floorboards.',
requires: [{ path: 'flags.carries_iron', op: '==', value: true }],
result:
'Nobody fires. They go back into the rocks and the story is around ' +
'Cold Fork before the wagon is.',
effects: [
{ path: 'skills.nerve', op: 'add', value: 5 },
{ path: 'standing', op: 'add', value: 8 },
{ path: 'relationships.ward.trusts_you', op: 'add', value: 6 },
{ path: 'relationships.dutch.wary_of_you', op: 'add', value: 8 },
{ path: 'notable', op: 'push', value: 'Brought the scattergun up on the Ridge road.' },
],
},
],
},
];
export default routine;