@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,151 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
3
|
+
import { AI } from '../../../../tools/ai/ai.class.js';
|
|
4
|
+
/**
|
|
5
|
+
* Deterministic companion control: "order <companion> <command...>" runs
|
|
6
|
+
* the command AS the companion, through its own scene-bound registry
|
|
7
|
+
* (NPC.runCommand -- no AI round trip, no reflect chain: an order is an
|
|
8
|
+
* order). The companion's AI still acts on its own between orders (its
|
|
9
|
+
* prompt carries the allegiance block); this verb is for the moments
|
|
10
|
+
* that must happen NOW -- "order spirit attack krow". A spirit charges
|
|
11
|
+
* one service for an ordered physical task (fights bill separately in
|
|
12
|
+
* combat-exchange, one per fight).
|
|
13
|
+
*/
|
|
14
|
+
export class OrderCommand extends Command {
|
|
15
|
+
static verb = 'order';
|
|
16
|
+
static description = 'Command a companion: exact commands run instantly ("order spirit attack Krow"); anything else becomes a standing DIRECTIVE its AI pursues ("order agent to find Mr. Krow"). Spirit tasks cost a service.';
|
|
17
|
+
async execute(args = []) {
|
|
18
|
+
const game = this.game;
|
|
19
|
+
if (!game || game.companions.length === 0) {
|
|
20
|
+
return `You have no one to order -- no spirit bound, no agent running, no drone deployed.`;
|
|
21
|
+
}
|
|
22
|
+
if (!args || args.length < 2) {
|
|
23
|
+
const roster = game.companions.map(c => c.npc.name).join(', ');
|
|
24
|
+
return `Order WHO to do WHAT? With you: ${roster}. ("order <name> <command>")`;
|
|
25
|
+
}
|
|
26
|
+
// Longest-prefix companion match, remainder is the command.
|
|
27
|
+
let entry;
|
|
28
|
+
let commandWords = [];
|
|
29
|
+
for (let i = args.length - 1; i >= 1; i--) {
|
|
30
|
+
const picked = fuzzyPickName(args.slice(0, i).join(' '), game.companions.map(c => c.npc.name));
|
|
31
|
+
if (picked) {
|
|
32
|
+
entry = game.companions.find(c => c.npc.name === picked);
|
|
33
|
+
commandWords = args.slice(i);
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (!entry) {
|
|
38
|
+
return `None of yours answers to that. With you: ${game.companions.map(c => c.npc.name).join(', ')}.`;
|
|
39
|
+
}
|
|
40
|
+
if (commandWords.length === 0) {
|
|
41
|
+
return `Order ${entry.npc.name} to do WHAT?`;
|
|
42
|
+
}
|
|
43
|
+
if (entry.npc.isIncapacitated()) {
|
|
44
|
+
return `${entry.npc.name} is past taking orders.`;
|
|
45
|
+
}
|
|
46
|
+
// "order agent to find krow" reads naturally -- strip the connective
|
|
47
|
+
// FIRST, so every check below sees the bare command ("to attack krow"
|
|
48
|
+
// must read as the attack it is).
|
|
49
|
+
if (commandWords[0]?.toLowerCase() === 'to')
|
|
50
|
+
commandWords = commandWords.slice(1);
|
|
51
|
+
const cmd = commandWords.join(' ');
|
|
52
|
+
// The feed wears its plane's colors (player request: what the
|
|
53
|
+
// companion SEES should read as coming through its senses) -- the
|
|
54
|
+
// same visual language the HUD already speaks: yellow ✈ for a
|
|
55
|
+
// drone's sensor feed, magenta ✧ for a spirit's otherworldly report,
|
|
56
|
+
// cyan ▣ for an agent on the grid.
|
|
57
|
+
const feed = OrderCommand.FEED[entry.kind] ?? OrderCommand.FEED.ally;
|
|
58
|
+
this.actor.performAction('orders', `${entry.npc.name}: "${cmd}"`);
|
|
59
|
+
this.logger.logWithColor(`${feed.icon} [order] ${entry.npc.name}: ${cmd}`, feed.color);
|
|
60
|
+
this.logger.write(`OrderCommand: ${this.actor.name} -> ${entry.npc.name}: ${cmd}`);
|
|
61
|
+
// RECALL intent folds the companion deterministically and FREE --
|
|
62
|
+
// it must never reach the registry, where the astral "return" verb
|
|
63
|
+
// would run as the companion and answer "You're already in your
|
|
64
|
+
// body." (a real session's agent couldn't be brought home by any
|
|
65
|
+
// natural phrasing: "order agent return", "return to deck"...).
|
|
66
|
+
// ("return fire" is exempt -- that's a shooting order, not a fold.)
|
|
67
|
+
if (entry.kind !== 'ally'
|
|
68
|
+
&& /^(return(?!\s+fire)|recall|come\s+(back|home)|fold|dismiss|stand\s+down|go\s+home)\b/i.test(cmd)) {
|
|
69
|
+
const foldLine = entry.kind === 'spirit'
|
|
70
|
+
? `${feed.icon} You speak the release. The spirit inclines its head -- the bargain closes${(entry.services ?? 0) > 0 ? `, ${entry.services} unspent service${entry.services === 1 ? '' : 's'} forfeit` : ''} -- and it thins back to its own plane.`
|
|
71
|
+
: entry.kind === 'drone'
|
|
72
|
+
? `${feed.icon} The ${entry.boundDevice?.name ?? entry.npc.name} banks once and settles back onto your hand, rotors folding.${entry.boundDevice && entry.boundDevice.droneDamage > 0 ? ` The airframe carries its dents (${entry.boundDevice.droneSummary()}) -- rest repairs it.` : ''}`
|
|
73
|
+
: this.actor.plane === 'matrix'
|
|
74
|
+
? `${feed.icon} Your agent's icon collapses back into your persona -- folded into the deck.`
|
|
75
|
+
: `${feed.icon} The deck spins its agent down -- the DECK IN AR light dies as the icon folds home.`;
|
|
76
|
+
game.dismissCompanion(entry, `ordered home: "${cmd}"`);
|
|
77
|
+
this.scene.updateStatus();
|
|
78
|
+
return `{${feed.color}-fg}${foldLine}{/${feed.color}-fg}`;
|
|
79
|
+
}
|
|
80
|
+
// Spirits bill non-combat tasks a service (combat bills per-fight in
|
|
81
|
+
// combat-exchange, so attack orders aren't double-charged). The
|
|
82
|
+
// CHARGE lands on the success paths below -- a refused order (AI-off
|
|
83
|
+
// directive, unknown target) costs nothing; a spent bargain refuses
|
|
84
|
+
// up front.
|
|
85
|
+
// Anywhere in the phrase, not just the start: "find Mr. Krow and
|
|
86
|
+
// kill him" is an attack order too -- a real session billed it as a
|
|
87
|
+
// task, then the fight's own per-fight charge found the bargain
|
|
88
|
+
// already at zero and dismissed the spirit mid-lunge.
|
|
89
|
+
const isAttackOrder = /\b(attack|kill|subdue|fight|slay|destroy)\b/i.test(cmd);
|
|
90
|
+
const billsService = entry.kind === 'spirit' && !isAttackOrder;
|
|
91
|
+
if (billsService && (entry.services ?? 0) <= 0) {
|
|
92
|
+
return `${entry.npc.name} regards you flatly. The bargain is spent -- no services remain.`;
|
|
93
|
+
}
|
|
94
|
+
const chargeService = () => {
|
|
95
|
+
if (!billsService)
|
|
96
|
+
return;
|
|
97
|
+
entry.services = (entry.services ?? 0) - 1;
|
|
98
|
+
// Resource arithmetic -- Mechanics ticker (readability pass).
|
|
99
|
+
this.logger.meta(`👥 One service spent (${entry.services} left).`, 'green');
|
|
100
|
+
};
|
|
101
|
+
// Tier 1 -- ATOMIC: a known command runs deterministically, no AI.
|
|
102
|
+
// A parsed command whose RESULT is a refusal is NOT obedience: a real
|
|
103
|
+
// session's "go kill Mr. Krow" parsed as go("kill"), answered "That
|
|
104
|
+
// is not a way to go" -- and billed a service for it; "kill Mr.
|
|
105
|
+
// Krow" with Krow two rooms off shrugged instead of hunting. Refused
|
|
106
|
+
// atomics cost nothing and escalate to the directive tier.
|
|
107
|
+
const direct = await entry.npc.tryRunCommand(cmd);
|
|
108
|
+
const atomicRefused = direct !== null && OrderCommand.ATOMIC_REFUSAL.test(direct);
|
|
109
|
+
if (direct !== null && !atomicRefused) {
|
|
110
|
+
chargeService();
|
|
111
|
+
this.scene.updateStatus();
|
|
112
|
+
const report = direct || `${entry.npc.name} moves to obey.`;
|
|
113
|
+
return `{${feed.color}-fg}${feed.icon} ${report}{/${feed.color}-fg}`;
|
|
114
|
+
}
|
|
115
|
+
// Tier 2 -- DIRECTIVE (player request: "order agent to find mr.
|
|
116
|
+
// krow"): not a command (or a refused one), a GOAL. Set it as the
|
|
117
|
+
// companion's standing objective (surfaced in every future prompt)
|
|
118
|
+
// and spur its AI now -- the reflect chain lets it move rooms,
|
|
119
|
+
// search, and act several steps on its own, then keep pursuing on
|
|
120
|
+
// later stimuli.
|
|
121
|
+
if (!AI.isConfigured()) {
|
|
122
|
+
if (direct !== null) {
|
|
123
|
+
// No AI to escalate to -- at least show the refusal, unbilled.
|
|
124
|
+
return `{${feed.color}-fg}${feed.icon} ${direct}{/${feed.color}-fg}`;
|
|
125
|
+
}
|
|
126
|
+
return `{${feed.color}-fg}${feed.icon} ${entry.npc.name} needs exact commands without an AI brain -- try "order ${entry.npc.name.toLowerCase()} go north" or "... attack <name>".{/${feed.color}-fg}`;
|
|
127
|
+
}
|
|
128
|
+
chargeService();
|
|
129
|
+
entry.npc.setObjective(`ORDERED by ${this.actor.name}: ${cmd}. Pursue this until done or countermanded.`);
|
|
130
|
+
// viaLink: the order rides the bond (deck/rigger/summoning), so it
|
|
131
|
+
// reaches the companion across rooms and planes -- a meat-side
|
|
132
|
+
// master in AR must still reach their agent on the grid.
|
|
133
|
+
void Promise.resolve(entry.npc.hear(this.actor, `${cmd} [System note: this is a direct ORDER from ${this.actor.name}, your master. Acknowledge in ONE short line in your own voice, then PURSUE it immediately with [COMMAND] actions -- move rooms ("go <direction>"), search, act; several steps now if needed. Keep pursuing it on future turns until it's done.]`, { viaLink: true })).catch(err => {
|
|
134
|
+
this.logger.error(`${entry.npc.name} failed to take the directive: ${err}`);
|
|
135
|
+
});
|
|
136
|
+
this.scene.updateStatus();
|
|
137
|
+
return `{${feed.color}-fg}${feed.icon} ${entry.npc.name} takes the directive -- "${cmd}" -- and moves on it.{/${feed.color}-fg}`;
|
|
138
|
+
}
|
|
139
|
+
/** Per-kind feed styling -- matches the HUD's plane color language. */
|
|
140
|
+
static FEED = {
|
|
141
|
+
spirit: { color: 'magenta', icon: '✧' },
|
|
142
|
+
drone: { color: 'yellow', icon: '✈' },
|
|
143
|
+
agent: { color: 'cyan', icon: '▣' },
|
|
144
|
+
ally: { color: 'white', icon: '👥' },
|
|
145
|
+
};
|
|
146
|
+
// Result strings that mean the atomic tier bounced -- collected from
|
|
147
|
+
// real refusals (go/attack/talk/take across sessions). The ’ variant
|
|
148
|
+
// covers commands that answer with a smart quote.
|
|
149
|
+
static ATOMIC_REFUSAL = /not a way to go|can['’]t go that way|isn['’]t here|don['’]t see|there is no item|too heavy|doesn['’]t know how|not valid|doesn['’]t seem to have/i;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,kCAAkC,CAAC;AAEtD;;;;;;;;;GASG;AACH,MAAM,OAAO,YAAa,SAAQ,OAAO;IAC7B,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;IACtB,MAAM,CAAC,WAAW,GAAG,0MAA0M,CAAC;IAE1O,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1C,OAAO,mFAAmF,CAAC;QAC7F,CAAC;QACD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/D,OAAO,mCAAmC,MAAM,8BAA8B,CAAC;QACjF,CAAC;QAED,4DAA4D;QAC5D,IAAI,KAAmD,CAAC;QACxD,IAAI,YAAY,GAAa,EAAE,CAAC;QAChC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC1C,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,C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
|
+
* 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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pay.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/pay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,OAAO,UAAW,SAAQ,OAAO;IAC3B,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,MAAM,CAAC,WAAW,GAAG,yIAAyI,CAAC;IAEzK,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,QAAQ,IAAI,CAAC,CAAC;QAEtC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;YACvB,OAAO,uCAAuC,CAAC;QACjD,CAAC;QACD,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;YACd,OAAO,uGAAuG,CAAC;QACjH,CAAC;QACD,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;YAC3B,OAAO,gEAAgE,CAAC;QAC1E,CAAC;QACD,IAAI,KAAK,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,qBAAqB,IAAI,iDAAiD,CAAC;QACpF,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC5C,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC;QAEjC,KAAK,CAAC,aAAa,CAAC,wBAAwB,EAAE,GAAG,IAAI,QAAQ,CAAC,CAAC;QAC/D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,KAAK,CAAC,IAAI,SAAS,IAAI,eAAe,IAAI,CAAC,IAAI,CAAC,QAAQ,eAAe,KAAK,CAAC,QAAQ,YAAY,CAAC,CAAC;QACpI,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAE1B,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC;YAC3B,OAAO,WAAW,IAAI,6BAA6B,IAAI,CAAC,IAAI,CAAC,QAAQ,uEAAuE,CAAC;QAC/I,CAAC;QACD,OAAO,uBAAuB,IAAI,6DAA6D,CAAC;IAClG,CAAC"}
|
|
@@ -57,7 +57,11 @@ export class PersuadeCommand extends Command {
|
|
|
57
57
|
// Talking someone around is not a quiet activity (see sneak.ts).
|
|
58
58
|
actor.sneaking = false;
|
|
59
59
|
const negotiation = actor.skillRating('negotiation');
|
|
60
|
-
|
|
60
|
+
// A drink beforehand loosens the delivery (see use.ts liquid courage).
|
|
61
|
+
// First Impression (p.74) rides the job's opening social play, same
|
|
62
|
+
// consumable shape as the liquid-courage die. Reputation rides every
|
|
63
|
+
// one (Player.socialRep): a known name talks from higher ground.
|
|
64
|
+
const pool = Math.max(1, actor.charisma + (negotiation > 0 ? negotiation : -1) + actor.consumeLiquidCourage() + actor.consumeFirstImpression() + actor.socialRep + actor.woundModifier - actor.sustainingPenalty);
|
|
61
65
|
const theirs = Math.max(1, target.charisma + target.skillRating('negotiation'));
|
|
62
66
|
const mine = rollPool(pool);
|
|
63
67
|
const resistance = rollPool(theirs);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persuade.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/persuade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,eAAgB,SAAQ,OAAO;IAChC,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,MAAM,CAAC,WAAW,GAAG,wJAAwJ,CAAC;IAExL,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO,6DAA6D,CAAC;QACvE,CAAC;QACD,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;YAC3B,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ;gBAC7B,CAAC,CAAC,4DAA4D;gBAC9D,CAAC,CAAC,0DAA0D,CAAC;QACjE,CAAC;QAED,MAAM,IAAI,GAAG,KAAK,CAAC,eAAe,CAAC;QACnC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC;aAChD,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,KAAK,KA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M,CAAC,IAAI,mCAAmC,GAAG,EAAE,CAAC,CAAC;QAC5E,CAAC,CAAC,CAAC;QAEH,OAAO;YACL,eAAe,MAAM,CAAC,IAAI,GAAG;YAC7B,kBAAkB,UAAU,CAAC,IAAI,CAAC,EAAE;YACpC,KAAK,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,UAAU,CAAC,EAAE;YAC7C,KAAK,OAAO,EAAE;SACf,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { BypassCommand } from './bypass-command.js';
|
|
|
2
2
|
import { rollPool, formatRoll } from '../utilities/dice.js';
|
|
3
3
|
export class PickCommand extends BypassCommand {
|
|
4
4
|
static verb = 'pick';
|
|
5
|
-
static description = 'Pick a lock -- skips needing the code,
|
|
5
|
+
static description = 'Pick a lock -- Agility + locksmith, skips needing the code. Fail, and the mechanism seizes for good (the code still works) -- and the noise carries. "pick north" or "pick <name>" if there\'s more than one barrier.';
|
|
6
6
|
bypassType = 'lockpick';
|
|
7
7
|
noPuzzleMessage = "There's nothing here to pick.";
|
|
8
8
|
async execute(args) {
|
|
@@ -15,17 +15,20 @@ export class PickCommand extends BypassCommand {
|
|
|
15
15
|
if (this.actor.plane === 'astral') {
|
|
16
16
|
return `Astral fingers pass straight through tumblers. "return" to your body to work a physical lock.`;
|
|
17
17
|
}
|
|
18
|
+
if (this.actor.plane === 'drone') {
|
|
19
|
+
return `Rotors and a camera don't pick locks -- and your picks are streets away with your body.`;
|
|
20
|
+
}
|
|
18
21
|
return super.execute(args);
|
|
19
22
|
}
|
|
20
23
|
async determineOutcome() {
|
|
21
24
|
// A LOCKSMITH test (Agility + locksmith, 2 hits; unskilled defaults to
|
|
22
25
|
// Agility - 1) -- the character's training decides the odds now, not a
|
|
23
|
-
// minigame or a coin flip.
|
|
26
|
+
// minigame or a coin flip. Failure burns the route and goes loud.
|
|
24
27
|
const skill = this.actor.skillRating('locksmith');
|
|
25
28
|
const pool = Math.max(1, this.actor.agility + (skill > 0 ? skill : -1) + this.actor.woundModifier - this.actor.sustainingPenalty);
|
|
26
29
|
const roll = rollPool(pool);
|
|
27
30
|
if (this.actor === this.scene.getPlayer()) {
|
|
28
|
-
this.logger.
|
|
31
|
+
this.logger.meta(`Locksmith: ${formatRoll(roll)} (2+ to open)`);
|
|
29
32
|
}
|
|
30
33
|
return roll.hits >= 2;
|
|
31
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pick.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/pick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,OAAO,WAAY,SAAQ,aAAa;IAClC,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"pick.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/pick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,OAAO,WAAY,SAAQ,aAAa;IAClC,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,uNAAuN,CAAC;IAC7O,UAAU,GAAqB,UAAU,CAAC;IAC1C,eAAe,GAAG,+BAA+B,CAAC;IAE5D,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,sEAAsE;QACtE,qEAAqE;QACrE,gCAAgC;QAChC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAClC,OAAO,2DAA2D,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,IAAI,cAAc,6DAA6D,CAAC;QAC7K,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAClC,OAAO,+FAA+F,CAAC;QACzG,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;YACjC,OAAO,yFAAyF,CAAC;QACnG,CAAC;QACD,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAES,KAAK,CAAC,gBAAgB;QAC9B,uEAAuE;QACvE,uEAAuE;QACvE,kEAAkE;QAClE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAClD,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAClI,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,CAAC;YAC1C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAClE,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;IACxB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Quality trading in play, at the book's own rates (SR5e p.106-107):
|
|
4
|
+
* gain a positive quality at listed karma x2; buy OFF a negative at its
|
|
5
|
+
* bonus value x2. One verb, direction inferred -- an unowned positive
|
|
6
|
+
* gets bought, an owned negative gets bought off; nothing else is for
|
|
7
|
+
* sale (RAW doesn't price shedding a positive or acquiring a flaw --
|
|
8
|
+
* the GM assigns those, and this game's "GM" does it through incidents,
|
|
9
|
+
* see Player.addNotoriety). Happens at HOME, like all training. The
|
|
10
|
+
* reputation math follows automatically: burning a Criminal SIN drops a
|
|
11
|
+
* point of notoriety the moment the record clears (Player.notoriety
|
|
12
|
+
* reads the live quality set).
|
|
13
|
+
*/
|
|
14
|
+
export declare class QualityTradeCommand extends Command implements ICommand {
|
|
15
|
+
protected static verb: string;
|
|
16
|
+
protected static description: string;
|
|
17
|
+
execute(args?: string[]): Promise<string>;
|
|
18
|
+
private buyPositive;
|
|
19
|
+
private buyOffNegative;
|
|
20
|
+
private listBoard;
|
|
21
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { QUALITIES } from '../qualities.js';
|
|
3
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
4
|
+
/**
|
|
5
|
+
* Quality trading in play, at the book's own rates (SR5e p.106-107):
|
|
6
|
+
* gain a positive quality at listed karma x2; buy OFF a negative at its
|
|
7
|
+
* bonus value x2. One verb, direction inferred -- an unowned positive
|
|
8
|
+
* gets bought, an owned negative gets bought off; nothing else is for
|
|
9
|
+
* sale (RAW doesn't price shedding a positive or acquiring a flaw --
|
|
10
|
+
* the GM assigns those, and this game's "GM" does it through incidents,
|
|
11
|
+
* see Player.addNotoriety). Happens at HOME, like all training. The
|
|
12
|
+
* reputation math follows automatically: burning a Criminal SIN drops a
|
|
13
|
+
* point of notoriety the moment the record clears (Player.notoriety
|
|
14
|
+
* reads the live quality set).
|
|
15
|
+
*/
|
|
16
|
+
export class QualityTradeCommand extends Command {
|
|
17
|
+
static verb = 'qualities';
|
|
18
|
+
static description = 'Trade qualities with karma at your hideout (SR5e x2 rates): "qualities" lists, "qualities <name>" buys a positive or buys off a negative.';
|
|
19
|
+
async execute(args = []) {
|
|
20
|
+
const actor = this.actor;
|
|
21
|
+
if (actor.inExchange) {
|
|
22
|
+
return `Reinventing yourself mid-firefight is called dying.`;
|
|
23
|
+
}
|
|
24
|
+
if (actor.currentLocation?.roomType !== 'Residence') {
|
|
25
|
+
return `Who you are changes at home, quietly -- head back to your hideout first.`;
|
|
26
|
+
}
|
|
27
|
+
if (actor.plane !== 'meat') {
|
|
28
|
+
return `Come back to your body before rearranging what it is.`;
|
|
29
|
+
}
|
|
30
|
+
if (!args || args.length === 0) {
|
|
31
|
+
return this.listBoard();
|
|
32
|
+
}
|
|
33
|
+
// Exact key first ("qualities sinner-criminal" works verbatim), then
|
|
34
|
+
// fuzzy over display names ONLY -- names and keys together made every
|
|
35
|
+
// single-word quality ambiguous with its own key.
|
|
36
|
+
const input = args.join(' ');
|
|
37
|
+
const byKey = QUALITIES.find(q => q.key === input.toLowerCase().replace(/\s+/g, '-'));
|
|
38
|
+
const picked = byKey?.name ?? fuzzyPickName(input, QUALITIES.map(q => q.name));
|
|
39
|
+
const quality = QUALITIES.find(q => q.name === picked);
|
|
40
|
+
if (!quality) {
|
|
41
|
+
return `That's not a quality this street knows. "qualities" lists the board.`;
|
|
42
|
+
}
|
|
43
|
+
if (quality.kind === 'positive') {
|
|
44
|
+
return this.buyPositive(quality);
|
|
45
|
+
}
|
|
46
|
+
return this.buyOffNegative(quality);
|
|
47
|
+
}
|
|
48
|
+
buyPositive(quality) {
|
|
49
|
+
const actor = this.actor;
|
|
50
|
+
if (actor.hasQuality(quality.key)) {
|
|
51
|
+
return `${quality.name} is already part of who you are.`;
|
|
52
|
+
}
|
|
53
|
+
// RAW forbids the one stacking this catalog can produce: High Pain
|
|
54
|
+
// Tolerance never combines with a pain editor (p.74).
|
|
55
|
+
if (quality.key === 'high-pain-tolerance' && actor.hasAug('pain-editor')) {
|
|
56
|
+
return `The pain editor already owns that circuit -- High Pain Tolerance can't grow where chrome filters first (SR5e p.74).`;
|
|
57
|
+
}
|
|
58
|
+
const cost = quality.karma * 2;
|
|
59
|
+
if (actor.karma < cost) {
|
|
60
|
+
return `${quality.name} costs ${cost} karma in play (listed ${quality.karma} x2, ${quality.page}) -- you have ${actor.karma}.`;
|
|
61
|
+
}
|
|
62
|
+
actor.karma -= cost;
|
|
63
|
+
actor.addQuality(quality.key);
|
|
64
|
+
this.actor.performAction('grows into', quality.name);
|
|
65
|
+
this.logger.write(`${actor.name} bought quality ${quality.key} (${cost} karma, ${actor.karma} left).`);
|
|
66
|
+
this.scene.updateStatus();
|
|
67
|
+
return `It took the downtime to make it true, but it's true now: ${quality.name}. ${quality.effect}. (${cost} karma spent, ${actor.karma} left.)`;
|
|
68
|
+
}
|
|
69
|
+
buyOffNegative(quality) {
|
|
70
|
+
const actor = this.actor;
|
|
71
|
+
if (!actor.hasQuality(quality.key)) {
|
|
72
|
+
return `${quality.name} isn't your problem. Count the small blessings.`;
|
|
73
|
+
}
|
|
74
|
+
const cost = quality.karma * 2;
|
|
75
|
+
if (actor.karma < cost) {
|
|
76
|
+
return `Shedding ${quality.name} costs ${cost} karma (bonus ${quality.karma} x2, SR5e p.107) -- you have ${actor.karma}.`;
|
|
77
|
+
}
|
|
78
|
+
const notorietyBefore = actor.notoriety;
|
|
79
|
+
actor.karma -= cost;
|
|
80
|
+
actor.qualities.delete(quality.key);
|
|
81
|
+
this.actor.performAction('sheds', quality.name);
|
|
82
|
+
this.logger.write(`${actor.name} bought off quality ${quality.key} (${cost} karma, ${actor.karma} left).`);
|
|
83
|
+
this.scene.updateStatus();
|
|
84
|
+
// Flavor the big ones; the mechanics already followed the delete.
|
|
85
|
+
const flavor = quality.key.startsWith('sinner')
|
|
86
|
+
? `A very quiet talismonger of the paperwork arts burns the old file. The system forgets your number.`
|
|
87
|
+
: quality.key.startsWith('incompetent')
|
|
88
|
+
? `Something finally clicks that never clicked before. It's trainable now ("advance").`
|
|
89
|
+
: `The work of shedding it happens in a hundred small moments of downtime -- and then it's just gone.`;
|
|
90
|
+
const repNote = actor.notoriety < notorietyBefore
|
|
91
|
+
? ` (Notoriety ${notorietyBefore} -> ${actor.notoriety} -- the record cleans up with it.)`
|
|
92
|
+
: '';
|
|
93
|
+
return `${flavor} ${quality.name} is behind you. (${cost} karma spent, ${actor.karma} left.)${repNote}`;
|
|
94
|
+
}
|
|
95
|
+
listBoard() {
|
|
96
|
+
const actor = this.actor;
|
|
97
|
+
const lines = [`=== QUALITIES (karma: ${actor.karma} -- SR5e in-play rates, p.106-107) ===`];
|
|
98
|
+
const owned = QUALITIES.filter(q => actor.hasQuality(q.key));
|
|
99
|
+
if (owned.length > 0) {
|
|
100
|
+
lines.push(`Yours:`);
|
|
101
|
+
for (const q of owned) {
|
|
102
|
+
const trade = q.kind === 'negative'
|
|
103
|
+
? ` buy off for ${q.karma * 2} karma${actor.karma >= q.karma * 2 ? '' : ' (short)'}`
|
|
104
|
+
: ` (yours to keep)`;
|
|
105
|
+
lines.push(` ${(q.kind === 'positive' ? '+ ' : '- ') + q.name.padEnd(24)} ${q.effect}${trade}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const buyable = QUALITIES.filter(q => q.kind === 'positive' && !actor.hasQuality(q.key));
|
|
109
|
+
if (buyable.length > 0) {
|
|
110
|
+
lines.push(`On the board (listed x2 to learn in play):`);
|
|
111
|
+
for (const q of buyable) {
|
|
112
|
+
const blocked = q.key === 'high-pain-tolerance' && actor.hasAug('pain-editor');
|
|
113
|
+
lines.push(` + ${q.name.padEnd(24)} ${q.effect} -- ${q.karma * 2} karma${blocked ? ' (BLOCKED: pain editor)' : actor.karma >= q.karma * 2 ? '' : ' (short)'}`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
lines.push('');
|
|
117
|
+
lines.push(`"qualities <name>" buys a positive or buys off a negative. Negatives can't be taken on for karma -- the street hands those out for free (see your sheet's Stains).`);
|
|
118
|
+
return lines.join('\n');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=quality-trade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-trade.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/quality-trade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,SAAS,EAAY,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,mBAAoB,SAAQ,OAAO;IACpC,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,MAAM,CAAC,WAAW,GAAG,2IAA2I,CAAC;IAE3K,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO,qDAAqD,CAAC;QAC/D,CAAC;QACD,IAAI,KAAK,CAAC,eAAe,EAAE,QAAQ,KAAK,WAAW,EAAE,CAAC;YACpD,OAAO,0EAA0E,CAAC;QACpF,CAAC;QACD,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;YAC3B,OAAO,uDAAuD,CAAC;QACjE,CAAC;QAED,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;QAC1B,CAAC;QAED,qEAAqE;QACrE,sEAAsE;QACtE,kDAAkD;QAClD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC7B,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;QACtF,MAAM,MAAM,G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,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -21,34 +21,82 @@ export class RestCommand extends Command {
|
|
|
21
21
|
if (actor === this.scene.getPlayer() && this.scene.isPlayerExchangeActive()) {
|
|
22
22
|
return `Rest? Lead is flying. Survive first.`;
|
|
23
23
|
}
|
|
24
|
-
// Downtime also covers bench work: any damaged cyberdeck
|
|
25
|
-
// repaired alongside the nap (Logic roll -- soldering
|
|
24
|
+
// Downtime also covers bench work: any damaged cyberdeck or drone
|
|
25
|
+
// carried gets repaired alongside the nap (Logic roll -- soldering
|
|
26
|
+
// and rotor-truing are both brainwork; Juryrigger helps both).
|
|
26
27
|
const damagedDecks = actor.inventory.getAllItems().filter(i => i.isCyberdeck() && i.deckDamage > 0);
|
|
27
|
-
|
|
28
|
-
return `Your head's already clear -- nothing to sleep off.`;
|
|
29
|
-
}
|
|
28
|
+
const damagedDrones = actor.inventory.getAllItems().filter(i => i.isDrone() && i.droneDamage > 0);
|
|
30
29
|
const othersHere = this.scene.getActorsInRoom(room).filter(a => a !== actor);
|
|
31
30
|
const isResidence = room.roomType?.toLowerCase() === 'residence';
|
|
31
|
+
if (actor.stunTaken === 0 && damagedDecks.length === 0 && damagedDrones.length === 0) {
|
|
32
|
+
// Nothing to heal -- but sleeping is its own point now (needs
|
|
33
|
+
// system: edge refills only fed-and-slept, see Game.
|
|
34
|
+
// applyDepartureNeeds). A bed you own still counts slept-in even
|
|
35
|
+
// with a clear head.
|
|
36
|
+
if (isResidence && !actor.sleptThisCycle) {
|
|
37
|
+
actor.markSlept();
|
|
38
|
+
actor.performAction('sleeps', 'a full night');
|
|
39
|
+
return `Nothing to sleep off -- so you just SLEEP: a real eight hours in your own bed. It counts.`;
|
|
40
|
+
}
|
|
41
|
+
return `Your head's already clear -- nothing to sleep off.`;
|
|
42
|
+
}
|
|
32
43
|
if (!isResidence && othersHere.length > 0) {
|
|
33
44
|
return `Too exposed to rest here with ${othersHere.map(a => a.name).join(', ')} around. Find your hideout, or an empty room.`;
|
|
34
45
|
}
|
|
35
|
-
|
|
46
|
+
// Home with the rent unpaid barely counts as home: no heat, cold
|
|
47
|
+
// water, recovery halved until the tab's squared (see pay.ts).
|
|
48
|
+
const inDebtAtHome = isResidence && (this.game?.rentDebt ?? 0) > 0;
|
|
49
|
+
// A rest in a REAL BED is sleep (needs system): the sleep debt resets
|
|
50
|
+
// and sleep-locked fatigue unlocks -- before the recovery roll below,
|
|
51
|
+
// so tonight's sleep can heal the very boxes it just released.
|
|
52
|
+
// Jobsite corners rest the body but don't count as a night's sleep.
|
|
53
|
+
const sleptNow = isResidence && !actor.sleptThisCycle;
|
|
54
|
+
if (isResidence)
|
|
55
|
+
actor.markSlept();
|
|
56
|
+
const lines = [inDebtAtHome
|
|
57
|
+
? `You find the cot in the cold -- the landlord cut the heat over the ${this.game.rentDebt} you owe ("pay" to square it).`
|
|
58
|
+
: `You find a corner, close your eyes, and let the static drain out.`];
|
|
59
|
+
if (sleptNow)
|
|
60
|
+
lines.push(` A real night's sleep, in a bed that's yours. It counts.`);
|
|
36
61
|
if (actor.stunTaken > 0) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
62
|
+
// Home comfort is dice: the lifestyle tier adds (or, on the Street,
|
|
63
|
+
// subtracts) from the recovery roll -- but only AT HOME. A corner of
|
|
64
|
+
// a job site is the same corner for everyone.
|
|
65
|
+
const tierDice = isResidence ? (this.game?.lifestyle?.restDice ?? 0) : 0;
|
|
66
|
+
// Quick Healer (p.77): +2 on every healing test, this one included.
|
|
67
|
+
const healerDice = actor.qualityBonus('healing');
|
|
68
|
+
const roll = rollPool(Math.max(1, actor.body + tierDice + healerDice));
|
|
69
|
+
let recovery = roll.hits + 1;
|
|
70
|
+
// Insomnia (p.81): the sleep that comes is thin -- half the boxes.
|
|
71
|
+
const insomnia = actor.hasQuality('insomnia');
|
|
72
|
+
if (insomnia)
|
|
73
|
+
recovery = Math.max(1, Math.ceil(recovery / 2));
|
|
74
|
+
if (inDebtAtHome)
|
|
75
|
+
recovery = Math.max(1, Math.ceil(recovery / 2));
|
|
76
|
+
const recovered = actor.healStun(recovery);
|
|
77
|
+
this.logger.write(`RestCommand: ${actor.name} rested and recovered ${recovered} stun (${actor.stunTaken}/${actor.maxStunBoxes})${inDebtAtHome ? ' [halved: rent debt]' : ''}${insomnia ? ' [halved: insomnia]' : ''}${tierDice !== 0 ? ` [lifestyle ${tierDice > 0 ? '+' : ''}${tierDice}d]` : ''}${healerDice ? ` [quick healer +${healerDice}d]` : ''}.`);
|
|
78
|
+
lines.push(` Rest: ${formatRoll(roll)}${tierDice > 0 ? ` (+${tierDice} -- a real bed)` : tierDice < 0 ? ` (${tierDice} -- the Street sleeps badly)` : ''}${healerDice ? ` (+${healerDice} -- quick healer)` : ''}${insomnia ? ' (halved -- sleep never comes easy)' : ''}${inDebtAtHome ? ' (halved -- shivering is not sleeping)' : ''}`);
|
|
41
79
|
lines.push(` ${recovered} stun recovered: ${actor.stunSummary()}`);
|
|
42
80
|
}
|
|
43
81
|
for (const deck of damagedDecks) {
|
|
44
82
|
const wasBricked = deck.isBricked;
|
|
45
|
-
|
|
83
|
+
// Juryrigger (p.75): +2 on the bench -- coaxing boards back to life
|
|
84
|
+
// is exactly the intuitive-hardware knack the quality describes.
|
|
85
|
+
const repairRoll = rollPool(actor.logic + actor.qualityBonus('piloting'));
|
|
46
86
|
const repaired = deck.repairDeck(repairRoll.hits + 1);
|
|
47
87
|
this.logger.write(`RestCommand: ${actor.name} repaired ${repaired} boxes on ${deck.name} (${deck.deckDamage}/${deck.maxDeckBoxes}).`);
|
|
48
88
|
lines.push(` Bench work on the ${deck.name}: ${formatRoll(repairRoll)}`);
|
|
49
89
|
lines.push(` ${repaired} box${repaired === 1 ? '' : 'es'} repaired: ${deck.deckSummary()}${wasBricked && !deck.isBricked ? ' -- it boots again.' : ''}`);
|
|
50
90
|
}
|
|
51
|
-
|
|
91
|
+
for (const drone of damagedDrones) {
|
|
92
|
+
const wasWrecked = drone.isWrecked;
|
|
93
|
+
const repairRoll = rollPool(actor.logic + actor.qualityBonus('piloting'));
|
|
94
|
+
const repaired = drone.repairDrone(repairRoll.hits + 1);
|
|
95
|
+
this.logger.write(`RestCommand: ${actor.name} repaired ${repaired} hull boxes on ${drone.name} (${drone.droneDamage}/${drone.maxDroneBoxes}).`);
|
|
96
|
+
lines.push(` Airframe work on the ${drone.name}: ${formatRoll(repairRoll)}`);
|
|
97
|
+
lines.push(` ${repaired} box${repaired === 1 ? '' : 'es'} trued and patched: ${drone.droneSummary()}${wasWrecked && !drone.isWrecked ? ' -- the rotors answer again.' : ''}`);
|
|
98
|
+
}
|
|
99
|
+
lines.push(actor.stunTaken === 0 && !damagedDecks.some(d => d.deckDamage > 0) && !damagedDrones.some(d => d.droneDamage > 0)
|
|
52
100
|
? ` Head clear, gear humming. Back to work.`
|
|
53
101
|
: ` (Rest again to keep recovering.)`);
|
|
54
102
|
this.actor.performAction('rests', '');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/rest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;;GAQG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,8HAA8H,CAAC;IAE9J,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,IAAI,GAAG,KAAK,CAAC,eAAe,CAAC;QAEnC,IAAI,KAAK,CAAC,eAAe,EAAE,EAAE,CAAC;YAC5B,OAAO,sBAAsB,CAAC;QAChC,CAAC;QACD,IAAI,KAAK,KAAK,IAAI,CAAC,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