@maka/maka-cli 5.6.0 → 5.8.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 +33 -32
- 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 +81 -2
- 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 +197 -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 +21 -11
- 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 +13 -5
- 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 +6 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +54 -20
- 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 +306 -55
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/companions.d.ts +33 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/companions.js +137 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/companions.js.map +1 -0
- 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 +6 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +67 -22
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +15 -7
- 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 +83 -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/look.js +7 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/order.d.ts +19 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/order.js +151 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/order.js.map +1 -0
- 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 +6 -3
- 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 +15 -4
- 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/summon.d.ts +19 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/summon.js +112 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/summon.js.map +1 -0
- 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 +132 -5
- 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 +196 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.js +828 -31
- 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.d.ts +33 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +232 -10
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +111 -5
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +432 -41
- 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/room.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.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 +48 -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 +82 -8
- 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 +28 -15
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.d.ts +15 -3
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +207 -34
- 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/dice.d.ts +7 -4
- package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js +8 -5
- package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.js +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js +49 -4
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js.map +1 -1
- 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 +107 -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/ssl.js +10 -15
- package/bundle/typescript/src/commands/ssl.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/templates/react/kit/mui/auth/password-reset/basic-password-reset-page.js.tsx +3 -4
- 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/bundle/typescript/src/tools/ssl/ssl.class.d.ts +8 -0
- package/bundle/typescript/src/tools/ssl/ssl.class.js +53 -0
- package/bundle/typescript/src/tools/ssl/ssl.class.js.map +1 -1
- package/package.json +2 -2
|
@@ -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/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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,83 @@
|
|
|
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 drone (control rig required): fly it, see through it, fight with its mount. A deployed frame is seized wherever it flies. "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
|
+
// Jumping into a DEPLOYED frame seizes it WHEREVER it flies (player
|
|
57
|
+
// request -- jumping in rides the link, not your hands): the
|
|
58
|
+
// dog-brain yields the stick and your presence snaps to the frame's
|
|
59
|
+
// position, not your body's. Only a frame mid-exchange refuses --
|
|
60
|
+
// combat holds live references to the shell.
|
|
61
|
+
let seizedRoom;
|
|
62
|
+
const flying = this.game?.companions.find(c => c.boundDevice === drone);
|
|
63
|
+
if (flying) {
|
|
64
|
+
if (flying.npc.inExchange) {
|
|
65
|
+
return `The ${drone.name} is fighting for its life -- the link can't seize a bucking frame mid-exchange. Let it settle first.`;
|
|
66
|
+
}
|
|
67
|
+
seizedRoom = flying.npc.currentLocation;
|
|
68
|
+
this.game.dismissCompanion(flying, 'jumped into -- dog-brain yields the stick');
|
|
69
|
+
}
|
|
70
|
+
this.logger.write(`JumpCommand: ${actor.name} jumping into ${drone.name} (${mode}-sim)${seizedRoom ? ` -- seizing the deployed frame in ${seizedRoom.name}` : ''}.`);
|
|
71
|
+
const lines = enterDrone(this.scene, actor, drone, mode);
|
|
72
|
+
if (seizedRoom && seizedRoom !== actor.currentLocation) {
|
|
73
|
+
actor.currentLocation = seizedRoom;
|
|
74
|
+
lines.push(`The dog-brain stands down as the link reaches across the district -- you snap into the frame where it already flies: ${seizedRoom.name}.`);
|
|
75
|
+
}
|
|
76
|
+
else if (flying) {
|
|
77
|
+
lines.push(`The dog-brain stands down -- the stick is yours.`);
|
|
78
|
+
}
|
|
79
|
+
this.scene.updateStatus();
|
|
80
|
+
return lines.join('\n');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=jump.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump.js","sourceRoot":"","sources":["../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ACD,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;QACxF,CAAC;QAED,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/E,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,oCAAoC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,G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AK,GAAG;gBACZ,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,WAAW,CAAC,CAAC,CAAC,eAAe;gBACvG,GAAG,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC9D,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;aACjE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACb,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC,CAAC;YAChG,KAAK,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QACnC,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,mBAAmB,IAAI,CAAC,KAAK,CAAC,QAAQ,mIAAmI,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;QAExC,uCAAuC;QACvC,IAAI,SAAS,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAC5C,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,MAAM,CAC3C,CAAC;QAEF,qEAAqE;QACrE,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,SAAS,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,IAA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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"}
|
|
@@ -3,6 +3,7 @@ import { NPC } from '../models/npc.js';
|
|
|
3
3
|
import { Category } from '../types/shared/item-enum.js';
|
|
4
4
|
import { Command } from './command.js';
|
|
5
5
|
import { shellsInRoom, canReachHost } from '../utilities/planes.js';
|
|
6
|
+
import { BULLET } from '../utilities/log-style.js';
|
|
6
7
|
export class LookCommand extends Command {
|
|
7
8
|
static verb = 'look';
|
|
8
9
|
static description = 'Examine your surroundings';
|
|
@@ -80,7 +81,7 @@ export class LookCommand extends Command {
|
|
|
80
81
|
if (otherActors.length > 0) {
|
|
81
82
|
const actorList = otherActors.map(a => {
|
|
82
83
|
const aura = this.actor.plane === 'astral' && a.plane === 'meat' ? ' (an aura, dim and physical)' : '';
|
|
83
|
-
return
|
|
84
|
+
return `${BULLET}${a.name}${aura}`;
|
|
84
85
|
}).join('\n');
|
|
85
86
|
description += `\n\nYou see:\n${actorList}`;
|
|
86
87
|
}
|
|
@@ -89,7 +90,7 @@ export class LookCommand extends Command {
|
|
|
89
90
|
if (this.actor.plane !== 'matrix') {
|
|
90
91
|
const shells = shellsInRoom(this.scene, room).filter(s => s !== this.actor);
|
|
91
92
|
if (shells.length > 0) {
|
|
92
|
-
const shellList = shells.map(s =>
|
|
93
|
+
const shellList = shells.map(s => `${BULLET}${s.name}'s body -- slumped and vacant, nobody home`).join('\n');
|
|
93
94
|
description += `\n\n${shellList}`;
|
|
94
95
|
}
|
|
95
96
|
}
|
|
@@ -97,15 +98,15 @@ export class LookCommand extends Command {
|
|
|
97
98
|
const exits = Array.from(room.exits.entries())
|
|
98
99
|
.map(([direction, exit]) => {
|
|
99
100
|
if (typeof exit === 'string') {
|
|
100
|
-
return
|
|
101
|
+
return `${BULLET}${direction}: ${exit}`;
|
|
101
102
|
}
|
|
102
103
|
else if (exit instanceof Door) {
|
|
103
104
|
const targetRoom = exit.getOtherSideToName(room);
|
|
104
105
|
const lockedStr = exit.checkIfLocked() ? ' (locked)' : '';
|
|
105
|
-
return
|
|
106
|
+
return `${BULLET}${direction}: ${targetRoom}${lockedStr}`;
|
|
106
107
|
}
|
|
107
108
|
else {
|
|
108
|
-
return
|
|
109
|
+
return `${BULLET}${direction}: Unknown`;
|
|
109
110
|
}
|
|
110
111
|
});
|
|
111
112
|
if (exits.length > 0) {
|
|
@@ -167,7 +168,7 @@ export class LookCommand extends Command {
|
|
|
167
168
|
for (const slotKey of Object.keys(group)) {
|
|
168
169
|
const item = group[slotKey];
|
|
169
170
|
if (item) {
|
|
170
|
-
lines.push(
|
|
171
|
+
lines.push(`${BULLET}${groupKey}.${slotKey}: ${item.name}`);
|
|
171
172
|
}
|
|
172
173
|
}
|
|
173
174
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"look.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/look.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,OAAO,EAAY,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EtC,IAAI,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YAC/C,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAChC,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAEnC,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAA+B,EAAE,CAAC;YAC5E,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;YAClC,IAAI,CAAC,KAAK;gBAAE,SAAS;YAErB,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzC,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;gBAC5B,IAAI,IAAI,EAAE,CAAC;oBACT,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,QAAQ,IAAI,OAAO,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC9D,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,yCAAyC,CAAC,CAAC;QACtE,CAAC;QAED,OAAO,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Deterministic companion control: "order <companion> <command...>" runs
|
|
4
|
+
* the command AS the companion, through its own scene-bound registry
|
|
5
|
+
* (NPC.runCommand -- no AI round trip, no reflect chain: an order is an
|
|
6
|
+
* order). The companion's AI still acts on its own between orders (its
|
|
7
|
+
* prompt carries the allegiance block); this verb is for the moments
|
|
8
|
+
* that must happen NOW -- "order spirit attack krow". A spirit charges
|
|
9
|
+
* one service for an ordered physical task (fights bill separately in
|
|
10
|
+
* combat-exchange, one per fight).
|
|
11
|
+
*/
|
|
12
|
+
export declare class OrderCommand extends Command implements ICommand {
|
|
13
|
+
protected static verb: string;
|
|
14
|
+
protected static description: string;
|
|
15
|
+
execute(args?: string[]): Promise<string>;
|
|
16
|
+
/** Per-kind feed styling -- matches the HUD's plane color language. */
|
|
17
|
+
private static readonly FEED;
|
|
18
|
+
private static readonly ATOMIC_REFUSAL;
|
|
19
|
+
}
|