@maka/maka-cli 5.5.0 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/typescript/package.json +2 -2
- package/bundle/typescript/src/commands/_index.d.ts +4 -0
- package/bundle/typescript/src/commands/_index.js +4 -0
- package/bundle/typescript/src/commands/_index.js.map +1 -1
- package/bundle/typescript/src/commands/debug.js +1 -7
- package/bundle/typescript/src/commands/debug.js.map +1 -1
- package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.js +17 -1
- package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/commands/env/_index.d.ts +3 -0
- package/bundle/typescript/src/commands/env/_index.js +4 -0
- package/bundle/typescript/src/commands/env/_index.js.map +1 -0
- package/bundle/typescript/src/commands/env/env.command.d.ts +3 -0
- package/bundle/typescript/src/commands/env/env.command.js +22 -0
- package/bundle/typescript/src/commands/env/env.command.js.map +1 -0
- package/bundle/typescript/src/commands/env/get.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/env/get.sub.cmd.js +46 -0
- package/bundle/typescript/src/commands/env/get.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/env/prompt-for-env.d.ts +10 -0
- package/bundle/typescript/src/commands/env/prompt-for-env.js +27 -0
- package/bundle/typescript/src/commands/env/prompt-for-env.js.map +1 -0
- package/bundle/typescript/src/commands/env/set.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/env/set.sub.cmd.js +59 -0
- package/bundle/typescript/src/commands/env/set.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js +79 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/augmentations.d.ts +31 -0
- package/bundle/typescript/src/commands/game/sideQuest/augmentations.js +125 -0
- package/bundle/typescript/src/commands/game/sideQuest/augmentations.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.d.ts +17 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js +113 -15
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.d.ts +37 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js +193 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js +10 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.d.ts +3 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js +12 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js +7 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js +97 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.d.ts +21 -10
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js +41 -27
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +63 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.d.ts +35 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js +277 -44
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js +37 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drink.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drink.js +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drink.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/eat.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/eat.js +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/eat.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +101 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +4 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +15 -11
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +3 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js +58 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.d.ts +26 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.js +125 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/install.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/install.js +125 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/install.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jump.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jump.js +62 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jump.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.js +76 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/pay.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pay.js +39 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pay.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js +5 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js +5 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.js +121 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js +60 -12
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +27 -10
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +6 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sell.d.ts +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js +125 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js +36 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js +9 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js +27 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/treat.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/treat.js +67 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/treat.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.d.ts +29 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +118 -11
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/work.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/work.js +68 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/work.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +131 -4
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.d.ts +6 -2
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +10 -6
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +115 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.js +464 -25
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +28 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js +111 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +70 -7
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +109 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +423 -39
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +6 -6
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +38 -14
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +41 -8
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/qualities.d.ts +44 -0
- package/bundle/typescript/src/commands/game/sideQuest/qualities.js +155 -0
- package/bundle/typescript/src/commands/game/sideQuest/qualities.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +274 -5
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.d.ts +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +50 -3
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.d.ts +13 -6
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js +25 -14
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +100 -10
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/commerce.d.ts +56 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/commerce.js +144 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/commerce.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/outdoors.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/outdoors.js +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/outdoors.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +84 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/terminal-reset.d.ts +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/terminal-reset.js +23 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/terminal-reset.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +51 -15
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/commands/remote/reconfig.sub.cmd.js +27 -1
- package/bundle/typescript/src/commands/remote/reconfig.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/commands/run/run.command.js +1 -7
- package/bundle/typescript/src/commands/run/run.command.js.map +1 -1
- package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.js +1 -6
- package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/generators/config.js +11 -10
- package/bundle/typescript/src/generators/config.js.map +1 -1
- package/bundle/typescript/src/templates/meteor/config/pm2.config.js +3 -3
- package/bundle/typescript/src/templates/meteor/project/gitignore +2 -1
- package/bundle/typescript/src/tool.d.ts +2 -0
- package/bundle/typescript/src/tool.js +3 -0
- package/bundle/typescript/src/tool.js.map +1 -1
- package/bundle/typescript/src/tools/aws/aws.class.js +6 -4
- package/bundle/typescript/src/tools/aws/aws.class.js.map +1 -1
- package/bundle/typescript/src/tools/dotenvx/dotenvx.class.d.ts +24 -0
- package/bundle/typescript/src/tools/dotenvx/dotenvx.class.js +66 -0
- package/bundle/typescript/src/tools/dotenvx/dotenvx.class.js.map +1 -0
- package/bundle/typescript/src/tools/ssh/ssh.class.js +1 -1
- package/bundle/typescript/src/tools/ssh/ssh.class.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
import { Command, ICommand } from './command.js';
|
|
2
2
|
import { PuzzleBypassType } from '../types/seed/puzzle-seed.js';
|
|
3
3
|
/**
|
|
4
|
-
* Shared implementation for pick/hack/cast. The gate check (already
|
|
5
|
-
* solved? prerequisite met? does this puzzle even have this bypassType?
|
|
6
|
-
* always runs first and synchronously, so a doomed
|
|
7
|
-
* player sit through an interactive challenge they
|
|
8
|
-
* allowed to attempt. Each concrete command differs
|
|
9
|
-
* description, bypass type, the "nothing to do that to"
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
4
|
+
* Shared implementation for pick/hack/cast/bluff. The gate check (already
|
|
5
|
+
* solved? prerequisite met? does this puzzle even have this bypassType?
|
|
6
|
+
* route already burned?) always runs first and synchronously, so a doomed
|
|
7
|
+
* attempt never makes the player sit through an interactive challenge they
|
|
8
|
+
* were never going to be allowed to attempt. Each concrete command differs
|
|
9
|
+
* in its verb, description, bypass type, the "nothing to do that to"
|
|
10
|
+
* message, how the outcome gets determined (see determineOutcome() --
|
|
11
|
+
* every real bypass overrides it with a skill roll), and what failure
|
|
12
|
+
* costs beyond the burned route (onBypassFailure()).
|
|
13
13
|
*/
|
|
14
14
|
export declare abstract class BypassCommand extends Command implements ICommand {
|
|
15
15
|
protected abstract bypassType: PuzzleBypassType;
|
|
16
16
|
protected abstract noPuzzleMessage: string;
|
|
17
|
-
/**
|
|
17
|
+
/** Fallback: a flat coin flip. Every real bypass overrides this with a
|
|
18
|
+
* skill roll (pick: Agility+locksmith, hack: Logic+hacking, bluff:
|
|
19
|
+
* Charisma+con, cast: the casting pool). */
|
|
18
20
|
protected determineOutcome(): Promise<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Type-specific teeth for a failed bypass, beyond the burned route and
|
|
23
|
+
* the alarm world event both applied by execute(). Returns narration
|
|
24
|
+
* lines. Default: nothing extra -- the cost of a snapped pick or a blown
|
|
25
|
+
* story is the burned shortcut and a district that heard about it. The
|
|
26
|
+
* spell bypass overrides this with ward backlash (see cast.ts), which
|
|
27
|
+
* runs through the real damage tracks and can still knock out or kill.
|
|
28
|
+
*/
|
|
29
|
+
protected onBypassFailure(): Promise<string[]>;
|
|
19
30
|
/**
|
|
20
31
|
* There's no typed answer here to disambiguate with (unlike solve.ts),
|
|
21
32
|
* so with more than one barrier in the room the player has to name which
|
|
@@ -1,20 +1,33 @@
|
|
|
1
1
|
import { Command } from './command.js';
|
|
2
2
|
/**
|
|
3
|
-
* Shared implementation for pick/hack/cast. The gate check (already
|
|
4
|
-
* solved? prerequisite met? does this puzzle even have this bypassType?
|
|
5
|
-
* always runs first and synchronously, so a doomed
|
|
6
|
-
* player sit through an interactive challenge they
|
|
7
|
-
* allowed to attempt. Each concrete command differs
|
|
8
|
-
* description, bypass type, the "nothing to do that to"
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
3
|
+
* Shared implementation for pick/hack/cast/bluff. The gate check (already
|
|
4
|
+
* solved? prerequisite met? does this puzzle even have this bypassType?
|
|
5
|
+
* route already burned?) always runs first and synchronously, so a doomed
|
|
6
|
+
* attempt never makes the player sit through an interactive challenge they
|
|
7
|
+
* were never going to be allowed to attempt. Each concrete command differs
|
|
8
|
+
* in its verb, description, bypass type, the "nothing to do that to"
|
|
9
|
+
* message, how the outcome gets determined (see determineOutcome() --
|
|
10
|
+
* every real bypass overrides it with a skill roll), and what failure
|
|
11
|
+
* costs beyond the burned route (onBypassFailure()).
|
|
12
12
|
*/
|
|
13
13
|
export class BypassCommand extends Command {
|
|
14
|
-
/**
|
|
14
|
+
/** Fallback: a flat coin flip. Every real bypass overrides this with a
|
|
15
|
+
* skill roll (pick: Agility+locksmith, hack: Logic+hacking, bluff:
|
|
16
|
+
* Charisma+con, cast: the casting pool). */
|
|
15
17
|
async determineOutcome() {
|
|
16
18
|
return Math.random() < 0.5;
|
|
17
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Type-specific teeth for a failed bypass, beyond the burned route and
|
|
22
|
+
* the alarm world event both applied by execute(). Returns narration
|
|
23
|
+
* lines. Default: nothing extra -- the cost of a snapped pick or a blown
|
|
24
|
+
* story is the burned shortcut and a district that heard about it. The
|
|
25
|
+
* spell bypass overrides this with ward backlash (see cast.ts), which
|
|
26
|
+
* runs through the real damage tracks and can still knock out or kill.
|
|
27
|
+
*/
|
|
28
|
+
async onBypassFailure() {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
18
31
|
/**
|
|
19
32
|
* There's no typed answer here to disambiguate with (unlike solve.ts),
|
|
20
33
|
* so with more than one barrier in the room the player has to name which
|
|
@@ -77,23 +90,24 @@ export class BypassCommand extends Command {
|
|
|
77
90
|
}
|
|
78
91
|
this.logger.write(`${this.actor.name} attempted to ${this.bypassType} "${target.puzzle.name}": ${result.success ? 'success' : 'failure'}${result.alarmed ? ' (alarmed)' : ''}`);
|
|
79
92
|
this.actor.performAction(this.bypassType, result.message);
|
|
80
|
-
// A failed bypass
|
|
81
|
-
//
|
|
82
|
-
//
|
|
83
|
-
//
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
// A failed bypass used to be instant, unrecoverable death by fiat --
|
|
94
|
+
// no dice, no damage, just endGame(). Replaced (after a real session
|
|
95
|
+
// died to it) with consequences that run through the systems that now
|
|
96
|
+
// exist: the route BURNS (puzzle.bypassBurned -- this trick never works
|
|
97
|
+
// on this barrier again; the findable answer still does), the alarm
|
|
98
|
+
// world event above puts every NPC on notice, any sneak is over, and
|
|
99
|
+
// the type-specific teeth in onBypassFailure() (spell backlash damage,
|
|
100
|
+
// see cast.ts) can still put you down -- but through the damage
|
|
101
|
+
// tracks, resisted and narrated, not by administrative decree.
|
|
102
|
+
if (result.alarmed) {
|
|
103
|
+
this.actor.sneaking = false;
|
|
104
|
+
const consequence = await this.onBypassFailure();
|
|
105
|
+
this.scene.updateStatus();
|
|
106
|
+
return [
|
|
107
|
+
result.message,
|
|
108
|
+
` The route is BURNED -- that trick will never work on this barrier again. The real answer still will, if you can find it.`,
|
|
109
|
+
...consequence,
|
|
110
|
+
].join('\n');
|
|
97
111
|
}
|
|
98
112
|
return result.message;
|
|
99
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bypass-command.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/bypass-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAIjD;;;;;;;;;;GAUG;AACH,MAAM,OAAgB,aAAc,SAAQ,OAAO;IAIjD
|
|
1
|
+
{"version":3,"file":"bypass-command.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/bypass-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAIjD;;;;;;;;;;GAUG;AACH,MAAM,OAAgB,aAAc,SAAQ,OAAO;IAIjD;;gDAE4C;IAClC,KAAK,CAAC,gBAAgB;QAC9B,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC;IAC7B,CAAC;IAED;;;;;;;OAOG;IACO,KAAK,CAAC,eAAe;QAC7B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED;;;;;;OAMG;IACK,aAAa,CAAC,IAAc,EAAE,OAAuB;QAC3D,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAEhD,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACxD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpE,OAAO,EAAE,KAAK,EAAE,kCAAkC,IAAI,C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KAAK,CAAC;YAC5B,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;YACjD,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;YAC1B,OAAO;gBACL,MAAM,CAAC,OAAO;gBACd,4HAA4H;gBAC5H,GAAG,WAAW;aACf,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACf,CAAC;QAED,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;CACF"}
|
|
@@ -3,6 +3,18 @@ export declare class CallCommand extends Command implements ICommand {
|
|
|
3
3
|
protected static verb: string;
|
|
4
4
|
protected static description: string;
|
|
5
5
|
execute(args: string[]): Promise<string>;
|
|
6
|
+
/**
|
|
7
|
+
* Whether a cab can physically reach this room. The predicate itself
|
|
8
|
+
* lives in utilities/outdoors.ts, SHARED with the generator: every
|
|
9
|
+
* drafted run is guaranteed an outdoor START room (the curb the cab
|
|
10
|
+
* dropped you on -- normalizeSkeleton injects one if the model built
|
|
11
|
+
* an indoor start), so walking back to where you arrived always
|
|
12
|
+
* reaches a hailable curb.
|
|
13
|
+
*/
|
|
14
|
+
static isOutdoors(room: {
|
|
15
|
+
name: string;
|
|
16
|
+
roomType?: string;
|
|
17
|
+
} | undefined): boolean;
|
|
6
18
|
private hasEquippedCommlink;
|
|
7
19
|
private hasCommlink;
|
|
8
20
|
/**
|
|
@@ -4,6 +4,7 @@ import { parseArgsWithQuotes } from './talk.js';
|
|
|
4
4
|
import { CALL_ICON, CALL_COLOR } from '../utilities/comm-style.js';
|
|
5
5
|
import { FIXER_NAME } from '../factories/scene-seed-generator.js';
|
|
6
6
|
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
7
|
+
import { isOutdoorsPlace } from '../utilities/outdoors.js';
|
|
7
8
|
export class CallCommand extends Command {
|
|
8
9
|
static verb = 'call';
|
|
9
10
|
static description = 'Call someone remotely over a commlink (no need to be in the same room; commlink must be equipped).';
|
|
@@ -40,21 +41,63 @@ export class CallCommand extends Command {
|
|
|
40
41
|
if (this.actor.inExchange) {
|
|
41
42
|
return `Mid-fight is no time to hail a cab.`;
|
|
42
43
|
}
|
|
44
|
+
// Curbside pickup only: no cab noses into a bar, a crypt, or your
|
|
45
|
+
// hideout. Step out to a street-level room first. EXCEPTION: the
|
|
46
|
+
// ride home off a WRAPPED job hails from anywhere -- the cab is the
|
|
47
|
+
// only road home now (no hideout door on runs), and a generated
|
|
48
|
+
// scene isn't guaranteed a single outdoor room; the fiction walks
|
|
49
|
+
// you to the curb instead of the gate stranding you.
|
|
50
|
+
const homeboundIndoors = !this.scene.isHub && this.scene.isCompleted()
|
|
51
|
+
&& !CallCommand.isOutdoors(this.actor.currentLocation);
|
|
52
|
+
if (!CallCommand.isOutdoors(this.actor.currentLocation) && !homeboundIndoors) {
|
|
53
|
+
return `The dispatcher grunts: "Curbside pickup only, chummer." Step outside -- a street, an alley, somewhere a cab can actually reach.`;
|
|
54
|
+
}
|
|
43
55
|
if (this.scene.isHub && this.game.pendingRun) {
|
|
44
56
|
this.actor.performAction('calls a taxi', 'and steps to the curb');
|
|
45
57
|
const ride = this.game.pendingRide;
|
|
46
58
|
const trip = await this.game.launchPendingRun();
|
|
47
59
|
return `${ride?.arrive ?? 'A cab pulls up.'}\n${ride?.board ?? 'You climb in.'}\n${trip}`;
|
|
48
60
|
}
|
|
49
|
-
if (!this.scene.isHub
|
|
50
|
-
|
|
61
|
+
if (!this.scene.isHub) {
|
|
62
|
+
// The ride home runs on the meter -- the ride TO a job stays on
|
|
63
|
+
// the client, as Johnson promises. The cab is the ONLY road home
|
|
64
|
+
// now (run scenes no longer carry the hideout door), so broke
|
|
65
|
+
// doesn't strand you: whatever the stick can't cover goes on the
|
|
66
|
+
// tab, collected with the rent at the door (Game.returnToHub).
|
|
67
|
+
//
|
|
68
|
+
// A job does NOT have to be finished to leave it: a run gone
|
|
69
|
+
// sideways (real session: failed the job, stuck in the scene)
|
|
70
|
+
// ends by walking back to the curb you were dropped on -- the
|
|
71
|
+
// dispatcher doesn't care about your employer's feelings. The
|
|
72
|
+
// payout simply never lands; that's the price of walking.
|
|
73
|
+
const wrapped = this.scene.isCompleted();
|
|
74
|
+
const FARE = 80;
|
|
75
|
+
const paid = Math.min(this.actor.currency, FARE);
|
|
76
|
+
const owed = FARE - paid;
|
|
77
|
+
if (paid > 0)
|
|
78
|
+
this.actor.adjustCurrency(-paid);
|
|
79
|
+
if (owed > 0)
|
|
80
|
+
this.game.rentDebt += owed;
|
|
81
|
+
this.actor.performAction('calls a taxi', wrapped ? 'for the ride home' : 'and walks away from the job');
|
|
51
82
|
const home = await this.game.continueToNextScene();
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
83
|
+
const meterLine = owed === 0
|
|
84
|
+
? `The meter takes its ${FARE}.`
|
|
85
|
+
: paid > 0
|
|
86
|
+
? `The meter takes the ${paid} you've got; the other ${owed} goes on your tab.`
|
|
87
|
+
: `The cabbie eyes your dead stick and sighs: "On the tab, chummer. All ${FARE} of it."`;
|
|
88
|
+
const curbLine = homeboundIndoors
|
|
89
|
+
? `You pick your way back out to street level -- the job's done, and nothing here argues.\n`
|
|
90
|
+
: '';
|
|
91
|
+
// "Refusing to finish a run" is on the book's own notoriety list
|
|
92
|
+
// (SR5e p.368) -- each abandoned job is its own incident.
|
|
93
|
+
let walkLine = '';
|
|
94
|
+
if (!wrapped) {
|
|
95
|
+
const stained = this.actor.addNotoriety(`walked out on "${this.game.currentJobName ?? 'a job'}"`);
|
|
96
|
+
walkLine = `You're leaving the job on the table -- no payout follows you home${stained ? `, and word WILL travel. (+1 Notoriety, now ${this.actor.notoriety})` : '.'}\n`;
|
|
97
|
+
}
|
|
98
|
+
return `${curbLine}${walkLine}A cab noses out of the dark and finds you like it always knew where you'd be. ${meterLine}\n${home}`;
|
|
56
99
|
}
|
|
57
|
-
return `No
|
|
100
|
+
return `The dispatcher's bored voice: "No fare on the books for you, chummer." (No job arranged -- "call ${FIXER_NAME}" first.)`;
|
|
58
101
|
}
|
|
59
102
|
const { target, remainingWords } = this.resolveTargetAndMessage(rawWords);
|
|
60
103
|
if (!target) {
|
|
@@ -184,6 +227,19 @@ export class CallCommand extends Command {
|
|
|
184
227
|
}
|
|
185
228
|
return `{${CALL_COLOR}-fg}${CALL_ICON} You call ${target.name}: "${greeting}"${deliveryNote}{/${CALL_COLOR}-fg}`;
|
|
186
229
|
}
|
|
230
|
+
/**
|
|
231
|
+
* Whether a cab can physically reach this room. The predicate itself
|
|
232
|
+
* lives in utilities/outdoors.ts, SHARED with the generator: every
|
|
233
|
+
* drafted run is guaranteed an outdoor START room (the curb the cab
|
|
234
|
+
* dropped you on -- normalizeSkeleton injects one if the model built
|
|
235
|
+
* an indoor start), so walking back to where you arrived always
|
|
236
|
+
* reaches a hailable curb.
|
|
237
|
+
*/
|
|
238
|
+
static isOutdoors(room) {
|
|
239
|
+
if (!room)
|
|
240
|
+
return false;
|
|
241
|
+
return isOutdoorsPlace(room.name, room.roomType);
|
|
242
|
+
}
|
|
187
243
|
hasEquippedCommlink(actor) {
|
|
188
244
|
return actor.equipment.head?.commlink != null;
|
|
189
245
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/call.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/call.ts"],"names":[],"mappings":"AAAA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@@ -13,6 +13,27 @@ export declare class CastCommand extends BypassCommand {
|
|
|
13
13
|
protected static description: string;
|
|
14
14
|
protected bypassType: PuzzleBypassType;
|
|
15
15
|
protected noPuzzleMessage: string;
|
|
16
|
+
/** Backlash drain when a ward-bypass fails -- resisted with Willpower,
|
|
17
|
+
* like any drain. The nastiest drain in the game: forcing a hostile
|
|
18
|
+
* ward is harder on the caster than any spell of their own. */
|
|
19
|
+
private static readonly BACKLASH_DRAIN;
|
|
20
|
+
/**
|
|
21
|
+
* The ward-bypass outcome is a real SPELLCASTING test now, not the
|
|
22
|
+
* legacy coin flip (a real session died to a 50/50 that ignored Magic 6
|
|
23
|
+
* + spellcasting entirely): the full casting pool -- Magic +
|
|
24
|
+
* spellcasting (or the book-caster's base), best focus, wounds,
|
|
25
|
+
* sustaining -- needs 2 hits to unweave the barrier, same threshold as
|
|
26
|
+
* pick/hack/bluff.
|
|
27
|
+
*/
|
|
28
|
+
protected determineOutcome(): Promise<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* A failed unweaving isn't quiet OR free: the ward's backlash is drain
|
|
31
|
+
* (BACKLASH_DRAIN, resisted with Willpower like any drain), landing on
|
|
32
|
+
* the real stun track with overflow into physical. Enough of it still
|
|
33
|
+
* knocks out or kills -- but through dice and the condition monitors,
|
|
34
|
+
* the same death any spell drain earns, not by fiat.
|
|
35
|
+
*/
|
|
36
|
+
protected onBypassFailure(): Promise<string[]>;
|
|
16
37
|
execute(args?: string[]): Promise<string>;
|
|
17
38
|
/**
|
|
18
39
|
* Lenient spell-name matching: the exact key, or a unique fragment of at
|
|
@@ -45,9 +66,22 @@ export declare class CastCommand extends BypassCommand {
|
|
|
45
66
|
* knockout -- out of the run, but honestly narrated as unconsciousness.
|
|
46
67
|
*/
|
|
47
68
|
private drainCollapse;
|
|
48
|
-
|
|
69
|
+
/**
|
|
70
|
+
* The shared combat-spell engine (manabolt/stunbolt/powerbolt/
|
|
71
|
+
* fireball): one exchange flow, parameterized by what SOAKS the hit
|
|
72
|
+
* (SPELLS[key].soak -- the direct/indirect distinction, RAW p.283),
|
|
73
|
+
* whether damage is stun, and the spell's narration.
|
|
74
|
+
*/
|
|
75
|
+
private castCombatSpell;
|
|
49
76
|
private castHeal;
|
|
50
77
|
private castArmor;
|
|
78
|
+
/**
|
|
79
|
+
* The sustained utility pair (invisibility / increase reflexes), same
|
|
80
|
+
* toggle shape as the armor spell: the BEARER carries the effect and
|
|
81
|
+
* its -2 sustaining burden, the caster pays the drain, and casting at
|
|
82
|
+
* the same bearer again releases it for free.
|
|
83
|
+
*/
|
|
84
|
+
private castSustainedUtility;
|
|
51
85
|
/**
|
|
52
86
|
* Non-combat casts are a single block, no exchange pacing needed: the
|
|
53
87
|
* player's own casts return the text for ui.ts to print, while an NPC's
|