@maka/maka-cli 5.12.0 → 5.14.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.
- package/bundle/typescript/package.json +2 -1
- package/bundle/typescript/src/commands/aws/ci.sub.cmd.js +1 -0
- package/bundle/typescript/src/commands/aws/ci.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/commands/build/build.js +13 -37
- package/bundle/typescript/src/commands/build/build.js.map +1 -1
- package/bundle/typescript/src/commands/create.js +13 -28
- package/bundle/typescript/src/commands/create.js.map +1 -1
- package/bundle/typescript/src/commands/deploy/_index.d.ts +1 -0
- package/bundle/typescript/src/commands/deploy/_index.js +1 -0
- package/bundle/typescript/src/commands/deploy/_index.js.map +1 -1
- package/bundle/typescript/src/commands/deploy/deploy.command.js +1 -0
- package/bundle/typescript/src/commands/deploy/deploy.command.js.map +1 -1
- package/bundle/typescript/src/commands/deploy/github.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/deploy/github.sub.cmd.js +147 -0
- package/bundle/typescript/src/commands/deploy/github.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js +5 -5
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +48 -37
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js +14 -14
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/catalog.js +25 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/catalog.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js +6 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/crew.d.ts +43 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/crew.js +259 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/crew.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/end-call.js +6 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/end-call.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +15 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +8 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/grapple.js +3 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/grapple.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +3 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.d.ts +5 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js +45 -27
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/job-offer.js +12 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/job-offer.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/lead.d.ts +5 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/lead.js +31 -17
- package/bundle/typescript/src/commands/game/sideQuest/commands/lead.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/order.js +21 -10
- package/bundle/typescript/src/commands/game/sideQuest/commands/order.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/palm.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/palm.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/perform.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/perform.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/reboot.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/reboot.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/reload.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/reload.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.d.ts +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js +81 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/source.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/source.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +3 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +4 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.d.ts +15 -2
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +70 -35
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.d.ts +16 -5
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +36 -8
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +139 -4
- package/bundle/typescript/src/commands/game/sideQuest/game.js +591 -85
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/headless.d.ts +86 -0
- package/bundle/typescript/src/commands/game/sideQuest/headless.js +185 -0
- package/bundle/typescript/src/commands/game/sideQuest/headless.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +50 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +59 -11
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +242 -109
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +11 -11
- package/bundle/typescript/src/commands/game/sideQuest/types/save-file.d.ts +22 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +7 -5
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.d.ts +6 -4
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js +36 -24
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.d.ts +7 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +59 -18
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/command-queue.d.ts +19 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/command-queue.js +56 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/command-queue.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/crew-ledger.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/crew-ledger.js +25 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/crew-ledger.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/emitter.d.ts +44 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/emitter.js +22 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/emitter.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.d.ts +4 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.js +5 -2
- package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/hints.d.ts +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/hints.js +24 -7
- package/bundle/typescript/src/commands/game/sideQuest/utilities/hints.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.d.ts +6 -5
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js +30 -6
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/session-context.d.ts +28 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/session-context.js +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/session-context.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/social.d.ts +50 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/social.js +166 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/social.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/commands/generate.js +7 -0
- package/bundle/typescript/src/commands/generate.js.map +1 -1
- package/bundle/typescript/src/commands/run/run.command.js +31 -31
- package/bundle/typescript/src/commands/run/run.command.js.map +1 -1
- package/bundle/typescript/src/templates/meteor/config/deploy.sh.template +73 -0
- package/bundle/typescript/src/templates/meteor/config/nginx.conf.template +31 -0
- package/bundle/typescript/src/templates/meteor/github/workflows/deploy.yaml +82 -0
- package/bundle/typescript/src/tools/mpi/mpi.class.d.ts +18 -0
- package/bundle/typescript/src/tools/mpi/mpi.class.js +276 -3
- package/bundle/typescript/src/tools/mpi/mpi.class.js.map +1 -1
- package/bundle/typescript/src/tools/mpi/sdk-runtime.d.ts +6 -0
- package/bundle/typescript/src/tools/mpi/sdk-runtime.js +64 -0
- package/bundle/typescript/src/tools/mpi/sdk-runtime.js.map +1 -0
- package/bundle/typescript/src/tools/pkg/pkg.class.js +89 -78
- package/bundle/typescript/src/tools/pkg/pkg.class.js.map +1 -1
- package/bundle/typescript/src/tools/scaffold/scaffold.class.js +23 -7
- package/bundle/typescript/src/tools/scaffold/scaffold.class.js.map +1 -1
- package/package.json +2 -1
|
@@ -2,6 +2,7 @@ import { Command } from './command.js';
|
|
|
2
2
|
import { hint } from '../utilities/hints.js';
|
|
3
3
|
import { loadCatalog } from '../utilities/catalog.js';
|
|
4
4
|
import { AUGMENTATIONS } from '../augmentations.js';
|
|
5
|
+
import { QUALITIES } from '../qualities.js';
|
|
5
6
|
// The browsing sections, keyed to the swag domain map (source.ts) so
|
|
6
7
|
// "catalog Torque" shows exactly what the Arms Dealer is best at.
|
|
7
8
|
const SECTIONS = [
|
|
@@ -30,6 +31,25 @@ function renderChromeMenu() {
|
|
|
30
31
|
lines.push('', footer);
|
|
31
32
|
return lines;
|
|
32
33
|
}
|
|
34
|
+
// Qualities are the karma economy's shelf (SR5e in-play rates,
|
|
35
|
+
// p.106-107: listed karma x2 to learn a positive OR buy off a
|
|
36
|
+
// negative) -- browsable here beside the gear, traded on the
|
|
37
|
+
// "qualities" board in the game log.
|
|
38
|
+
const QUALITIES_QUERY = /^(qualit(y|ies)|traits?)$/;
|
|
39
|
+
function renderQualitiesMenu() {
|
|
40
|
+
const lines = [
|
|
41
|
+
`=== QUALITIES === (karma, not nuyen -- traded at your hideout)`,
|
|
42
|
+
` ${'Name'.padEnd(24)} ${'Karma'.padStart(5)} Source`,
|
|
43
|
+
];
|
|
44
|
+
for (const q of [...QUALITIES].sort((x, y) => x.karma - y.karma)) {
|
|
45
|
+
lines.push(` ${q.kind === 'positive' ? '+' : '-'} ${q.name.padEnd(22)} ${String(q.karma * 2).padStart(5)} ${q.page}`);
|
|
46
|
+
lines.push(` ${q.effect}`);
|
|
47
|
+
}
|
|
48
|
+
const footer = hint(`In-play rates (p.106-107): the karma shown LEARNS a "+" quality or BUYS OFF a "-" one -- listed value x2 either way. "qualities" opens the trade board.`);
|
|
49
|
+
if (footer)
|
|
50
|
+
lines.push('', footer);
|
|
51
|
+
return lines;
|
|
52
|
+
}
|
|
33
53
|
/**
|
|
34
54
|
* The street's shopping window (player direction: served from
|
|
35
55
|
* maka-cli.com's GameCatalog, cached locally, baked-in floor offline --
|
|
@@ -61,15 +81,19 @@ export class CatalogCommand extends Command {
|
|
|
61
81
|
lines.push(` ${s.title.padEnd(24)} ${count} items${hint(` -- best through: ${s.roles.join(', ')}`)}`);
|
|
62
82
|
}
|
|
63
83
|
lines.push(` ${'CHROME & BIOWARE'.padEnd(24)} ${AUGMENTATIONS.length} items${hint(` -- surgery only, at the Street Doc's clinic`)}`);
|
|
84
|
+
lines.push(` ${'QUALITIES'.padEnd(24)} ${QUALITIES.length} traits${hint(` -- karma trades, on the "qualities" board`)}`);
|
|
64
85
|
const footer = hint(`"catalog <section|contact|search>" narrows. The Source column cites the SR5e gear table each figure comes from (approx. = canon-approximate). "source <item> from <contact>" starts the shopping run.`);
|
|
65
86
|
if (footer)
|
|
66
87
|
lines.push('', footer);
|
|
67
88
|
return lines.join('\n');
|
|
68
89
|
}
|
|
69
|
-
// Chrome first:
|
|
90
|
+
// Chrome and qualities first: their own menus, not catalog rows.
|
|
70
91
|
if (CHROME_QUERY.test(query)) {
|
|
71
92
|
return renderChromeMenu().join('\n');
|
|
72
93
|
}
|
|
94
|
+
if (QUALITIES_QUERY.test(query)) {
|
|
95
|
+
return renderQualitiesMenu().join('\n');
|
|
96
|
+
}
|
|
73
97
|
// A section title, a contact's role domain, or a text search.
|
|
74
98
|
const section = SECTIONS.find(s => s.title.toLowerCase().includes(query)
|
|
75
99
|
|| s.roles.some(r => r.toLowerCase() === query));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,qEAAqE;AACrE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ACxB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from './command.js';
|
|
2
|
-
import { hint } from '../utilities/hints.js';
|
|
2
|
+
import { hint, hintsEnabled } from '../utilities/hints.js';
|
|
3
3
|
import { CALL_ICON, isLinked } from '../utilities/comm-style.js';
|
|
4
4
|
/**
|
|
5
5
|
* The roster: who talks to you, how plugged-in they are, and how deep
|
|
@@ -34,7 +34,11 @@ export class ContactsCommand extends Command {
|
|
|
34
34
|
// who's LINKED -- reachable by "call" from anywhere in the hub.
|
|
35
35
|
const actor = this.game.hubActor(name);
|
|
36
36
|
const linked = actor ? isLinked(actor) : false;
|
|
37
|
-
|
|
37
|
+
// The note is the relationship's memory -- a client's grudge or a
|
|
38
|
+
// sloppy wrap-up (returnToHub's upsert) -- compacted to its first
|
|
39
|
+
// word as a marker, hint-on shows the whole line.
|
|
40
|
+
const noteMark = c.note ? ` [${hintsEnabled() ? c.note : c.note.split(/\s|-/)[0]}]` : '';
|
|
41
|
+
lines.push(` ${name.padEnd(17)} ${(c.role ?? 'Street Contact').padEnd(14)} ${linked ? CALL_ICON : ' '} Conn ${c.connection}, Loyalty ${c.loyalty}${ledger ? ` (${ledger})` : ''}${c.asked ? ' [tapped]' : ''}${noteMark}`);
|
|
38
42
|
}
|
|
39
43
|
lines.push('');
|
|
40
44
|
lines.push(`${CALL_ICON} = a "call" away, wherever you are.${hint(` "ask <contact> about <thing>" taps their network -- Loyalty rides your roll (p.387); "about work" gets a gig (Loyalty 2+). "source <item> from <contact>" sends them shopping. Gigs deepen loyalty to 6; money alone stops at 3. [tapped] networks refresh at homecoming.`)}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;
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K,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* THE CREW (the party system): persistent teammates who ride every run
|
|
4
|
+
* for a cut of the take. Slots hold hired runners (the for-hire board),
|
|
5
|
+
* deep-loyalty contacts (Leadership's "command" recruit, lead.ts), and
|
|
6
|
+
* -- Phase B -- other players' characters riding as ghosts. The hub
|
|
7
|
+
* stays solo (player ruling): the crew is FOR the job, spawned at the
|
|
8
|
+
* jobsite curb (Game.spawnCrew) and settled at homecoming
|
|
9
|
+
* (settleCrewAfterRun). Changing the crew scraps any pending job -- the
|
|
10
|
+
* quote was for a different team.
|
|
11
|
+
*
|
|
12
|
+
* "crew" = the roster + for-hire board (reference -> Mechanics panel);
|
|
13
|
+
* hire/dismiss/train act, so they render in the game log (menu split).
|
|
14
|
+
*/
|
|
15
|
+
export declare class CrewCommand extends Command implements ICommand {
|
|
16
|
+
protected static verb: string;
|
|
17
|
+
protected static description: string;
|
|
18
|
+
execute(args?: string[]): Promise<string>;
|
|
19
|
+
}
|
|
20
|
+
/** "hire <name>": sign a runner off the for-hire board. One negotiation
|
|
21
|
+
* roll trims their asking cut (the haggle school, ±); crew cap gated. */
|
|
22
|
+
export declare class HireCommand extends Command implements ICommand {
|
|
23
|
+
protected static verb: string;
|
|
24
|
+
protected static description: string;
|
|
25
|
+
execute(args?: string[]): Promise<string>;
|
|
26
|
+
}
|
|
27
|
+
/** "dismiss <name>": cut a crew member loose. Their gear goes with them. */
|
|
28
|
+
export declare class DismissCommand extends Command implements ICommand {
|
|
29
|
+
protected static verb: string;
|
|
30
|
+
protected static description: string;
|
|
31
|
+
execute(args?: string[]): Promise<string>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* "train <name> <skill>": INSTRUCTION's hook (the reserved skill,
|
|
35
|
+
* player.ts) -- spend YOUR karma on THEIR craft. Costs the advance.ts
|
|
36
|
+
* table's new-rating x2; your instruction rating must reach the new
|
|
37
|
+
* rating; one lesson per member per job cycle.
|
|
38
|
+
*/
|
|
39
|
+
export declare class TrainCommand extends Command implements ICommand {
|
|
40
|
+
protected static verb: string;
|
|
41
|
+
protected static description: string;
|
|
42
|
+
execute(args?: string[]): Promise<string>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { hint } from '../utilities/hints.js';
|
|
3
|
+
import { rollPool, formatRoll } from '../utilities/dice.js';
|
|
4
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
5
|
+
import { SKILL_NAMES } from '../models/player.js';
|
|
6
|
+
import { fetchPlayers, fetchGhost, ghostHireable, setGhostHireable } from '../utilities/social.js';
|
|
7
|
+
import { authToken } from '../utilities/cloud-saves.js';
|
|
8
|
+
/**
|
|
9
|
+
* THE CREW (the party system): persistent teammates who ride every run
|
|
10
|
+
* for a cut of the take. Slots hold hired runners (the for-hire board),
|
|
11
|
+
* deep-loyalty contacts (Leadership's "command" recruit, lead.ts), and
|
|
12
|
+
* -- Phase B -- other players' characters riding as ghosts. The hub
|
|
13
|
+
* stays solo (player ruling): the crew is FOR the job, spawned at the
|
|
14
|
+
* jobsite curb (Game.spawnCrew) and settled at homecoming
|
|
15
|
+
* (settleCrewAfterRun). Changing the crew scraps any pending job -- the
|
|
16
|
+
* quote was for a different team.
|
|
17
|
+
*
|
|
18
|
+
* "crew" = the roster + for-hire board (reference -> Mechanics panel);
|
|
19
|
+
* hire/dismiss/train act, so they render in the game log (menu split).
|
|
20
|
+
*/
|
|
21
|
+
export class CrewCommand extends Command {
|
|
22
|
+
static verb = 'crew';
|
|
23
|
+
static description = 'Your crew roster and the for-hire board. "crew players" lists real runners on the street (social layer); "crew hireable on|off" opts your character in as a hireable ghost while you\'re away. "hire", "dismiss", "train" act on the roster; Leadership caps the table.';
|
|
24
|
+
async execute(args = []) {
|
|
25
|
+
const game = this.game;
|
|
26
|
+
if (!game?.hasHub) {
|
|
27
|
+
return `The crew ledger lives at home -- out here there's just whoever showed up.`;
|
|
28
|
+
}
|
|
29
|
+
// "crew players": the STREET -- real players' runners (social
|
|
30
|
+
// layer). Online now, or opted in as hireable ghosts while away.
|
|
31
|
+
const sub = args[0]?.toLowerCase();
|
|
32
|
+
if (sub === 'players' || sub === 'street') {
|
|
33
|
+
if (!authToken()) {
|
|
34
|
+
return `The street list runs on your maka-cli.com login -- \`maka login\` first.`;
|
|
35
|
+
}
|
|
36
|
+
const players = await fetchPlayers();
|
|
37
|
+
if (players === undefined) {
|
|
38
|
+
return `The grid isn't answering -- the street list is offline right now.`;
|
|
39
|
+
}
|
|
40
|
+
const lines = [`=== THE STREET === (real runners, via maka-cli.com)`];
|
|
41
|
+
if (players.length === 0) {
|
|
42
|
+
lines.push(` Quiet out there tonight -- nobody else on the street yet.`);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
lines.push(` ${'Runner'.padEnd(16)} ${'Player'.padEnd(12)} ${'Archetype'.padEnd(16)} Karma Status`);
|
|
46
|
+
for (const p of players) {
|
|
47
|
+
const status = `${p.online ? 'online' : 'away'}${p.ghostHireable ? ', hireable' : ''}`;
|
|
48
|
+
lines.push(` ${p.playerName.padEnd(16)} ${p.handle.padEnd(12)} ${(p.archetypeName ?? '?').padEnd(16)} ${String(p.karma).padStart(5)} ${status}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const footer = hint(`"hire <runner>" signs a hireable one as a GHOST -- their real sheet rides your runs AI-driven, and their cut goes home to their player. Live shared runs come later.`);
|
|
52
|
+
if (footer)
|
|
53
|
+
lines.push('', footer);
|
|
54
|
+
return lines.join('\n');
|
|
55
|
+
}
|
|
56
|
+
// "crew hireable on|off": the ghost opt-in (consent lives with YOU).
|
|
57
|
+
if (sub === 'hireable') {
|
|
58
|
+
const flag = args[1]?.toLowerCase();
|
|
59
|
+
if (flag !== 'on' && flag !== 'off') {
|
|
60
|
+
return `Ghost hiring is ${ghostHireable() ? 'ON -- your runner can be hired while you\'re away' : 'OFF'}. ("crew hireable on|off")`;
|
|
61
|
+
}
|
|
62
|
+
setGhostHireable(flag === 'on');
|
|
63
|
+
return flag === 'on'
|
|
64
|
+
? `Opt-in set: while you're away, other players can hire ${this.actor.name} as a ghost -- the engine plays your sheet, and your cut lands here as earnings.`
|
|
65
|
+
: `Opt-out set: your runner rides for nobody but you.`;
|
|
66
|
+
}
|
|
67
|
+
const lines = [`=== THE CREW === (${game.crew.length}/${game.crewCap} slots -- Leadership sets the table)`];
|
|
68
|
+
if (game.crew.length > 0) {
|
|
69
|
+
lines.push(` ${'Name'.padEnd(16)} ${'Role'.padEnd(16)} ${'Cut'.padStart(4)} Jobs`);
|
|
70
|
+
for (const m of game.crew) {
|
|
71
|
+
const role = m.source === 'ghost' ? `ghost (${m.ghost?.owner ?? '?'})` : (m.archetypeName ?? 'Contact');
|
|
72
|
+
lines.push(` ${m.name.padEnd(16)} ${role.padEnd(16)} ${String(m.cutPct + '%').padStart(4)} ${m.jobsRun}`);
|
|
73
|
+
}
|
|
74
|
+
const whereNote = hint(` (between jobs they live their own lives -- the crew meets you at the jobsite)`);
|
|
75
|
+
if (whereNote)
|
|
76
|
+
lines.push(whereNote);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
lines.push(` Nobody rides with you yet.`);
|
|
80
|
+
}
|
|
81
|
+
lines.push('');
|
|
82
|
+
lines.push(`FOR HIRE (fresh faces each homecoming):`);
|
|
83
|
+
if (game.crewForHire.length > 0) {
|
|
84
|
+
lines.push(` ${'Name'.padEnd(16)} ${'Archetype'.padEnd(16)} Asking`);
|
|
85
|
+
for (const c of game.crewForHire) {
|
|
86
|
+
lines.push(` ${c.name.padEnd(16)} ${(c.archetypeName ?? '?').padEnd(16)} ${c.cutPct}% of the take`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
lines.push(` The boards are quiet tonight.`);
|
|
91
|
+
}
|
|
92
|
+
const footer = hint(`"hire <name>" signs one (Negotiation trims the cut, once); "command <contact>" recruits a loyal local at family rates (lead.ts); "dismiss <name>" cuts one loose; "train <name> <skill>" spends your karma on THEIR craft (instruction skill). Any crew change scraps a pending job.`);
|
|
93
|
+
if (footer)
|
|
94
|
+
lines.push('', footer);
|
|
95
|
+
return lines.join('\n');
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/** "hire <name>": sign a runner off the for-hire board. One negotiation
|
|
99
|
+
* roll trims their asking cut (the haggle school, ±); crew cap gated. */
|
|
100
|
+
export class HireCommand extends Command {
|
|
101
|
+
static verb = 'hire';
|
|
102
|
+
static description = 'Sign a runner off the for-hire board into your crew ("crew" shows the board). Your Negotiation trims their cut once; Leadership caps the crew.';
|
|
103
|
+
async execute(args = []) {
|
|
104
|
+
const game = this.game;
|
|
105
|
+
if (!game?.hasHub || !this.scene.isHub) {
|
|
106
|
+
return `Hiring happens at home, over the boards.`;
|
|
107
|
+
}
|
|
108
|
+
if (args.length === 0)
|
|
109
|
+
return `Hire whom? "crew" shows the board.`;
|
|
110
|
+
const query = args.join(' ');
|
|
111
|
+
const picked = fuzzyPickName(query, game.crewForHire.map(c => c.name));
|
|
112
|
+
let candidate = picked ? game.crewForHire.find(c => c.name === picked) : undefined;
|
|
113
|
+
// Not on the local board? Try THE STREET -- a real player's runner,
|
|
114
|
+
// hired as a GHOST (their saved sheet, AI-driven; their cut goes
|
|
115
|
+
// home via the earnings ledger). Opt-in gated server-side.
|
|
116
|
+
let ghostHire = false;
|
|
117
|
+
if (!candidate && authToken()) {
|
|
118
|
+
const players = await fetchPlayers();
|
|
119
|
+
const hireable = (players ?? []).filter(p => p.ghostHireable);
|
|
120
|
+
const ghostPick = fuzzyPickName(query, hireable.map(p => p.playerName));
|
|
121
|
+
const street = ghostPick ? hireable.find(p => p.playerName === ghostPick) : undefined;
|
|
122
|
+
if (street) {
|
|
123
|
+
const sheet = await fetchGhost(street.handle, street.slug);
|
|
124
|
+
if (!sheet) {
|
|
125
|
+
return `${street.playerName}'s sheet isn't answering -- their save may not be synced. Try again later.`;
|
|
126
|
+
}
|
|
127
|
+
ghostHire = true;
|
|
128
|
+
candidate = {
|
|
129
|
+
name: sheet.playerName,
|
|
130
|
+
source: 'ghost',
|
|
131
|
+
archetypeName: sheet.archetypeName,
|
|
132
|
+
description: `${sheet.playerName}, ${sheet.archetypeName ?? 'a runner'} -- ${sheet.owner}'s character, riding as a ghost while they're away.`,
|
|
133
|
+
combat: { ...sheet.attributes, skills: { ...sheet.skills } },
|
|
134
|
+
gear: sheet.gear,
|
|
135
|
+
cutPct: 20,
|
|
136
|
+
jobsRun: 0,
|
|
137
|
+
ghost: { slug: sheet.slug, owner: sheet.owner },
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (!candidate) {
|
|
142
|
+
return `Nobody by that name on the boards or the street.${hint(` ("crew" lists the local board; "crew players" lists real runners.)`)}`;
|
|
143
|
+
}
|
|
144
|
+
if (game.crew.some(m => m.name === candidate.name)) {
|
|
145
|
+
return `${candidate.name} already rides with you.`;
|
|
146
|
+
}
|
|
147
|
+
if (game.crew.length >= game.crewCap) {
|
|
148
|
+
return `The crew is full (${game.crew.length}/${game.crewCap} -- Leadership sets the table).${hint(` ("dismiss <name>" frees a slot; training Leadership raises the cap.)`)}`;
|
|
149
|
+
}
|
|
150
|
+
// One negotiation pass on the cut -- the fence-counter school.
|
|
151
|
+
const actor = this.actor;
|
|
152
|
+
const negotiation = actor.skillRating('negotiation');
|
|
153
|
+
const pool = Math.max(1, actor.charisma + (negotiation > 0 ? negotiation : -1) + actor.socialRep + actor.woundModifier);
|
|
154
|
+
const theirs = Math.max(1, Number(candidate.combat.charisma ?? 3) + 2);
|
|
155
|
+
const mine = rollPool(pool);
|
|
156
|
+
const resist = rollPool(theirs);
|
|
157
|
+
if (actor === this.scene.getPlayer()) {
|
|
158
|
+
this.logger.meta(`Hire terms -- you (Cha+Negotiation): ${formatRoll(mine)}`);
|
|
159
|
+
this.logger.meta(`${candidate.name}: ${formatRoll(resist)}`);
|
|
160
|
+
}
|
|
161
|
+
const net = mine.hits - resist.hits;
|
|
162
|
+
const askingCut = candidate.cutPct;
|
|
163
|
+
if (net > 0)
|
|
164
|
+
candidate.cutPct = Math.max(8, candidate.cutPct - net);
|
|
165
|
+
else if (mine.criticalGlitch)
|
|
166
|
+
candidate.cutPct = Math.min(35, candidate.cutPct + 3);
|
|
167
|
+
game.crewForHire = game.crewForHire.filter(c => c.name !== candidate.name);
|
|
168
|
+
game.crew.push(candidate);
|
|
169
|
+
const scrapLine = game.scrapPendingRunForCrewChange();
|
|
170
|
+
actor.performAction('hires', `${candidate.name} onto the crew`);
|
|
171
|
+
this.logger.write(`Hired ${candidate.name} (${candidate.archetypeName}${ghostHire ? `, ghost of ${candidate.ghost?.owner}` : ''}) at ${candidate.cutPct}% (asked ${askingCut}%).`);
|
|
172
|
+
const cutNote = candidate.cutPct < askingCut
|
|
173
|
+
? `talked down from ${askingCut}% to ${candidate.cutPct}%`
|
|
174
|
+
: candidate.cutPct > askingCut
|
|
175
|
+
? `talked UP to ${candidate.cutPct}% -- they didn't like your tone`
|
|
176
|
+
: `at their asking ${candidate.cutPct}%`;
|
|
177
|
+
// A ghost is a real player's character: say so, always-on.
|
|
178
|
+
const ghostNote = ghostHire
|
|
179
|
+
? ` A GHOST rides with you -- ${candidate.ghost?.owner}'s runner, played by the street itself; their cut goes home.`
|
|
180
|
+
: '';
|
|
181
|
+
// Where they ARE is expectation-setting, not teaching (a real
|
|
182
|
+
// session hired Jax and went looking for him in the hub) -- the
|
|
183
|
+
// crew doesn't loiter in your solo hub; they meet you on the job.
|
|
184
|
+
return `${candidate.name} pings back a single word: "In." Crew, ${cutNote} of the take (${game.crew.length}/${game.crewCap} slots).${ghostNote}${scrapLine}${hint(` (They meet you at the jobsite curb every run until you cut them loose; "crew" shows the roster.)`)}`;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/** "dismiss <name>": cut a crew member loose. Their gear goes with them. */
|
|
188
|
+
export class DismissCommand extends Command {
|
|
189
|
+
static verb = 'dismiss';
|
|
190
|
+
static description = 'Cut a crew member loose (their gear leaves with them). Frees a slot; scraps any pending job.';
|
|
191
|
+
async execute(args = []) {
|
|
192
|
+
const game = this.game;
|
|
193
|
+
if (!game?.hasHub || !this.scene.isHub) {
|
|
194
|
+
return `Crew business waits for home -- nobody gets cut loose mid-job.`;
|
|
195
|
+
}
|
|
196
|
+
if (args.length === 0)
|
|
197
|
+
return `Dismiss whom? "crew" shows the roster.`;
|
|
198
|
+
const picked = fuzzyPickName(args.join(' '), game.crew.map(m => m.name));
|
|
199
|
+
const member = picked ? game.crew.find(m => m.name === picked) : undefined;
|
|
200
|
+
if (!member)
|
|
201
|
+
return `Nobody by that name on the crew.`;
|
|
202
|
+
game.crew = game.crew.filter(m => m.name !== member.name);
|
|
203
|
+
const scrapLine = game.scrapPendingRunForCrewChange();
|
|
204
|
+
this.actor.performAction('dismisses', `${member.name} from the crew`);
|
|
205
|
+
this.logger.write(`Dismissed ${member.name} (${member.source}, ${member.jobsRun} jobs run).`);
|
|
206
|
+
return `${member.name} takes it the street way -- a nod, no speech. ${member.jobsRun > 0 ? `${member.jobsRun} job${member.jobsRun === 1 ? '' : 's'} together, ` : ''}gear on their back, gone by morning.${scrapLine}`;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* "train <name> <skill>": INSTRUCTION's hook (the reserved skill,
|
|
211
|
+
* player.ts) -- spend YOUR karma on THEIR craft. Costs the advance.ts
|
|
212
|
+
* table's new-rating x2; your instruction rating must reach the new
|
|
213
|
+
* rating; one lesson per member per job cycle.
|
|
214
|
+
*/
|
|
215
|
+
export class TrainCommand extends Command {
|
|
216
|
+
static verb = 'train';
|
|
217
|
+
static description = 'Teach a crew member (Instruction skill): "train <name> <skill>" raises their skill one point for karma (new rating x2). Your Instruction must cover the new rating; one lesson per member per job cycle.';
|
|
218
|
+
async execute(args = []) {
|
|
219
|
+
const game = this.game;
|
|
220
|
+
if (!game?.hasHub || !this.scene.isHub) {
|
|
221
|
+
return `Lessons happen at home, between jobs.`;
|
|
222
|
+
}
|
|
223
|
+
if (args.length < 2)
|
|
224
|
+
return `Train whom, in what? "train <name> <skill>".`;
|
|
225
|
+
const skillArg = args[args.length - 1].toLowerCase();
|
|
226
|
+
const nameArg = args.slice(0, -1).join(' ');
|
|
227
|
+
const picked = fuzzyPickName(nameArg, game.crew.map(m => m.name));
|
|
228
|
+
const member = picked ? game.crew.find(m => m.name === picked) : undefined;
|
|
229
|
+
if (!member)
|
|
230
|
+
return `Nobody by that name on the crew.`;
|
|
231
|
+
if (member.trainedThisCycle) {
|
|
232
|
+
return `${member.name} already drilled this cycle -- even chrome needs to sleep on a lesson.`;
|
|
233
|
+
}
|
|
234
|
+
const skill = SKILL_NAMES.find(s => s === skillArg);
|
|
235
|
+
if (!skill)
|
|
236
|
+
return `"${skillArg}" isn't a trainable skill.${hint(` (The sheet's skill names are the vocabulary.)`)}`;
|
|
237
|
+
const combat = member.combat;
|
|
238
|
+
combat.skills = combat.skills ?? {};
|
|
239
|
+
const current = combat.skills[skill] ?? 0;
|
|
240
|
+
const newRating = current + 1;
|
|
241
|
+
if (newRating > 6)
|
|
242
|
+
return `${member.name}'s ${skill} is at the street's ceiling already.`;
|
|
243
|
+
const teacherRating = this.actor.skillRating('instruction');
|
|
244
|
+
if (teacherRating < newRating) {
|
|
245
|
+
return `You can't teach what you can't do -- your Instruction ${teacherRating} won't carry ${member.name} to ${skill} ${newRating}.${hint(` ("advance instruction" first.)`)}`;
|
|
246
|
+
}
|
|
247
|
+
const cost = newRating * 2;
|
|
248
|
+
if (this.actor.karma < cost) {
|
|
249
|
+
return `Raising ${member.name}'s ${skill} to ${newRating} costs ${cost} karma -- you have ${this.actor.karma}.`;
|
|
250
|
+
}
|
|
251
|
+
this.actor.karma -= cost;
|
|
252
|
+
combat.skills[skill] = newRating;
|
|
253
|
+
member.trainedThisCycle = true;
|
|
254
|
+
this.actor.performAction('trains', `${member.name} in ${skill}`);
|
|
255
|
+
this.logger.write(`Trained ${member.name}: ${skill} ${current} -> ${newRating} (${cost} karma; ${this.actor.karma} left).`);
|
|
256
|
+
return `You drill ${member.name} until the moves stick: ${skill} ${current} -> ${newRating} (${cost} karma spent, ${this.actor.karma} banked).`;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
//# sourceMappingURL=crew.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crew.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/crew.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAa,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,yQAAyQ,CAAC;IAEzS,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;YAClB,OAAO,2EAA2E,CAAC;QACrF,CAAC;QAED,8DAA8D;QAC9D,iEAAiE;QACjE,MAAM,GAAG,GAAG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 -18,9 +18,14 @@ export class EndCallCommand extends Command {
|
|
|
18
18
|
// its own initiative (via recursiveReflect) would otherwise leave the
|
|
19
19
|
// player watching a call that quietly went nowhere, with no way to
|
|
20
20
|
// tell it was actually over. Announce it directly in that case.
|
|
21
|
-
if (this.actor instanceof NPC &&
|
|
21
|
+
if (this.actor instanceof NPC && this.scene.isHumanControlled(partner)) {
|
|
22
22
|
this.logger.logWithColor(`${CALL_ICON} ${this.actor.name} ends the call.`, CALL_COLOR);
|
|
23
23
|
}
|
|
24
|
+
// Refresh the HUD's call line NOW: a player-typed command refreshes
|
|
25
|
+
// incidentally (ui.ts), but an NPC hanging up on its own initiative
|
|
26
|
+
// left "On a call with Mr. Krow" glowing until the player's next
|
|
27
|
+
// keystroke (real session).
|
|
28
|
+
this.scene.updateStatus();
|
|
24
29
|
return `{${CALL_COLOR}-fg}${CALL_ICON} You end the call with ${partner.name}.{/${CALL_COLOR}-fg}`;
|
|
25
30
|
}
|
|
26
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"end-call.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/end-call.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,OAAO,cAAe,SAAQ,OAAO;IAC/B,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,MAAM,CAAC,WAAW,GAAG,qCAAqC,CAAC;IAErE,KAAK,CAAC,OAAO;QACX,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC;QAC7C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,uBAAuB,CAAC;QACjC,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,iBAAiB,GAAG,SAAS,CAAC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E5E,oEAAoE;QACpE,wEAAwE;QACxE,sEAAsE;QACtE,mEAAmE;QACnE,gEAAgE;QAChE,IAAI,IAAI,CAAC,KAAK,YAAY,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC;YACvE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,iBAAiB,EAAE,UAAU,CAAC,CAAC;QACzF,CAAC;QAED,oEAAoE;QACpE,oEAAoE;QACpE,iEAAiE;QACjE,4BAA4B;QAC5B,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAE1B,OAAO,IAAI,UAAU,OAAO,SAAS,0BAA0B,OAAO,CAAC,IAAI,MAAM,UAAU,MAAM,CAAC;IACpG,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command } from './command.js';
|
|
2
2
|
import { priceOf } from '../utilities/commerce.js';
|
|
3
3
|
import { sameSpot, spotOf, spotRefusal } from '../utilities/spots.js';
|
|
4
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
4
5
|
export class GiveCommand extends Command {
|
|
5
6
|
static verb = 'give';
|
|
6
7
|
static description = 'Give an item or money to someone.';
|
|
@@ -19,7 +20,12 @@ export class GiveCommand extends Command {
|
|
|
19
20
|
}
|
|
20
21
|
const [, itemOrAmount, recipientName] = match;
|
|
21
22
|
const room = this.actor.currentLocation;
|
|
22
|
-
|
|
23
|
+
// Fuzzy resolution, same school as take/attack -- honorific names
|
|
24
|
+
// made exact matching brutal (a real session's "give jounal to
|
|
25
|
+
// slate" bounced off "Ms. Slate" at the handover moment).
|
|
26
|
+
const inRoom = room.getActors().filter(a => a !== this.actor);
|
|
27
|
+
const picked = fuzzyPickName(recipientName, inRoom.map(a => a.name));
|
|
28
|
+
const recipient = picked ? inRoom.find(a => a.name === picked) : undefined;
|
|
23
29
|
if (!recipient) {
|
|
24
30
|
this.logger.write(`Recipient "${recipientName}" not found in room ${room.name}`);
|
|
25
31
|
return `You don’t see anyone named "${recipientName}" here.`;
|
|
@@ -139,6 +145,13 @@ export class GiveCommand extends Command {
|
|
|
139
145
|
// completion banner announces itself directly to the screen, since the
|
|
140
146
|
// trigger here might not even be the player's own action.
|
|
141
147
|
this.scene.checkWinCondition(item.name, recipient.name);
|
|
148
|
+
// Handing anything to the run's CLIENT is face time: the meet
|
|
149
|
+
// (advance) or -- when the give above just completed the objective --
|
|
150
|
+
// the wrap-up remainder, in one beat (Game.onClientInteraction).
|
|
151
|
+
let clientBeat = null;
|
|
152
|
+
if (this.actor === this.scene.getPlayer()) {
|
|
153
|
+
clientBeat = (this.game ?? this.scene.ownerGame)?.onClientInteraction(recipient.name) ?? null;
|
|
154
|
+
}
|
|
142
155
|
// Side-gig delivery (see work.ts): the right package into the right
|
|
143
156
|
// hands is a payday -- the ordinary "give" IS the completion verb.
|
|
144
157
|
const gig = this.game?.activeGig;
|
|
@@ -163,7 +176,7 @@ export class GiveCommand extends Command {
|
|
|
163
176
|
].filter((b) => !!b);
|
|
164
177
|
return `You gave ${item.name} to ${recipient.name}.\n${gigNet} nuyen lands on your stick the moment it leaves your hands.${gigTax > 0 ? ` (${gigTax}¥ skimmed at source -- SIN on file.)` : ''} (${this.actor.currency} carried.)${bonds.length > 0 ? `\n${bonds.join('\n')}` : ''}`;
|
|
165
178
|
}
|
|
166
|
-
return `You gave ${item.name} to ${recipient.name}
|
|
179
|
+
return `You gave ${item.name} to ${recipient.name}.${clientBeat ? `\n${clientBeat}` : ''}`;
|
|
167
180
|
}
|
|
168
181
|
}
|
|
169
182
|
//# sourceMappingURL=give.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"give.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/give.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,OAAO,EA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M,MAAM,8DAA8D,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,sCAAsC,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,aAAa,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACvR,CAAC;QAED,OAAO,YAAY,IAAI,CAAC,IAAI,OAAO,SAAS,CAAC,IAAI,IAAI,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC7F,CAAC"}
|
|
@@ -60,15 +60,17 @@ export class GoCommand extends Command {
|
|
|
60
60
|
const death = await exchange.resolveDeath(fleer, opponent, {
|
|
61
61
|
fallLine: fleer === this.scene.getPlayer()
|
|
62
62
|
? `The shot catches you square in the back. The door was two steps away.`
|
|
63
|
-
:
|
|
63
|
+
: this.scene.isHumanControlled(fleer)
|
|
64
|
+
? `The shot catches ${fleer.name} square in the back. The door was two steps away.`
|
|
65
|
+
: `${fleer.name} drops mid-stride, two steps from the door. Their gear scatters across ${fleer.currentLocation.name}.`,
|
|
64
66
|
});
|
|
65
67
|
return exchange.finishExchange([...lines, ...death]);
|
|
66
68
|
}
|
|
67
69
|
if (fleer.isUnconscious()) {
|
|
68
70
|
// Stun KO on the way out: the player defers to the room settling
|
|
69
71
|
// (Scene.beginPlayerKnockout); an NPC is a live capture.
|
|
70
|
-
const ko =
|
|
71
|
-
? await exchange.resolvePlayerKnockout(opponent)
|
|
72
|
+
const ko = this.scene.isHumanControlled(fleer)
|
|
73
|
+
? await exchange.resolvePlayerKnockout(opponent, fleer)
|
|
72
74
|
: await exchange.resolveDeath(fleer, opponent, {
|
|
73
75
|
fatal: false,
|
|
74
76
|
fallLine: `${fleer.name} drops mid-stride, out cold, two steps from the door. Their gear scatters across ${fleer.currentLocation.name}.`,
|
|
@@ -101,7 +103,7 @@ export class GoCommand extends Command {
|
|
|
101
103
|
// Applies to every combatant, NPCs included -- an NPC's AI loop firing
|
|
102
104
|
// "go" while its own exchange still resolves is how a fleeing target
|
|
103
105
|
// once got shot mid-exchange by interleaved resolutions.
|
|
104
|
-
if (this.actor.inExchange || (this.
|
|
106
|
+
if (this.actor.inExchange || (this.scene.isHumanControlled(this.actor) && this.scene.isPlayerExchangeActive(this.actor.name))) {
|
|
105
107
|
// The player is refused (they can retype in the lull). An NPC's flee
|
|
106
108
|
// attempt instead WAITS for the lull and then goes -- its AI decides
|
|
107
109
|
// to run exactly once, mid-exchange, and discarding that meant a
|
|
@@ -109,7 +111,7 @@ export class GoCommand extends Command {
|
|
|
109
111
|
// player wondered why the fight had stalled (see
|
|
110
112
|
// CombatExchange.waitForLull). The parting-shot toll below still
|
|
111
113
|
// applies when they finally make their break.
|
|
112
|
-
if (this.
|
|
114
|
+
if (this.scene.isHumanControlled(this.actor)) {
|
|
113
115
|
this.logger.write(`GoCommand: ${this.actor.name} tried to move mid-exchange -- blocked.`);
|
|
114
116
|
return `Lead is flying -- you can't disengage until the exchange resolves.${hint(` (The lull after it is your chance to run.)`)}`;
|
|
115
117
|
}
|
|
@@ -321,7 +323,7 @@ export class GoCommand extends Command {
|
|
|
321
323
|
if (this.actor.plane === 'astral' && target.warded) {
|
|
322
324
|
if (this.actor.hasMetamagic('masking')) {
|
|
323
325
|
this.actor.performAction('slips a ward', target.name);
|
|
324
|
-
if (this.
|
|
326
|
+
if (this.scene.isHumanControlled(this.actor)) {
|
|
325
327
|
this.logger.logWithColor(`The ward tastes your aura and finds... weather. Masking carries you through.`, 'magenta');
|
|
326
328
|
}
|
|
327
329
|
return null;
|