@dreadwood-types/types 0.1.53 → 0.1.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bloodMire.d.ts +47 -0
- package/dist/bloodMire.d.ts.map +1 -0
- package/dist/bloodMire.js +67 -0
- package/dist/bloodMire.js.map +1 -0
- package/dist/constants.d.ts +7 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +22 -0
- package/dist/constants.js.map +1 -1
- package/dist/dreadwoodsZones.d.ts +1 -1
- package/dist/dreadwoodsZones.d.ts.map +1 -1
- package/dist/dreadwoodsZones.js +34 -0
- package/dist/dreadwoodsZones.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/messages.d.ts +32 -0
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js.map +1 -1
- package/dist/quests.d.ts +19 -8
- package/dist/quests.d.ts.map +1 -1
- package/dist/quests.js +88 -8
- package/dist/quests.js.map +1 -1
- package/dist/rotwoodGrove.d.ts +40 -0
- package/dist/rotwoodGrove.d.ts.map +1 -0
- package/dist/rotwoodGrove.js +43 -0
- package/dist/rotwoodGrove.js.map +1 -0
- package/dist/storyPlaces.d.ts +78 -0
- package/dist/storyPlaces.d.ts.map +1 -0
- package/dist/storyPlaces.js +46 -0
- package/dist/storyPlaces.js.map +1 -0
- package/dist/storyQuests.d.ts +224 -0
- package/dist/storyQuests.d.ts.map +1 -0
- package/dist/storyQuests.js +482 -0
- package/dist/storyQuests.js.map +1 -0
- package/dist/travel.d.ts +16 -1
- package/dist/travel.d.ts.map +1 -1
- package/dist/travel.js +27 -3
- package/dist/travel.js.map +1 -1
- package/dist/woodwork.d.ts +4 -4
- package/dist/woodwork.d.ts.map +1 -1
- package/dist/woodwork.js +4 -4
- package/dist/woodwork.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* STORY QUESTS (James, 2026-09-26): the quests after the first dozen are data,
|
|
3
|
+
* not hand-written handlers. A quest is a giver, an optional gate ("I don't
|
|
4
|
+
* trust strangers" until you have helped Anne), what the giver hands you when
|
|
5
|
+
* you accept, and a list of steps; the backend's storyQuests.ts runs every
|
|
6
|
+
* one of them the same way, and the client draws the journal card from the
|
|
7
|
+
* same list. Adding a quest is one entry in STORY_QUESTS plus whatever NPCs
|
|
8
|
+
* and props it needs in the world.
|
|
9
|
+
*
|
|
10
|
+
* The design sheets are in the backend's design-references, one per quest
|
|
11
|
+
* (`quest-fredsletter`, `quest-wilsonbigcatch`, ...).
|
|
12
|
+
*
|
|
13
|
+
* Rewards are deliberately large next to the first quests: Explorer has no
|
|
14
|
+
* repeatable source beyond discoveries (33 XP), so quests are how it levels.
|
|
15
|
+
* A `choiceXp` reward is a lump the player puts into any skill they pick,
|
|
16
|
+
* from a picker that stays open (and is saved) until they choose.
|
|
17
|
+
*/
|
|
18
|
+
export const STORY_SKILLS = [
|
|
19
|
+
'strength',
|
|
20
|
+
'archery',
|
|
21
|
+
'precision',
|
|
22
|
+
'fishing',
|
|
23
|
+
'cooking',
|
|
24
|
+
'foraging',
|
|
25
|
+
'woodwork',
|
|
26
|
+
'mining',
|
|
27
|
+
'blacksmithing',
|
|
28
|
+
'explorer',
|
|
29
|
+
];
|
|
30
|
+
export const STORY_COMBAT_SKILLS = ['strength', 'archery', 'precision'];
|
|
31
|
+
export const STORY_SKILL_NAMES = {
|
|
32
|
+
strength: 'Strength',
|
|
33
|
+
archery: 'Archery',
|
|
34
|
+
precision: 'Mastery',
|
|
35
|
+
fishing: 'Fishing',
|
|
36
|
+
cooking: 'Cooking',
|
|
37
|
+
foraging: 'Foraging',
|
|
38
|
+
woodwork: 'Woodwork',
|
|
39
|
+
mining: 'Mining',
|
|
40
|
+
blacksmithing: 'Blacksmithing',
|
|
41
|
+
explorer: 'Explorer',
|
|
42
|
+
};
|
|
43
|
+
export function isStorySkill(value) {
|
|
44
|
+
return typeof value === 'string' && STORY_SKILLS.includes(value);
|
|
45
|
+
}
|
|
46
|
+
export const STORY_QUEST_IDS = [
|
|
47
|
+
'fredsLetter',
|
|
48
|
+
'beagleBirthday',
|
|
49
|
+
'wilsonBigCatch',
|
|
50
|
+
'smithsApprentice',
|
|
51
|
+
'spiderHollowEggs',
|
|
52
|
+
'harbourThief',
|
|
53
|
+
'coldFeet',
|
|
54
|
+
'livoniasDiary',
|
|
55
|
+
'charcoalBurner',
|
|
56
|
+
];
|
|
57
|
+
/** The npc_action id for a story choice. */
|
|
58
|
+
export const STORY_CHOICE_PREFIX = 'story:';
|
|
59
|
+
export function storyChoiceAction(quest, option) {
|
|
60
|
+
return `${STORY_CHOICE_PREFIX}${quest}:${option}`;
|
|
61
|
+
}
|
|
62
|
+
export function parseStoryChoiceAction(action) {
|
|
63
|
+
if (!action.startsWith(STORY_CHOICE_PREFIX))
|
|
64
|
+
return null;
|
|
65
|
+
const [quest, option] = action.slice(STORY_CHOICE_PREFIX.length).split(':');
|
|
66
|
+
if (!isStoryQuestId(quest) || !option)
|
|
67
|
+
return null;
|
|
68
|
+
return { quest, option };
|
|
69
|
+
}
|
|
70
|
+
export function isStoryQuestId(value) {
|
|
71
|
+
return typeof value === 'string' && STORY_QUEST_IDS.includes(value);
|
|
72
|
+
}
|
|
73
|
+
// ---- Items the story quests add -------------------------------------------
|
|
74
|
+
export const FREDS_LETTER_KIND = 'fredsletter';
|
|
75
|
+
export const BOAT_TICKET_KIND = 'boatticket';
|
|
76
|
+
export const TROPHY_TROUT_KIND = 'trophytrout';
|
|
77
|
+
export const LIVONIA_PAGE_KIND = 'livoniapage';
|
|
78
|
+
export const STORY_ITEM_KINDS = [FREDS_LETTER_KIND, BOAT_TICKET_KIND, TROPHY_TROUT_KIND, LIVONIA_PAGE_KIND];
|
|
79
|
+
/** The Blender model a quest prop draws with (CAPITAL_BUILDING_MODELS), from its style's prop. */
|
|
80
|
+
export function questPropModel(style) {
|
|
81
|
+
const prop = (style ?? '').split(':')[0];
|
|
82
|
+
if (prop === 'spideregg')
|
|
83
|
+
return 'questeggsac';
|
|
84
|
+
if (prop === 'clue')
|
|
85
|
+
return 'questclue';
|
|
86
|
+
if (prop === 'beacon')
|
|
87
|
+
return 'questbeacon';
|
|
88
|
+
return 'questdiarypage';
|
|
89
|
+
}
|
|
90
|
+
/** The world entity a `touch` step counts. Its style is `<prop>:<which>`, e.g. `spideregg:3`. */
|
|
91
|
+
export const QUEST_PROP_KIND = 'questprop';
|
|
92
|
+
// ---- The NPCs -------------------------------------------------------------
|
|
93
|
+
export const FRED = { kind: 'fred', name: 'Fred' };
|
|
94
|
+
/** Rimdel after his escape: a clerk at the Grand Exchange. The prisoner keeps the id `rimdel`. */
|
|
95
|
+
export const CAPITAL_RIMDEL_ID = 'rimdel-capital';
|
|
96
|
+
export const CAPITAL_RIMDEL = { kind: 'rimdel', id: CAPITAL_RIMDEL_ID, name: 'Rimdel' };
|
|
97
|
+
export const FORBES = { kind: 'forbes', name: 'Forbes' };
|
|
98
|
+
export const WILSON = { kind: 'wilson', name: 'Wilson' };
|
|
99
|
+
export const HALDREN = { kind: 'haldren', name: 'Master Haldren' };
|
|
100
|
+
export const TOBIN = { kind: 'worriedfarmer', name: 'Farmer Tobin' };
|
|
101
|
+
export const MARLOW = { kind: 'harbourmaster', name: 'Marlow' };
|
|
102
|
+
/** Wears the Castle Guard's steel, but is his own kind: a guard is attackable, and a click on Crane must talk. */
|
|
103
|
+
export const CRANE = { kind: 'harbourguard', name: 'Sergeant Crane' };
|
|
104
|
+
export const EXPLORER = { kind: 'strandedexplorer', name: 'Hallvard' };
|
|
105
|
+
export const SCHOLAR = { kind: 'capitalscholar', name: 'Scholar Aldous' };
|
|
106
|
+
export const BURNER = { kind: 'charcoalburner', name: 'Old Cole' };
|
|
107
|
+
/** Every kind a story quest adds to the world, for the NpcKind union and the name table. */
|
|
108
|
+
export const STORY_NPC_NAMES = {
|
|
109
|
+
fred: FRED.name,
|
|
110
|
+
haldren: HALDREN.name,
|
|
111
|
+
worriedfarmer: TOBIN.name,
|
|
112
|
+
strandedexplorer: EXPLORER.name,
|
|
113
|
+
capitalscholar: SCHOLAR.name,
|
|
114
|
+
charcoalburner: BURNER.name,
|
|
115
|
+
harbourguard: CRANE.name,
|
|
116
|
+
};
|
|
117
|
+
const COOKED_FISH = ['cookedperch', 'cookedtench', 'cookedtrout', 'cookedbass', 'cookedfrostpike'];
|
|
118
|
+
const ANY_LOG = ['birchwood', 'poplarwood', 'pinewood', 'sprucewood', 'ashwood'];
|
|
119
|
+
// ---- The quests -----------------------------------------------------------
|
|
120
|
+
export const STORY_QUESTS = {
|
|
121
|
+
fredsLetter: {
|
|
122
|
+
giver: FRED,
|
|
123
|
+
requires: {
|
|
124
|
+
quest: 'anneFoxes',
|
|
125
|
+
refuse: "I don't talk to strangers. You could be anyone. Go on, off my step.",
|
|
126
|
+
},
|
|
127
|
+
offer: "Anne's told me so much about you, the foxes and all. Would you take a letter to the Capital for me? The ticket's on me.",
|
|
128
|
+
accept: "Bless you. Here's the ticket for Branson's boat, and the letter. It's for Rimdel, at the Grand Exchange. Don't you go reading it.",
|
|
129
|
+
decline: "Suit yourself. It's kept this long.",
|
|
130
|
+
onAccept: [
|
|
131
|
+
{ kind: BOAT_TICKET_KIND, qty: 1 },
|
|
132
|
+
{ kind: FREDS_LETTER_KIND, qty: 1 },
|
|
133
|
+
],
|
|
134
|
+
keep: [
|
|
135
|
+
{ kind: FREDS_LETTER_KIND, untilStep: 1, say: 'Lost it? Good thing I wrote two. Here, and hold on to this one.' },
|
|
136
|
+
{ kind: BOAT_TICKET_KIND, untilStep: 1, say: "Lost your ticket? I'll write you another. Branson knows my hand." },
|
|
137
|
+
],
|
|
138
|
+
steps: [
|
|
139
|
+
{
|
|
140
|
+
kind: 'deliver',
|
|
141
|
+
npc: CAPITAL_RIMDEL,
|
|
142
|
+
items: [{ kinds: [FREDS_LETTER_KIND], qty: 1, label: "Fred's Letter" }],
|
|
143
|
+
label: 'Sail to the Capital and give the letter to Rimdel',
|
|
144
|
+
hint: "Show Branson your ticket on the Long Pier, sail to the King's Harbour, and find Rimdel at the Grand Exchange.",
|
|
145
|
+
say: "A letter from Fred? He found me. I've been expecting this for a long time. Tell him I'm well, and that I'm sorry.",
|
|
146
|
+
short: "You'll have something for me, I think? From Fred?",
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
kind: 'talk',
|
|
150
|
+
npc: FRED,
|
|
151
|
+
label: 'Tell Fred the letter arrived',
|
|
152
|
+
hint: "Fred's cottage is beside Anne's, on the green between the crossroads and Base Camp.",
|
|
153
|
+
say: "He read it? He's well? Oh, I'd stopped hoping.",
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
done: "Rimdel is my brother. Twenty years we didn't speak, and then the goblins took him. Take this, and keep the pass: Branson won't charge you for the Capital again.",
|
|
157
|
+
after: 'Tell Rimdel I said hello, if you pass the Grand Exchange.',
|
|
158
|
+
rewards: {
|
|
159
|
+
coins: 150,
|
|
160
|
+
xp: { explorer: 2500 },
|
|
161
|
+
choiceXp: { qty: 1500 },
|
|
162
|
+
perk: "Fred's Pass: free sailing to the Capital",
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
beagleBirthday: {
|
|
166
|
+
giver: FORBES,
|
|
167
|
+
sharedGiver: true,
|
|
168
|
+
requires: { quest: 'lostBeagle', refuse: 'Have you seen my dog? Bernie ran off after a gull.' },
|
|
169
|
+
offer: "It's Bernie's birthday! I want a proper treat for her: a cooked fish and five fresh eggs from the farm.",
|
|
170
|
+
accept: 'Wonderful. The farm hens lay out by the barn, and any cooked fish will do.',
|
|
171
|
+
decline: 'Another time, then. She will never know.',
|
|
172
|
+
steps: [
|
|
173
|
+
{
|
|
174
|
+
kind: 'deliver',
|
|
175
|
+
npc: FORBES,
|
|
176
|
+
items: [
|
|
177
|
+
{ kinds: COOKED_FISH, qty: 1, label: 'Cooked fish' },
|
|
178
|
+
{ kinds: ['egg'], qty: 5, label: 'Eggs' },
|
|
179
|
+
],
|
|
180
|
+
label: 'Bring Forbes a cooked fish and five eggs',
|
|
181
|
+
hint: 'Cook any fish at a campfire, and collect eggs from the hens at No Harm Farm.',
|
|
182
|
+
say: 'Look at her spin! Happy birthday, Bernie.',
|
|
183
|
+
short: 'A cooked fish and five eggs. She has been good all year.',
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
done: 'That is the happiest I have ever seen her. Thank you, friend.',
|
|
187
|
+
after: 'Bernie still has egg on her nose.',
|
|
188
|
+
rewards: { coins: 50, xp: { explorer: 800, cooking: 600 } },
|
|
189
|
+
},
|
|
190
|
+
wilsonBigCatch: {
|
|
191
|
+
giver: WILSON,
|
|
192
|
+
sharedGiver: true,
|
|
193
|
+
requires: {
|
|
194
|
+
quest: 'wilsonRod',
|
|
195
|
+
skill: { skill: 'fishing', level: 30 },
|
|
196
|
+
refuse: 'Come back when you can land a trout. Fishing 30, and a fly rod.',
|
|
197
|
+
},
|
|
198
|
+
offer: "Years ago I hooked a trout as long as my arm, and it snapped my line. Catch ten trout for me and I'll bet you meet him.",
|
|
199
|
+
accept: 'Trout take a fly. Try the fishery water. And bring him to me when you have him.',
|
|
200
|
+
decline: 'He will keep. He always has.',
|
|
201
|
+
steps: [
|
|
202
|
+
{
|
|
203
|
+
kind: 'catch',
|
|
204
|
+
fish: ['rawtrout'],
|
|
205
|
+
qty: 10,
|
|
206
|
+
label: 'Catch ten trout',
|
|
207
|
+
hint: 'Trout take a fly on a fly rod. The Trout Fishery is the surest water.',
|
|
208
|
+
give: { kind: TROPHY_TROUT_KIND, qty: 1, notice: 'The line nearly tears from your hands. This one is enormous: The Big One!' },
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
kind: 'deliver',
|
|
212
|
+
npc: WILSON,
|
|
213
|
+
items: [{ kinds: [TROPHY_TROUT_KIND], qty: 1, label: 'The Big One' }],
|
|
214
|
+
label: 'Bring The Big One to Wilson',
|
|
215
|
+
hint: 'Wilson is on the lake shore beside the battlefield bridge.',
|
|
216
|
+
say: "That's him! Look at the size of him. He's going on the wall.",
|
|
217
|
+
short: 'Well? Did you meet him?',
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
done: 'Twenty years I waited to see that fish. Here, you have earned every bit of this.',
|
|
221
|
+
after: 'Have you seen him on my wall? Best fish on the lake.',
|
|
222
|
+
rewards: { coins: 250, xp: { fishing: 4000, explorer: 1500 } },
|
|
223
|
+
},
|
|
224
|
+
smithsApprentice: {
|
|
225
|
+
giver: HALDREN,
|
|
226
|
+
offer: 'My apprentice has run off to sea and the orders are piling up. Bring me ten bronze bars and I will teach you a thing or two.',
|
|
227
|
+
accept: 'Copper and tin from the mine, smelted in any furnace. Ten bars.',
|
|
228
|
+
decline: 'Then stand clear of the anvil.',
|
|
229
|
+
steps: [
|
|
230
|
+
{
|
|
231
|
+
kind: 'deliver',
|
|
232
|
+
npc: HALDREN,
|
|
233
|
+
items: [{ kinds: ['bronzebar'], qty: 10, label: 'Bronze bars' }],
|
|
234
|
+
label: 'Bring Master Haldren ten bronze bars',
|
|
235
|
+
hint: 'Mine copper and tin in the mine cave beyond the Broken Road, then smelt them at a furnace.',
|
|
236
|
+
say: 'Good even colour, clean pour. You have hands for this.',
|
|
237
|
+
short: 'Ten bronze bars. I am not counting nine.',
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
done: 'Good work. Come by the forge whenever you want the anvil.',
|
|
241
|
+
after: 'Good tools build stronger people. Keep your bars clean.',
|
|
242
|
+
rewards: { coins: 200, xp: { blacksmithing: 2500, mining: 1200, explorer: 1500 } },
|
|
243
|
+
},
|
|
244
|
+
spiderHollowEggs: {
|
|
245
|
+
giver: TOBIN,
|
|
246
|
+
offer: "They've taken my chickens, all of them. The spiders from the Hollow. Please, stop them before the eggs hatch.",
|
|
247
|
+
accept: 'Smash the egg sacs in the Hollow and kill whatever guards them. Be careful.',
|
|
248
|
+
decline: "I don't blame you. Nobody goes in there.",
|
|
249
|
+
steps: [
|
|
250
|
+
{
|
|
251
|
+
kind: 'touch',
|
|
252
|
+
prop: 'spideregg',
|
|
253
|
+
qty: 5,
|
|
254
|
+
label: 'Smash five egg sacs in Spider Hollow',
|
|
255
|
+
hint: 'The pale egg sacs hang in the webs of Spider Hollow, in the Dreadwoods.',
|
|
256
|
+
notices: {},
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
kind: 'kill',
|
|
260
|
+
npcKinds: ['spidermatriarch'],
|
|
261
|
+
qty: 1,
|
|
262
|
+
npcLabel: 'the Spider Matriarch',
|
|
263
|
+
label: 'Kill the Spider Matriarch',
|
|
264
|
+
hint: 'The Matriarch broods in her den at the back of Spider Hollow.',
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
kind: 'talk',
|
|
268
|
+
npc: TOBIN,
|
|
269
|
+
label: 'Tell Farmer Tobin',
|
|
270
|
+
hint: 'Farmer Tobin is at his coop on the road to Spider Hollow.',
|
|
271
|
+
say: 'She is dead? The eggs too? Then I can sleep tonight.',
|
|
272
|
+
},
|
|
273
|
+
],
|
|
274
|
+
done: 'I owe you more than I can pay, but take this.',
|
|
275
|
+
after: 'Not a spider on the farm since. Not one.',
|
|
276
|
+
rewards: { coins: 300, xp: { explorer: 2500 }, choiceXp: { qty: 3000, skills: STORY_COMBAT_SKILLS } },
|
|
277
|
+
},
|
|
278
|
+
harbourThief: {
|
|
279
|
+
giver: MARLOW,
|
|
280
|
+
offer: 'Crates keep going missing off the quay at night, and nobody saw anything. Would you look around for me?',
|
|
281
|
+
accept: 'Check the stacks by the warehouses. Whoever it is leaves in a hurry.',
|
|
282
|
+
decline: 'Then keep your hands off my crates.',
|
|
283
|
+
steps: [
|
|
284
|
+
{
|
|
285
|
+
kind: 'touch',
|
|
286
|
+
prop: 'clue',
|
|
287
|
+
qty: 3,
|
|
288
|
+
label: 'Search the quay for three clues',
|
|
289
|
+
hint: 'Look along the crate stacks on the quay of the King\'s Harbour.',
|
|
290
|
+
notices: {
|
|
291
|
+
'clue:footprint': 'Fresh muddy boot prints, heavy, the kind with hobnails. Guard boots.',
|
|
292
|
+
'clue:cloth': 'A strip of blue cloth snagged on a nail: the colour of the Castle Guard.',
|
|
293
|
+
'clue:coin': 'A coin with a strange anchor stamped on it. Not from around here.',
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
kind: 'choose',
|
|
298
|
+
npc: CRANE,
|
|
299
|
+
label: 'Confront Sergeant Crane',
|
|
300
|
+
hint: 'Sergeant Crane keeps the guard post at the head of the quay.',
|
|
301
|
+
say: 'Keep your voice down. There is a purse in this for you if you forget what you found.',
|
|
302
|
+
options: [
|
|
303
|
+
{ id: 'report', label: 'Turn him in to Marlow', say: 'You would ruin me over a few crates? Fine. Go on, then.' },
|
|
304
|
+
{
|
|
305
|
+
id: 'bribe',
|
|
306
|
+
label: 'Take the purse and keep quiet',
|
|
307
|
+
say: 'Smart. We never spoke.',
|
|
308
|
+
bonus: { coins: 400 },
|
|
309
|
+
finish: true,
|
|
310
|
+
},
|
|
311
|
+
],
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
kind: 'talk',
|
|
315
|
+
npc: MARLOW,
|
|
316
|
+
label: 'Tell Marlow who it was',
|
|
317
|
+
hint: 'Marlow keeps the harbour office on the Royal Pier.',
|
|
318
|
+
say: 'Crane? A sergeant of the Guard? I will see him in chains.',
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
done: 'The harbour thanks you. Here is what the merchants put up for the thief.',
|
|
322
|
+
after: 'Not a crate missing since.',
|
|
323
|
+
rewards: { coins: 200, xp: { explorer: 2500 }, choiceXp: { qty: 1500 } },
|
|
324
|
+
},
|
|
325
|
+
coldFeet: {
|
|
326
|
+
giver: EXPLORER,
|
|
327
|
+
offer: 'My sled broke on the floes and the bears are between me and home. I need timber to fix it and something hot to eat.',
|
|
328
|
+
accept: 'Ten logs of any kind and a cooked fish. Then light the beacon at the shore camp to keep the bears back.',
|
|
329
|
+
decline: 'Then I will wait. I am good at waiting.',
|
|
330
|
+
steps: [
|
|
331
|
+
{
|
|
332
|
+
kind: 'deliver',
|
|
333
|
+
npc: EXPLORER,
|
|
334
|
+
items: [
|
|
335
|
+
{ kinds: ANY_LOG, qty: 10, label: 'Logs' },
|
|
336
|
+
{ kinds: COOKED_FISH, qty: 1, label: 'Cooked fish' },
|
|
337
|
+
],
|
|
338
|
+
label: 'Bring Hallvard ten logs and a cooked fish',
|
|
339
|
+
hint: 'Any logs will do: fell trees on the way north. Cook a fish at a fire.',
|
|
340
|
+
say: 'Warm food. And the runners will hold now.',
|
|
341
|
+
short: 'Ten logs and a cooked fish. My hands are too cold to fell a tree.',
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
kind: 'touch',
|
|
345
|
+
prop: 'beacon',
|
|
346
|
+
qty: 1,
|
|
347
|
+
label: 'Light the warning beacon at the shore camp',
|
|
348
|
+
hint: 'The beacon stands at the shore camp, where the floes come ashore.',
|
|
349
|
+
notices: { 'beacon:shore': 'The beacon catches and roars. Out on the ice, the bears turn away from the light.' },
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
kind: 'talk',
|
|
353
|
+
npc: EXPLORER,
|
|
354
|
+
label: 'Tell Hallvard the way is clear',
|
|
355
|
+
hint: 'Hallvard is by his broken sled on the Bear Floes shore.',
|
|
356
|
+
say: 'I see the fire. Then I am going home.',
|
|
357
|
+
},
|
|
358
|
+
],
|
|
359
|
+
done: 'Take this, for the timber and the fire. I will not forget it.',
|
|
360
|
+
after: 'The sea is quiet today. Even the bears.',
|
|
361
|
+
rewards: { coins: 250, xp: { explorer: 3000, woodwork: 1500 } },
|
|
362
|
+
},
|
|
363
|
+
livoniasDiary: {
|
|
364
|
+
giver: SCHOLAR,
|
|
365
|
+
requires: {
|
|
366
|
+
quest: 'clearRatTunnel',
|
|
367
|
+
refuse: 'Livonia? The Breaker of Men? Nobody has come back from that tunnel to tell me anything.',
|
|
368
|
+
},
|
|
369
|
+
offer: 'Livonia was not always a monster. She was a scholar, like me. Her diary was torn up and scattered. Find the pages and I will tell you her story.',
|
|
370
|
+
accept: 'One in the Rat Tunnel, one in the Goblin Cave, one in the Frozen Depths. Bring me all three.',
|
|
371
|
+
decline: 'The pages will keep. Paper is patient.',
|
|
372
|
+
steps: [
|
|
373
|
+
{
|
|
374
|
+
kind: 'touch',
|
|
375
|
+
prop: 'diarypage',
|
|
376
|
+
qty: 3,
|
|
377
|
+
label: 'Find three torn diary pages',
|
|
378
|
+
hint: 'The pages are in the Rat Tunnel, the Goblin Cave and the Frozen Depths.',
|
|
379
|
+
notices: {
|
|
380
|
+
'diarypage:rattunnel': 'A torn page: "...the dark below whispers..."',
|
|
381
|
+
'diarypage:goblincave': 'A torn page, stuffed in a goblin crate: "...they guard something..."',
|
|
382
|
+
'diarypage:frozendepths': 'A torn page under the ice: "...so cold, yet so beautiful..."',
|
|
383
|
+
},
|
|
384
|
+
give: { kind: LIVONIA_PAGE_KIND, qty: 1 },
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
kind: 'deliver',
|
|
388
|
+
npc: SCHOLAR,
|
|
389
|
+
items: [{ kinds: [LIVONIA_PAGE_KIND], qty: 3, label: 'Torn diary pages' }],
|
|
390
|
+
label: 'Bring the three pages to Scholar Aldous',
|
|
391
|
+
hint: "Scholar Aldous keeps the study in the Capital's archives.",
|
|
392
|
+
say: 'And the last page was here all along, in her own notes. "I understand now." Poor Livonia.',
|
|
393
|
+
short: 'Three pages. The fourth, I think, is already here.',
|
|
394
|
+
},
|
|
395
|
+
],
|
|
396
|
+
done: 'She went into the dark to learn what it was, and it kept her. Take her ring; she would have wanted it worn.',
|
|
397
|
+
after: 'Pieces of the past survive in unlikely places.',
|
|
398
|
+
rewards: { coins: 1000, xp: { explorer: 6000 }, choiceXp: { qty: 4000 } },
|
|
399
|
+
},
|
|
400
|
+
charcoalBurner: {
|
|
401
|
+
giver: BURNER,
|
|
402
|
+
offer: "Can't swing an axe with this arm, but the mound still needs tending. Burn me twenty charcoal, would you?",
|
|
403
|
+
accept: 'Feed logs into the mound and bring me the charcoal. Twenty.',
|
|
404
|
+
decline: 'Suit yourself. My arm will mend. Eventually.',
|
|
405
|
+
steps: [
|
|
406
|
+
{
|
|
407
|
+
kind: 'deliver',
|
|
408
|
+
npc: BURNER,
|
|
409
|
+
items: [{ kinds: ['charcoal'], qty: 20, label: 'Charcoal' }],
|
|
410
|
+
label: 'Burn twenty charcoal for Old Cole',
|
|
411
|
+
hint: 'Click the charcoal mound with logs in your bag to burn them.',
|
|
412
|
+
say: 'Good black charcoal, that. The forge will be glad of it.',
|
|
413
|
+
short: 'Twenty charcoal. The mound does the work; you feed it.',
|
|
414
|
+
},
|
|
415
|
+
],
|
|
416
|
+
done: 'Here, for your trouble. The mound is yours whenever you want it.',
|
|
417
|
+
after: 'Arm is mending. Slowly.',
|
|
418
|
+
rewards: { coins: 100, xp: { woodwork: 1200, explorer: 800 } },
|
|
419
|
+
},
|
|
420
|
+
};
|
|
421
|
+
/** The step a player is on, or null once past the last one. */
|
|
422
|
+
export function storyStep(id, progress) {
|
|
423
|
+
const steps = STORY_QUESTS[id].steps;
|
|
424
|
+
return steps[progress?.step ?? 0] ?? null;
|
|
425
|
+
}
|
|
426
|
+
/** The quantity a counting step needs, or 0 for a step that does not count. */
|
|
427
|
+
export function storyStepTarget(step) {
|
|
428
|
+
return step.kind === 'kill' || step.kind === 'catch' || step.kind === 'touch' ? step.qty : 0;
|
|
429
|
+
}
|
|
430
|
+
export function npcMatches(ref, npc) {
|
|
431
|
+
if (ref.kind !== npc.kind)
|
|
432
|
+
return false;
|
|
433
|
+
return ref.id ? ref.id === npc.id : true;
|
|
434
|
+
}
|
|
435
|
+
/** Reward lines for the offer card, as QuestReward rows. */
|
|
436
|
+
export function storyRewardRows(reward) {
|
|
437
|
+
const rows = [];
|
|
438
|
+
if (reward.coins)
|
|
439
|
+
rows.push({ kind: 'coins', qty: reward.coins });
|
|
440
|
+
for (const skill of STORY_SKILLS) {
|
|
441
|
+
const qty = reward.xp?.[skill];
|
|
442
|
+
if (qty)
|
|
443
|
+
rows.push({ kind: `${skill === 'precision' ? 'mastery' : skill}_xp`, qty });
|
|
444
|
+
}
|
|
445
|
+
if (reward.choiceXp)
|
|
446
|
+
rows.push({ kind: reward.choiceXp.skills === STORY_COMBAT_SKILLS ? 'choice_combat_xp' : 'choice_xp', qty: reward.choiceXp.qty });
|
|
447
|
+
for (const item of reward.items ?? [])
|
|
448
|
+
rows.push(item);
|
|
449
|
+
return rows;
|
|
450
|
+
}
|
|
451
|
+
export function normalizeStoryProgress(raw) {
|
|
452
|
+
const out = {};
|
|
453
|
+
if (!raw || typeof raw !== 'object')
|
|
454
|
+
return out;
|
|
455
|
+
for (const id of STORY_QUEST_IDS) {
|
|
456
|
+
const v = raw[id];
|
|
457
|
+
if (!v || typeof v !== 'object')
|
|
458
|
+
continue;
|
|
459
|
+
const r = v;
|
|
460
|
+
const step = typeof r.step === 'number' && Number.isFinite(r.step) ? Math.max(0, Math.floor(r.step)) : 0;
|
|
461
|
+
const count = typeof r.count === 'number' && Number.isFinite(r.count) ? Math.max(0, Math.floor(r.count)) : 0;
|
|
462
|
+
const touched = Array.isArray(r.touched) ? r.touched.filter((t) => typeof t === 'string').slice(0, 32) : undefined;
|
|
463
|
+
out[id] = touched && touched.length ? { step, count, touched } : { step, count };
|
|
464
|
+
}
|
|
465
|
+
return out;
|
|
466
|
+
}
|
|
467
|
+
export function normalizePendingXpChoices(raw) {
|
|
468
|
+
if (!Array.isArray(raw))
|
|
469
|
+
return [];
|
|
470
|
+
const out = [];
|
|
471
|
+
for (const v of raw.slice(0, 16)) {
|
|
472
|
+
if (!v || typeof v !== 'object')
|
|
473
|
+
continue;
|
|
474
|
+
const r = v;
|
|
475
|
+
if (typeof r.quest !== 'string' || typeof r.qty !== 'number' || !Number.isFinite(r.qty) || r.qty <= 0)
|
|
476
|
+
continue;
|
|
477
|
+
const skills = Array.isArray(r.skills) ? r.skills.filter(isStorySkill) : [];
|
|
478
|
+
out.push({ quest: r.quest, qty: Math.floor(r.qty), skills: skills.length ? skills : [...STORY_SKILLS] });
|
|
479
|
+
}
|
|
480
|
+
return out;
|
|
481
|
+
}
|
|
482
|
+
//# sourceMappingURL=storyQuests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyQuests.js","sourceRoot":"","sources":["../src/storyQuests.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAeH,MAAM,CAAC,MAAM,YAAY,GAA0B;IACjD,UAAU;IACV,SAAS;IACT,WAAW;IACX,SAAS;IACT,SAAS;IACT,UAAU;IACV,UAAU;IACV,QAAQ;IACR,eAAe;IACf,UAAU;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAA0B,CAAC,UAAU,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AAE/F,MAAM,CAAC,MAAM,iBAAiB,GAA+B;IAC3D,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,aAAa,EAAE,eAAe;IAC9B,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,YAAkC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC1F,CAAC;AAgHD,MAAM,CAAC,MAAM,eAAe,GAA4B;IACtD,aAAa;IACb,gBAAgB;IAChB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,UAAU;IACV,eAAe;IACf,gBAAgB;CACjB,CAAC;AAEF,4CAA4C;AAC5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,Q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,OAAO,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC;IACnC,MAAM,GAAG,GAAsB,EAAE,CAAC;IAClC,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;QACjC,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ;YAAE,SAAS;QAC1C,MAAM,CAAC,GAAG,CAA4B,CAAC;QACvC,IAAI,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;YAAE,SAAS;QAChH,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5E,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,EAAE,CAAC,CAAC;IAC3G,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/travel.d.ts
CHANGED
|
@@ -56,8 +56,23 @@ export type TravelPort = {
|
|
|
56
56
|
*/
|
|
57
57
|
export declare const TRAVEL_PORT_RADIUS = 48;
|
|
58
58
|
export declare const TRAVEL_PORTS: readonly TravelPort[];
|
|
59
|
+
/**
|
|
60
|
+
* Fred's Letter (storyQuests.ts): Fred's boat ticket is one free sailing to
|
|
61
|
+
* the Capital, and once the letter is delivered Fred's Pass makes every
|
|
62
|
+
* sailing there free. Either one also opens the port before the battlefield
|
|
63
|
+
* bridge is mended: the ticket is the invitation.
|
|
64
|
+
*/
|
|
65
|
+
export declare const FREDS_PASS_PORT: TravelPortId;
|
|
66
|
+
export type TravelFare = {
|
|
67
|
+
fare: number;
|
|
68
|
+
via: 'coins' | 'ticket' | 'pass';
|
|
69
|
+
};
|
|
70
|
+
/** What this player pays to sail to this port, holding this many of Fred's boat tickets. */
|
|
71
|
+
export declare function travelFareFor(port: TravelPort, quests: QuestsSnapshot, tickets?: number): TravelFare;
|
|
72
|
+
/** The ticket item, for callers that count it in the bag. */
|
|
73
|
+
export declare const TRAVEL_TICKET_KIND = "boatticket";
|
|
59
74
|
/** The reason a port is closed to this player, or null when they may sail. */
|
|
60
|
-
export declare function travelPortLockReason(port: TravelPort, quests: QuestsSnapshot): string | null;
|
|
75
|
+
export declare function travelPortLockReason(port: TravelPort, quests: QuestsSnapshot, tickets?: number): string | null;
|
|
61
76
|
export declare function isTravelPortId(value: unknown): value is TravelPortId;
|
|
62
77
|
export declare function travelPortById(id: string): TravelPort | null;
|
|
63
78
|
/** The port this tile is in, if any: the nearest landing within TRAVEL_PORT_RADIUS. */
|
package/dist/travel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"travel.d.ts","sourceRoot":"","sources":["../src/travel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"travel.d.ts","sourceRoot":"","sources":["../src/travel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG3D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,Y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AC;AAEnD,8EAA8E;AAC9E,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,SAAI,GAAG,MAAM,GAAG,IAAI,CAIzG;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAE5D;AAED,uFAAuF;AACvF,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAWpE;AAED,oEAAoE;AACpE,eAAO,MAAM,yBAAyB,UAAU,CAAC;AAEjD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,YAAY,GAAG,MAAM,CAEzD;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAG5E"}
|
package/dist/travel.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HARBOUR_LANDING, HARBOUR_NAME } from './harbour.js';
|
|
2
2
|
import { FROZEN_SHORE_LANDING, HOPE_BEACH_LANDING } from './landmarks.js';
|
|
3
|
+
import { BOAT_TICKET_KIND } from './storyQuests.js';
|
|
3
4
|
/**
|
|
4
5
|
* SEA TRAVEL
|
|
5
6
|
*
|
|
@@ -40,8 +41,10 @@ export const TRAVEL_PORTS = [
|
|
|
40
41
|
label: 'Hope Beach',
|
|
41
42
|
x: HOPE_BEACH_LANDING.x,
|
|
42
43
|
z: HOPE_BEACH_LANDING.z,
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
// James, 2026-09-26: "the boat service is always free to hope beach".
|
|
45
|
+
// Nobody should be stranded at the far end of the run for want of coins.
|
|
46
|
+
fare: 0,
|
|
47
|
+
blurb: 'The Long Pier, Hope Beach. Always free.',
|
|
45
48
|
transition: 'voyage-hope-beach',
|
|
46
49
|
},
|
|
47
50
|
{
|
|
@@ -69,10 +72,31 @@ export const TRAVEL_PORTS = [
|
|
|
69
72
|
requires: { quest: 'battlefieldBridge', hint: 'Repair the battlefield bridge first' },
|
|
70
73
|
},
|
|
71
74
|
];
|
|
75
|
+
/**
|
|
76
|
+
* Fred's Letter (storyQuests.ts): Fred's boat ticket is one free sailing to
|
|
77
|
+
* the Capital, and once the letter is delivered Fred's Pass makes every
|
|
78
|
+
* sailing there free. Either one also opens the port before the battlefield
|
|
79
|
+
* bridge is mended: the ticket is the invitation.
|
|
80
|
+
*/
|
|
81
|
+
export const FREDS_PASS_PORT = 'capital-harbour';
|
|
82
|
+
/** What this player pays to sail to this port, holding this many of Fred's boat tickets. */
|
|
83
|
+
export function travelFareFor(port, quests, tickets = 0) {
|
|
84
|
+
if (port.id === FREDS_PASS_PORT) {
|
|
85
|
+
if (quests.fredsLetter === 'completed')
|
|
86
|
+
return { fare: 0, via: 'pass' };
|
|
87
|
+
if (tickets > 0)
|
|
88
|
+
return { fare: 0, via: 'ticket' };
|
|
89
|
+
}
|
|
90
|
+
return { fare: port.fare, via: 'coins' };
|
|
91
|
+
}
|
|
92
|
+
/** The ticket item, for callers that count it in the bag. */
|
|
93
|
+
export const TRAVEL_TICKET_KIND = BOAT_TICKET_KIND;
|
|
72
94
|
/** The reason a port is closed to this player, or null when they may sail. */
|
|
73
|
-
export function travelPortLockReason(port, quests) {
|
|
95
|
+
export function travelPortLockReason(port, quests, tickets = 0) {
|
|
74
96
|
if (!port.requires)
|
|
75
97
|
return null;
|
|
98
|
+
if (travelFareFor(port, quests, tickets).via !== 'coins')
|
|
99
|
+
return null;
|
|
76
100
|
return quests[port.requires.quest] === 'completed' ? null : port.requires.hint;
|
|
77
101
|
}
|
|
78
102
|
export function isTravelPortId(value) {
|
package/dist/travel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"travel.js","sourceRoot":"","sources":["../src/travel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,e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ClB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,oEAAoE;AACpE,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAC;AAEjD,MAAM,UAAU,gBAAgB,CAAC,EAAgB;IAC/C,OAAO,GAAG,yBAAyB,GAAG,EAAE,EAAE,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,QAAgB;IACvD,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;QAAE,OAAO,IAAI,CAAC;IACjE,OAAO,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1E,CAAC"}
|
package/dist/woodwork.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ export declare const BATTLEFIELD_BRIDGE_REPAIR_WOODWORK_LEVEL = 15;
|
|
|
83
83
|
/** Roughly a full spruce-tier craft plus the gather effort across four woods. */
|
|
84
84
|
export declare const BATTLEFIELD_BRIDGE_REPAIR_WOODWORK_XP = 1500;
|
|
85
85
|
/** Building a new route across the battlefield is a major discovery. */
|
|
86
|
-
export declare const BATTLEFIELD_BRIDGE_REPAIR_EXPLORER_XP =
|
|
86
|
+
export declare const BATTLEFIELD_BRIDGE_REPAIR_EXPLORER_XP = 3330;
|
|
87
87
|
export declare const RUPERT_ROW_BRIDGE_CROSSING_COST = 200;
|
|
88
88
|
export declare const JOHN_SAFE_PASSAGE_COST = 250;
|
|
89
89
|
export declare const BATTLEFIELD_BRIDGE_STYLE_BROKEN = "broken";
|
|
@@ -107,7 +107,7 @@ export declare const HOPE_PIER_GAP1_REPAIR_COST: Array<{
|
|
|
107
107
|
export declare const HOPE_PIER_GAP1_WOODWORK_LEVEL: 10;
|
|
108
108
|
/** Below the bridge's 1500: thirty logs of common wood at two thirds its level. */
|
|
109
109
|
export declare const HOPE_PIER_GAP1_WOODWORK_XP = 900;
|
|
110
|
-
export declare const HOPE_PIER_GAP1_EXPLORER_XP =
|
|
110
|
+
export declare const HOPE_PIER_GAP1_EXPLORER_XP = 1500;
|
|
111
111
|
export declare const HOPE_PIER_GAP2_REPAIR_COST: Array<{
|
|
112
112
|
kind: string;
|
|
113
113
|
qty: number;
|
|
@@ -117,7 +117,7 @@ export declare const HOPE_PIER_GAP2_WOODWORK_LEVEL: 30;
|
|
|
117
117
|
/** Half again as much wood as the bridge, at twice its level. */
|
|
118
118
|
export declare const HOPE_PIER_GAP2_WOODWORK_XP = 3000;
|
|
119
119
|
/** Reaching the pier head opens the far end of the starting shore. */
|
|
120
|
-
export declare const HOPE_PIER_GAP2_EXPLORER_XP =
|
|
120
|
+
export declare const HOPE_PIER_GAP2_EXPLORER_XP = 3330;
|
|
121
121
|
/** Sound decking - walkable, and what a repaired span becomes for its owner. */
|
|
122
122
|
export declare const HOPE_PIER_STYLE_DECK = "deck";
|
|
123
123
|
/** Smashed span over open water. */
|
|
@@ -152,7 +152,7 @@ export declare const THAW_EAST_BRIDGE_REPAIR_COST: Array<{
|
|
|
152
152
|
}>;
|
|
153
153
|
export declare const THAW_EAST_BRIDGE_WOODWORK_LEVEL: 30;
|
|
154
154
|
export declare const THAW_EAST_BRIDGE_WOODWORK_XP = 1800;
|
|
155
|
-
export declare const THAW_EAST_BRIDGE_EXPLORER_XP =
|
|
155
|
+
export declare const THAW_EAST_BRIDGE_EXPLORER_XP = 2000;
|
|
156
156
|
/** Cost, level and payout for one of the pier's two spans. */
|
|
157
157
|
export declare function hopePierGapSpec(gap: 1 | 2): {
|
|
158
158
|
cost: Array<{
|