@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.
Files changed (44) hide show
  1. package/dist/bloodMire.d.ts +47 -0
  2. package/dist/bloodMire.d.ts.map +1 -0
  3. package/dist/bloodMire.js +67 -0
  4. package/dist/bloodMire.js.map +1 -0
  5. package/dist/constants.d.ts +7 -1
  6. package/dist/constants.d.ts.map +1 -1
  7. package/dist/constants.js +22 -0
  8. package/dist/constants.js.map +1 -1
  9. package/dist/dreadwoodsZones.d.ts +1 -1
  10. package/dist/dreadwoodsZones.d.ts.map +1 -1
  11. package/dist/dreadwoodsZones.js +34 -0
  12. package/dist/dreadwoodsZones.js.map +1 -1
  13. package/dist/index.d.ts +4 -0
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +4 -0
  16. package/dist/index.js.map +1 -1
  17. package/dist/messages.d.ts +32 -0
  18. package/dist/messages.d.ts.map +1 -1
  19. package/dist/messages.js.map +1 -1
  20. package/dist/quests.d.ts +19 -8
  21. package/dist/quests.d.ts.map +1 -1
  22. package/dist/quests.js +88 -8
  23. package/dist/quests.js.map +1 -1
  24. package/dist/rotwoodGrove.d.ts +40 -0
  25. package/dist/rotwoodGrove.d.ts.map +1 -0
  26. package/dist/rotwoodGrove.js +43 -0
  27. package/dist/rotwoodGrove.js.map +1 -0
  28. package/dist/storyPlaces.d.ts +78 -0
  29. package/dist/storyPlaces.d.ts.map +1 -0
  30. package/dist/storyPlaces.js +46 -0
  31. package/dist/storyPlaces.js.map +1 -0
  32. package/dist/storyQuests.d.ts +224 -0
  33. package/dist/storyQuests.d.ts.map +1 -0
  34. package/dist/storyQuests.js +482 -0
  35. package/dist/storyQuests.js.map +1 -0
  36. package/dist/travel.d.ts +16 -1
  37. package/dist/travel.d.ts.map +1 -1
  38. package/dist/travel.js +27 -3
  39. package/dist/travel.js.map +1 -1
  40. package/dist/woodwork.d.ts +4 -4
  41. package/dist/woodwork.d.ts.map +1 -1
  42. package/dist/woodwork.js +4 -4
  43. package/dist/woodwork.js.map +1 -1
  44. package/package.json +1 -1
@@ -0,0 +1,43 @@
1
+ import { DEADLANDS_MIN_X, DEADLANDS_MIN_Z } from './zones.js';
2
+ /**
3
+ * The Rotwood Grove (James's Dreadwoods pack, 2026-09-26: the rotwood grove
4
+ * painting): the Rotwood Ent's clearing in the north-west of the woods.
5
+ *
6
+ * A clearing of blood-dark earth ringed by the grove's dead giants: fallen
7
+ * trunks and root arches round the rim, rotten stumps burning green wisps
8
+ * round the Ent in the middle, the way in from the south under an arch and
9
+ * between wisp posts. Moss wolves (the forest monsters built ahead of a home)
10
+ * prowl it. Geometry here; the backend's rotwoodGrove.ts dresses it; the zone
11
+ * is DREADWOODS_NPC_ZONES 'rotwood-grove'.
12
+ */
13
+ export const GROVE_CX = DEADLANDS_MIN_X + 90;
14
+ export const GROVE_CZ = DEADLANDS_MIN_Z + 124;
15
+ /** The zone: the clearing and its rim. */
16
+ export const GROVE_RX = 22;
17
+ export const GROVE_RZ = 17;
18
+ /** The clearing of dark earth, an ellipse. */
19
+ export const GROVE_CLEARING_RX = 15;
20
+ export const GROVE_CLEARING_RZ = 11;
21
+ /** Where the Ent stands, looking down the way in. */
22
+ export const GROVE_ENT = { x: GROVE_CX, z: GROVE_CZ - 2 };
23
+ /** The way in: up from the south, three wide, to the Ent. */
24
+ export const GROVE_PATH_Z0 = GROVE_CZ + 1;
25
+ export const GROVE_PATH_Z1 = GROVE_CZ + 20;
26
+ /** The root arch the way in passes under (5 x 1, its feet two either side of the path). */
27
+ export const GROVE_ENTRY_ARCH = { x: GROVE_CX, z: GROVE_CZ + GROVE_CLEARING_RZ + 2 };
28
+ /** The moss wolves' posts (rotwood-grove-smoke.ts pins them clear and reachable). */
29
+ export const GROVE_WOLF_SPAWNS = [
30
+ { x: GROVE_CX - 10, z: GROVE_CZ + 2 },
31
+ { x: GROVE_CX + 10, z: GROVE_CZ + 3 },
32
+ { x: GROVE_CX - 3, z: GROVE_CZ - 8 },
33
+ { x: GROVE_CX + 4, z: GROVE_CZ - 8 },
34
+ ];
35
+ export function inGroveClearing(x, z) {
36
+ const dx = (x - GROVE_CX) / GROVE_CLEARING_RX;
37
+ const dz = (z - GROVE_CZ) / GROVE_CLEARING_RZ;
38
+ return dx * dx + dz * dz <= 1;
39
+ }
40
+ export function onGrovePath(x, z) {
41
+ return Math.abs(x - GROVE_CX) <= 1 && z >= GROVE_PATH_Z0 && z <= GROVE_PATH_Z1;
42
+ }
43
+ //# sourceMappingURL=rotwoodGrove.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rotwoodGrove.js","sourceRoot":"","sources":["../src/rotwoodGrove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE9D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,GAAG,EAAE,CAAC;AAC7C,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,GAAG,GAAG,CAAC;AAC9C,0CAA0C;AAC1C,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,CAAC;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,CAAC;AAC3B,8CAA8C;AAC9C,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AACpC,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AACpC,qDAAqD;AACrD,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,CAAC,EAAE,CAAC;AAC1D,6DAA6D;AAC7D,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,GAAG,CAAC,CAAC;AAC1C,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,GAAG,EAAE,CAAC;AAC3C,2FAA2F;AAC3F,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,iBAAiB,GAAG,CAAC,EAAE,CAAC;AACrF,qFAAqF;AACrF,MAAM,CAAC,MAAM,iBAAiB,GAAwC;IACpE,EAAE,CAAC,EAAE,QAAQ,GAAG,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,CAAC,EAAE;IACrC,EAAE,CAAC,EAAE,QAAQ,GAAG,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,CAAC,EAAE;IACrC,EAAE,CAAC,EAAE,QAAQ,GAAG,CAAC,EAAE,CAAC,EAAE,QAAQ,GAAG,CAAC,EAAE;IACpC,EAAE,CAAC,EAAE,QAAQ,GAAG,CAAC,EAAE,CAAC,EAAE,QAAQ,GAAG,CAAC,EAAE;CACrC,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,CAAS,EAAE,CAAS;IAClD,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,iBAAiB,CAAC;IAC9C,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,iBAAiB,CAAC;IAC9C,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,CAAS,EAAE,CAAS;IAC9C,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,aAAa,IAAI,CAAC,IAAI,aAAa,CAAC;AACjF,CAAC"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Fred's cottage: west of Anne's, mirroring Eldric's to the east, so her
3
+ * garden has a neighbour on each side. A Blender model (quest-workshop
4
+ * `fredcottage`), door to the south onto the lane like the others.
5
+ */
6
+ export declare const FREDS_HOME: {
7
+ readonly name: "Fred";
8
+ readonly x: number;
9
+ readonly localZ: number;
10
+ };
11
+ /** Fred stands at his gate, looking up the lane toward Anne's. */
12
+ export declare const FRED_SPOT: {
13
+ readonly x: number;
14
+ readonly localZ: number;
15
+ };
16
+ /** Rimdel, on the steps of the Grand Exchange (u 118, door on v 26), now a clerk there. */
17
+ export declare const CAPITAL_RIMDEL_SPOT: {
18
+ readonly x: number;
19
+ readonly z: number;
20
+ readonly faceX: number;
21
+ readonly faceZ: number;
22
+ };
23
+ /** Master Haldren, inside the Main Forge's open front between its two anvils. */
24
+ export declare const HALDREN_SPOT: {
25
+ readonly x: number;
26
+ readonly z: number;
27
+ readonly faceX: number;
28
+ readonly faceZ: number;
29
+ };
30
+ /** Old Cole, beside the middle charcoal mound in the forge yard (mounds at v 111). */
31
+ export declare const CHARCOAL_BURNER_SPOT: {
32
+ readonly x: number;
33
+ readonly z: number;
34
+ readonly faceX: number;
35
+ readonly faceZ: number;
36
+ };
37
+ /** Scholar Aldous, at the door of the Royal Administration, where the archives are kept. */
38
+ export declare const SCHOLAR_SPOT: {
39
+ readonly x: number;
40
+ readonly z: number;
41
+ readonly faceX: number;
42
+ readonly faceZ: number;
43
+ };
44
+ /** Sergeant Crane, on the quay by the crate stacks north of the Royal Pier's root. */
45
+ export declare const HARBOUR_GUARD_SPOT: {
46
+ readonly x: number;
47
+ readonly z: number;
48
+ readonly faceX: number;
49
+ readonly faceZ: number;
50
+ };
51
+ /** The three clues on the quay: boot prints, a torn cloth, a strange coin. */
52
+ export declare const HARBOUR_CLUES: ReadonlyArray<{
53
+ which: 'footprint' | 'cloth' | 'coin';
54
+ x: number;
55
+ z: number;
56
+ }>;
57
+ /** Farmer Tobin, outside the Dreadwoods east gate on the Calverton side, the nearest safe ground to Spider Hollow. */
58
+ export declare const TOBIN_SPOT: {
59
+ readonly x: number;
60
+ readonly z: number;
61
+ readonly faceX: number;
62
+ readonly faceZ: number;
63
+ };
64
+ /** Hallvard, by his broken sled on the shore ice where the floes come in. */
65
+ export declare const EXPLORER_SPOT: {
66
+ readonly x: number;
67
+ readonly z: number;
68
+ readonly faceX: 182;
69
+ readonly faceZ: 25;
70
+ };
71
+ /** The warning beacon at the shore camp, lit for Cold Feet. */
72
+ export declare const SHORE_BEACON_SPOT: {
73
+ readonly x: number;
74
+ readonly z: number;
75
+ };
76
+ /** How many egg sacs hang in Spider Hollow; the quest wants five of them. */
77
+ export declare const SPIDER_EGG_SAC_COUNT = 7;
78
+ //# sourceMappingURL=storyPlaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storyPlaces.d.ts","sourceRoot":"","sources":["../src/storyPlaces.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,eAAO,MAAM,UAAU;;;;CAA0E,CAAC;AAClG,kEAAkE;AAClE,eAAO,MAAM,SAAS;;;CAAkE,CAAC;AAEzF,2FAA2F;AAC3F,eAAO,MAAM,mBAAmB;;;;;CAAoE,CAAC;AACrG,iFAAiF;AACjF,eAAO,MAAM,YAAY;;;;;CAAkE,CAAC;AAC5F,sFAAsF;AACtF,eAAO,MAAM,oBAAoB;;;;;CAAoE,CAAC;AACtG,4FAA4F;AAC5F,eAAO,MAAM,YAAY;;;;;CAAoE,CAAC;AAC9F,sFAAsF;AACtF,eAAO,MAAM,kBAAkB;;;;;CAAsH,CAAC;AACtJ,8EAA8E;AAC9E,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC;IAAE,KAAK,EAAE,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAIxG,CAAC;AACF,sHAAsH;AACtH,eAAO,MAAM,UAAU;;;;;CAA0I,CAAC;AAClK,6EAA6E;AAC7E,eAAO,MAAM,aAAa;;;;;CAA0I,CAAC;AACrK,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB;;;CAAkE,CAAC;AACjG,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,IAAI,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Where the story quests' people stand (storyQuests.ts has the quests).
3
+ * Kept apart from storyQuests.ts because it reaches into the map modules
4
+ * (the Capital, the harbour, the Bear Floes), and quests.ts, which those
5
+ * modules' neighbours import, must not.
6
+ *
7
+ * Tiles are world tiles except where a field says local: Anne's green is
8
+ * still laid out in local rows (toWorldZ in the backend).
9
+ */
10
+ import { BEAR_FLOES_CAMP, BEAR_FLOES_SHORE_ICE } from './bearFloes.js';
11
+ import { cu, cv } from './capital.js';
12
+ import { HARBOUR_QUAY_MIN_X, HARBOUR_ROAD_Z } from './harbour.js';
13
+ import { ANNES_HOUSE_LOCAL_Z, ANNES_X, DREADWOODS_EAST_GATE_X, DREADWOODS_EAST_GATE_Z } from './landmarks.js';
14
+ /**
15
+ * Fred's cottage: west of Anne's, mirroring Eldric's to the east, so her
16
+ * garden has a neighbour on each side. A Blender model (quest-workshop
17
+ * `fredcottage`), door to the south onto the lane like the others.
18
+ */
19
+ export const FREDS_HOME = { name: 'Fred', x: ANNES_X - 20, localZ: ANNES_HOUSE_LOCAL_Z };
20
+ /** Fred stands at his gate, looking up the lane toward Anne's. */
21
+ export const FRED_SPOT = { x: FREDS_HOME.x + 2, localZ: FREDS_HOME.localZ + 5 };
22
+ /** Rimdel, on the steps of the Grand Exchange (u 118, door on v 26), now a clerk there. */
23
+ export const CAPITAL_RIMDEL_SPOT = { x: cu(118), z: cv(29), faceX: cu(118), faceZ: cv(40) };
24
+ /** Master Haldren, inside the Main Forge's open front between its two anvils. */
25
+ export const HALDREN_SPOT = { x: cu(70), z: cv(79), faceX: cu(70), faceZ: cv(90) };
26
+ /** Old Cole, beside the middle charcoal mound in the forge yard (mounds at v 111). */
27
+ export const CHARCOAL_BURNER_SPOT = { x: cu(71), z: cv(114), faceX: cu(74), faceZ: cv(111) };
28
+ /** Scholar Aldous, at the door of the Royal Administration, where the archives are kept. */
29
+ export const SCHOLAR_SPOT = { x: cu(262), z: cv(78), faceX: cu(262), faceZ: cv(90) };
30
+ /** Sergeant Crane, on the quay by the crate stacks north of the Royal Pier's root. */
31
+ export const HARBOUR_GUARD_SPOT = { x: HARBOUR_QUAY_MIN_X + 2, z: HARBOUR_ROAD_Z - 8, faceX: HARBOUR_QUAY_MIN_X + 6, faceZ: HARBOUR_ROAD_Z };
32
+ /** The three clues on the quay: boot prints, a torn cloth, a strange coin. */
33
+ export const HARBOUR_CLUES = [
34
+ { which: 'footprint', x: HARBOUR_QUAY_MIN_X + 1, z: HARBOUR_ROAD_Z - 14 },
35
+ { which: 'cloth', x: HARBOUR_QUAY_MIN_X + 3, z: HARBOUR_ROAD_Z + 12 },
36
+ { which: 'coin', x: HARBOUR_QUAY_MIN_X - 4, z: HARBOUR_ROAD_Z + 20 },
37
+ ];
38
+ /** Farmer Tobin, outside the Dreadwoods east gate on the Calverton side, the nearest safe ground to Spider Hollow. */
39
+ export const TOBIN_SPOT = { x: DREADWOODS_EAST_GATE_X + 5, z: DREADWOODS_EAST_GATE_Z + 4, faceX: DREADWOODS_EAST_GATE_X, faceZ: DREADWOODS_EAST_GATE_Z };
40
+ /** Hallvard, by his broken sled on the shore ice where the floes come in. */
41
+ export const EXPLORER_SPOT = { x: BEAR_FLOES_SHORE_ICE.x - 6, z: BEAR_FLOES_SHORE_ICE.z + 6, faceX: BEAR_FLOES_SHORE_ICE.x, faceZ: BEAR_FLOES_SHORE_ICE.z };
42
+ /** The warning beacon at the shore camp, lit for Cold Feet. */
43
+ export const SHORE_BEACON_SPOT = { x: BEAR_FLOES_CAMP.x - 3, z: BEAR_FLOES_CAMP.z - 5 };
44
+ /** How many egg sacs hang in Spider Hollow; the quest wants five of them. */
45
+ export const SPIDER_EGG_SAC_COUNT = 7;
46
+ //# sourceMappingURL=storyPlaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storyPlaces.js","sourceRoot":"","sources":["../src/storyPlaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,EAAE,EAA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AA+D;AAC/D,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC,GAAG,CAAC,EAAW,CAAC;AACjG,6EAA6E;AAC7E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC"}
@@ -0,0 +1,224 @@
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
+ /** The skills a reward can pay into, keyed as the stats are (`precision` is shown as Mastery). */
19
+ export type StorySkill = 'strength' | 'archery' | 'precision' | 'fishing' | 'cooking' | 'foraging' | 'woodwork' | 'mining' | 'blacksmithing' | 'explorer';
20
+ export declare const STORY_SKILLS: readonly StorySkill[];
21
+ export declare const STORY_COMBAT_SKILLS: readonly StorySkill[];
22
+ export declare const STORY_SKILL_NAMES: Record<StorySkill, string>;
23
+ export declare function isStorySkill(value: unknown): value is StorySkill;
24
+ /** Who a step talks to. `id` picks one NPC out of a kind (the Capital's Rimdel, not the prisoner). */
25
+ export type StoryNpcRef = {
26
+ kind: string;
27
+ id?: string;
28
+ name: string;
29
+ };
30
+ /** Any one of `kinds` counts: "a cooked fish" is several items. */
31
+ export type StoryItemNeed = {
32
+ kinds: readonly string[];
33
+ qty: number;
34
+ label: string;
35
+ };
36
+ export type StoryReward = {
37
+ coins?: number;
38
+ xp?: Partial<Record<StorySkill, number>>;
39
+ /** XP the player puts into one skill of their choice, from `skills` (every skill when absent). */
40
+ choiceXp?: {
41
+ qty: number;
42
+ skills?: readonly StorySkill[];
43
+ };
44
+ items?: readonly {
45
+ kind: string;
46
+ qty: number;
47
+ }[];
48
+ /** A lasting perk, shown on the card as a line of its own (Fred's Pass). */
49
+ perk?: string;
50
+ };
51
+ type StepBase = {
52
+ /** The line on the journal card and the tracker. */
53
+ label: string;
54
+ /** What the quest helper says under the arrow. */
55
+ hint: string;
56
+ };
57
+ /**
58
+ * One step. `talk` and `deliver` finish when the player speaks to the NPC
59
+ * (holding the items, for a delivery, which are taken); `kill` counts the
60
+ * player's own kills; `catch` counts fish landed; `touch` counts distinct
61
+ * quest props clicked (`questprop` entities whose style starts with `prop`);
62
+ * `choose` offers the NPC's options, and each can pay its own reward and end
63
+ * the quest early.
64
+ */
65
+ export type StoryStep = (StepBase & {
66
+ kind: 'talk';
67
+ npc: StoryNpcRef;
68
+ say: string;
69
+ }) | (StepBase & {
70
+ kind: 'deliver';
71
+ npc: StoryNpcRef;
72
+ items: readonly StoryItemNeed[];
73
+ say: string;
74
+ short: string;
75
+ }) | (StepBase & {
76
+ kind: 'kill';
77
+ npcKinds: readonly string[];
78
+ qty: number;
79
+ npcLabel: string;
80
+ }) | (StepBase & {
81
+ kind: 'catch';
82
+ fish: readonly string[];
83
+ qty: number;
84
+ /** Handed over with the last catch, e.g. Wilson's big trout. */
85
+ give?: {
86
+ kind: string;
87
+ qty: number;
88
+ notice: string;
89
+ };
90
+ }) | (StepBase & {
91
+ kind: 'touch';
92
+ prop: string;
93
+ qty: number;
94
+ /** Said by the player on each new prop, keyed by the prop's full style. */
95
+ notices: Readonly<Record<string, string>>;
96
+ /** Handed over with each new prop. */
97
+ give?: {
98
+ kind: string;
99
+ qty: number;
100
+ };
101
+ }) | (StepBase & {
102
+ kind: 'choose';
103
+ npc: StoryNpcRef;
104
+ say: string;
105
+ options: readonly {
106
+ id: string;
107
+ label: string;
108
+ say: string;
109
+ /** Paid on top of the quest's own reward. */
110
+ bonus?: StoryReward;
111
+ /** Finish the quest straight away instead of going on to the next step. */
112
+ finish?: boolean;
113
+ }[];
114
+ });
115
+ export type StoryQuestDef = {
116
+ giver: StoryNpcRef;
117
+ /**
118
+ * The giver has an older quest of their own (Forbes, Wilson). Until this
119
+ * quest's gate quest is done they answer as they always have, rather than
120
+ * with this quest's refusal.
121
+ */
122
+ sharedGiver?: boolean;
123
+ /** Until this is met the giver will not offer the quest and says `refuse`. */
124
+ requires?: {
125
+ quest?: string;
126
+ skill?: {
127
+ skill: StorySkill;
128
+ level: number;
129
+ };
130
+ refuse: string;
131
+ };
132
+ /** What the giver says when they offer it (the card's giver line). */
133
+ offer: string;
134
+ accept: string;
135
+ decline: string;
136
+ /** Handed over on accept. */
137
+ onAccept?: readonly {
138
+ kind: string;
139
+ qty: number;
140
+ }[];
141
+ /**
142
+ * Items the quest cannot go on without. Lose one before the step that
143
+ * uses it and the giver hands you another.
144
+ */
145
+ keep?: readonly {
146
+ kind: string;
147
+ untilStep: number;
148
+ say: string;
149
+ }[];
150
+ steps: readonly StoryStep[];
151
+ /** The giver's closing line, with the reward. */
152
+ done: string;
153
+ /** What the giver says ever after. */
154
+ after: string;
155
+ rewards: StoryReward;
156
+ };
157
+ export type StoryQuestId = 'fredsLetter' | 'beagleBirthday' | 'wilsonBigCatch' | 'smithsApprentice' | 'spiderHollowEggs' | 'harbourThief' | 'coldFeet' | 'livoniasDiary' | 'charcoalBurner';
158
+ export declare const STORY_QUEST_IDS: readonly StoryQuestId[];
159
+ /** The npc_action id for a story choice. */
160
+ export declare const STORY_CHOICE_PREFIX = "story:";
161
+ export declare function storyChoiceAction(quest: StoryQuestId, option: string): string;
162
+ export declare function parseStoryChoiceAction(action: string): {
163
+ quest: StoryQuestId;
164
+ option: string;
165
+ } | null;
166
+ export declare function isStoryQuestId(value: unknown): value is StoryQuestId;
167
+ /** Where a player has got to in one story quest. */
168
+ export type StoryProgress = {
169
+ step: number;
170
+ /** Kills, catches or props for a counting step. */
171
+ count: number;
172
+ /** The props already clicked on a `touch` step, so one prop is not five. */
173
+ touched?: string[];
174
+ };
175
+ export type StoryProgressMap = Partial<Record<StoryQuestId, StoryProgress>>;
176
+ /** An XP lump waiting for the player to pick its skill. Saved, so closing the picker loses nothing. */
177
+ export type PendingXpChoice = {
178
+ quest: string;
179
+ qty: number;
180
+ skills: StorySkill[];
181
+ };
182
+ export declare const FREDS_LETTER_KIND = "fredsletter";
183
+ export declare const BOAT_TICKET_KIND = "boatticket";
184
+ export declare const TROPHY_TROUT_KIND = "trophytrout";
185
+ export declare const LIVONIA_PAGE_KIND = "livoniapage";
186
+ export declare const STORY_ITEM_KINDS: readonly string[];
187
+ /** The Blender model a quest prop draws with (CAPITAL_BUILDING_MODELS), from its style's prop. */
188
+ export declare function questPropModel(style: string | undefined): string;
189
+ /** The world entity a `touch` step counts. Its style is `<prop>:<which>`, e.g. `spideregg:3`. */
190
+ export declare const QUEST_PROP_KIND = "questprop";
191
+ export declare const FRED: StoryNpcRef;
192
+ /** Rimdel after his escape: a clerk at the Grand Exchange. The prisoner keeps the id `rimdel`. */
193
+ export declare const CAPITAL_RIMDEL_ID = "rimdel-capital";
194
+ export declare const CAPITAL_RIMDEL: StoryNpcRef;
195
+ export declare const FORBES: StoryNpcRef;
196
+ export declare const WILSON: StoryNpcRef;
197
+ export declare const HALDREN: StoryNpcRef;
198
+ export declare const TOBIN: StoryNpcRef;
199
+ export declare const MARLOW: StoryNpcRef;
200
+ /** Wears the Castle Guard's steel, but is his own kind: a guard is attackable, and a click on Crane must talk. */
201
+ export declare const CRANE: StoryNpcRef;
202
+ export declare const EXPLORER: StoryNpcRef;
203
+ export declare const SCHOLAR: StoryNpcRef;
204
+ export declare const BURNER: StoryNpcRef;
205
+ /** Every kind a story quest adds to the world, for the NpcKind union and the name table. */
206
+ export declare const STORY_NPC_NAMES: Readonly<Record<string, string>>;
207
+ export declare const STORY_QUESTS: Record<StoryQuestId, StoryQuestDef>;
208
+ /** The step a player is on, or null once past the last one. */
209
+ export declare function storyStep(id: StoryQuestId, progress: StoryProgress | undefined): StoryStep | null;
210
+ /** The quantity a counting step needs, or 0 for a step that does not count. */
211
+ export declare function storyStepTarget(step: StoryStep): number;
212
+ export declare function npcMatches(ref: StoryNpcRef, npc: {
213
+ kind: string;
214
+ id: string;
215
+ }): boolean;
216
+ /** Reward lines for the offer card, as QuestReward rows. */
217
+ export declare function storyRewardRows(reward: StoryReward): {
218
+ kind: string;
219
+ qty: number;
220
+ }[];
221
+ export declare function normalizeStoryProgress(raw: unknown): StoryProgressMap;
222
+ export declare function normalizePendingXpChoices(raw: unknown): PendingXpChoice[];
223
+ export {};
224
+ //# sourceMappingURL=storyQuests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storyQuests.d.ts","sourceRoot":"","sources":["../src/storyQuests.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,kGAAkG;AAClG,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,SAAS,GACT,WAAW,GACX,SAAS,GACT,SAAS,GACT,UAAU,GACV,UAAU,GACV,QAAQ,GACR,eAAe,GACf,UAAU,CAAC;AAEf,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EAW7C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,SAAS,UAAU,EAAyC,CAAC;AAE/F,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAWxD,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED,sGAAsG;AACtG,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MA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