@maka/maka-cli 5.120.0 → 5.122.0

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 (147) hide show
  1. package/bundle/typescript/package.json +1 -1
  2. package/bundle/typescript/src/commands/game/sideQuest/archetypes.d.ts +72 -0
  3. package/bundle/typescript/src/commands/game/sideQuest/archetypes.js +300 -61
  4. package/bundle/typescript/src/commands/game/sideQuest/archetypes.js.map +1 -1
  5. package/bundle/typescript/src/commands/game/sideQuest/aspects.js +11 -1
  6. package/bundle/typescript/src/commands/game/sideQuest/aspects.js.map +1 -1
  7. package/bundle/typescript/src/commands/game/sideQuest/augmentations.d.ts +33 -0
  8. package/bundle/typescript/src/commands/game/sideQuest/augmentations.js +85 -0
  9. package/bundle/typescript/src/commands/game/sideQuest/augmentations.js.map +1 -1
  10. package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js +2 -2
  11. package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js +31 -2
  12. package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -1
  13. package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js +8 -0
  14. package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js.map +1 -1
  15. package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.d.ts +10 -3
  16. package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js +17 -4
  17. package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js.map +1 -1
  18. package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js +1 -1
  19. package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -1
  20. package/bundle/typescript/src/commands/game/sideQuest/commands/catalog.d.ts +0 -7
  21. package/bundle/typescript/src/commands/game/sideQuest/commands/catalog.js +39 -3
  22. package/bundle/typescript/src/commands/game/sideQuest/commands/catalog.js.map +1 -1
  23. package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js +31 -5
  24. package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js.map +1 -1
  25. package/bundle/typescript/src/commands/game/sideQuest/commands/fit.d.ts +29 -0
  26. package/bundle/typescript/src/commands/game/sideQuest/commands/fit.js +85 -0
  27. package/bundle/typescript/src/commands/game/sideQuest/commands/fit.js.map +1 -0
  28. package/bundle/typescript/src/commands/game/sideQuest/commands/hack.d.ts +16 -1
  29. package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +273 -28
  30. package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js.map +1 -1
  31. package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js +4 -4
  32. package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js.map +1 -1
  33. package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +16 -5
  34. package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
  35. package/bundle/typescript/src/commands/game/sideQuest/commands/mark.d.ts +19 -10
  36. package/bundle/typescript/src/commands/game/sideQuest/commands/mark.js +43 -227
  37. package/bundle/typescript/src/commands/game/sideQuest/commands/mark.js.map +1 -1
  38. package/bundle/typescript/src/commands/game/sideQuest/commands/move.js +31 -3
  39. package/bundle/typescript/src/commands/game/sideQuest/commands/move.js.map +1 -1
  40. package/bundle/typescript/src/commands/game/sideQuest/commands/pan.js +3 -1
  41. package/bundle/typescript/src/commands/game/sideQuest/commands/pan.js.map +1 -1
  42. package/bundle/typescript/src/commands/game/sideQuest/commands/pick.d.ts +34 -1
  43. package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js +81 -12
  44. package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js.map +1 -1
  45. package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js +5 -0
  46. package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js.map +1 -1
  47. package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +5 -2
  48. package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
  49. package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js +4 -0
  50. package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js.map +1 -1
  51. package/bundle/typescript/src/commands/game/sideQuest/commands/silent.js +4 -6
  52. package/bundle/typescript/src/commands/game/sideQuest/commands/silent.js.map +1 -1
  53. package/bundle/typescript/src/commands/game/sideQuest/commands/stance.d.ts +10 -0
  54. package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js +50 -2
  55. package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js.map +1 -1
  56. package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js +27 -0
  57. package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js.map +1 -1
  58. package/bundle/typescript/src/commands/game/sideQuest/engine-version.d.ts +1 -1
  59. package/bundle/typescript/src/commands/game/sideQuest/engine-version.js +45 -1
  60. package/bundle/typescript/src/commands/game/sideQuest/engine-version.js.map +1 -1
  61. package/bundle/typescript/src/commands/game/sideQuest/factories/chargen-factory.d.ts +3 -2
  62. package/bundle/typescript/src/commands/game/sideQuest/factories/chargen-factory.js +34 -41
  63. package/bundle/typescript/src/commands/game/sideQuest/factories/chargen-factory.js.map +1 -1
  64. package/bundle/typescript/src/commands/game/sideQuest/factories/repro-scene.js +4 -0
  65. package/bundle/typescript/src/commands/game/sideQuest/factories/repro-scene.js.map +1 -1
  66. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +44 -1
  67. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -1
  68. package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +47 -0
  69. package/bundle/typescript/src/commands/game/sideQuest/game.js +115 -11
  70. package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
  71. package/bundle/typescript/src/commands/game/sideQuest/headless-harness.d.ts +17 -0
  72. package/bundle/typescript/src/commands/game/sideQuest/headless-harness.js +30 -2
  73. package/bundle/typescript/src/commands/game/sideQuest/headless-harness.js.map +1 -1
  74. package/bundle/typescript/src/commands/game/sideQuest/models/device.d.ts +86 -0
  75. package/bundle/typescript/src/commands/game/sideQuest/models/device.js +103 -1
  76. package/bundle/typescript/src/commands/game/sideQuest/models/device.js.map +1 -1
  77. package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +140 -45
  78. package/bundle/typescript/src/commands/game/sideQuest/models/item.js +456 -104
  79. package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
  80. package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +2 -0
  81. package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +7 -5
  82. package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
  83. package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +113 -4
  84. package/bundle/typescript/src/commands/game/sideQuest/models/player.js +289 -47
  85. package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
  86. package/bundle/typescript/src/commands/game/sideQuest/qualities.d.ts +4 -0
  87. package/bundle/typescript/src/commands/game/sideQuest/qualities.js +16 -0
  88. package/bundle/typescript/src/commands/game/sideQuest/qualities.js.map +1 -1
  89. package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +9 -9
  90. package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +6 -6
  91. package/bundle/typescript/src/commands/game/sideQuest/types/repro.d.ts +8 -0
  92. package/bundle/typescript/src/commands/game/sideQuest/types/repro.js.map +1 -1
  93. package/bundle/typescript/src/commands/game/sideQuest/types/save-file.d.ts +9 -2
  94. package/bundle/typescript/src/commands/game/sideQuest/types/seed/device-seed.d.ts +17 -0
  95. package/bundle/typescript/src/commands/game/sideQuest/ui.js +23 -26
  96. package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
  97. package/bundle/typescript/src/commands/game/sideQuest/utilities/affordances.js +1 -1
  98. package/bundle/typescript/src/commands/game/sideQuest/utilities/affordances.js.map +1 -1
  99. package/bundle/typescript/src/commands/game/sideQuest/utilities/barrier-combat.d.ts +38 -0
  100. package/bundle/typescript/src/commands/game/sideQuest/utilities/barrier-combat.js +67 -0
  101. package/bundle/typescript/src/commands/game/sideQuest/utilities/barrier-combat.js.map +1 -0
  102. package/bundle/typescript/src/commands/game/sideQuest/utilities/catalog-data.d.ts +279 -4
  103. package/bundle/typescript/src/commands/game/sideQuest/utilities/catalog-data.js +221 -212
  104. package/bundle/typescript/src/commands/game/sideQuest/utilities/catalog-data.js.map +1 -1
  105. package/bundle/typescript/src/commands/game/sideQuest/utilities/catalog.d.ts +48 -5
  106. package/bundle/typescript/src/commands/game/sideQuest/utilities/catalog.js +84 -17
  107. package/bundle/typescript/src/commands/game/sideQuest/utilities/catalog.js.map +1 -1
  108. package/bundle/typescript/src/commands/game/sideQuest/utilities/cloud-saves.d.ts +9 -0
  109. package/bundle/typescript/src/commands/game/sideQuest/utilities/cloud-saves.js +8 -0
  110. package/bundle/typescript/src/commands/game/sideQuest/utilities/cloud-saves.js.map +1 -1
  111. package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.d.ts +6 -0
  112. package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +52 -12
  113. package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -1
  114. package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.d.ts +32 -0
  115. package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.js +33 -0
  116. package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.js.map +1 -1
  117. package/bundle/typescript/src/commands/game/sideQuest/utilities/condition-report.js +10 -1
  118. package/bundle/typescript/src/commands/game/sideQuest/utilities/condition-report.js.map +1 -1
  119. package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.d.ts +5 -0
  120. package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js +35 -1
  121. package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js.map +1 -1
  122. package/bundle/typescript/src/commands/game/sideQuest/utilities/first-aid.js +3 -1
  123. package/bundle/typescript/src/commands/game/sideQuest/utilities/first-aid.js.map +1 -1
  124. package/bundle/typescript/src/commands/game/sideQuest/utilities/matrix-intrusion.d.ts +121 -0
  125. package/bundle/typescript/src/commands/game/sideQuest/utilities/matrix-intrusion.js +141 -0
  126. package/bundle/typescript/src/commands/game/sideQuest/utilities/matrix-intrusion.js.map +1 -0
  127. package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js +11 -3
  128. package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js.map +1 -1
  129. package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +1 -1
  130. package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js.map +1 -1
  131. package/bundle/typescript/src/commands/game/sideQuest/utilities/pregen-worksheet.d.ts +93 -0
  132. package/bundle/typescript/src/commands/game/sideQuest/utilities/pregen-worksheet.js +201 -0
  133. package/bundle/typescript/src/commands/game/sideQuest/utilities/pregen-worksheet.js.map +1 -0
  134. package/bundle/typescript/src/commands/game/sideQuest/utilities/range.d.ts +19 -13
  135. package/bundle/typescript/src/commands/game/sideQuest/utilities/range.js +77 -34
  136. package/bundle/typescript/src/commands/game/sideQuest/utilities/range.js.map +1 -1
  137. package/bundle/typescript/src/commands/game/sideQuest/utilities/room-view.js +91 -9
  138. package/bundle/typescript/src/commands/game/sideQuest/utilities/room-view.js.map +1 -1
  139. package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.d.ts +16 -0
  140. package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js +50 -3
  141. package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js.map +1 -1
  142. package/bundle/typescript/src/commands/game/sideQuest/utilities/web-character-generator.d.ts +9 -1
  143. package/bundle/typescript/src/commands/game/sideQuest/utilities/web-character-generator.js +28 -4
  144. package/bundle/typescript/src/commands/game/sideQuest/utilities/web-character-generator.js.map +1 -1
  145. package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +43 -3
  146. package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
  147. package/package.json +1 -1
@@ -100,3 +100,20 @@ export interface BootOptions {
100
100
  * and off telemetry, which is most of what made this expensive before.
101
101
  */
102
102
  export declare function bootSession(opts?: BootOptions): Promise<HeadlessSession>;
103
+ /**
104
+ * PUT MARKS ON THE HOST A PERSONA IS STANDING UNDER -- test setup, not a
105
+ * game move.
106
+ *
107
+ * Needed from 2026-09-03 (uMQAhaAysgaKpWFkn), when placing a mark became
108
+ * the OPPOSED test the book describes. Until then a fixture could pin
109
+ * Math.random to 0.99 and be certain a setup `hack` landed, because only
110
+ * one side rolled. Now both sides do, so "every die is a 6" makes the
111
+ * HOST roll perfectly too and the setup step became a coin toss that
112
+ * usually lost.
113
+ *
114
+ * A test that only needs a persona INSIDE a host should not be spending
115
+ * a dice roll to get there -- that made the roll's outcome a silent
116
+ * precondition of assertions about something else entirely. This states
117
+ * the precondition instead.
118
+ */
119
+ export declare function markHostOver(session: HeadlessSession, actorName: string, marks?: number): void;
@@ -1,5 +1,5 @@
1
1
  import { createHeadlessSession } from './headless.js';
2
- import { getArchetype } from './archetypes.js';
2
+ import { getArchetype, archetypeGearDefs } from './archetypes.js';
3
3
  import { Size, Category, Rating } from './types/shared/item-enum.js';
4
4
  /**
5
5
  * STANDING UP A REAL HEADLESS BOOT, cheaply.
@@ -138,7 +138,7 @@ function enumKeyFor(enumObj, value) {
138
138
  export function saveForArchetype(name, archetypeName) {
139
139
  const a = getArchetype(archetypeName);
140
140
  const { skills, ...attrs } = a.combat;
141
- const inventory = (a.gear ?? []).map(def => ({
141
+ const inventory = archetypeGearDefs(a).map(def => ({
142
142
  name: def.name,
143
143
  description: def.description,
144
144
  size: enumKeyFor(Size, def.size),
@@ -259,4 +259,32 @@ export async function bootSession(opts = {}) {
259
259
  }
260
260
  return session;
261
261
  }
262
+ /**
263
+ * PUT MARKS ON THE HOST A PERSONA IS STANDING UNDER -- test setup, not a
264
+ * game move.
265
+ *
266
+ * Needed from 2026-09-03 (uMQAhaAysgaKpWFkn), when placing a mark became
267
+ * the OPPOSED test the book describes. Until then a fixture could pin
268
+ * Math.random to 0.99 and be certain a setup `hack` landed, because only
269
+ * one side rolled. Now both sides do, so "every die is a 6" makes the
270
+ * HOST roll perfectly too and the setup step became a coin toss that
271
+ * usually lost.
272
+ *
273
+ * A test that only needs a persona INSIDE a host should not be spending
274
+ * a dice roll to get there -- that made the roll's outcome a silent
275
+ * precondition of assertions about something else entirely. This states
276
+ * the precondition instead.
277
+ */
278
+ export function markHostOver(session, actorName, marks = 1) {
279
+ const scene = session.game.scene;
280
+ const actor = scene.getPlayerByName(actorName);
281
+ if (!actor)
282
+ throw new Error(`markHostOver: no actor called ${actorName}`);
283
+ const rooms = Object.values(scene.getRooms());
284
+ const here = actor.currentLocation.name;
285
+ const host = rooms.find(r => r.hasNode && r.name === here) ?? rooms.find(r => r.hasNode);
286
+ if (!host)
287
+ throw new Error('markHostOver: this scene has no host');
288
+ host.hostMarksBy.set(actorName, marks);
289
+ }
262
290
  //# sourceMappingURL=headless-harness.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"headless-harness.js","sourceRoot":"","sources":["../../../../../../src/commands/game/sideQuest/headless-harness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAmB,MAAM,eAAe,CAAC;AAIvE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,mEAAmE;AACnE,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,wCAAwC;IACrD,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,GAAG;CACZ,CAA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AAE,KAAK,CAAC,CAAC;AACzC,CAAC"}
@@ -21,6 +21,12 @@ export interface IDeviceConfig {
21
21
  * see DEFAULT_DEVICE_RATING. Meaningless on a 'ward', which is not
22
22
  * electronics at all. */
23
23
  rating?: number;
24
+ /** BARRIER RATINGS (p.197-198): Structure (the condition monitor) and
25
+ * Armor (what it soaks with). Omitted takes barrierDefaultsFor(). */
26
+ structure?: number;
27
+ armor?: number;
28
+ /** The seed's footprint, only to pick the barrier default tier. */
29
+ footprint?: 'small' | 'medium' | 'large';
24
30
  /** Wireless mode. Defaults on for electronics, and is always off on a
25
31
  * 'ward'. A device with its wireless off has no icon to find and
26
32
  * nothing to reach from the grid. */
@@ -38,6 +44,36 @@ export interface IDeviceConfig {
38
44
  * be a device", not "everything in the room is".
39
45
  */
40
46
  export declare const DEFAULT_DEVICE_RATING: Partial<Record<DeviceKind, number>>;
47
+ /**
48
+ * THE BOOK'S BARRIER TIERS (p.197 Barrier Ratings, RAG-checked 2026-09-03):
49
+ * Structure / Armor. Fragile is standard glass; Reinforced is a security
50
+ * door, armored glass, Kevlar wallboard; Heavy is concrete or a metal
51
+ * beam. A device seed that says neither gets Reinforced -- the ordinary
52
+ * locked door -- or Heavy when its footprint is large. A ward is the Art
53
+ * and has no Structure to shoot.
54
+ */
55
+ export declare const BARRIER_TIERS: {
56
+ readonly fragile: {
57
+ readonly structure: 1;
58
+ readonly armor: 2;
59
+ };
60
+ readonly reinforced: {
61
+ readonly structure: 8;
62
+ readonly armor: 12;
63
+ };
64
+ readonly heavy: {
65
+ readonly structure: 12;
66
+ readonly armor: 20;
67
+ };
68
+ };
69
+ export declare function barrierDefaultsFor(kind: DeviceKind, footprint?: 'small' | 'medium' | 'large'): {
70
+ structure: number;
71
+ armor: number;
72
+ };
73
+ /** A seed's rating, kept to the range the book uses (1-12, the same
74
+ * clamp as Host.clampRating) so a typo cannot make a lock impossible
75
+ * or free. */
76
+ export declare function clampDeviceRating(rating: number): number;
41
77
  /**
42
78
  * A DEVICE: a thing in a room that is shut and can be opened.
43
79
  *
@@ -81,6 +117,20 @@ export declare class Device {
81
117
  grantsItem?: Item;
82
118
  atSpot?: string;
83
119
  opensExit?: string;
120
+ /**
121
+ * MARKS ON THIS DEVICE, placer -> count (max 3, p.236).
122
+ *
123
+ * A SLAVED DEVICE IS ITS OWN ICON (Data Trails p.87-88, and the
124
+ * reason uMQAhaAysgaKpWFkn decomposes): a decker already standing
125
+ * inside a host still rolls Hacking + Logic [Sleaze] versus this
126
+ * device's OWN DR + Firewall to get a mark on it, and only then can
127
+ * a Control Device action work it. Owning the host is not owning
128
+ * the door.
129
+ *
130
+ * Session state, like every other mark ledger -- a persona reboot
131
+ * clears what it placed (utilities/marks.ts).
132
+ */
133
+ marksBy: Map<string, number>;
84
134
  openMessage: string;
85
135
  refuseMessage: string;
86
136
  /** The whole of this device's state. */
@@ -98,8 +148,43 @@ export declare class Device {
98
148
  */
99
149
  rating: number;
100
150
  wireless: boolean;
151
+ /**
152
+ * WHAT IT IS MADE OF (p.197-198): Structure is the condition monitor
153
+ * shooting it fills, Armor is what it soaks with. Reaching Structure
154
+ * makes a hole big enough to be a way through -- the barrier opens,
155
+ * with the same finality as a bricked deck. utilities/barrier-combat.ts
156
+ * is the only writer.
157
+ */
158
+ readonly structure: number;
159
+ readonly armor: number;
160
+ private _barrierDamage;
161
+ /**
162
+ * THE LOCKSMITH EXTENDED TEST IN PROGRESS (p.48, p.359-360): picking a
163
+ * maglock by hand accumulates hits toward Rating x 2 across attempts,
164
+ * one die fewer each time. Every `pick` is one interval of the same
165
+ * test, so the running total lives on the lock. One worker at a time:
166
+ * a different actor starting over resets it. Cleared when the device
167
+ * opens. Session-only -- a lock half-picked when you quit is a lock.
168
+ */
169
+ private _pickProgress?;
101
170
  constructor(config: IDeviceConfig);
102
171
  isOpen(): boolean;
172
+ /** The running test for this actor -- fresh when nobody, or somebody else, was working it. */
173
+ pickProgressFor(actorName: string): {
174
+ actorName: string;
175
+ hits: number;
176
+ attempts: number;
177
+ };
178
+ resetPickProgress(): void;
179
+ /** The hits a hand-pick needs in total: Rating x 2 (p.359-360). */
180
+ get pickThreshold(): number;
181
+ get barrierDamage(): number;
182
+ /** Boxes actually taken; a ward has nothing to fill. */
183
+ takeBarrierDamage(boxes: number): number;
184
+ /** Damage has reached Structure: there is a hole where the barrier was. */
185
+ get isHoled(): boolean;
186
+ /** "Structure 8 / Armor 12, 3/8" -- the panel's line. */
187
+ barrierSummary(): string;
103
188
  /**
104
189
  * IS THERE AN ICON HERE TO FIND? Wireless mode on, and a rating that
105
190
  * means it is electronics at all.
@@ -175,5 +260,6 @@ export declare class Device {
175
260
  /** Persistence-only: one flag in, nothing out. */
176
261
  restoreState(state: {
177
262
  open: boolean;
263
+ damage?: number;
178
264
  }): void;
179
265
  }
@@ -16,6 +16,32 @@ export const DEFAULT_DEVICE_RATING = {
16
16
  lock: 2,
17
17
  panel: 2,
18
18
  };
19
+ /**
20
+ * THE BOOK'S BARRIER TIERS (p.197 Barrier Ratings, RAG-checked 2026-09-03):
21
+ * Structure / Armor. Fragile is standard glass; Reinforced is a security
22
+ * door, armored glass, Kevlar wallboard; Heavy is concrete or a metal
23
+ * beam. A device seed that says neither gets Reinforced -- the ordinary
24
+ * locked door -- or Heavy when its footprint is large. A ward is the Art
25
+ * and has no Structure to shoot.
26
+ */
27
+ export const BARRIER_TIERS = {
28
+ fragile: { structure: 1, armor: 2 },
29
+ reinforced: { structure: 8, armor: 12 },
30
+ heavy: { structure: 12, armor: 20 },
31
+ };
32
+ export function barrierDefaultsFor(kind, footprint) {
33
+ if (kind === 'ward')
34
+ return { structure: 0, armor: 0 };
35
+ return footprint === 'large' ? BARRIER_TIERS.heavy : BARRIER_TIERS.reinforced;
36
+ }
37
+ /** A seed's rating, kept to the range the book uses (1-12, the same
38
+ * clamp as Host.clampRating) so a typo cannot make a lock impossible
39
+ * or free. */
40
+ export function clampDeviceRating(rating) {
41
+ if (!Number.isFinite(rating))
42
+ return 1;
43
+ return Math.max(1, Math.min(12, Math.floor(rating)));
44
+ }
19
45
  /**
20
46
  * A DEVICE: a thing in a room that is shut and can be opened.
21
47
  *
@@ -59,6 +85,20 @@ export class Device {
59
85
  grantsItem;
60
86
  atSpot;
61
87
  opensExit;
88
+ /**
89
+ * MARKS ON THIS DEVICE, placer -> count (max 3, p.236).
90
+ *
91
+ * A SLAVED DEVICE IS ITS OWN ICON (Data Trails p.87-88, and the
92
+ * reason uMQAhaAysgaKpWFkn decomposes): a decker already standing
93
+ * inside a host still rolls Hacking + Logic [Sleaze] versus this
94
+ * device's OWN DR + Firewall to get a mark on it, and only then can
95
+ * a Control Device action work it. Owning the host is not owning
96
+ * the door.
97
+ *
98
+ * Session state, like every other mark ledger -- a persona reboot
99
+ * clears what it placed (utilities/marks.ts).
100
+ */
101
+ marksBy = new Map();
62
102
  openMessage;
63
103
  refuseMessage;
64
104
  /** The whole of this device's state. */
@@ -76,6 +116,25 @@ export class Device {
76
116
  */
77
117
  rating;
78
118
  wireless;
119
+ /**
120
+ * WHAT IT IS MADE OF (p.197-198): Structure is the condition monitor
121
+ * shooting it fills, Armor is what it soaks with. Reaching Structure
122
+ * makes a hole big enough to be a way through -- the barrier opens,
123
+ * with the same finality as a bricked deck. utilities/barrier-combat.ts
124
+ * is the only writer.
125
+ */
126
+ structure;
127
+ armor;
128
+ _barrierDamage = 0;
129
+ /**
130
+ * THE LOCKSMITH EXTENDED TEST IN PROGRESS (p.48, p.359-360): picking a
131
+ * maglock by hand accumulates hits toward Rating x 2 across attempts,
132
+ * one die fewer each time. Every `pick` is one interval of the same
133
+ * test, so the running total lives on the lock. One worker at a time:
134
+ * a different actor starting over resets it. Cleared when the device
135
+ * opens. Session-only -- a lock half-picked when you quit is a lock.
136
+ */
137
+ _pickProgress;
79
138
  constructor(config) {
80
139
  this.kind = config.kind;
81
140
  this.name = config.name;
@@ -89,7 +148,10 @@ export class Device {
89
148
  this.opensExit = config.opensExit;
90
149
  this.openMessage = config.openMessage || 'It opens.';
91
150
  this.refuseMessage = config.refuseMessage || `Nothing happens.`;
92
- this.rating = config.rating ?? DEFAULT_DEVICE_RATING[config.kind] ?? 0;
151
+ this.rating = config.rating !== undefined ? clampDeviceRating(config.rating) : DEFAULT_DEVICE_RATING[config.kind] ?? 0;
152
+ const tier = barrierDefaultsFor(config.kind, config.footprint);
153
+ this.structure = config.kind === 'ward' ? 0 : Math.max(0, Math.floor(config.structure ?? tier.structure));
154
+ this.armor = config.kind === 'ward' ? 0 : Math.max(0, Math.floor(config.armor ?? tier.armor));
93
155
  // A ward has no wireless mode to be in. Everything else defaults ON,
94
156
  // because a seeded keypad nobody thought about is a keypad on the
95
157
  // grid -- which is the state the report says the game should model.
@@ -98,6 +160,43 @@ export class Device {
98
160
  isOpen() {
99
161
  return this.open;
100
162
  }
163
+ // ---- The Extended Test (pick.ts) ----
164
+ /** The running test for this actor -- fresh when nobody, or somebody else, was working it. */
165
+ pickProgressFor(actorName) {
166
+ if (!this._pickProgress || this._pickProgress.actorName !== actorName) {
167
+ this._pickProgress = { actorName, hits: 0, attempts: 0 };
168
+ }
169
+ return this._pickProgress;
170
+ }
171
+ resetPickProgress() {
172
+ this._pickProgress = undefined;
173
+ }
174
+ /** The hits a hand-pick needs in total: Rating x 2 (p.359-360). */
175
+ get pickThreshold() {
176
+ return this.rating * 2;
177
+ }
178
+ // ---- The barrier (utilities/barrier-combat.ts) ----
179
+ get barrierDamage() {
180
+ return this._barrierDamage;
181
+ }
182
+ /** Boxes actually taken; a ward has nothing to fill. */
183
+ takeBarrierDamage(boxes) {
184
+ if (this.structure <= 0)
185
+ return 0;
186
+ const taken = Math.max(0, Math.floor(boxes));
187
+ this._barrierDamage = Math.min(this.structure, this._barrierDamage + taken);
188
+ return taken;
189
+ }
190
+ /** Damage has reached Structure: there is a hole where the barrier was. */
191
+ get isHoled() {
192
+ return this.structure > 0 && this._barrierDamage >= this.structure;
193
+ }
194
+ /** "Structure 8 / Armor 12, 3/8" -- the panel's line. */
195
+ barrierSummary() {
196
+ if (this.structure <= 0)
197
+ return '';
198
+ return `Structure ${this.structure} / Armor ${this.armor}${this._barrierDamage > 0 ? `, ${this._barrierDamage}/${this.structure} boxes` : ''}`;
199
+ }
101
200
  /**
102
201
  * IS THERE AN ICON HERE TO FIND? Wireless mode on, and a rating that
103
202
  * means it is electronics at all.
@@ -207,6 +306,7 @@ export class Device {
207
306
  force(succeeded) {
208
307
  if (succeeded) {
209
308
  this.open = true;
309
+ this._pickProgress = undefined;
210
310
  return { success: true, message: this.openMessage, alarmed: false };
211
311
  }
212
312
  return { success: false, message: AFFORDANCE_FLAVOR[this.kind].failureMessage, alarmed: true };
@@ -231,6 +331,8 @@ export class Device {
231
331
  /** Persistence-only: one flag in, nothing out. */
232
332
  restoreState(state) {
233
333
  this.open = state.open;
334
+ if (state.damage !== undefined)
335
+ this._barrierDamage = Math.max(0, Math.min(this.structure, Math.floor(state.damage)));
234
336
  }
235
337
  }
236
338
  //# sourceMappingURL=device.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"device.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/models/device.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAc,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AA6B7C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAwC;IACxE,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;CACT,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,OAAO,MAAM;IACD,IAAI,CAAa;IAC1B,IAAI,CAAS;IACb,WAAW,CAAS;IACpB,IAAI,CAAU;IACd,OAAO,CAAQ;IACf,UAAU,CAAQ;IAClB,MAAM,CAAU;IAChB,SAAS,CAAU;IACnB,WAAW,CAAS;IACpB,aA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ACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACjG,CAAC;IAED;;;OAGG;IACH,iBAAiB;QACf,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI;YACzB,CAAC,CAAC,0DAA0D,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,gBAAgB;YACnG,CAAC,CAAC,IAAI,CAAC,OAAO;gBACZ,CAAC,CAAC,gDAAgD,IAAI,CAAC,OAAO,CAAC,IAAI,YAAY;gBAC/E,CAAC,CAAC,iEAAiE,CAAC;QACxE,OAAO,gCAAgC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;IAC9F,CAAC;IAED,kDAAkD;IAClD,OAAO;QACL,MAAM,IAAI,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;QACrD,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5C,CAAC;IAED,kDAAkD;IAClD,YAAY,CAAC,KAAwB;QACnC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;CACF"}
1
+ {"version":3,"file":"device.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/models/device.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAc,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAmC7C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAwC;IACxE,IAAI,EAAE,CAAC;IACP,KAAK,EAAE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AAC,OAAO,CAAC,IAAI,YAAY;gBAC/E,CAAC,CAAC,iEAAiE,CAAC;QACxE,OAAO,gCAAgC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;IAC9F,CAAC;IAED,kDAAkD;IAClD,OAAO;QACL,MAAM,IAAI,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;QACrD,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5C,CAAC;IAED,kDAAkD;IAClD,YAAY,CAAC,KAAyC;QACpD,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS;YAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACxH,CAAC;CACF"}
@@ -1,5 +1,13 @@
1
1
  import { Size, Category, Rating } from '../types/shared/item-enum.js';
2
+ import type { ICatalogItem, ICatalogEffect, ICatalogAmmo, ICatalogVehicle, WeaponSkill, WeaponRange, MountPoint, ModKind } from '../utilities/catalog-data.js';
2
3
  import { AbstractItem } from '../types/shared/abstracts.js';
4
+ /**
5
+ * What a running program adds to a Matrix attribute, from its catalog
6
+ * row's effects (v13). The program's key is the deck's word for it
7
+ * (utilities/programs.ts); the row is found by the program's name.
8
+ * PROGRAM_ATTR_MODS stands in when no row is loaded.
9
+ */
10
+ export declare function programMatrixMod(key: string, attr: 'attack' | 'sleaze' | 'dataProcessing' | 'firewall' | 'damage'): number;
3
11
  export interface IItemConstructorConfig {
4
12
  name: string;
5
13
  description: string;
@@ -113,12 +121,24 @@ export declare class Item extends AbstractItem {
113
121
  /**
114
122
  * STUN BY NATURE (SR5 p.170-171, p.424, RAG-checked 2026-09-02):
115
123
  * electricity damage is Stun, so a taser, a stun baton or shock gloves
116
- * never deal Physical.
124
+ * never deal Physical. THE ROW SAYS SO (catalog v13: weapon.damageType
125
+ * / weapon.electric); the name regex is the fallback for generated gear.
117
126
  */
118
127
  isStunWeapon(): boolean;
119
128
  /**
120
- * STUN BY AMMUNITION (p.434): gel rounds deal Stun at AP +1; stick-n-shock
121
- * deal electric Stun at DV -2, AP -5. Anything else is Physical.
129
+ * WHAT THE LOADED ROUND DOES TO THE LINE (p.433-434): the ammunition
130
+ * row's block -- gel Stun at AP +1, stick-n-shock electric Stun at DV
131
+ * -2 / AP -5, APDS AP -4, explosive DV +1 / AP -1, flechette DV +2 /
132
+ * AP +5. Regular rounds shift nothing. Generated ammunition with no
133
+ * row keeps the two Stun names the engine always knew.
134
+ */
135
+ loadedAmmoMods(): (ICatalogAmmo & {
136
+ kind: string;
137
+ }) | undefined;
138
+ /**
139
+ * STUN BY AMMUNITION (p.434): the loaded round's block when it deals
140
+ * Stun. Kept as the pre-v13 shape for its callers (combat-exchange,
141
+ * the non-lethal tests): gel or stick-n-shock, with the DV/AP shift.
122
142
  */
123
143
  stunAmmo(): {
124
144
  kind: 'gel' | 'stick-n-shock';
@@ -131,6 +151,19 @@ export declare class Item extends AbstractItem {
131
151
  set owner(owner: string | undefined);
132
152
  get id(): string;
133
153
  get transferable(): boolean;
154
+ /**
155
+ * SURGERY MAKES IT PART OF YOU (Chrome Flesh p.222, the headware
156
+ * cyberdeck housing). One-way on purpose: there is no uninstall for
157
+ * chrome anywhere else in this engine either.
158
+ */
159
+ implantIntoBody(): void;
160
+ /**
161
+ * "Nothing special happens" is honest for most props, but confusing for
162
+ * gear whose NAME implies a specific action that lives at a different
163
+ * verb -- a Lockpick Set at a pickable door (user, 2026-09-03). The
164
+ * row's `useHint` (catalog v13) names that verb; absent it, the generic
165
+ * line stands, which is correct for gear that really has nothing to say.
166
+ */
134
167
  use(): string;
135
168
  /**
136
169
  * How much this item's quality tier is worth in game mechanics: extra
@@ -140,11 +173,33 @@ export declare class Item extends AbstractItem {
140
173
  * that gear feeds scales off this one number.
141
174
  */
142
175
  get qualityBonus(): number;
176
+ /** The catalog row, by exact slug or name (strict: catalogRowFor). */
177
+ get row(): ICatalogItem | undefined;
178
+ /** The SR5 Rating / Force / Capacity this thing carries: the row's, or
179
+ * the "(Rating N)" its name prints. Undefined for an unrated thing. */
180
+ get ratingValue(): number | undefined;
143
181
  private get weaponHay();
144
- /** Base ranged DV before quality (RAW: holdout 6P ... assault 11P, compressed). */
182
+ /** The p.185 range class: the row's, else read off the name (utilities/range.ts guessRangeClass). */
183
+ get rangeClass(): WeaponRange;
184
+ /** The skill this weapon is used with: the row's, else the class's. */
185
+ get weaponSkill(): WeaponSkill;
186
+ /**
187
+ * THE DV, the book's flat part (p.421-431): 8 for the Predator's "8P",
188
+ * 2 for a knife's "(STR+2)P" -- the Strength half is the wielder's and
189
+ * Player.getWeaponProfile adds it (dvAttribute says whether to). The
190
+ * fallback is the CLASS row of the same tables, un-compressed.
191
+ */
192
+ get weaponDv(): number;
193
+ /** Which attribute the DV rides on: melee is (STR + dv) unless the row says otherwise. */
194
+ get dvAttribute(): 'strength' | undefined;
195
+ /** Physical or Stun, before ammunition and stance have their say. */
196
+ get damageType(): 'P' | 'S';
197
+ /** @deprecated v13 -- the DV is weaponDv; kept one release for its readers. */
145
198
  get rangedBase(): number;
146
- /** Base melee DV before STR/quality (RAW: knife STR+2, sword/katana/club STR+3). */
199
+ /** @deprecated v13 -- the DV is weaponDv; kept one release for its readers. */
147
200
  get meleeBase(): number;
201
+ /** Reach (p.421-423): the row's, else none. */
202
+ get reach(): number;
148
203
  /**
149
204
  * ACCURACY -- the LIMIT on an attack made with this weapon (p.46-47,
150
205
  * p.168: "Each weapon has an Accuracy rating that serves as its limit
@@ -152,60 +207,100 @@ export declare class Item extends AbstractItem {
152
207
  * inherent one, higher or lower (p.46-47), so this is not a floor or a
153
208
  * cap on the Physical limit -- it is the limit.
154
209
  *
155
- * NOT COMPRESSED, unlike the DV values above. Damage was squeezed to
156
- * engine scale because it is measured against soak dice this engine
157
- * also scales; a limit is measured against HITS, which are the book's
158
- * own units, and the Matrix brackets next door already spend the raw
159
- * attribute ("whole, never halved"). Compressing here would make a
160
- * sniper rifle and a holdout cap at the same place.
161
- *
162
- * The numbers are the book's tables (p.421-431), read through the same
163
- * duck-typing school as rangedBase/armorPen so generated gear works
164
- * unmodified. Class-based rather than per-weapon ON PURPOSE: the RAG
165
- * could not produce standard-table rows for every gun this game ships
166
- * (the shotgun table did not come back, and the one AK-97 figure it
167
- * did return was off a Run Faster character sheet -- a MODIFIED
168
- * weapon, not the table), so a per-weapon list would have meant
169
- * inventing the gaps. Every value below is one the book gave up.
210
+ * THIS IS THE BARE NUMBER, NOT THE PARENTHETICAL. Tables write "Acc 5
211
+ * (7)": the 5 is the gun, and the 7 is the gun PLUS a shooter who owns
212
+ * a smartlink (p.433, +2 Accuracy with a smartgun system) -- see
213
+ * Player.smartlinkAccuracyBonus, which supplies the +2 in
214
+ * getAttackLimit. A laser sight's +1 rides the same way (fitted mods,
215
+ * Player.gearLimit), and never stacks with the smartlink (p.432).
170
216
  *
171
- * THIS IS THE BARE NUMBER, NOT THE PARENTHETICAL, and that is now a
172
- * division of labour rather than a gap. Tables write "Acc 5 (7)": the
173
- * 5 is the gun, and the 7 is the gun PLUS a shooter who owns a
174
- * smartlink (p.433, +2 Accuracy with a smartgun system). A gun sitting
175
- * on a table has no idea who will pick it up, so the pairing is asked
176
- * of the shooter -- see Player.smartlinkAccuracyBonus, which supplies
177
- * the +2 in getAttackLimit. fxPHSuE4nrH3gAGiy.
217
+ * 0 means "no Accuracy of its own": the table's own word 'physical'
218
+ * (shock gloves, throwing knives, grenades) and everything that is not
219
+ * a weapon. Callers fall back to the Physical limit, which is what an
220
+ * improvised or bare-handed attack uses (p.168).
178
221
  *
179
- * The laser-sight parenthetical (p.429 Enfield, "4 (5) with the
180
- * built-in laser sight") is a DIFFERENT accessory and is still not
181
- * modelled: the engine has no sight-fitting model, and inventing one
182
- * to reuse the smartlink pairing would be guessing at a second rule.
183
- *
184
- * Note the wireless smartgun bonus is a DICE POOL bonus (+1/+2,
185
- * p.433), NOT an Accuracy bonus -- getAttackPool already spends it as
186
- * dice. Keeping those apart is the same discipline as the Matrix
187
- * brackets: a limit is never a die, and a die is never a limit.
222
+ * The fallback ladder is the book's class values, read through the
223
+ * same duck-typing school as the DV so generated gear works.
188
224
  */
189
225
  get accuracy(): number;
190
226
  /**
191
- * Armor penetration (<= 0): how much of the defender's ARMOR the hit
192
- * ignores (RAW AP, compressed ~2:3 -- knife/katana -3 -> -2, heavy
193
- * pistol -1 -> -1). Applied against armor dice only, never Body
194
- * (combat-exchange.ts).
227
+ * Armor penetration: how much the hit shifts the defender's ARMOR
228
+ * (p.169) -- negative eats it, a "+" (gel, flechette) adds to it. The
229
+ * row's AP, else the class value from the same tables, un-compressed.
195
230
  */
196
231
  get armorPen(): number;
197
- /** Heavier armor classes soak harder (RAW: jacket 12 vs clothing 6). */
232
+ /** Heavier armor classes soak harder (RAW: jacket 12 vs clothing 6). Fallback only. */
198
233
  get isHeavyArmor(): boolean;
234
+ /**
235
+ * THE ARMOR RATING of a worn piece (p.436-437): the row's, else the
236
+ * class value -- jacket-class 12, a vest 9, armor clothing 6, plain
237
+ * clothing 0. Only the highest worn piece counts (Player.armorBreakdown).
238
+ */
239
+ get armorValue(): number;
240
+ /** A "+" accessory's bonus (helmet +2, shield +6, p.437-438): the row's, else the class value. */
241
+ get armorBonus(): number;
242
+ /**
243
+ * WHAT THIS THING DOES, in the engine's vocabulary: the row's effects
244
+ * plus everything fitted into it (a smartlink in the goggles, a laser
245
+ * sight on the gun). A fitted mod's effects apply whenever the host
246
+ * does, so they are re-tagged with the host's own `when`.
247
+ */
248
+ get effects(): ICatalogEffect[];
249
+ /** When a row's effects apply by default: worn for a wearable, held for a weapon, carried otherwise. */
250
+ get defaultWhen(): 'worn' | 'held' | 'carried';
251
+ /** A flag the row (or a fitted mod) grants, by key; its value, or 0. */
252
+ capability(key: string): number;
253
+ hasCapability(key: string): boolean;
254
+ fitted: Item[];
255
+ /** Capacity this thing offers to mods. */
256
+ get capacity(): number;
257
+ /** What kinds of mod it holds. */
258
+ get holds(): ModKind[];
259
+ get capacityUsed(): number;
260
+ /** The accessory seats a gun has: the row's, else the class rule (p.432). */
261
+ get mounts(): MountPoint[];
262
+ /** Accessories the factory fitted (identifiers, see ICatalogWeapon.builtIn). */
263
+ get builtIn(): string[];
264
+ hasBuiltIn(id: string): boolean;
265
+ /**
266
+ * A SMARTGUN (p.433): a smartgun system built in or fitted. Before v13
267
+ * every firearm in the engine counted as one; canon makes it an
268
+ * accessory. Generated gear with no row is a smartgun only when it
269
+ * says so.
270
+ */
271
+ get isSmartgun(): boolean;
272
+ /** Which mount a fitted accessory sits in: the first of its mounts still free when it was fitted. */
273
+ mountOf(mod: Item): MountPoint | undefined;
274
+ /**
275
+ * Why a mod will not fit, or null when it will. The message is the
276
+ * player's line, so it names the rule that refused.
277
+ */
278
+ fitRefusal(mod: Item): string | null;
279
+ /** Fits a mod; the refusal line, or null when it went in. */
280
+ fit(mod: Item): string | null;
281
+ /** Takes a mod back out; false when it was not there. */
282
+ unfit(mod: Item): boolean;
283
+ /** The drone's stat block, when it has one. */
284
+ get vehicle(): ICatalogVehicle | undefined;
285
+ /** Pilot rating (p.199): the row's, else the price-tier fallback the engine always used. */
286
+ get pilotRating(): number;
287
+ /** A drone's hull armor (p.199): the row's, else the tier fallback. */
288
+ get droneArmor(): number;
289
+ /** A drone's Body (p.199): the row's, else the tier fallback. */
290
+ get droneBody(): number;
291
+ /** Does the drone carry a weapon mount: the row's, else the name says. */
292
+ get hasWeaponMount(): boolean;
199
293
  private _deckDamage;
200
294
  isCyberdeck(): boolean;
201
- /** Better decks have more board to burn through: 8 + 2 per quality step. */
295
+ /** The Matrix condition monitor (p.228): 8 + (Device Rating / 2), rounded up. */
202
296
  get maxDeckBoxes(): number;
203
297
  get deckDamage(): number;
204
- /** p.227: Summit 1, Chariot 2, Tsurugi 3, Cyber-5 5 (Excalibur-class 6). */
298
+ /** Device Rating, NUMERIC (catalog v13): the row's, else the tier ladder
299
+ * (p.227: Summit 1, Chariot 2, Tsurugi 3, Cyber-5 5, Excalibur-class 6). */
205
300
  get deviceRating(): number;
206
- /** The p.227 attribute array (highest first), by Device Rating. */
301
+ /** The p.227 attribute array (highest first): the row's four numbers, else by Device Rating. */
207
302
  get deckArray(): number[];
208
- /** How many programs run at once (p.227; storage is unlimited). */
303
+ /** How many programs run at once (p.227; storage is unlimited): the row's, else the Device Rating. */
209
304
  get programSlots(): number;
210
305
  private _deckOrder;
211
306
  get deckOrder(): number[];