@maka/maka-cli 5.10.0 → 5.12.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 +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js +3 -1
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js +6 -5
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +28 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js +3 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/catalog.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/catalog.js +99 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/catalog.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/companions.js +12 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/companions.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js +14 -8
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/deck.d.ts +30 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/deck.js +142 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/deck.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/docwagon.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/docwagon.js +87 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/docwagon.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +11 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +29 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/grapple.js +9 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/grapple.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +9 -5
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.js +7 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/install.js +4 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/install.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/job-offer.d.ts +32 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/job-offer.js +94 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/job-offer.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jump.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/jump.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/lead.d.ts +39 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lead.js +187 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lead.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/palm.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/palm.js +86 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/palm.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pan.js +3 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/pan.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/perform.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/perform.js +48 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/perform.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.js +8 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js +8 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +9 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js +3 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.d.ts +6 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js +80 -65
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/source.d.ts +11 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/source.js +176 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/source.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +6 -3
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +71 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.js +424 -29
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +28 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js +83 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +29 -7
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +23 -3
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +78 -17
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +7 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +299 -60
- package/bundle/typescript/src/commands/game/sideQuest/types/save-file.d.ts +25 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +73 -3
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/catalog-data.d.ts +32 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/catalog-data.js +112 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/catalog-data.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/catalog.d.ts +28 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/catalog.js +128 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/catalog.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.d.ts +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +41 -9
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.d.ts +19 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.js +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/docwagon.d.ts +33 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/docwagon.js +44 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/docwagon.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.d.ts +4 -2
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +35 -4
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/programs.d.ts +39 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/programs.js +63 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/programs.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/session-lock.d.ts +18 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/session-lock.js +91 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/session-lock.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +25 -16
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { hint } from '../utilities/hints.js';
|
|
3
|
+
import { loadCatalog } from '../utilities/catalog.js';
|
|
4
|
+
import { AUGMENTATIONS } from '../augmentations.js';
|
|
5
|
+
// The browsing sections, keyed to the swag domain map (source.ts) so
|
|
6
|
+
// "catalog Torque" shows exactly what the Arms Dealer is best at.
|
|
7
|
+
const SECTIONS = [
|
|
8
|
+
{ title: 'ARMS & ARMOR', categories: ['Weapon', 'MeleeWeapon', 'RangedWeapon', 'Ammunition', 'Explosive', 'BodyArmor', 'Armor', 'ArmorClothing', 'Shield', 'Helmet'], roles: ['Arms Dealer'] },
|
|
9
|
+
{ title: 'ELECTRONICS & MATRIX', categories: ['Commlink', 'Cyberdeck', 'Electronics', 'Software', 'RCC'], roles: ['Data Broker', 'Mechanic'] },
|
|
10
|
+
{ title: 'DRONES & RIGS', categories: ['Drone'], roles: ['Mechanic'] },
|
|
11
|
+
{ title: 'MEDICAL', categories: ['Medical', 'StimPatch', 'SlapPatch'], roles: ['Street Doc'] },
|
|
12
|
+
{ title: 'MAGICAL GOODS', categories: ['Focus', 'SpellFormula', 'Grimoire'], roles: ['Talismonger'] },
|
|
13
|
+
];
|
|
14
|
+
// Chrome is NOT a swag parcel -- augmentations live in the game's own
|
|
15
|
+
// roster (augmentations.ts, deliberately game-economy priced) and go in
|
|
16
|
+
// via surgery at the clinic, so the catalog renders them as the Street
|
|
17
|
+
// Doc's OTHER menu rather than sourceable rows.
|
|
18
|
+
const CHROME_QUERY = /^(chrome|cyber(ware|netics)?|bio(ware)?|ware|augment(ation)?s?|implants?)$/;
|
|
19
|
+
function renderChromeMenu() {
|
|
20
|
+
const lines = [
|
|
21
|
+
`=== CHROME & BIOWARE === (surgery at the Street Doc's clinic -- not a delivery)`,
|
|
22
|
+
` ${'Name'.padEnd(22)} ${'Cost'.padStart(7)} Essence Type`,
|
|
23
|
+
];
|
|
24
|
+
for (const a of [...AUGMENTATIONS].sort((x, y) => x.cost - y.cost)) {
|
|
25
|
+
lines.push(` ${a.name.padEnd(22)} ${(String(a.cost) + '¥').padStart(7)} ${('-' + a.essence.toFixed(1)).padStart(7)} ${a.kind === 'cyberware' ? 'cyber' : 'bio'}`);
|
|
26
|
+
lines.push(` ${a.effect}`);
|
|
27
|
+
}
|
|
28
|
+
const footer = hint(`Chrome goes in on the table, not in a parcel: visit the clinic and "install <name>". Essence doesn't come back.`);
|
|
29
|
+
if (footer)
|
|
30
|
+
lines.push('', footer);
|
|
31
|
+
return lines;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The street's shopping window (player direction: served from
|
|
35
|
+
* maka-cli.com's GameCatalog, cached locally, baked-in floor offline --
|
|
36
|
+
* see utilities/catalog.ts). A reference panel: always on, like
|
|
37
|
+
* sheet/spells. The Source column cites the SR5e gear-table page each
|
|
38
|
+
* figure comes from; "approx." rows carry canon-approximate figures.
|
|
39
|
+
*/
|
|
40
|
+
export class CatalogCommand extends Command {
|
|
41
|
+
static verb = 'catalog';
|
|
42
|
+
static description = 'The swag catalog: what the street can source ("source <item> from <contact>"). "catalog" lists sections; "catalog <section|contact|search>" narrows. Prices are SR5e gear-table figures; the Source column cites the page (approx. = canon-approximate).';
|
|
43
|
+
async execute(args = []) {
|
|
44
|
+
const items = loadCatalog();
|
|
45
|
+
const query = args.join(' ').trim().toLowerCase();
|
|
46
|
+
// Column headers over labeled cells (player direction: "avail 2"
|
|
47
|
+
// read as "there are two available"). Source = the SR5e page the
|
|
48
|
+
// figures come from, or "approx." for canon-approximate rows --
|
|
49
|
+
// which also retires the old ~ marker and its legend.
|
|
50
|
+
const renderRows = (rows) => [
|
|
51
|
+
` ${'Name'.padEnd(26)} ${'Cost'.padStart(7)} Availability Source`,
|
|
52
|
+
...rows.map(i => ` ${i.name.padEnd(26)} ${(String(i.price) + '¥').padStart(7)} ${String(i.availability).padStart(12)} ${i.approx ? 'approx.' : i.page ?? ''}`.trimEnd()),
|
|
53
|
+
];
|
|
54
|
+
if (!query) {
|
|
55
|
+
// Counts are data; who-to-source-through and the how-to line are
|
|
56
|
+
// teaching (player direction) -- both ride the hints toggle.
|
|
57
|
+
const lines = [`=== THE CATALOG === (${items.length} items the network can source)`];
|
|
58
|
+
for (const s of SECTIONS) {
|
|
59
|
+
const count = items.filter(i => s.categories.includes(i.category)).length;
|
|
60
|
+
if (count > 0)
|
|
61
|
+
lines.push(` ${s.title.padEnd(24)} ${count} items${hint(` -- best through: ${s.roles.join(', ')}`)}`);
|
|
62
|
+
}
|
|
63
|
+
lines.push(` ${'CHROME & BIOWARE'.padEnd(24)} ${AUGMENTATIONS.length} items${hint(` -- surgery only, at the Street Doc's clinic`)}`);
|
|
64
|
+
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
|
+
if (footer)
|
|
66
|
+
lines.push('', footer);
|
|
67
|
+
return lines.join('\n');
|
|
68
|
+
}
|
|
69
|
+
// Chrome first: its own menu, not catalog rows.
|
|
70
|
+
if (CHROME_QUERY.test(query)) {
|
|
71
|
+
return renderChromeMenu().join('\n');
|
|
72
|
+
}
|
|
73
|
+
// A section title, a contact's role domain, or a text search.
|
|
74
|
+
const section = SECTIONS.find(s => s.title.toLowerCase().includes(query)
|
|
75
|
+
|| s.roles.some(r => r.toLowerCase() === query));
|
|
76
|
+
const roleOfContact = this.game?.contacts
|
|
77
|
+
? [...this.game.contacts.entries()].find(([name]) => name.toLowerCase().includes(query))?.[1]?.role
|
|
78
|
+
: undefined;
|
|
79
|
+
const bySection = section
|
|
80
|
+
?? (roleOfContact ? SECTIONS.find(s => s.roles.includes(roleOfContact)) : undefined);
|
|
81
|
+
const rows = bySection
|
|
82
|
+
? items.filter(i => bySection.categories.includes(i.category))
|
|
83
|
+
: items.filter(i => i.name.toLowerCase().includes(query) || i.description.toLowerCase().includes(query) || i.category.toLowerCase() === query);
|
|
84
|
+
if (rows.length === 0) {
|
|
85
|
+
return `Nothing in the catalog matches "${args.join(' ')}".${hint(` The network takes special orders ("source <whatever> from <contact>").`)}`;
|
|
86
|
+
}
|
|
87
|
+
const header = bySection
|
|
88
|
+
? `=== ${bySection.title} ===${hint(` (best through: ${bySection.roles.join(', ')} -- +2 dice in their trade)`)}`
|
|
89
|
+
: `=== CATALOG: "${args.join(' ')}" ===`;
|
|
90
|
+
const out = [header, ...renderRows(rows.sort((a, b) => a.price - b.price))];
|
|
91
|
+
const chromePointer = bySection?.roles.includes('Street Doc')
|
|
92
|
+
? hint(`The doc also cuts chrome -- "catalog chrome" for the surgery menu.`)
|
|
93
|
+
: '';
|
|
94
|
+
if (chromePointer)
|
|
95
|
+
out.push('', chromePointer);
|
|
96
|
+
return out.join('\n');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=catalog.js.map
|
|
@@ -0,0 +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;AAEpD,qEAAqE;AACrE,kEAAkE;AAClE,MAAM,QAAQ,GAA+D;IAC3E,EAAE,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,aAAa,CAAC,EAAE;IAC9L,EAAE,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,aAAa,EAAE,UAAU,CAAC,EAAE;IAC9I,EAAE,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE;IACtE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,CAAC,EAAE,KAAK,EAAE,CAAC,YAAY,CAAC,EAAE;IAC9F,EAAE,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,aAAa,CAAC,EAAE;CACtG,CAAC;AAEF,sEAAsE;AACtE,wEAAwE;AACxE,uEAA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AG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5E,MAAM,aAAa,GAAG,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC;YAC3D,CAAC,CAAC,IAAI,CAAC,oEAAoE,CAAC;YAC5E,CAAC,CAAC,EAAE,CAAC;QACP,IAAI,aAAa;YAAE,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;QAC/C,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command } from './command.js';
|
|
2
2
|
import { hint } from '../utilities/hints.js';
|
|
3
3
|
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
4
|
+
import { agentRatingFromName } from '../utilities/programs.js';
|
|
4
5
|
/**
|
|
5
6
|
* The rigger's autonomous frames (SR5e p.269-271): "deploy <drone>" puts
|
|
6
7
|
* a carried frame in the air under its own DOG-BRAIN -- no control rig
|
|
@@ -84,7 +85,16 @@ export class AgentCommand extends Command {
|
|
|
84
85
|
if (deck.isBricked) {
|
|
85
86
|
return `The ${deck.name} is bricked -- nothing runs on dead boards.`;
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
+
// Bought agent software (p.246, catalog: "Agent Rating N") beats the
|
|
89
|
+
// deck's bundled dog-brain (3 + quality) -- carry the chip, run the
|
|
90
|
+
// better mind.
|
|
91
|
+
const chips = actor.inventory.getAllItems()
|
|
92
|
+
.map(i => agentRatingFromName(i.name))
|
|
93
|
+
.filter((r) => r !== undefined);
|
|
94
|
+
const bundled = 3 + deck.qualityBonus;
|
|
95
|
+
const best = chips.length > 0 ? Math.max(...chips) : 0;
|
|
96
|
+
const fromChip = best > bundled;
|
|
97
|
+
const rating = Math.max(bundled, best);
|
|
88
98
|
const shell = game.spawnCompanionShell({
|
|
89
99
|
name: `Agent (${deck.name})`,
|
|
90
100
|
description: `${actor.name}'s autonomous agent program, running on their ${deck.name}: a sharp-edged icon that guards their persona and cuts at whatever ice engages them. Attacks against it damage the deck it runs on.`,
|
|
@@ -101,7 +111,7 @@ export class AgentCommand extends Command {
|
|
|
101
111
|
this.logger.write(`AgentCommand: ${actor.name} deployed agent rating ${rating} on ${deck.name}.`);
|
|
102
112
|
this.scene.updateStatus();
|
|
103
113
|
return [
|
|
104
|
-
`A second icon unfolds beside your persona -- your agent, rating ${rating}, running hot off the ${deck.name}.`,
|
|
114
|
+
`A second icon unfolds beside your persona -- your agent, rating ${rating}${fromChip ? ' (bought software, sharper than the bundled dog-brain)' : ''}, running hot off the ${deck.name}.`,
|
|
105
115
|
` It rides the grid with you and fights the ice at your side -- but every hit it takes lands on YOUR deck (${deck.deckSummary()}).${hint(` ("order agent ..." to direct it; "agent" again to fold it away; it folds on jack-out.)`)}`,
|
|
106
116
|
].join('\n');
|
|
107
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companions.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/companions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"companions.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/companions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM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O,iCAAiC,CAAC;QAC3C,CAAC;QACD,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,EAAE,IAAI,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;QACvD,IAAK,CAAC,gBAAgB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAC1C,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC1B,OAAO,OAAO,IAAI,+DAA+D,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,WAAW,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,oCAAoC,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC1P,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command } from './command.js';
|
|
2
2
|
import { hint } from '../utilities/hints.js';
|
|
3
|
+
import { CALL_ICON, isLinked } from '../utilities/comm-style.js';
|
|
3
4
|
/**
|
|
4
5
|
* The roster: who talks to you, how plugged-in they are, and how deep
|
|
5
6
|
* the relationship runs. Contacts are EARNED (see Game.touchContact) --
|
|
@@ -18,20 +19,25 @@ export class ContactsCommand extends Command {
|
|
|
18
19
|
if (!roster || roster.size === 0) {
|
|
19
20
|
return `Nobody owes you their attention yet.${hint(` Relationships on this street start with TRANSACTIONS -- buy a bowl, fence a score, get stitched, deliver a package. Then "contacts" has names in it.`)}`;
|
|
20
21
|
}
|
|
22
|
+
// Compact rows (player direction: the roster renders in the narrow
|
|
23
|
+
// Mechanics column now -- "Conn 5, Loyalty 1", no flavor clause).
|
|
24
|
+
// The ledger squeezes to "(¥500, 2 gigs)" and a tapped network to
|
|
25
|
+
// "[tapped]"; the old teaching legend rides the hint toggle.
|
|
21
26
|
const lines = [`=== CONTACTS ===`];
|
|
22
27
|
for (const [name, c] of roster) {
|
|
23
|
-
const depth = c.loyalty >= 5 ? 'would take a risk for you'
|
|
24
|
-
: c.loyalty >= 3 ? 'genuinely glad to see you'
|
|
25
|
-
: c.loyalty === 2 ? 'knows your usual'
|
|
26
|
-
: 'knows your name';
|
|
27
28
|
const ledger = [
|
|
28
|
-
c.spent > 0 ?
|
|
29
|
-
c.gigs > 0 ? `${c.gigs} gig${c.gigs === 1 ? '' : 's'}
|
|
29
|
+
c.spent > 0 ? `¥${c.spent}` : '',
|
|
30
|
+
c.gigs > 0 ? `${c.gigs} gig${c.gigs === 1 ? '' : 's'}` : '',
|
|
30
31
|
].filter(Boolean).join(', ');
|
|
31
|
-
|
|
32
|
+
// The ROLE is the SR5e archetype (p.98) -- what this name IS on
|
|
33
|
+
// the street, not just how much juice they carry. The 📞 marks
|
|
34
|
+
// who's LINKED -- reachable by "call" from anywhere in the hub.
|
|
35
|
+
const actor = this.game.hubActor(name);
|
|
36
|
+
const linked = actor ? isLinked(actor) : false;
|
|
37
|
+
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]' : ''}`);
|
|
32
38
|
}
|
|
33
39
|
lines.push('');
|
|
34
|
-
lines.push(`"ask <contact> about <thing>" taps their network -- Loyalty rides your roll (
|
|
40
|
+
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.`)}`);
|
|
35
41
|
return lines.join('\n');
|
|
36
42
|
}
|
|
37
43
|
}
|
|
@@ -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;
|
|
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;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,OAAO,eAAgB,SAAQ,OAAO;IAChC,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,MAAM,CAAC,WAAW,GAAG,gJAAgJ,CAAC;IAEhL,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;YACvB,OAAO,qGAAqG,CAAC;QAC/G,CAAC;QACD,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YACjC,OAAO,uCAAuC,IAAI,CAAC,uJAAuJ,CAAC,EAAE,CAAC;QAChN,CAAC;QAED,mEAAmE;QACnE,kEAAkE;QAClE,kEAAkE;QAClE,6DAA6D;QAC7D,MAAM,KAAK,GAAG,CAAC,kBAAkB,CAAC,CAAC;QACnC,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG;gBACb,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE;gBAChC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CA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+
* shows the stat line -- Device Rating, the attribute array as currently
|
|
5
|
+
* assigned, condition monitor, running programs, and the carried chip
|
|
6
|
+
* library. "deck config <attack> <sleaze> <data> <firewall>" re-deals
|
|
7
|
+
* the array's four values across the attributes (RAW: any order, same
|
|
8
|
+
* numbers -- rig for combat or rig for stealth, your call).
|
|
9
|
+
*/
|
|
10
|
+
export declare class DeckCommand extends Command implements ICommand {
|
|
11
|
+
protected static verb: string;
|
|
12
|
+
protected static description: string;
|
|
13
|
+
execute(args?: string[]): Promise<string>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* "load <program>": move a carried program chip into the deck's running
|
|
17
|
+
* memory (capped by the p.227 Programs column). The chip stays in your
|
|
18
|
+
* library -- storage is unlimited, RUNNING is the scarce thing.
|
|
19
|
+
*/
|
|
20
|
+
export declare class LoadProgramCommand extends Command implements ICommand {
|
|
21
|
+
protected static verb: string;
|
|
22
|
+
protected static description: string;
|
|
23
|
+
execute(args?: string[]): Promise<string>;
|
|
24
|
+
}
|
|
25
|
+
/** "unload <program>": free a running slot. The chip stays in the library. */
|
|
26
|
+
export declare class UnloadProgramCommand extends Command implements ICommand {
|
|
27
|
+
protected static verb: string;
|
|
28
|
+
protected static description: string;
|
|
29
|
+
execute(args?: string[]): Promise<string>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { hint } from '../utilities/hints.js';
|
|
3
|
+
import { findProgram, getProgram, PROGRAMS } from '../utilities/programs.js';
|
|
4
|
+
/**
|
|
5
|
+
* The decker's hardware panel (SR5e p.227 DECK CONFIGURATION). "deck"
|
|
6
|
+
* shows the stat line -- Device Rating, the attribute array as currently
|
|
7
|
+
* assigned, condition monitor, running programs, and the carried chip
|
|
8
|
+
* library. "deck config <attack> <sleaze> <data> <firewall>" re-deals
|
|
9
|
+
* the array's four values across the attributes (RAW: any order, same
|
|
10
|
+
* numbers -- rig for combat or rig for stealth, your call).
|
|
11
|
+
*/
|
|
12
|
+
export class DeckCommand extends Command {
|
|
13
|
+
static verb = 'deck';
|
|
14
|
+
static description = 'Your cyberdeck\'s stat panel: Device Rating, the Attack/Sleaze/Data Processing/Firewall array, condition, and loaded programs. "deck config <a> <s> <d> <f>" re-deals the array (RAW p.227: same four values, any order).';
|
|
15
|
+
async execute(args = []) {
|
|
16
|
+
const actor = this.actor;
|
|
17
|
+
const deck = actor.activeDeck ?? actor.getAnyCyberdeck();
|
|
18
|
+
if (!deck) {
|
|
19
|
+
return actor.isTechnomancer()
|
|
20
|
+
? `No deck -- your living persona IS the hardware.`
|
|
21
|
+
: `No cyberdeck on you. The catalog stocks them ("catalog electronics") -- start saving.`;
|
|
22
|
+
}
|
|
23
|
+
if (args[0]?.toLowerCase() === 'config') {
|
|
24
|
+
const values = args.slice(1).map(Number);
|
|
25
|
+
if (values.length !== 4 || values.some(isNaN)) {
|
|
26
|
+
return `"deck config <attack> <sleaze> <data> <firewall>" -- four numbers, re-dealing your array [${deck.deckArray.join(' ')}].`;
|
|
27
|
+
}
|
|
28
|
+
// Map each requested value onto an unused array slot.
|
|
29
|
+
const used = new Set();
|
|
30
|
+
const order = [];
|
|
31
|
+
for (const v of values) {
|
|
32
|
+
const idx = deck.deckArray.findIndex((a, i) => a === v && !used.has(i));
|
|
33
|
+
if (idx === -1) {
|
|
34
|
+
return `That's not your array -- the ${deck.name} deals [${deck.deckArray.join(' ')}], same four numbers in any order.`;
|
|
35
|
+
}
|
|
36
|
+
used.add(idx);
|
|
37
|
+
order.push(idx);
|
|
38
|
+
}
|
|
39
|
+
deck.configureDeck(order);
|
|
40
|
+
this.logger.write(`DeckCommand: ${actor.name} configured ${deck.name} -> A${deck.attack} S${deck.sleaze} D${deck.dataProcessing} F${deck.firewall}.`);
|
|
41
|
+
this.scene.updateStatus();
|
|
42
|
+
return `You re-deal the array: Attack ${deck.attack}, Sleaze ${deck.sleaze}, Data Processing ${deck.dataProcessing}, Firewall ${deck.firewall}. The persona shivers as the load rebalances.`;
|
|
43
|
+
}
|
|
44
|
+
const running = deck.loadedPrograms.map(k => {
|
|
45
|
+
const p = getProgram(k);
|
|
46
|
+
return p ? `${p.name} -- ${p.effect}` : k;
|
|
47
|
+
});
|
|
48
|
+
const library = actor.inventory.getAllItems()
|
|
49
|
+
.map(i => findProgram(i.name))
|
|
50
|
+
.filter((p) => !!p)
|
|
51
|
+
.map(p => p.name)
|
|
52
|
+
.filter(n => !deck.loadedPrograms.includes(PROGRAMS.find(p => p.name === n).key));
|
|
53
|
+
const lines = [
|
|
54
|
+
`=== ${deck.name.toUpperCase()} ===`,
|
|
55
|
+
` Device Rating ${deck.deviceRating} -- array [${deck.deckArray.join(' ')}]`,
|
|
56
|
+
` Attack ${deck.attack} Sleaze ${deck.sleaze} Data Processing ${deck.dataProcessing} Firewall ${deck.firewall}`,
|
|
57
|
+
` Condition: ${deck.deckSummary()}${deck.isBricked ? ' -- BRICKED (rest to repair)' : ''}`,
|
|
58
|
+
` Running (${deck.loadedPrograms.length}/${deck.programSlots}):${running.length ? '' : ' nothing'}`,
|
|
59
|
+
...running.map(r => ` ${r}`),
|
|
60
|
+
];
|
|
61
|
+
// The library line ALWAYS shows -- a real session hit "load" ->
|
|
62
|
+
// '"deck" shows your library' -> a panel with no library at all,
|
|
63
|
+
// then tried to load "firewall" off the mnemonic line. What you can
|
|
64
|
+
// load (and where chips come from when you have none) is core
|
|
65
|
+
// panel content, not a hint.
|
|
66
|
+
if (library.length > 0) {
|
|
67
|
+
lines.push(` Library (carried, not running): ${library.join(', ')} -- "load <name>" runs one`);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
lines.push(` Library: no program chips -- the street sells them ("catalog software", then "source <name> from a contact")`);
|
|
71
|
+
}
|
|
72
|
+
const mnemonic = hint(`Attack cuts, Sleaze cracks, Data Processing thinks, Firewall holds -- those are attributes, not programs. "deck config <a> <s> <d> <f>" re-deals the array.`);
|
|
73
|
+
if (mnemonic)
|
|
74
|
+
lines.push('', mnemonic);
|
|
75
|
+
return lines.join('\n');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* "load <program>": move a carried program chip into the deck's running
|
|
80
|
+
* memory (capped by the p.227 Programs column). The chip stays in your
|
|
81
|
+
* library -- storage is unlimited, RUNNING is the scarce thing.
|
|
82
|
+
*/
|
|
83
|
+
export class LoadProgramCommand extends Command {
|
|
84
|
+
static verb = 'load';
|
|
85
|
+
static description = 'Load a carried program into your cyberdeck\'s running memory ("load exploit"). Decks run a limited number at once -- "unload <program>" frees a slot; "deck" shows the panel.';
|
|
86
|
+
async execute(args = []) {
|
|
87
|
+
const actor = this.actor;
|
|
88
|
+
const deck = actor.activeDeck ?? actor.getAnyCyberdeck();
|
|
89
|
+
if (!deck)
|
|
90
|
+
return `Nothing to load INTO -- no cyberdeck on you.`;
|
|
91
|
+
if (deck.isBricked)
|
|
92
|
+
return `The ${deck.name} is bricked -- nothing runs on dead boards.`;
|
|
93
|
+
const carried = actor.inventory.getAllItems()
|
|
94
|
+
.map(i => findProgram(i.name))
|
|
95
|
+
.filter((p) => !!p)
|
|
96
|
+
.filter(p => !deck.hasProgram(p.key));
|
|
97
|
+
if (args.length === 0) {
|
|
98
|
+
return carried.length > 0
|
|
99
|
+
? `Load what? Carried chips: ${carried.map(p => p.name).join(', ')}. ("load <name>")`
|
|
100
|
+
: `Nothing to load -- you own no program chips yet. The street sells them: "catalog software", then "source <name> from a contact".`;
|
|
101
|
+
}
|
|
102
|
+
const program = findProgram(args.join(' '));
|
|
103
|
+
if (!program) {
|
|
104
|
+
return `No program called "${args.join(' ')}". The street's libraries: ${PROGRAMS.map(p => p.name).join(', ')} ("catalog software" for prices).`;
|
|
105
|
+
}
|
|
106
|
+
const owned = actor.inventory.getAllItems().some(i => findProgram(i.name)?.key === program.key);
|
|
107
|
+
if (!owned) {
|
|
108
|
+
return `You don't own ${program.name} -- the Data Broker does ("source ${program.name.toLowerCase()} program from a contact").`;
|
|
109
|
+
}
|
|
110
|
+
if (deck.hasProgram(program.key))
|
|
111
|
+
return `${program.name} is already running.`;
|
|
112
|
+
if (deck.loadedPrograms.length >= deck.programSlots) {
|
|
113
|
+
return `The ${deck.name} runs ${deck.programSlots} program${deck.programSlots === 1 ? '' : 's'} and every slot is hot -- "unload" something first.`;
|
|
114
|
+
}
|
|
115
|
+
deck.loadedPrograms.push(program.key);
|
|
116
|
+
this.logger.write(`LoadProgramCommand: ${actor.name} loaded ${program.key} on ${deck.name} (${deck.loadedPrograms.length}/${deck.programSlots}).`);
|
|
117
|
+
this.scene.updateStatus();
|
|
118
|
+
return `${program.name} spins up on the ${deck.name} (${deck.loadedPrograms.length}/${deck.programSlots} slots). ${program.effect}`;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/** "unload <program>": free a running slot. The chip stays in the library. */
|
|
122
|
+
export class UnloadProgramCommand extends Command {
|
|
123
|
+
static verb = 'unload';
|
|
124
|
+
static description = 'Unload a running program from your cyberdeck, freeing its slot. The chip stays in your library.';
|
|
125
|
+
async execute(args = []) {
|
|
126
|
+
const actor = this.actor;
|
|
127
|
+
const deck = actor.activeDeck ?? actor.getAnyCyberdeck();
|
|
128
|
+
if (!deck)
|
|
129
|
+
return `No cyberdeck, no running programs.`;
|
|
130
|
+
if (args.length === 0)
|
|
131
|
+
return `Unload what? Running: ${deck.loadedPrograms.map(k => getProgram(k)?.name ?? k).join(', ') || 'nothing'}.`;
|
|
132
|
+
const program = findProgram(args.join(' '));
|
|
133
|
+
if (!program || !deck.hasProgram(program.key)) {
|
|
134
|
+
return `That's not running on the ${deck.name}. Running: ${deck.loadedPrograms.map(k => getProgram(k)?.name ?? k).join(', ') || 'nothing'}.`;
|
|
135
|
+
}
|
|
136
|
+
deck.loadedPrograms = deck.loadedPrograms.filter(k => k !== program.key);
|
|
137
|
+
this.logger.write(`UnloadProgramCommand: ${actor.name} unloaded ${program.key} from ${deck.name}.`);
|
|
138
|
+
this.scene.updateStatus();
|
|
139
|
+
return `${program.name} winds down -- ${deck.loadedPrograms.length}/${deck.programSlots} slots hot.`;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=deck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deck.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/deck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAE7E;;;;;;;GAOG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,2NAA2N,CAAC;IAE3P,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;QACzD,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,KAAK,CAAC,cAAc,EAAE;gBAC3B,CAAC,CAAC,iDAAiD;gBACnD,CAAC,CAAC,uFAAuF,CAAC;QAC9F,CAAC;QAED,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,CAAC;YACxC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACzC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC9C,OAAO,6FAA6F,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YACn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G,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5C,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YAC9C,OAAO,6BAA6B,IAAI,CAAC,IAAI,cAAc,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,SAAS,GAAG,CAAC;QAC/I,CAAC;QACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;QACzE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB,KAAK,CAAC,IAAI,aAAa,OAAO,CAAC,GAAG,SAAS,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;QACpG,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC1B,OAAO,GAAG,OAAO,CAAC,IAAI,kBAAkB,IAAI,CAAC,cAAc,CAAC,MAAM,IAAI,IAAI,CAAC,YAAY,aAAa,CAAC;IACvG,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* The DOCWAGON counter (SR5e p.450, mechanics in utilities/docwagon.ts
|
|
4
|
+
* and Game.tryDocwagonRescue). Bare "docwagon" is the reference panel --
|
|
5
|
+
* always on, like sheet/spells (standing ruling). "docwagon <tier>"
|
|
6
|
+
* buys or renews, through the district's DocWagon face: any Street Doc
|
|
7
|
+
* contact in the room or on the line.
|
|
8
|
+
*/
|
|
9
|
+
export declare class DocwagonCommand extends Command implements ICommand {
|
|
10
|
+
protected static verb: string;
|
|
11
|
+
protected static description: string;
|
|
12
|
+
execute(args?: string[]): Promise<string>;
|
|
13
|
+
private statusPanel;
|
|
14
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { hint } from '../utilities/hints.js';
|
|
3
|
+
import { Item } from '../models/item.js';
|
|
4
|
+
import { Size, Category, Rating } from '../types/shared/item-enum.js';
|
|
5
|
+
import { DOCWAGON_TIERS, RESUSC_FEE, DEATH_COMP, CONTRACT_YEAR_HOMECOMINGS, newContract, } from '../utilities/docwagon.js';
|
|
6
|
+
/**
|
|
7
|
+
* The DOCWAGON counter (SR5e p.450, mechanics in utilities/docwagon.ts
|
|
8
|
+
* and Game.tryDocwagonRescue). Bare "docwagon" is the reference panel --
|
|
9
|
+
* always on, like sheet/spells (standing ruling). "docwagon <tier>"
|
|
10
|
+
* buys or renews, through the district's DocWagon face: any Street Doc
|
|
11
|
+
* contact in the room or on the line.
|
|
12
|
+
*/
|
|
13
|
+
export class DocwagonCommand extends Command {
|
|
14
|
+
static verb = 'docwagon';
|
|
15
|
+
static description = 'DocWagon contracts (SR5e p.450): "docwagon" shows your coverage and the tier table; "docwagon <tier>" buys/renews through a Street Doc (in person or on the line).';
|
|
16
|
+
async execute(args = []) {
|
|
17
|
+
if (!this.game?.hasHub) {
|
|
18
|
+
return `DocWagon sells contracts at storefronts, not on jobsites. Home turf.`;
|
|
19
|
+
}
|
|
20
|
+
const wanted = args.join(' ').trim().toLowerCase().replace(/\s+/g, '-');
|
|
21
|
+
if (!wanted)
|
|
22
|
+
return this.statusPanel();
|
|
23
|
+
const tier = Object.keys(DOCWAGON_TIERS).find(t => t === wanted || t.startsWith(wanted));
|
|
24
|
+
if (!tier) {
|
|
25
|
+
return `No such contract. Tiers: ${Object.keys(DOCWAGON_TIERS).join(', ')}.`;
|
|
26
|
+
}
|
|
27
|
+
// The purchase runs through the district's DocWagon face: a Street
|
|
28
|
+
// Doc contact, reachable in person or over the link.
|
|
29
|
+
const partner = this.actor.activeCallPartner;
|
|
30
|
+
const reachable = [
|
|
31
|
+
...this.scene.getActorsInRoom(this.actor.currentLocation).filter(a => a !== this.actor),
|
|
32
|
+
...(partner ? [partner] : []),
|
|
33
|
+
].find(a => this.game.contacts.get(a.name)?.role === 'Street Doc');
|
|
34
|
+
if (!reachable) {
|
|
35
|
+
return `Contracts get signed at the clinic (or on the line with your Street Doc) -- nobody here can notarize a tissue sample.`;
|
|
36
|
+
}
|
|
37
|
+
const def = DOCWAGON_TIERS[tier];
|
|
38
|
+
if (this.actor.currency < def.price) {
|
|
39
|
+
return `${reachable.name} taps the rate card: ${def.price} nuyen a year for ${tier}. You're carrying ${this.actor.currency}.`;
|
|
40
|
+
}
|
|
41
|
+
const renewal = this.game.docwagon?.tier === tier;
|
|
42
|
+
this.actor.adjustCurrency(-def.price);
|
|
43
|
+
this.game.docwagon = newContract(tier);
|
|
44
|
+
const loyaltyLine = this.game.touchContact(reachable.name, 'trade', def.price);
|
|
45
|
+
this.actor.performAction('signs', `a DocWagon ${tier} contract with ${reachable.name}`);
|
|
46
|
+
this.logger.write(`DocWagon ${tier} ${renewal ? 'renewed' : 'signed'}: ${def.price} nuyen, ${def.freeResuscs} resuscs, ${CONTRACT_YEAR_HOMECOMINGS} homecomings.`);
|
|
47
|
+
// The band itself -- the visible half of the contract.
|
|
48
|
+
if (!this.actor.inventory.hasItem('DocWagon Wristband')) {
|
|
49
|
+
this.actor.inventory.addItem(new Item({
|
|
50
|
+
name: 'DocWagon Wristband',
|
|
51
|
+
description: `A matte biomonitor band, sealed to the wrist. It reads your vitals every second of your life -- and screams for help the moment they stop. Rupture of the band also alerts DocWagon.`,
|
|
52
|
+
size: Size.Tiny, category: Category.Electronics, shape: 'band', color: 'white and red',
|
|
53
|
+
texture: 'medical polymer', rating: Rating.Standard, weight: 0.1, transferable: false,
|
|
54
|
+
}));
|
|
55
|
+
this.scene.updateInventory(this.scene.getPlayer().inventory);
|
|
56
|
+
}
|
|
57
|
+
return [
|
|
58
|
+
`${reachable.name} takes the ${def.price}, files the tissue sample, and seals the band to your wrist. ${renewal ? 'Another year on the clock.' : `You are covered: DocWagon ${tier.toUpperCase()}.`}`,
|
|
59
|
+
def.blurb,
|
|
60
|
+
loyaltyLine ?? '',
|
|
61
|
+
hint(`("docwagon" any time to check your coverage.)`),
|
|
62
|
+
].filter(Boolean).join('\n');
|
|
63
|
+
}
|
|
64
|
+
statusPanel() {
|
|
65
|
+
const lines = [`=== DOCWAGON${hint(' (SR5e p.450)')} ===`];
|
|
66
|
+
const c = this.game.docwagon;
|
|
67
|
+
if (c) {
|
|
68
|
+
const def = DOCWAGON_TIERS[c.tier];
|
|
69
|
+
lines.push(`Contract: ${c.tier.toUpperCase()} -- ${c.homecomingsLeft} homecoming${c.homecomingsLeft === 1 ? '' : 's'} left on the year.`);
|
|
70
|
+
lines.push(`Resuscitations: ${c.resuscsLeft} free left (then ${RESUSC_FEE} each). HTR: ${def.htrFee > 0 ? `${def.htrFee} per extraction` : 'no charge'}${def.deathComp ? `; a dead medic bills ${DEATH_COMP}` : '; DocWagon eats its own casualties'}.`);
|
|
71
|
+
lines.push(`The band answers a flatline anywhere the wagons fly: KO'd under hostile guns means an HTR extraction; clinical death means the crash cart -- not the morgue.`);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
lines.push(`No contract. Flatline uninsured and the street decides -- permanently.`);
|
|
75
|
+
}
|
|
76
|
+
lines.push('');
|
|
77
|
+
lines.push(`Tiers (per year = ${CONTRACT_YEAR_HOMECOMINGS} homecomings):`);
|
|
78
|
+
for (const [name, def] of Object.entries(DOCWAGON_TIERS)) {
|
|
79
|
+
lines.push(` ${name.padEnd(15)} ${String(def.price).padStart(6)} nuyen -- ${def.blurb}`);
|
|
80
|
+
}
|
|
81
|
+
const footer = hint(`Sign or renew with any Street Doc: "docwagon <tier>".`);
|
|
82
|
+
if (footer)
|
|
83
|
+
lines.push('', footer);
|
|
84
|
+
return lines.join('\n');
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=docwagon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docwagon.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/docwagon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACS,cAAc,EAAE,UAAU,EAAE,UAAU,EACpD,yBAAyB,EAAE,WAAW,GACvC,MAAM,0BAA0B,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,OAAO,eAAgB,SAAQ,OAAO;IAChC,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,MAAM,CAAC,WAAW,GAAG,oKAAoK,CAAC;IAEpM,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;YACvB,OAAO,sEAAsE,CAAC;QAChF,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACxE,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;QAEvC,MAAM,IAAI,GAAI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,IAAI,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QAC7G,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,4BAA4B,MAAM,CAAC,IAAI,C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AI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;QAC5F,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,uDAAuD,CAAC,CAAC;QAC7E,IAAI,MAAM;YAAE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QACnC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -22,7 +22,7 @@ export class EquipmentCommand extends Command {
|
|
|
22
22
|
// Holstered means the PROFILE says bare fists -- lead with the carried
|
|
23
23
|
// weapon and how to get it out, or the numbers lie about readiness.
|
|
24
24
|
if (actor.plane === 'meat' && weaponItem && !actor.weaponDrawn) {
|
|
25
|
-
lines.push(`Weapon: ${weaponItem.name} (HOLSTERED -- "brandish" to draw)${ammoNote}`);
|
|
25
|
+
lines.push(`Weapon: ${weaponItem.name} (HOLSTERED${hint(' -- "brandish" to draw')})${ammoNote}`);
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
28
|
lines.push(`Weapon: ${weapon.name} -- damage ${weapon.damage}${weapon.poolBonus > 0 ? `, +${weapon.poolBonus} attack dice` : ''}${ammoNote}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equipment.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/equipment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAG7C;;;;;;GAMG;AACH,MAAM,OAAO,gBAAiB,SAAQ,OAAO;IACjC,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,MAAM,CAAC,WAAW,GAAG,0EAA0E,CAAC;IAE1G,KAAK,CAAC,OAAO,CA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AAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;YAC3D,IAAI,CAAC,KAAK;gBAAE,SAAS;YACrB,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,KAAoC,CAAC;iBAClE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC;iBACnC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,KAAK,SAAS,IAAI,IAAI,KAAK,IAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YAClE,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACxB,gBAAgB,GAAG,IAAI,CAAC;gBACxB,KAAK,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;QAED,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,CAAC,qDAAqD,IAAI,CAAC,8BAA8B,CAAC,EAAE,CAAC,CAAC;QAC1G,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -26,4 +26,15 @@ export declare class GoCommand extends Command implements ICommand {
|
|
|
26
26
|
* mundane background -- the ward has nothing to flare at, and the
|
|
27
27
|
* initiate slips through like weather. */
|
|
28
28
|
private checkWard;
|
|
29
|
+
/**
|
|
30
|
+
* An AIR-GAPPED host's room is dark ground on the grid: nothing there
|
|
31
|
+
* broadcasts, so there is no overlay for a remote persona to stand in
|
|
32
|
+
* -- and no way to ENGAGE what guards it (player report: killed the
|
|
33
|
+
* host's ice from a wireless ride-in, then couldn't loot the host it
|
|
34
|
+
* guarded; if the gap blocks the loot it blocks the fight). A persona
|
|
35
|
+
* whose BODY is in the room rode in on the hard line -- they pass. The
|
|
36
|
+
* host's own ice never leaves its dark room, so the one-way trap
|
|
37
|
+
* (out, then blocked coming back) never bites it in practice.
|
|
38
|
+
*/
|
|
39
|
+
private checkAirGap;
|
|
29
40
|
}
|