@maka/maka-cli 5.64.0 → 5.65.1
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/bundle/typescript/package.json +4 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/backlog.d.ts +29 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/backlog.js +165 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/backlog.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.d.ts +40 -13
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js +107 -25
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/breach.d.ts +11 -15
- package/bundle/typescript/src/commands/game/sideQuest/commands/breach.js +13 -16
- package/bundle/typescript/src/commands/game/sideQuest/commands/breach.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.d.ts +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js +30 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.d.ts +40 -49
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js +121 -160
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.d.ts +7 -8
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js +13 -13
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/cover.d.ts +30 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/cover.js +65 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/cover.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/dispel.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/dispel.js +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/dispel.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +25 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.d.ts +2 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/job-offer.js +9 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/job-offer.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/jobs.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/jobs.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +58 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.js +18 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/move.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.d.ts +2 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/posture.d.ts +45 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/posture.js +115 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/posture.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +80 -9
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +35 -24
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.d.ts +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +158 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/engine-version.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/engine-version.js +15 -1
- package/bundle/typescript/src/commands/game/sideQuest/engine-version.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.d.ts +82 -43
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +419 -263
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +82 -84
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.d.ts +23 -4
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +95 -79
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/seed-migration.d.ts +30 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/seed-migration.js +176 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/seed-migration.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.js +21 -5
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/headless.js +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/headless.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/_index.d.ts +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/_index.js +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/_index.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/device.d.ts +121 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/device.js +145 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/device.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/door.d.ts +27 -8
- package/bundle/typescript/src/commands/game/sideQuest/models/door.js +15 -10
- package/bundle/typescript/src/commands/game/sideQuest/models/door.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +81 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +138 -21
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +68 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +102 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +72 -43
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +82 -59
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +1 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +0 -22
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +78 -109
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +4 -101
- package/bundle/typescript/src/commands/game/sideQuest/types/save-file.d.ts +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/device-seed.d.ts +52 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/device-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/device-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/legacy-puzzle-seed.d.ts +63 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/legacy-puzzle-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/legacy-puzzle-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.d.ts +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +3 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.d.ts +2 -28
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js +1 -14
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/affordances.d.ts +55 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/affordances.js +36 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/affordances.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-review.d.ts +65 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-review.js +137 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-review.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog.d.ts +90 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog.js +103 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +37 -4
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/credentials.d.ts +26 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/credentials.js +48 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/credentials.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/devices.d.ts +23 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/devices.js +55 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/devices.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.d.ts +57 -2
- package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.js +46 -3
- package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.js +18 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js +68 -38
- package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-grid.d.ts +3 -3
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-grid.js +3 -3
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.d.ts +36 -12
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js +101 -27
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/use-target.d.ts +106 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/use-target.js +184 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/use-target.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +54 -5
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/maka.js +1 -1
- package/bundle/typescript/src/maka.js.map +1 -1
- package/bundle/typescript/src/tools/sdk-loader/relocate.d.ts +19 -2
- package/bundle/typescript/src/tools/sdk-loader/relocate.js +22 -2
- package/bundle/typescript/src/tools/sdk-loader/relocate.js.map +1 -1
- package/package.json +4 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.d.ts +0 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js +0 -72
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.d.ts +0 -6
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js +0 -26
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +0 -152
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +0 -393
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.d.ts +0 -28
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.js +0 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.js.map +0 -1
|
@@ -3,27 +3,24 @@ import { rollPool, formatRoll } from '../utilities/dice.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* The FORCEFUL route past a physical barrier (player ruling: "solve" was
|
|
5
5
|
* too broad -- a maglock wants finesse OR muscle, and muscle deserves its
|
|
6
|
-
* own verb). Same
|
|
6
|
+
* own verb). Same device kind as "pick" (a lock), opposite
|
|
7
7
|
* philosophy: raw Strength + Body instead of Agility + locksmith, and it
|
|
8
8
|
* is LOUD no matter what -- a successful breach still raises the world
|
|
9
9
|
* and ends any sneak (onBypassSuccess), where a clean pick stays quiet.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* noticed being told about a pick they never owned (2026-08-27). Hence
|
|
17
|
-
* burnedFlavor below: same flag, own fiction. Do not reinstate the wart.
|
|
10
|
+
* NOTHING BURNS ANY MORE. Both verbs used to share the barrier's one
|
|
11
|
+
* "burned" flag -- a failed attempt spent the shortcut for good -- and
|
|
12
|
+
* that flag went with the puzzle mechanic. A lock you failed to force
|
|
13
|
+
* is a lock you can throw yourself at again, which is what a lock is.
|
|
14
|
+
* The trade against "pick" is undiminished: breach is loud whether or
|
|
15
|
+
* not it works, and that is what you are choosing.
|
|
18
16
|
*/
|
|
19
17
|
export class BreachCommand extends BypassCommand {
|
|
20
18
|
static verb = 'breach';
|
|
21
|
-
static description = 'Force a physical barrier open with raw muscle -- Strength + Body, no skill needed. Loud EVEN WHEN IT WORKS: the crash carries and any sneak is over. Fail
|
|
22
|
-
|
|
19
|
+
static description = 'Force a physical barrier open with raw muscle -- Strength + Body, no skill needed. Loud EVEN WHEN IT WORKS: the crash carries and any sneak is over. Fail and it holds -- try again if you like, but the boom has already carried. "breach north" or "breach <name>" if there\'s more than one.';
|
|
20
|
+
deviceKind = 'lock';
|
|
23
21
|
verbName = 'breach';
|
|
24
|
-
|
|
22
|
+
noDeviceMessage = "There's nothing here to breach -- no physical barrier holds this room.";
|
|
25
23
|
failureFlavor = `You slam into it and it HOLDS -- the frame seizes solid, and the boom rolls down every corridor on the floor.`;
|
|
26
|
-
burnedFlavor = `The frame is sprung and jammed hard in its seat -- you've already thrown everything you have at it, and it won't give twice. Only the real code opens it now.`;
|
|
27
24
|
async execute(args) {
|
|
28
25
|
// Shoulders are meat -- same plane fiction as pick.ts.
|
|
29
26
|
if (this.actor.plane === 'matrix') {
|
|
@@ -51,11 +48,11 @@ export class BreachCommand extends BypassCommand {
|
|
|
51
48
|
/** Breaching is loud when it WORKS, too -- the defining trade against
|
|
52
49
|
* pick. The world event lets every listening NPC react (same channel
|
|
53
50
|
* the failure alarm uses); the sneak is over either way. */
|
|
54
|
-
async
|
|
51
|
+
async onForceSuccess(device) {
|
|
55
52
|
this.actor.sneaking = false;
|
|
56
|
-
this.scene.addWorldEvent(`${this.actor.name} breached "${
|
|
53
|
+
this.scene.addWorldEvent(`${this.actor.name} breached "${device.name}" in ${this.actor.currentLocation.name} -- the crash carried.`);
|
|
57
54
|
// A breach is loud past the walls too (heat -- SINs & getting caught).
|
|
58
|
-
this.game?.addHeat(2, `breached "${
|
|
55
|
+
this.game?.addHeat(2, `breached "${device.name}"`);
|
|
59
56
|
return [` The crash CARRIES -- anyone nearby knows exactly where you are now.`];
|
|
60
57
|
}
|
|
61
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breach.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/breach.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"breach.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/breach.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,aAAc,SAAQ,aAAa;IACpC,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,iSAAiS,CAAC;IACvT,UAAU,GAAG,MAAe,CAAC;IAC7B,QAAQ,GAAG,QAAQ,CAAC;IACpB,eAAe,GAAG,wEAAwE,CAAC;IAC3F,aAAa,GAAG,+GAA+G,CAAC;IAE1I,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,uDAAuD;QACvD,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAClC,OAAO,+DAA+D,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,IAAI,cAAc,uCAAuC,CAAC;QAC3J,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAClC,OAAO,uGAAuG,CAAC;QACjH,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK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: string;
|
|
12
12
|
protected static description: string;
|
|
13
13
|
execute(args?: string[]): Promise<string>;
|
|
14
|
+
/**
|
|
15
|
+
* The shelf, flattened in PRINT ORDER across every vendor in the room
|
|
16
|
+
* -- the list "buy <n>" indexes into. One function so the numbers a
|
|
17
|
+
* player reads and the numbers the parser honours cannot drift apart:
|
|
18
|
+
* browse() and purchase() both call it rather than each walking the
|
|
19
|
+
* vendors themselves.
|
|
20
|
+
*/
|
|
21
|
+
private shelf;
|
|
14
22
|
private browse;
|
|
15
23
|
/** Is what they asked for inside a present contact's TRADE (the same
|
|
16
24
|
* domain list their AI is briefed on in npc.ts)? Returns the item
|
|
@@ -2,6 +2,8 @@ import { Command } from './command.js';
|
|
|
2
2
|
import { hint } from '../utilities/hints.js';
|
|
3
3
|
import { priceOf, vendorsInRoom, waresOf, shelfNote } from '../utilities/commerce.js';
|
|
4
4
|
import { findCatalogItem, ROLE_DOMAINS } from '../utilities/catalog.js';
|
|
5
|
+
import { optionMark } from '../utilities/log-style.js';
|
|
6
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
5
7
|
/**
|
|
6
8
|
* Diegetic shopping: "browse" (or bare "buy") in a vendor's room reads
|
|
7
9
|
* their shelves with live prices; "buy <item>" slides the nuyen across
|
|
@@ -31,19 +33,36 @@ export class BuyCommand extends Command {
|
|
|
31
33
|
}
|
|
32
34
|
return this.purchase(args.join(' '), vendors);
|
|
33
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* The shelf, flattened in PRINT ORDER across every vendor in the room
|
|
38
|
+
* -- the list "buy <n>" indexes into. One function so the numbers a
|
|
39
|
+
* player reads and the numbers the parser honours cannot drift apart:
|
|
40
|
+
* browse() and purchase() both call it rather than each walking the
|
|
41
|
+
* vendors themselves.
|
|
42
|
+
*/
|
|
43
|
+
shelf(vendors) {
|
|
44
|
+
const out = [];
|
|
45
|
+
for (const vendor of vendors) {
|
|
46
|
+
for (const item of waresOf(this.actor.currentLocation, vendor.name))
|
|
47
|
+
out.push(item);
|
|
48
|
+
}
|
|
49
|
+
return out;
|
|
50
|
+
}
|
|
34
51
|
browse(vendors, room) {
|
|
35
52
|
const lines = [];
|
|
53
|
+
let nth = 0;
|
|
36
54
|
for (const vendor of vendors) {
|
|
37
55
|
const wares = waresOf(this.actor.currentLocation, vendor.name);
|
|
38
56
|
lines.push(`${vendor.name}'s wares:`);
|
|
39
57
|
for (const item of wares) {
|
|
58
|
+
nth += 1;
|
|
40
59
|
const price = priceOf(item);
|
|
41
60
|
const dots = '.'.repeat(Math.max(2, 28 - item.name.length));
|
|
42
|
-
lines.push(
|
|
61
|
+
lines.push(`${optionMark(nth)}${item.name} ${dots} ${price} nuyen${shelfNote(item)}`);
|
|
43
62
|
}
|
|
44
63
|
}
|
|
45
64
|
lines.push('');
|
|
46
|
-
lines.push(`You're carrying ${this.actor.currency} nuyen.${hint(` "buy <item>"
|
|
65
|
+
lines.push(`You're carrying ${this.actor.currency} nuyen.${hint(` "buy <item>" -- or "buy <number>" off this list.`)}`);
|
|
47
66
|
this.logger.write(`BuyCommand: ${this.actor.name} browsed in ${room.name}.`);
|
|
48
67
|
return lines.join('\n');
|
|
49
68
|
}
|
|
@@ -71,6 +90,15 @@ export class BuyCommand extends Command {
|
|
|
71
90
|
purchase(wanted, vendors) {
|
|
72
91
|
const actor = this.actor;
|
|
73
92
|
const room = actor.currentLocation;
|
|
93
|
+
// "buy 3" -- the row browse() printed. Resolved through the shared
|
|
94
|
+
// resolver against the same flattened shelf, so the index can only
|
|
95
|
+
// ever mean what was on screen. A name that IS a number still wins
|
|
96
|
+
// (see fuzzy-match.ts), and an out-of-range number falls through to
|
|
97
|
+
// the ordinary not-on-the-shelf refusal.
|
|
98
|
+
const shelf = this.shelf(vendors);
|
|
99
|
+
const byIndex = fuzzyPickName(wanted, shelf.map(i => i.name), { index: true });
|
|
100
|
+
if (byIndex)
|
|
101
|
+
wanted = byIndex;
|
|
74
102
|
const item = room.inventory.getItem(wanted) ?? undefined;
|
|
75
103
|
if (!item) {
|
|
76
104
|
// NOT ON THE SHELF IS NOT THE SAME AS NOT AVAILABLE (playtest
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buy.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/buy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"buy.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/buy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAExE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;GAOG;AACH,MAAM,OAAO,UAAW,SAAQ,OAAO;IAC3B,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,MAAM,CAAC,WAAW,GAAG,2IAA2I,CAAC;IAE3K,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;YAC3B,OAAO,kEAAkE,CAAC;QAC5E,CAAC;QACD,IAAI,K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AK,CAAC,CAAC;QAElE,OAAO;YACL,aAAa,KAAK,oBAAoB,MAAM,CAAC,IAAI,MAAM,KAAK,CAAC,QAAQ,SAAS;YAC9E,OAAO,IAAI,CAAC,IAAI,YAAY;YAC5B,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SACxB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC"}
|
|
@@ -1,61 +1,52 @@
|
|
|
1
1
|
import { Command, ICommand } from './command.js';
|
|
2
|
-
import {
|
|
3
|
-
import { PuzzleTarget } from '../models/room.js';
|
|
2
|
+
import { Device } from '../models/device.js';
|
|
4
3
|
/**
|
|
5
|
-
* Shared implementation for pick/hack/cast/
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
4
|
+
* Shared implementation for pick/breach/hack/cast/dispel -- FORCING a
|
|
5
|
+
* device rather than opening it the way it was meant to open.
|
|
6
|
+
*
|
|
7
|
+
* The gate check (is it already open? does this verb even bite on this
|
|
8
|
+
* kind of thing?) always runs first and synchronously, so a doomed
|
|
9
|
+
* attempt never makes the player sit through an interactive challenge
|
|
10
|
+
* they were never going to be allowed to attempt. Each concrete command
|
|
11
|
+
* differs in its verb, the kind of device it works, the "nothing to do
|
|
12
|
+
* that to" message, how the outcome gets determined (see
|
|
13
|
+
* determineOutcome() -- every real one overrides it with a skill roll),
|
|
14
|
+
* and what failure costs beyond the noise (onForceFailure()).
|
|
15
|
+
*
|
|
16
|
+
* WHAT LEFT WITH THE PUZZLE MECHANIC: there is no burned route any
|
|
17
|
+
* more. A lock you failed to pick is a lock you can try again, which is
|
|
18
|
+
* what a lock IS -- the one-shot shortcut was a property of a riddle
|
|
19
|
+
* pretending to be an object. Failure is still loud and still raises
|
|
20
|
+
* the world; it just doesn't spend the thing.
|
|
14
21
|
*/
|
|
15
22
|
export declare abstract class BypassCommand extends Command implements ICommand {
|
|
16
|
-
|
|
17
|
-
protected abstract
|
|
23
|
+
/** The kind of device this verb works. */
|
|
24
|
+
protected abstract deviceKind: Device['kind'];
|
|
25
|
+
protected abstract noDeviceMessage: string;
|
|
18
26
|
/** The word the player typed -- used in disambiguation prompts. Two
|
|
19
|
-
* commands can share a
|
|
20
|
-
*
|
|
27
|
+
* commands can share a kind (pick and breach both work a lock), so
|
|
28
|
+
* this can't be derived from it. */
|
|
21
29
|
protected abstract verbName: string;
|
|
22
|
-
/** Optional: replaces the
|
|
23
|
-
*
|
|
24
|
-
*
|
|
30
|
+
/** Optional: replaces the stock per-kind failure line -- for a verb
|
|
31
|
+
* that shares a kind but fails differently (a breach doesn't snap a
|
|
32
|
+
* pick). */
|
|
25
33
|
protected failureFlavor?: string;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* breach used to re-refuse a breach with the snapped-pick line -- a
|
|
29
|
-
* pick the player never owned (playtest 2026-08-27). A verb that
|
|
30
|
-
* shares a bypassType but burns differently says so here. */
|
|
31
|
-
protected burnedFlavor?: string;
|
|
32
|
-
/** Fallback: a flat coin flip. Every real bypass overrides this with a
|
|
33
|
-
* skill roll (pick: Agility+locksmith, hack: Logic+hacking, bluff:
|
|
34
|
-
* Charisma+con, cast: the casting pool). */
|
|
34
|
+
/** Fallback: a flat coin flip. Every real one overrides this with a
|
|
35
|
+
* skill roll. */
|
|
35
36
|
protected determineOutcome(): Promise<boolean>;
|
|
37
|
+
/** Type-specific teeth for a failed forcing, beyond the noise.
|
|
38
|
+
* Returns narration lines. */
|
|
39
|
+
protected onForceFailure(): Promise<string[]>;
|
|
40
|
+
/** Type-specific consequences of a forcing that WORKED, before the
|
|
41
|
+
* success message renders (see breach.ts: smashing through is loud
|
|
42
|
+
* whether or not it gives). */
|
|
43
|
+
protected onForceSuccess(device: Device): Promise<string[]>;
|
|
36
44
|
/**
|
|
37
|
-
*
|
|
38
|
-
* the
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* runs through the real damage tracks and can still knock out or kill.
|
|
43
|
-
*/
|
|
44
|
-
protected onBypassFailure(): Promise<string[]>;
|
|
45
|
-
/**
|
|
46
|
-
* Type-specific consequences of a bypass that WORKED, before the success
|
|
47
|
-
* message renders. Default: nothing -- picking, hacking, and bluffing
|
|
48
|
-
* are quiet when they land. The forceful bypass overrides this (see
|
|
49
|
-
* breach.ts): smashing through a barrier is loud whether or not it
|
|
50
|
-
* gives, so success still raises the world and ends any sneak.
|
|
51
|
-
*/
|
|
52
|
-
protected onBypassSuccess(target: PuzzleTarget): Promise<string[]>;
|
|
53
|
-
/**
|
|
54
|
-
* There's no typed answer here to disambiguate with (unlike solve.ts),
|
|
55
|
-
* so with more than one barrier in the room the player has to name which
|
|
56
|
-
* one: a direction ("pick north", for a locked door) or a word from the
|
|
57
|
-
* barrier's own name ("pick maglock"). With only one candidate, a bare
|
|
58
|
-
* "pick" still works exactly as before.
|
|
45
|
+
* There's no typed answer here to disambiguate with, so with more
|
|
46
|
+
* than one device in the room the player has to name which one: a
|
|
47
|
+
* direction ("pick north", for a device holding a door) or a word
|
|
48
|
+
* from its own name ("pick maglock"). With only one candidate, a bare
|
|
49
|
+
* "pick" still works.
|
|
59
50
|
*/
|
|
60
51
|
private resolveTarget;
|
|
61
52
|
execute(args: string[]): Promise<string>;
|