@maka/maka-cli 5.5.0 → 5.7.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 -2
- package/bundle/typescript/src/commands/_index.d.ts +4 -0
- package/bundle/typescript/src/commands/_index.js +4 -0
- package/bundle/typescript/src/commands/_index.js.map +1 -1
- package/bundle/typescript/src/commands/debug.js +1 -7
- package/bundle/typescript/src/commands/debug.js.map +1 -1
- package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.js +17 -1
- package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/commands/env/_index.d.ts +3 -0
- package/bundle/typescript/src/commands/env/_index.js +4 -0
- package/bundle/typescript/src/commands/env/_index.js.map +1 -0
- package/bundle/typescript/src/commands/env/env.command.d.ts +3 -0
- package/bundle/typescript/src/commands/env/env.command.js +22 -0
- package/bundle/typescript/src/commands/env/env.command.js.map +1 -0
- package/bundle/typescript/src/commands/env/get.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/env/get.sub.cmd.js +46 -0
- package/bundle/typescript/src/commands/env/get.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/env/prompt-for-env.d.ts +10 -0
- package/bundle/typescript/src/commands/env/prompt-for-env.js +27 -0
- package/bundle/typescript/src/commands/env/prompt-for-env.js.map +1 -0
- package/bundle/typescript/src/commands/env/set.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/env/set.sub.cmd.js +59 -0
- package/bundle/typescript/src/commands/env/set.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js +79 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/augmentations.d.ts +31 -0
- package/bundle/typescript/src/commands/game/sideQuest/augmentations.js +125 -0
- package/bundle/typescript/src/commands/game/sideQuest/augmentations.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.d.ts +17 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js +113 -15
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.d.ts +37 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js +193 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js +10 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.d.ts +3 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js +12 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js +7 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js +97 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.d.ts +21 -10
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js +41 -27
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +63 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.d.ts +35 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js +277 -44
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js +37 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drink.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drink.js +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drink.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/eat.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/eat.js +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/eat.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +101 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +4 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +15 -11
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.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.js +58 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.d.ts +26 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.js +125 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/install.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/install.js +125 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/install.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jump.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jump.js +62 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jump.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.js +76 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/pay.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pay.js +39 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pay.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js +5 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js +5 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.js +121 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js +60 -12
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +27 -10
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +6 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sell.d.ts +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js +125 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js +36 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js +9 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js +27 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/treat.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/treat.js +67 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/treat.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.d.ts +29 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +118 -11
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/work.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/work.js +68 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/work.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +131 -4
- 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 +6 -2
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +10 -6
- 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 +115 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.js +464 -25
- 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 +111 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +70 -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 +109 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +423 -39
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +6 -6
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +38 -14
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +41 -8
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/qualities.d.ts +44 -0
- package/bundle/typescript/src/commands/game/sideQuest/qualities.js +155 -0
- package/bundle/typescript/src/commands/game/sideQuest/qualities.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +274 -5
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.d.ts +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +50 -3
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.d.ts +13 -6
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js +25 -14
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +100 -10
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/commerce.d.ts +56 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/commerce.js +144 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/commerce.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/outdoors.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/outdoors.js +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/outdoors.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +84 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/terminal-reset.d.ts +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/terminal-reset.js +23 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/terminal-reset.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +51 -15
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/commands/remote/reconfig.sub.cmd.js +27 -1
- package/bundle/typescript/src/commands/remote/reconfig.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/commands/run/run.command.js +1 -7
- package/bundle/typescript/src/commands/run/run.command.js.map +1 -1
- package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.js +1 -6
- package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/generators/config.js +11 -10
- package/bundle/typescript/src/generators/config.js.map +1 -1
- package/bundle/typescript/src/templates/meteor/config/pm2.config.js +3 -3
- package/bundle/typescript/src/templates/meteor/project/gitignore +2 -1
- package/bundle/typescript/src/tool.d.ts +2 -0
- package/bundle/typescript/src/tool.js +3 -0
- package/bundle/typescript/src/tool.js.map +1 -1
- package/bundle/typescript/src/tools/aws/aws.class.js +6 -4
- package/bundle/typescript/src/tools/aws/aws.class.js.map +1 -1
- package/bundle/typescript/src/tools/dotenvx/dotenvx.class.d.ts +24 -0
- package/bundle/typescript/src/tools/dotenvx/dotenvx.class.js +66 -0
- package/bundle/typescript/src/tools/dotenvx/dotenvx.class.js.map +1 -0
- package/bundle/typescript/src/tools/ssh/ssh.class.js +1 -1
- package/bundle/typescript/src/tools/ssh/ssh.class.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"haggle.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/haggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CA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): the Awakened
|
|
4
|
+
* and technomancer endgame "advance" has been advertising. Each grade
|
|
5
|
+
* costs 10 + (new grade x3) karma, can never exceed the BASE talent
|
|
6
|
+
* (RAW), lifts the talent ceiling to 6 + grade (advance.ts reads it),
|
|
7
|
+
* and grants ONE pick: a metamagic for the Awakened, an echo for
|
|
8
|
+
* technomancers. Trains at home like everything else. Every pick has a
|
|
9
|
+
* real hook -- same catalog policy as qualities.ts.
|
|
10
|
+
*/
|
|
11
|
+
export interface IMetamagic {
|
|
12
|
+
key: string;
|
|
13
|
+
name: string;
|
|
14
|
+
/** Who can take it: casters (magic, not adept), adepts, or technomancers. */
|
|
15
|
+
path: 'caster' | 'adept' | 'techno';
|
|
16
|
+
effect: string;
|
|
17
|
+
page: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const METAMAGICS: IMetamagic[];
|
|
20
|
+
export declare class InitiateCommand extends Command implements ICommand {
|
|
21
|
+
protected static verb: string;
|
|
22
|
+
protected static description: string;
|
|
23
|
+
execute(args?: string[]): Promise<string>;
|
|
24
|
+
private pathOpen;
|
|
25
|
+
private listPaths;
|
|
26
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
3
|
+
export const METAMAGICS = [
|
|
4
|
+
// ------------------------- The Awakened -------------------------
|
|
5
|
+
{
|
|
6
|
+
key: 'centering', name: 'Centering', path: 'caster', page: 'p.325',
|
|
7
|
+
effect: 'your tradition\'s chant quiets the mind: +grade dice on every drain resist',
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
key: 'masking', name: 'Masking', path: 'caster', page: 'p.325-326',
|
|
11
|
+
effect: 'your aura reads as mundane background -- wards have nothing to flare at, and your astral form slips through',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
key: 'quickening', name: 'Quickening', path: 'caster', page: 'p.326',
|
|
15
|
+
effect: 'the armor spell anchors into the world: it sustains itself, its -2 never bills',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
key: 'power-point', name: 'Power Point', path: 'adept', page: 'p.325',
|
|
19
|
+
effect: 'one more point of magic-as-muscle: +1 die on every adept attack pool',
|
|
20
|
+
},
|
|
21
|
+
// ------------------------ Technomancers ------------------------
|
|
22
|
+
{
|
|
23
|
+
key: 'overclocking', name: 'Overclocking', path: 'techno', page: 'p.258',
|
|
24
|
+
effect: 'the living persona runs past spec: +1 initiative die in hot-sim',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
key: 'attack-upgrade', name: 'Attack Upgrade', path: 'techno', page: 'p.258',
|
|
28
|
+
effect: 'resonance sharpened to a point: +1 die on matrix attack pools',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
key: 'firewall-upgrade', name: 'Firewall Upgrade', path: 'techno', page: 'p.258',
|
|
32
|
+
effect: 'the living persona hardens: +1 die on matrix soak',
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
export class InitiateCommand extends Command {
|
|
36
|
+
static verb = 'initiate';
|
|
37
|
+
static description = 'Initiation/submersion at your hideout (10 + grade x3 karma): each grade lifts Magic/Resonance past 6 and grants a metamagic (or echo). "initiate" lists; "initiate <pick>" pays.';
|
|
38
|
+
async execute(args = []) {
|
|
39
|
+
const actor = this.actor;
|
|
40
|
+
if (actor.inExchange) {
|
|
41
|
+
return `Transcendence waits for the shooting to stop.`;
|
|
42
|
+
}
|
|
43
|
+
if (actor.currentLocation?.roomType !== 'Residence') {
|
|
44
|
+
return `The work of initiation is done in seclusion -- home, quiet, undisturbed.`;
|
|
45
|
+
}
|
|
46
|
+
if (actor.plane !== 'meat') {
|
|
47
|
+
return `The ritual starts in the flesh. Come back to it.`;
|
|
48
|
+
}
|
|
49
|
+
const isTechno = actor.isTechnomancer() || actor.baseResonance > 0;
|
|
50
|
+
const isAwakened = actor.baseMagic > 0;
|
|
51
|
+
if (!isTechno && !isAwakened) {
|
|
52
|
+
return `Initiation is a road for the Awakened (and submersion for technomancers) -- the mundane walk other roads: chrome, karma, cred.`;
|
|
53
|
+
}
|
|
54
|
+
const ritualName = isTechno ? 'Submersion' : 'Initiation';
|
|
55
|
+
const talent = isTechno ? actor.baseResonance : actor.baseMagic;
|
|
56
|
+
// RAW: grade can never exceed the base talent.
|
|
57
|
+
const nextGrade = actor.initiationGrade + 1;
|
|
58
|
+
const cost = 10 + nextGrade * 3;
|
|
59
|
+
if (!args || args.length === 0) {
|
|
60
|
+
return this.listPaths(ritualName, talent, nextGrade, cost, isTechno);
|
|
61
|
+
}
|
|
62
|
+
if (nextGrade > talent) {
|
|
63
|
+
return `${ritualName} grade can't outrun the talent itself (grade ${actor.initiationGrade}, ${isTechno ? 'resonance' : 'magic'} ${talent}) -- raise the attribute first ("advance").`;
|
|
64
|
+
}
|
|
65
|
+
// Exact key first, then fuzzy over display names ONLY -- names and
|
|
66
|
+
// keys together make every one-word pick ambiguous with its own key
|
|
67
|
+
// (the same trap quality-trade.ts hit).
|
|
68
|
+
const available = METAMAGICS.filter(m => this.pathOpen(m, isTechno) && !actor.hasMetamagic(m.key));
|
|
69
|
+
const input = args.join(' ');
|
|
70
|
+
const byKey = available.find(m => m.key === input.toLowerCase().replace(/\s+/g, '-'));
|
|
71
|
+
const picked = byKey?.name ?? fuzzyPickName(input, available.map(m => m.name));
|
|
72
|
+
const pick = available.find(m => m.name === picked);
|
|
73
|
+
if (!pick) {
|
|
74
|
+
const owned = METAMAGICS.find(m => actor.hasMetamagic(m.key) && (m.name === args.join(' ') || fuzzyPickName(args.join(' '), [m.name])));
|
|
75
|
+
if (owned)
|
|
76
|
+
return `${owned.name} is already woven into you -- each is learned once (RAW).`;
|
|
77
|
+
return `That's not a ${isTechno ? 'known echo' : 'metamagic'} open to your path. "initiate" lists what is.`;
|
|
78
|
+
}
|
|
79
|
+
if (actor.karma < cost) {
|
|
80
|
+
return `Grade ${nextGrade} costs ${cost} karma (10 + grade x3, SR5e) -- you have ${actor.karma}. Finish more jobs.`;
|
|
81
|
+
}
|
|
82
|
+
actor.karma -= cost;
|
|
83
|
+
actor.initiationGrade = nextGrade;
|
|
84
|
+
actor.metamagics.add(pick.key);
|
|
85
|
+
this.actor.performAction(isTechno ? 'submerges' : 'initiates', `grade ${nextGrade} -- ${pick.name}`);
|
|
86
|
+
this.logger.write(`${actor.name} ${isTechno ? 'submersion' : 'initiation'} grade ${nextGrade}: ${pick.key} (${cost} karma, ${actor.karma} left).`);
|
|
87
|
+
this.scene.updateStatus();
|
|
88
|
+
const flavor = isTechno
|
|
89
|
+
? `You sink below the noise floor of the Matrix and come back carrying something new.`
|
|
90
|
+
: `The ordeal takes the downtime and gives back a deeper grip on the talent.`;
|
|
91
|
+
return [
|
|
92
|
+
`${flavor} ${ritualName} grade ${nextGrade}.`,
|
|
93
|
+
` ${pick.name}: ${pick.effect}. (${pick.page})`,
|
|
94
|
+
` Your ${isTechno ? 'resonance' : 'magic'} ceiling is now ${6 + nextGrade} ("advance" to climb toward it). (${cost} karma spent, ${actor.karma} left.)`,
|
|
95
|
+
].join('\n');
|
|
96
|
+
}
|
|
97
|
+
pathOpen(m, isTechno) {
|
|
98
|
+
if (isTechno)
|
|
99
|
+
return m.path === 'techno';
|
|
100
|
+
if (this.actor.adept)
|
|
101
|
+
return m.path === 'adept' || m.path === 'caster';
|
|
102
|
+
return m.path === 'caster';
|
|
103
|
+
}
|
|
104
|
+
listPaths(ritualName, talent, nextGrade, cost, isTechno) {
|
|
105
|
+
const actor = this.actor;
|
|
106
|
+
const lines = [`=== ${ritualName.toUpperCase()} (grade ${actor.initiationGrade}, karma: ${actor.karma}) ===`];
|
|
107
|
+
const owned = METAMAGICS.filter(m => actor.hasMetamagic(m.key));
|
|
108
|
+
if (owned.length > 0) {
|
|
109
|
+
lines.push(`Woven in:`);
|
|
110
|
+
for (const m of owned)
|
|
111
|
+
lines.push(` ${m.name.padEnd(18)} ${m.effect}`);
|
|
112
|
+
}
|
|
113
|
+
const gradeGate = nextGrade > talent
|
|
114
|
+
? ` -- BLOCKED: grade can't exceed ${isTechno ? 'resonance' : 'magic'} ${talent} ("advance" it first)`
|
|
115
|
+
: actor.karma >= cost ? '' : ' (short)';
|
|
116
|
+
lines.push(`Grade ${nextGrade} costs ${cost} karma${gradeGate}. One pick per grade:`);
|
|
117
|
+
for (const m of METAMAGICS.filter(x => this.pathOpen(x, isTechno) && !actor.hasMetamagic(x.key))) {
|
|
118
|
+
lines.push(` ${m.name.padEnd(18)} ${m.effect} (${m.page})`);
|
|
119
|
+
}
|
|
120
|
+
lines.push('');
|
|
121
|
+
lines.push(`"initiate <pick>" pays and weaves it in. Each grade also lifts your ${isTechno ? 'resonance' : 'magic'} ceiling to 6 + grade.`);
|
|
122
|
+
return lines.join('\n');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=initiate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initiate.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/initiate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAqB5D,MAAM,CAAC,MAAM,UAAU,GAAiB;IACtC,mEAAmE;IACnE;QACE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO;QAClE,MAAM,EAAE,4EAA4E;KACrF;IACD;QACE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW;QAClE,MAAM,EAAE,6GAA6G;KACtH;IACD;QACE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO;QACpE,MAAM,EAAE,gFAAgF;KACzF;IACD;QACE,GAAG,EAAE,aA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AI,CAAC,uEAAuE,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,wBAAwB,CAAC,CAAC;QAC5I,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* The chrome shop: "install" at a street clinic lists the augmentation
|
|
4
|
+
* catalog against your essence and nuyen; "install <name>" pays, goes
|
|
5
|
+
* under, and wakes up different. Essence burns permanently (and burns
|
|
6
|
+
* Magic/Resonance for the Awakened -- see Player.installAug); the fee
|
|
7
|
+
* comes off carried credsticks, which makes this the game's first true
|
|
8
|
+
* money sink. Loot chrome works too: carrying a matching Cyberware-
|
|
9
|
+
* category part waives the fee -- the doc just charges you the story.
|
|
10
|
+
*/
|
|
11
|
+
export declare class InstallCommand extends Command implements ICommand {
|
|
12
|
+
protected static verb: string;
|
|
13
|
+
protected static description: string;
|
|
14
|
+
execute(args?: string[]): Promise<string>;
|
|
15
|
+
/** Chrome gets cut in rooms that are clinics by type or by name. */
|
|
16
|
+
private static isClinic;
|
|
17
|
+
/** A carried loose part matching this aug -- payment in kind. */
|
|
18
|
+
private findCarriedPart;
|
|
19
|
+
private listCatalog;
|
|
20
|
+
private installAug;
|
|
21
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { AUGMENTATIONS, findAug } from '../augmentations.js';
|
|
3
|
+
import { Category } from '../types/shared/item-enum.js';
|
|
4
|
+
/**
|
|
5
|
+
* The chrome shop: "install" at a street clinic lists the augmentation
|
|
6
|
+
* catalog against your essence and nuyen; "install <name>" pays, goes
|
|
7
|
+
* under, and wakes up different. Essence burns permanently (and burns
|
|
8
|
+
* Magic/Resonance for the Awakened -- see Player.installAug); the fee
|
|
9
|
+
* comes off carried credsticks, which makes this the game's first true
|
|
10
|
+
* money sink. Loot chrome works too: carrying a matching Cyberware-
|
|
11
|
+
* category part waives the fee -- the doc just charges you the story.
|
|
12
|
+
*/
|
|
13
|
+
export class InstallCommand extends Command {
|
|
14
|
+
static verb = 'install';
|
|
15
|
+
static description = 'Buy and install cyberware/bioware at a street clinic. "install" lists the catalog; "install <name>" goes under the knife. Essence burns forever.';
|
|
16
|
+
async execute(args = []) {
|
|
17
|
+
const actor = this.actor;
|
|
18
|
+
if (actor.plane !== 'meat') {
|
|
19
|
+
return `Chrome goes into meat. Come back to your body first.`;
|
|
20
|
+
}
|
|
21
|
+
if (actor.inExchange) {
|
|
22
|
+
return `Nobody operates in a firefight.`;
|
|
23
|
+
}
|
|
24
|
+
if (!InstallCommand.isClinic(actor.currentLocation)) {
|
|
25
|
+
return `Back-alley self-surgery is how runners end up as cautionary tales. Find a street clinic -- there's one on Market Row.`;
|
|
26
|
+
}
|
|
27
|
+
if (!args || args.length === 0) {
|
|
28
|
+
return this.listCatalog();
|
|
29
|
+
}
|
|
30
|
+
const aug = findAug(args.join(' '));
|
|
31
|
+
if (!aug) {
|
|
32
|
+
return `The doc squints. "Never heard of it." The board lists: ${AUGMENTATIONS.map(a => a.name).join(', ')}.`;
|
|
33
|
+
}
|
|
34
|
+
return this.installAug(aug);
|
|
35
|
+
}
|
|
36
|
+
/** Chrome gets cut in rooms that are clinics by type or by name. */
|
|
37
|
+
static isClinic(room) {
|
|
38
|
+
if (!room)
|
|
39
|
+
return false;
|
|
40
|
+
return room.roomType === 'Clinic' || /clinic|med\b|infirmary|surgery/.test(`${room.roomType ?? ''} ${room.name}`.toLowerCase());
|
|
41
|
+
}
|
|
42
|
+
/** A carried loose part matching this aug -- payment in kind. */
|
|
43
|
+
findCarriedPart(aug) {
|
|
44
|
+
const wanted = aug.name.toLowerCase();
|
|
45
|
+
return this.actor.inventory.getAllItems().find(i => i.category === Category.Cyberware &&
|
|
46
|
+
(i.name.toLowerCase().includes(wanted) || wanted.includes(i.name.toLowerCase())));
|
|
47
|
+
}
|
|
48
|
+
listCatalog() {
|
|
49
|
+
const actor = this.actor;
|
|
50
|
+
const lines = [
|
|
51
|
+
`=== THE CHROME BOARD ===`,
|
|
52
|
+
`Essence ${actor.essence.toFixed(1)}/6.0 | Nuyen ${actor.currency}`,
|
|
53
|
+
'',
|
|
54
|
+
];
|
|
55
|
+
for (const aug of AUGMENTATIONS) {
|
|
56
|
+
const installed = actor.hasAug(aug.key);
|
|
57
|
+
const part = installed ? undefined : this.findCarriedPart(aug);
|
|
58
|
+
const price = part ? `part in hand -- fee waived` : `${aug.cost} nuyen`;
|
|
59
|
+
const tag = installed ? ' [INSTALLED]' : '';
|
|
60
|
+
lines.push(` ${aug.name.padEnd(18)} ${aug.essence.toFixed(1)} ess ${price.padStart(22)} (${aug.kind})${tag}`);
|
|
61
|
+
lines.push(` ${aug.effect}`);
|
|
62
|
+
}
|
|
63
|
+
lines.push('');
|
|
64
|
+
lines.push(`"install <name>" to go under. Essence never comes back${actor.baseMagic > 0 || actor.baseResonance > 0 ? ' -- and every full point lost burns a point of your ' + (actor.baseResonance > 0 ? 'Resonance' : 'Magic') : ''}.`);
|
|
65
|
+
return lines.join('\n');
|
|
66
|
+
}
|
|
67
|
+
installAug(aug) {
|
|
68
|
+
const actor = this.actor;
|
|
69
|
+
if (actor.hasAug(aug.key)) {
|
|
70
|
+
return `Your ${aug.name} is already in there, working fine.`;
|
|
71
|
+
}
|
|
72
|
+
// Wired II swallows Wired I's slot; going backwards buys nothing.
|
|
73
|
+
if (aug.key === 'wired-reflexes-1' && actor.hasAug('wired-reflexes-2')) {
|
|
74
|
+
return `You're already running Wired Reflexes II -- there's no downgrade surgery, and no reason to want one.`;
|
|
75
|
+
}
|
|
76
|
+
const conflict = AUGMENTATIONS.find(other => actor.hasAug(other.key) &&
|
|
77
|
+
((aug.excludes ?? []).includes(other.key) || (other.excludes ?? []).includes(aug.key)));
|
|
78
|
+
if (conflict) {
|
|
79
|
+
return `The doc shakes their head. "${aug.name} on top of your ${conflict.name}? The two systems would tear each other apart. Pick a nervous system and commit."`;
|
|
80
|
+
}
|
|
81
|
+
if (actor.essence - aug.essence <= 0.05) {
|
|
82
|
+
return `The doc runs the scanner and goes quiet. "Essence ${actor.essence.toFixed(1)}. There's not enough of you left to cut away. I won't do it."`;
|
|
83
|
+
}
|
|
84
|
+
// Payment: a matching loose part waives the fee; otherwise nuyen.
|
|
85
|
+
const part = this.findCarriedPart(aug);
|
|
86
|
+
let paymentLine;
|
|
87
|
+
if (part) {
|
|
88
|
+
actor.inventory.removeItem(part.name);
|
|
89
|
+
paymentLine = `You put the ${part.name} on the tray. The doc turns it over once, nods. "Part's good. Installation's on the house story-rate."`;
|
|
90
|
+
}
|
|
91
|
+
else if (actor.currency < aug.cost) {
|
|
92
|
+
return `${aug.name} runs ${aug.cost} nuyen -- you're carrying ${actor.currency}. The doc doesn't do tabs on surgery.`;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
actor.adjustCurrency(-aug.cost);
|
|
96
|
+
paymentLine = `Paid: ${aug.cost} nuyen (${actor.currency} left).`;
|
|
97
|
+
}
|
|
98
|
+
const essenceBefore = actor.essence;
|
|
99
|
+
const magicBefore = actor.magic;
|
|
100
|
+
const resonanceBefore = actor.resonance;
|
|
101
|
+
actor.installAug(aug);
|
|
102
|
+
// Surgery takes something out of you beyond the essence -- a couple of
|
|
103
|
+
// stun boxes that rest at home clears.
|
|
104
|
+
actor.takeStun(2);
|
|
105
|
+
actor.performAction('goes under the knife for', aug.name);
|
|
106
|
+
this.logger.write(`${actor.name} installed ${aug.key}: essence ${essenceBefore} -> ${actor.essence}, paid ${part ? 'in kind' : aug.cost}.`);
|
|
107
|
+
this.scene.addWorldEvent(`${actor.name} had ${aug.name} installed at ${actor.currentLocation.name}.`);
|
|
108
|
+
this.scene.updateStatus();
|
|
109
|
+
const lines = [
|
|
110
|
+
`The doc gloves up. "Sit. This one's not gentle."`,
|
|
111
|
+
` ${paymentLine}`,
|
|
112
|
+
` Essence: ${essenceBefore.toFixed(1)} -> ${actor.essence.toFixed(1)}`,
|
|
113
|
+
];
|
|
114
|
+
if (actor.magic < magicBefore) {
|
|
115
|
+
lines.push(` Something else is gone too -- Magic: ${magicBefore} -> ${actor.magic}. The world feels one shade flatter.`);
|
|
116
|
+
}
|
|
117
|
+
if (actor.resonance < resonanceBefore) {
|
|
118
|
+
lines.push(` The static in your head drops an octave -- Resonance: ${resonanceBefore} -> ${actor.resonance}.`);
|
|
119
|
+
}
|
|
120
|
+
lines.push(` ${aug.wakeLine}`);
|
|
121
|
+
lines.push(` (${aug.effect}. The anesthesia hangover is 2 stun -- rest it off.)`);
|
|
122
|
+
return lines.join('\n');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,aAAa,EAAiB,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxD;;;;;;;;GAQG;AACH,MAAM,OAAO,cAAe,SAAQ,OAAO;IAC/B,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC;IACxB,MAAM,CAAC,WAAW,GAAG,kJAAkJ,CAAC;IAElL,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;YAC3B,OAAO,sDAAsD,CAAC;QAChE,CAAC;QACD,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO,iCAAiC,CAAC;QAC3C,CAAC;QACD,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CA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G,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAE1B,MAAM,KAAK,GAAG;YACZ,kDAAkD;YAClD,KAAK,WAAW,EAAE;YAClB,cAAc,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;SACxE,CAAC;QACF,IAAI,KAAK,CAAC,KAAK,GAAG,WAAW,EAAE,CAAC;YAC9B,KAAK,CAAC,IAAI,CAAC,0CAA0C,WAAW,OAAO,KAAK,CAAC,KAAK,sCAAsC,CAAC,CAAC;QAC5H,CAAC;QACD,IAAI,KAAK,CAAC,SAAS,GAAG,eAAe,EAAE,CAAC;YACtC,KAAK,CAAC,IAAI,CAAC,2DAA2D,eAAe,OAAO,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC;QAClH,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;QAChC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,MAAM,sDAAsD,CAAC,CAAC;QACnF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Jumped-in rigging (SR5e p.266): "jump" pours the rigger into a carried
|
|
4
|
+
* drone -- full VR through an IMPLANTED CONTROL RIG (the book's hard
|
|
5
|
+
* requirement; the clinic sells them) -- and "jump" again drops back
|
|
6
|
+
* into the meat. While jumped in, the drone IS your presence: "go" flies
|
|
7
|
+
* it, "look" reads its sensors, gunnery fights with its mount (armed
|
|
8
|
+
* airframes only), and everything that hits it bleeds half through the
|
|
9
|
+
* link. "jump hot" runs hot-sim: sharper pools, physical consequences.
|
|
10
|
+
* The un-jumped Fly-Spy recon sweep stays where it was ("drone").
|
|
11
|
+
*/
|
|
12
|
+
export declare class JumpCommand extends Command implements ICommand {
|
|
13
|
+
protected static verb: string;
|
|
14
|
+
protected static description: string;
|
|
15
|
+
execute(args?: string[]): Promise<string>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { enterDrone, leaveDrone } from '../utilities/planes.js';
|
|
3
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
4
|
+
/**
|
|
5
|
+
* Jumped-in rigging (SR5e p.266): "jump" pours the rigger into a carried
|
|
6
|
+
* drone -- full VR through an IMPLANTED CONTROL RIG (the book's hard
|
|
7
|
+
* requirement; the clinic sells them) -- and "jump" again drops back
|
|
8
|
+
* into the meat. While jumped in, the drone IS your presence: "go" flies
|
|
9
|
+
* it, "look" reads its sensors, gunnery fights with its mount (armed
|
|
10
|
+
* airframes only), and everything that hits it bleeds half through the
|
|
11
|
+
* link. "jump hot" runs hot-sim: sharper pools, physical consequences.
|
|
12
|
+
* The un-jumped Fly-Spy recon sweep stays where it was ("drone").
|
|
13
|
+
*/
|
|
14
|
+
export class JumpCommand extends Command {
|
|
15
|
+
static verb = 'jump';
|
|
16
|
+
static description = 'Jump INTO a carried drone (control rig required): fly it, see through it, fight with its mount. "jump hot" for hot-sim; "jump" again returns to your body.';
|
|
17
|
+
async execute(args = []) {
|
|
18
|
+
const actor = this.actor;
|
|
19
|
+
// Already riding: this is the jump OUT.
|
|
20
|
+
if (actor.plane === 'drone') {
|
|
21
|
+
return leaveDrone(this.scene, actor).join('\n');
|
|
22
|
+
}
|
|
23
|
+
if (actor.plane !== 'meat') {
|
|
24
|
+
return actor.plane === 'matrix'
|
|
25
|
+
? `One immersion at a time -- "jack out" before you jump into an airframe.`
|
|
26
|
+
: `Your body is the antenna, and it's currently unoccupied. "return" first.`;
|
|
27
|
+
}
|
|
28
|
+
if (!actor.hasAug('control-rig')) {
|
|
29
|
+
return `Jumping in takes an implanted control rig -- wetware, not wishful thinking (SR5e p.266). The clinic installs them.`;
|
|
30
|
+
}
|
|
31
|
+
if (actor.inExchange) {
|
|
32
|
+
return `Going limp in a firefight is called being a target. Let the exchange settle.`;
|
|
33
|
+
}
|
|
34
|
+
const drones = actor.inventory.getAllItems().filter(i => i.isDrone());
|
|
35
|
+
if (drones.length === 0) {
|
|
36
|
+
return `Nothing to jump into -- no drone in your pack. (Ratchet's Circuit Bazaar stocks airframes.)`;
|
|
37
|
+
}
|
|
38
|
+
// "jump hot" / "jump <drone> hot": strip the mode word, pick the frame.
|
|
39
|
+
const words = args.map(w => w.toLowerCase());
|
|
40
|
+
const mode = words.includes('hot') ? 'hot' : 'cold';
|
|
41
|
+
const nameWords = args.filter(w => !/^(hot|cold)$/i.test(w));
|
|
42
|
+
let drone = drones.length === 1 ? drones[0] : undefined;
|
|
43
|
+
if (nameWords.length > 0) {
|
|
44
|
+
const picked = fuzzyPickName(nameWords.join(' '), drones.map(d => d.name));
|
|
45
|
+
drone = picked ? drones.find(d => d.name === picked) : undefined;
|
|
46
|
+
if (!drone) {
|
|
47
|
+
return `No drone by that name in your pack. Carried: ${drones.map(d => d.name).join(', ')}.`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (!drone) {
|
|
51
|
+
return `Which airframe? Carried: ${drones.map(d => d.name).join(', ')}. ("jump <name>")`;
|
|
52
|
+
}
|
|
53
|
+
if (drone.isWrecked) {
|
|
54
|
+
return `The ${drone.name} is a wreck -- bent rotors and dead boards jump nowhere. It repairs while you rest somewhere safe.`;
|
|
55
|
+
}
|
|
56
|
+
this.logger.write(`JumpCommand: ${actor.name} jumping into ${drone.name} (${mode}-sim).`);
|
|
57
|
+
const lines = enterDrone(this.scene, actor, drone, mode);
|
|
58
|
+
this.scene.updateStatus();
|
|
59
|
+
return lines.join('\n');
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=jump.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump.js","sourceRoot":"","sources":["../../../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IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;YACpB,OAAO,OAAO,KAAK,CAAC,IAAI,oGAAoG,CAAC;QAC/H,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,KAAK,CAAC,IAAI,iBAAiB,KAAK,CAAC,IAAI,KAAK,IAAI,QAAQ,CAAC,CAAC;QAC1F,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACzD,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* The bills half of downtime, SR5e p.369 scaled to per-job-cycle: your
|
|
4
|
+
* hideout runs at a lifestyle TIER, upkeep is collected every homecoming
|
|
5
|
+
* (Game.returnToHub), and the tier is real mechanics -- rest dice at home
|
|
6
|
+
* (rest.ts), a bonus edge per job at Middle+, a full stun reset walking
|
|
7
|
+
* in the door at High. Can't pay? You slide down a tier and the
|
|
8
|
+
* shortfall becomes debt. "lifestyle" views the board anywhere; changing
|
|
9
|
+
* tiers happens at home.
|
|
10
|
+
*/
|
|
11
|
+
export declare class LifestyleCommand extends Command implements ICommand {
|
|
12
|
+
protected static verb: string;
|
|
13
|
+
protected static description: string;
|
|
14
|
+
execute(args?: string[]): Promise<string>;
|
|
15
|
+
private listTiers;
|
|
16
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { LIFESTYLE_TIERS } from '../utilities/commerce.js';
|
|
3
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
4
|
+
/**
|
|
5
|
+
* The bills half of downtime, SR5e p.369 scaled to per-job-cycle: your
|
|
6
|
+
* hideout runs at a lifestyle TIER, upkeep is collected every homecoming
|
|
7
|
+
* (Game.returnToHub), and the tier is real mechanics -- rest dice at home
|
|
8
|
+
* (rest.ts), a bonus edge per job at Middle+, a full stun reset walking
|
|
9
|
+
* in the door at High. Can't pay? You slide down a tier and the
|
|
10
|
+
* shortfall becomes debt. "lifestyle" views the board anywhere; changing
|
|
11
|
+
* tiers happens at home.
|
|
12
|
+
*/
|
|
13
|
+
export class LifestyleCommand extends Command {
|
|
14
|
+
static verb = 'lifestyle';
|
|
15
|
+
static description = 'View or change your hideout\'s lifestyle tier (upkeep per job, rest quality, edge perks). "lifestyle" lists; "lifestyle <tier>" moves -- at home.';
|
|
16
|
+
async execute(args = []) {
|
|
17
|
+
if (!this.game?.hasHub) {
|
|
18
|
+
return `Lifestyle is a home thing, and out here there's only the job.`;
|
|
19
|
+
}
|
|
20
|
+
if (!args || args.length === 0) {
|
|
21
|
+
return this.listTiers();
|
|
22
|
+
}
|
|
23
|
+
const actor = this.actor;
|
|
24
|
+
if (actor.currentLocation?.roomType !== 'Residence') {
|
|
25
|
+
return `Rearranging how you live happens AT home -- head back to your hideout first.`;
|
|
26
|
+
}
|
|
27
|
+
const picked = fuzzyPickName(args.join(' '), LIFESTYLE_TIERS.map(t => t.name));
|
|
28
|
+
if (!picked) {
|
|
29
|
+
return `That's not a way to live. Tiers: ${LIFESTYLE_TIERS.map(t => t.name).join(', ')}.`;
|
|
30
|
+
}
|
|
31
|
+
if (picked === this.game.lifestyleTier) {
|
|
32
|
+
return `You're already living ${picked}.`;
|
|
33
|
+
}
|
|
34
|
+
if (this.game.rentDebt > 0) {
|
|
35
|
+
return `The landlord won't renegotiate with ${this.game.rentDebt} nuyen on the tab -- "pay" it off first.`;
|
|
36
|
+
}
|
|
37
|
+
const from = this.game.lifestyleTier;
|
|
38
|
+
this.game.lifestyleTier = picked;
|
|
39
|
+
actor.lifestyleEdgeBonus = this.game.lifestyle.edgeBonus;
|
|
40
|
+
// The hideout's description follows the rent -- the move is visible
|
|
41
|
+
// the next time you look around.
|
|
42
|
+
this.game.syncHomeToLifestyle();
|
|
43
|
+
actor.performAction('changes lifestyle', `${from} -> ${picked}`);
|
|
44
|
+
this.logger.write(`Lifestyle: ${from} -> ${picked} (upkeep ${this.game.lifestyle.upkeep}/job).`);
|
|
45
|
+
this.scene.updateStatus();
|
|
46
|
+
const tier = this.game.lifestyle;
|
|
47
|
+
const up = LIFESTYLE_TIERS.findIndex(t => t.name === picked) > LIFESTYLE_TIERS.findIndex(t => t.name === from);
|
|
48
|
+
return [
|
|
49
|
+
up
|
|
50
|
+
? `You move up: ${picked}. ${tier.blurb.charAt(0).toUpperCase()}${tier.blurb.slice(1)}.`
|
|
51
|
+
: `You cut back: ${picked}. ${tier.blurb.charAt(0).toUpperCase()}${tier.blurb.slice(1)}.`,
|
|
52
|
+
` Upkeep: ${tier.upkeep} nuyen per job, collected when you come home.`,
|
|
53
|
+
...(tier.restDice !== 0 ? [` Rest at home: ${tier.restDice > 0 ? '+' : ''}${tier.restDice} dice.`] : []),
|
|
54
|
+
...(tier.edgeBonus > 0 ? [` +${tier.edgeBonus} edge banked every job.`] : []),
|
|
55
|
+
...(tier.clearStunOnReturn ? [` Coming home clears your stun track entirely.`] : []),
|
|
56
|
+
` The place already reads different -- "look" around.`,
|
|
57
|
+
].join('\n');
|
|
58
|
+
}
|
|
59
|
+
listTiers() {
|
|
60
|
+
const lines = [`=== LIFESTYLE (currently ${this.game.lifestyleTier}${this.game.rentDebt > 0 ? `, ${this.game.rentDebt} nuyen owed` : ''}) ===`];
|
|
61
|
+
for (const tier of LIFESTYLE_TIERS) {
|
|
62
|
+
const marker = tier.name === this.game.lifestyleTier ? '>' : ' ';
|
|
63
|
+
const perks = [
|
|
64
|
+
tier.restDice !== 0 ? `rest ${tier.restDice > 0 ? '+' : ''}${tier.restDice}d at home` : 'baseline rest',
|
|
65
|
+
...(tier.edgeBonus > 0 ? [`+${tier.edgeBonus} edge/job`] : []),
|
|
66
|
+
...(tier.clearStunOnReturn ? ['stun clears on homecoming'] : []),
|
|
67
|
+
].join(', ');
|
|
68
|
+
lines.push(`${marker} ${tier.name.padEnd(9)} ${String(tier.upkeep).padStart(5)}/job ${perks}`);
|
|
69
|
+
lines.push(` ${tier.blurb}`);
|
|
70
|
+
}
|
|
71
|
+
lines.push('');
|
|
72
|
+
lines.push(`You're carrying ${this.actor.currency} nuyen. "lifestyle <tier>" at your hideout to move. Upkeep collects each homecoming; shortfalls slide you down and go on the tab.`);
|
|
73
|
+
return lines.join('\n');
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=lifestyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifestyle.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/lifestyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;;GAQG;AACH,MAAM,OAAO,gBAAiB,SAAQ,OAAO;IACjC,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,MAAM,CAAC,WAAW,GAAG,mJAAmJ,CAAC;IAEnL,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;YACvB,OAAO,+DAA+D,CAAC;QACzE,CAAC;QAED,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;QAC1B,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,KAAK,CAAC,eAAe,EAAE,QAAQ,KAAK,WAAW,EAAE,CAAC;YACpD,OAAO,8EAA8E,CAAC;QACx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AAmI,CAAC,CAAC;QACtL,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -9,6 +9,10 @@ export class LockCommand extends Command {
|
|
|
9
9
|
return this.lock(args);
|
|
10
10
|
}
|
|
11
11
|
lock(args) {
|
|
12
|
+
// Same physicality rule as unlock: keys ride with the body.
|
|
13
|
+
if (this.actor.plane !== 'meat') {
|
|
14
|
+
return `Locking a door takes the hands (and keys) you left with your body.`;
|
|
15
|
+
}
|
|
12
16
|
if (args.length === 0) {
|
|
13
17
|
this.logger.error('LockCommand: No target specified.');
|
|
14
18
|
return 'Please specify which door you want to lock.';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,cAAc,CAAC;IAE9C,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QAErB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAEO,IAAI,CAAC,IAAc;QACzB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;YACvD,OAAO,6CAA6C,CAAC;QACvD,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;QAEx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AAI,oCAAoC,qBAAqB,UAAU,MAAM,IAAI,CAAC,CAAC;QAChI,OAAO,2CAA2C,CAAC;IACrD,CAAC;IAIO,iBAAiB,CAAC,IAAU,EAAE,KAAa;QACjD,IAAI,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;YACzB,OAAO,aAAa,KAAK,sBAAsB,CAAC;QAClD,CAAC;QAED,MAAM,qBAAqB,GAAG,IAAI,CAAC,oBAAoB,EAAE,WAAW,EAAE,CAAC;QAEvE,IAAI,qBAAqB,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAAE,CAAC;YACjF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACrB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,IAAI,CAAC,KAAK,CAAC,IAAI,qBAAqB,KAAK,EAAE,CAAC,CAAC;YAC/E,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YACxC,OAAO,wBAAwB,KAAK,IAAI,CAAC;QAC3C,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,IAAI,CAAC,KAAK,CAAC,IAAI,6CAA6C,KAAK,IAAI,CAAC,CAAC;YACzG,OAAO,2CAA2C,CAAC;QACrD,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* The bills half of downtime: the hideout's rent comes due every time a
|
|
4
|
+
* run wraps (charged automatically on the ride home -- see
|
|
5
|
+
* Game.returnToHub). What can't be paid becomes DEBT, and while you owe,
|
|
6
|
+
* home barely works: rest recovers half (see rest.ts). "pay" squares the
|
|
7
|
+
* tab from carried cred, any time you're back in the district.
|
|
8
|
+
*/
|
|
9
|
+
export declare class PayCommand extends Command implements ICommand {
|
|
10
|
+
protected static verb: string;
|
|
11
|
+
protected static description: string;
|
|
12
|
+
execute(_args?: string[]): Promise<string>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* The bills half of downtime: the hideout's rent comes due every time a
|
|
4
|
+
* run wraps (charged automatically on the ride home -- see
|
|
5
|
+
* Game.returnToHub). What can't be paid becomes DEBT, and while you owe,
|
|
6
|
+
* home barely works: rest recovers half (see rest.ts). "pay" squares the
|
|
7
|
+
* tab from carried cred, any time you're back in the district.
|
|
8
|
+
*/
|
|
9
|
+
export class PayCommand extends Command {
|
|
10
|
+
static verb = 'pay';
|
|
11
|
+
static description = 'Square your rent tab ("pay" or "pay rent"). Rent is charged when a run wraps; unpaid debt makes rest at your hideout half as effective.';
|
|
12
|
+
async execute(_args = []) {
|
|
13
|
+
const actor = this.actor;
|
|
14
|
+
const debt = this.game?.rentDebt ?? 0;
|
|
15
|
+
if (!this.game?.hasHub) {
|
|
16
|
+
return `No landlord out here -- just the job.`;
|
|
17
|
+
}
|
|
18
|
+
if (debt <= 0) {
|
|
19
|
+
return `You're square with the landlord. The heat works, the water runs, nobody's leaving notes on your door.`;
|
|
20
|
+
}
|
|
21
|
+
if (actor.plane !== 'meat') {
|
|
22
|
+
return `Rent gets paid by hands, not personas. Come back to your body.`;
|
|
23
|
+
}
|
|
24
|
+
if (actor.currency <= 0) {
|
|
25
|
+
return `The tab stands at ${debt} nuyen and you're carrying nothing. Take a job.`;
|
|
26
|
+
}
|
|
27
|
+
const paid = Math.min(actor.currency, debt);
|
|
28
|
+
actor.adjustCurrency(-paid);
|
|
29
|
+
this.game.rentDebt = debt - paid;
|
|
30
|
+
actor.performAction('pays down the rent tab', `${paid} nuyen`);
|
|
31
|
+
this.logger.write(`PayCommand: ${actor.name} paid ${paid} rent debt (${this.game.rentDebt} remaining, ${actor.currency} carried).`);
|
|
32
|
+
this.scene.updateStatus();
|
|
33
|
+
if (this.game.rentDebt > 0) {
|
|
34
|
+
return `You put ${paid} nuyen against the tab -- ${this.game.rentDebt} still owed. The landlord's drone takes the transfer without comment.`;
|
|
35
|
+
}
|
|
36
|
+
return `You square the tab: ${paid} nuyen. Somewhere in the building, the heat clunks back on.`;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=pay.js.map
|