@maka/maka-cli 5.3.16 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/typescript/package.json +1 -1
- package/bundle/typescript/src/commands/create.js +1 -1
- package/bundle/typescript/src/commands/create.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.d.ts +43 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js +131 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js +79 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.d.ts +42 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js +224 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.d.ts +28 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js +101 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.d.ts +19 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +149 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.d.ts +58 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js +378 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.d.ts +11 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js +8 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.js +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js +60 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/edge.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js +31 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/end-call.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/end-call.js +27 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/end-call.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.d.ts +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +40 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js +43 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +7 -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 +11 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +115 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.d.ts +25 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +176 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/inv.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/inv.js +39 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/inv.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jack.d.ts +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jack.js +64 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jack.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.d.ts +10 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js +11 -33
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +35 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.js +46 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pan.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pan.js +55 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pan.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js +18 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/project.d.ts +19 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/project.js +54 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/project.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/read.js +6 -5
- package/bundle/typescript/src/commands/game/sideQuest/commands/read.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/reboot.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/reboot.js +52 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/reboot.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/reload.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/reload.js +40 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/reload.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js +59 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +23 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +20 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js +49 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/silent.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/silent.js +50 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/silent.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js +32 -11
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js +65 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/stance.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js +41 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/subdue.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/subdue.js +43 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/subdue.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/surrender.d.ts +20 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/surrender.js +45 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/surrender.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.d.ts +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +80 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +1 -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 +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +101 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
- 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/npc-factory.js +7 -2
- package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.d.ts +8 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +138 -21
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.d.ts +119 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +816 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +70 -9
- package/bundle/typescript/src/commands/game/sideQuest/game.js +403 -164
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/minigames/hack-minigame.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/minigames/hack-minigame.js +101 -0
- package/bundle/typescript/src/commands/game/sideQuest/minigames/hack-minigame.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/minigames/lockpick-minigame.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/minigames/lockpick-minigame.js +95 -0
- package/bundle/typescript/src/commands/game/sideQuest/minigames/lockpick-minigame.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/door.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/door.js +15 -2
- package/bundle/typescript/src/commands/game/sideQuest/models/door.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js +54 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +41 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js +106 -3
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +25 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +220 -47
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +213 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +525 -9
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +75 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +174 -6
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +20 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +39 -18
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +69 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +175 -2
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +80 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +7 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.d.ts +34 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.d.ts +15 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.d.ts +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/win-condition-seed.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/win-condition-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/win-condition-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/ui.d.ts +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +95 -5
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.d.ts +60 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js +138 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.d.ts +143 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +328 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.d.ts +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.js +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.d.ts +22 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js +34 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.d.ts +36 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.js +92 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.d.ts +44 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +193 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/pursuit.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/pursuit.js +36 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/pursuit.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +54 -7
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/commands/set/global.sub.cmd.js +59 -5
- package/bundle/typescript/src/commands/set/global.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/tools/ai/ai.class.d.ts +35 -0
- package/bundle/typescript/src/tools/ai/ai.class.js +112 -0
- package/bundle/typescript/src/tools/ai/ai.class.js.map +1 -0
- package/bundle/typescript/src/tools/fsi/fsi.interfaces.d.ts +1 -0
- package/bundle/typescript/src/tools/fsi/fsi.interfaces.js.map +1 -1
- package/bundle/typescript/src/tools/https/https.class.d.ts +2 -1
- package/bundle/typescript/src/tools/https/https.class.js +43 -0
- package/bundle/typescript/src/tools/https/https.class.js.map +1 -1
- package/bundle/typescript/src/tools/https/https.interface.d.ts +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Running silent, the Shadowrun way: your commlink stays on you but stops
|
|
4
|
+
* broadcasting. While silent, you can't place calls and NOBODY can raise
|
|
5
|
+
* you -- including the fixer, so a job callback will not find you until
|
|
6
|
+
* you go loud again. Toggling silent drops any call you're on. The HUD's
|
|
7
|
+
* Link line tracks the state (see game.ts updateStatus).
|
|
8
|
+
*/
|
|
9
|
+
export declare class SilentCommand extends Command implements ICommand {
|
|
10
|
+
protected static verb: string;
|
|
11
|
+
protected static description: string;
|
|
12
|
+
execute(_args?: string[]): Promise<string>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { Category } from '../types/shared/item-enum.js';
|
|
3
|
+
import { CALL_ICON, CALL_COLOR } from '../utilities/comm-style.js';
|
|
4
|
+
/**
|
|
5
|
+
* Running silent, the Shadowrun way: your commlink stays on you but stops
|
|
6
|
+
* broadcasting. While silent, you can't place calls and NOBODY can raise
|
|
7
|
+
* you -- including the fixer, so a job callback will not find you until
|
|
8
|
+
* you go loud again. Toggling silent drops any call you're on. The HUD's
|
|
9
|
+
* Link line tracks the state (see game.ts updateStatus).
|
|
10
|
+
*/
|
|
11
|
+
export class SilentCommand extends Command {
|
|
12
|
+
static verb = 'silent';
|
|
13
|
+
static description = 'Toggle your commlink broadcast: running silent means no calls in OR out (nobody can reach you -- not even the fixer) until you go loud again.';
|
|
14
|
+
async execute(_args = []) {
|
|
15
|
+
const actor = this.actor;
|
|
16
|
+
// Your link's broadcast IS the Matrix connection -- killing it while
|
|
17
|
+
// jacked in would be dumping yourself. Make it explicit instead.
|
|
18
|
+
if (actor.plane === 'matrix') {
|
|
19
|
+
return `Your link is the thread your mind is hanging from right now. "jack out" first, then go dark.`;
|
|
20
|
+
}
|
|
21
|
+
const hasAnyLink = actor.equipment.head?.commlink != null ||
|
|
22
|
+
actor.inventory.getAllItems().some(i => i.category === Category.Commlink);
|
|
23
|
+
if (!hasAnyLink) {
|
|
24
|
+
return `You have no commlink to silence.`;
|
|
25
|
+
}
|
|
26
|
+
// Going loud again.
|
|
27
|
+
if (actor.runningSilent) {
|
|
28
|
+
actor.runningSilent = false;
|
|
29
|
+
actor.performAction('goes loud', 'commlink broadcasting');
|
|
30
|
+
this.logger.write(`${actor.name} stops running silent.`);
|
|
31
|
+
this.scene.updateStatus();
|
|
32
|
+
return `{${CALL_COLOR}-fg}${CALL_ICON} Your link comes back up -- broadcasting again. Calls can reach you now.{/${CALL_COLOR}-fg}`;
|
|
33
|
+
}
|
|
34
|
+
// Going silent: drop any active call first, both sides.
|
|
35
|
+
let hangupNote = '';
|
|
36
|
+
const partner = actor.activeCallPartner;
|
|
37
|
+
if (partner) {
|
|
38
|
+
actor.activeCallPartner = undefined;
|
|
39
|
+
partner.activeCallPartner = undefined;
|
|
40
|
+
this.logger.write(`${actor.name} dropped the call with ${partner.name} by going silent.`);
|
|
41
|
+
hangupNote = ` The call with ${partner.name} drops mid-word.`;
|
|
42
|
+
}
|
|
43
|
+
actor.runningSilent = true;
|
|
44
|
+
actor.performAction('goes silent', 'commlink dark');
|
|
45
|
+
this.logger.write(`${actor.name} is now running silent.`);
|
|
46
|
+
this.scene.updateStatus();
|
|
47
|
+
return `{gray-fg}${CALL_ICON} You kill your link's broadcast.${hangupNote} Running silent -- no calls in or out, and your AR overlay dies with it (no commlink initiative bonus) until you go loud ("silent" again).{/gray-fg}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=silent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"silent.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/silent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,+IAA+I,CAAC;IAE/K,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,qEAAqE;QACrE,iEAAiE;QACjE,IAAI,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC7B,OAAO,8FAA8F,CAAC;QACxG,CAAC;QAED,MAAM,UAAU,GACd,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,IAAI,IAAI;YACtC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC5E,IAAI,CAAC,UAAU,EAA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 'solve';
|
|
4
|
-
static description = 'Attempt to solve a puzzle.';
|
|
4
|
+
static description = 'Attempt to solve a puzzle (or a locked door\'s lock/scanner/ward).';
|
|
5
5
|
async execute(args) {
|
|
6
6
|
const answer = args.join(' ').toLowerCase();
|
|
7
7
|
const room = this.actor.currentLocation;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const targets = room?.getPuzzleTargets() ?? [];
|
|
9
|
+
if (targets.length === 0) {
|
|
10
|
+
this.logger.write(`SolveCommand: ${this.actor.name} attempted to solve a riddle in a room with no puzzle.`);
|
|
10
11
|
return 'There doesn\'t seem to be a riddle here to solve.';
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
// The typed answer alone identifies which target it's for -- no need to
|
|
14
|
+
// ask the player to also name it (unlike pick/hack/cast, where there's
|
|
15
|
+
// no answer to disambiguate with -- see bypass-command.ts).
|
|
16
|
+
let firstResult;
|
|
17
|
+
for (const target of targets) {
|
|
18
|
+
const result = target.puzzle.solve(answer, this.actor.inventory);
|
|
19
|
+
firstResult ??= result;
|
|
20
|
+
if (result.success) {
|
|
21
|
+
this.logger.write(`${this.actor.name} attempted to solve ${target.puzzle.name} with result ${result.success}`);
|
|
22
|
+
this.logger.write(`${this.actor.name} has solved ${target.puzzle.name}`);
|
|
23
|
+
if (target.door) {
|
|
24
|
+
target.door.isLocked = false;
|
|
25
|
+
this.scene.updateExits(room);
|
|
26
|
+
this.scene.addWorldEvent(`${this.actor.name} unlocked the way ${target.direction} in ${room.name} by solving "${target.puzzle.name}".`);
|
|
27
|
+
}
|
|
28
|
+
else if (target.puzzle.rewardItem) {
|
|
29
|
+
this.actor.inventory.addItem(target.puzzle.rewardItem);
|
|
30
|
+
this.scene.addWorldEvent(`${this.actor.name} solved "${target.puzzle.name}" in ${room.name}.`);
|
|
31
|
+
this.scene.updateInventory(this.scene.getPlayer().inventory);
|
|
32
|
+
}
|
|
33
|
+
this.logger.write(`SolveCommand: ${result.message}`);
|
|
34
|
+
this.actor.performAction('solve', result.message);
|
|
35
|
+
return result.message;
|
|
36
|
+
}
|
|
17
37
|
}
|
|
18
|
-
this.logger.write(
|
|
19
|
-
this.
|
|
20
|
-
|
|
38
|
+
this.logger.write(`${this.actor.name} attempted to solve ${targets[0].puzzle.name} with result false`);
|
|
39
|
+
this.logger.write(`SolveCommand: ${firstResult.message}`);
|
|
40
|
+
this.actor.performAction('solve', firstResult.message);
|
|
41
|
+
return firstResult.message;
|
|
21
42
|
}
|
|
22
43
|
}
|
|
23
44
|
//# sourceMappingURL=solve.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solve.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/solve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,YAAa,SAAQ,OAAO;IAC7B,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;IACtB,MAAM,CAAC,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"solve.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/solve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,YAAa,SAAQ,OAAO;IAC7B,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;IACtB,MAAM,CAAC,WAAW,GAAG,oEAAoE,CAAC;IAEpG,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;QACxC,MAAM,OAAO,GAAG,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC;QAE/C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE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AM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;oBACvD,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,YAAY,MAAM,CAAC,MAAM,CAAC,IAAI,QAAQ,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;oBAC/F,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,CAAC;gBAC/D,CAAC;gBAED,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;gBACrD,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;gBAClD,OAAO,MAAM,CAAC,OAAO,CAAC;YACxB,CAAC;QACH,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,uBAAuB,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,oBAAoB,CAAC,CAAC;QACvG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,WAAY,CAAC,OAAO,EAAE,CAAC,CAAC;QAC3D,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,WAAY,CAAC,OAAO,CAAC,CAAC;QACxD,OAAO,WAAY,CAAC,OAAO,CAAC;IAC9B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* The spellbook: how a player actually discovers what they can cast and
|
|
4
|
+
* why. Especially load-bearing for INNATE casting -- an Awakened character
|
|
5
|
+
* has no formula item in their pack to stumble over, so without this
|
|
6
|
+
* command there'd be no way to learn you have the talent at all. Also
|
|
7
|
+
* breaks down the casting pool and shows sustained-spell state, so magic
|
|
8
|
+
* is never invisible bookkeeping.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SpellsCommand extends Command implements ICommand {
|
|
11
|
+
protected static verb: string;
|
|
12
|
+
protected static description: string;
|
|
13
|
+
execute(_args?: string[]): Promise<string>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { Category } from '../types/shared/item-enum.js';
|
|
3
|
+
/**
|
|
4
|
+
* The spellbook: how a player actually discovers what they can cast and
|
|
5
|
+
* why. Especially load-bearing for INNATE casting -- an Awakened character
|
|
6
|
+
* has no formula item in their pack to stumble over, so without this
|
|
7
|
+
* command there'd be no way to learn you have the talent at all. Also
|
|
8
|
+
* breaks down the casting pool and shows sustained-spell state, so magic
|
|
9
|
+
* is never invisible bookkeeping.
|
|
10
|
+
*/
|
|
11
|
+
export class SpellsCommand extends Command {
|
|
12
|
+
static verb = 'spells';
|
|
13
|
+
static description = 'Your spellbook: what you can cast, where the talent comes from, and your casting pool.';
|
|
14
|
+
async execute(_args = []) {
|
|
15
|
+
const actor = this.actor;
|
|
16
|
+
if (!actor.isCaster()) {
|
|
17
|
+
return `You page through your memory for anything arcane and come up empty. You're mundane -- no innate talent, no spell formulas, no grimoire, no focus. Magic is something that happens to other people.`;
|
|
18
|
+
}
|
|
19
|
+
const lines = ['=== SPELLBOOK ==='];
|
|
20
|
+
// Where the talent comes from.
|
|
21
|
+
if (actor.isAwakened()) {
|
|
22
|
+
lines.push(`You are AWAKENED (magic ${actor.magic}) -- the talent is in your blood. You know every spell innately.`);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
const grimoires = actor.inventory.getAllItems().filter(i => i.category === Category.Grimoire);
|
|
26
|
+
const formulas = actor.inventory.getAllItems().filter(i => i.category === Category.SpellFormula);
|
|
27
|
+
const sources = [...grimoires, ...formulas].map(i => i.name).join(', ');
|
|
28
|
+
lines.push(`You are mundane, casting from study: ${sources || 'a focus alone (no spells known)'}.`);
|
|
29
|
+
}
|
|
30
|
+
// The pool, broken down so the numbers aren't a mystery.
|
|
31
|
+
const focus = actor.getBestFocus();
|
|
32
|
+
const parts = [actor.isAwakened() ? `talent ${Math.max(5, actor.magic + 2)}` : `base 5`];
|
|
33
|
+
if (focus)
|
|
34
|
+
parts.push(`${focus.name} +${1 + focus.qualityBonus}`);
|
|
35
|
+
if (actor.woundModifier < 0)
|
|
36
|
+
parts.push(`wounds ${actor.woundModifier}`);
|
|
37
|
+
if (actor.sustainingPenalty > 0)
|
|
38
|
+
parts.push(`sustaining -${actor.sustainingPenalty}`);
|
|
39
|
+
lines.push(`Casting pool: ${actor.getMagicPool()}d6 (${parts.join(', ')})`);
|
|
40
|
+
if (actor.sustainedArmor > 0) {
|
|
41
|
+
lines.push(`Sustained: armor spell, +${actor.sustainedArmor} soak (-2 dice to everything else). Cast armor again to release.`);
|
|
42
|
+
}
|
|
43
|
+
// The spells themselves -- only what this actor actually knows.
|
|
44
|
+
lines.push('');
|
|
45
|
+
lines.push('Spells you know:');
|
|
46
|
+
const known = [];
|
|
47
|
+
if (actor.knowsSpell('manabolt')) {
|
|
48
|
+
known.push(` manabolt -- hurl raw mana; resisted by Body, armor is useless against it. Drain 3. (cast manabolt at <target>)`);
|
|
49
|
+
}
|
|
50
|
+
if (actor.knowsSpell('heal')) {
|
|
51
|
+
known.push(` heal -- knit physical wounds closed, yours or an ally's (touch range). Drain 2. (cast heal [on <ally>])`);
|
|
52
|
+
}
|
|
53
|
+
if (actor.knowsSpell('armor')) {
|
|
54
|
+
known.push(` armor -- a sustained protective weave on you or an ally, +soak at -2 dice for its bearer. Drain 2. (cast armor [on <ally>])`);
|
|
55
|
+
}
|
|
56
|
+
if (known.length === 0) {
|
|
57
|
+
known.push(` (none -- a focus channels power, but the spells themselves take a formula, a grimoire, or the Awakened gift)`);
|
|
58
|
+
}
|
|
59
|
+
lines.push(...known);
|
|
60
|
+
lines.push('');
|
|
61
|
+
lines.push(`Drain is the cost of every cast: resisted with Body, and what gets through fills your STUN track (${actor.stunSummary()}). Fill it and you're out cold; overflow spills into your body.`);
|
|
62
|
+
return lines.join('\n');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=spells.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spells.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/spells.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,wFAAwF,CAAC;IAExH,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;YACtB,OAAO,oMAAoM,CAAC;QAC9M,CAAC;QAED,MAAM,KAAK,GAAa,CAAC,mBAAmB,CAAC,CAAC;QAE9C,+BAA+B;QAC/B,IAAI,KAAK,CAAC,UAAU,EAAE,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,2BAA2B,KAAK,CAAC,KAAK,kEAAkE,CAAC,CAAC;QACvH,CAAC;aAAM,CAAC;YACN,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC9F,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,YAAY,CAAC,CAAC;YACjG,MAAM,OAAO,GAAG,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C;QAC/B,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,kHAAkH,CAAC,CAAC;QACjI,CAAC;QACD,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,2GAA2G,CAAC,CAAC;QAC1H,CAAC;QACD,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9B,KAAK,CAAC,IAAI,CAAC,+HAA+H,CAAC,CAAC;QAC9I,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,gHAAgH,CAAC,CAAC;QAC/H,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;QAErB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,qGAAqG,KAAK,CAAC,WAAW,EAAE,iEAAiE,CAAC,CAAC;QAEtM,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* The typed twin of the Tab key: set (or inspect) the fight-or-flight
|
|
4
|
+
* autopilot temperature. Tab cycles manual -> guarded -> aggressive in the
|
|
5
|
+
* UI; this command jumps straight to one by name, typo-tolerant. The full
|
|
6
|
+
* semantics live in utilities/auto-fight.ts.
|
|
7
|
+
*/
|
|
8
|
+
export declare class StanceCommand extends Command implements ICommand {
|
|
9
|
+
protected static verb: string;
|
|
10
|
+
protected static description: string;
|
|
11
|
+
execute(args?: string[]): Promise<string>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { STANCE_CYCLE } from '../models/player.js';
|
|
3
|
+
import { AutoFight } from '../utilities/auto-fight.js';
|
|
4
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
5
|
+
/**
|
|
6
|
+
* The typed twin of the Tab key: set (or inspect) the fight-or-flight
|
|
7
|
+
* autopilot temperature. Tab cycles manual -> guarded -> aggressive in the
|
|
8
|
+
* UI; this command jumps straight to one by name, typo-tolerant. The full
|
|
9
|
+
* semantics live in utilities/auto-fight.ts.
|
|
10
|
+
*/
|
|
11
|
+
export class StanceCommand extends Command {
|
|
12
|
+
static verb = 'stance';
|
|
13
|
+
static description = 'Set your fight autopilot: manual, guarded (subdues, honors surrender), or aggressive (to the death). Tab also cycles it.';
|
|
14
|
+
async execute(args = []) {
|
|
15
|
+
const actor = this.actor;
|
|
16
|
+
if (!args || args.length === 0) {
|
|
17
|
+
const lines = [
|
|
18
|
+
`Stance: ${actor.autoStance.toUpperCase()} -- ${AutoFight.describe(actor.autoStance)}.`,
|
|
19
|
+
'',
|
|
20
|
+
...STANCE_CYCLE.map(s => ` ${s.padEnd(10)} -- ${AutoFight.describe(s)}`),
|
|
21
|
+
'',
|
|
22
|
+
`Set with "stance <name>", or Tab to cycle. Flight is never automated -- running is always your call.`,
|
|
23
|
+
];
|
|
24
|
+
return lines.join('\n');
|
|
25
|
+
}
|
|
26
|
+
const picked = fuzzyPickName(args.join(' '), [...STANCE_CYCLE]);
|
|
27
|
+
if (!picked) {
|
|
28
|
+
return `That's not a stance. Choose: ${STANCE_CYCLE.join(', ')}.`;
|
|
29
|
+
}
|
|
30
|
+
const stance = picked;
|
|
31
|
+
if (stance === actor.autoStance) {
|
|
32
|
+
return `Already ${stance.toUpperCase()} -- ${AutoFight.describe(stance)}.`;
|
|
33
|
+
}
|
|
34
|
+
actor.autoStance = stance;
|
|
35
|
+
this.game?.autoFight?.cancelPending();
|
|
36
|
+
this.scene.updateStatus();
|
|
37
|
+
this.logger.write(`${actor.name} set stance to ${stance}.`);
|
|
38
|
+
return `Stance: ${stance.toUpperCase()} -- ${AutoFight.describe(stance)}.`;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=stance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stance.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/stance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,YAAY,EAAe,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,0HAA0H,CAAC;IAE1J,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,MAAM,KAAK,GAAG;gBACZ,WAAW,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,OAAO,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG;gBACvF,EAAE;gBACF,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;gBACzE,EAAE;gBACF,sGAAsG;aACvG,CAAC;YACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QAED,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC;QAChE,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,gCAAgC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QACpE,CAAC;QAED,MAAM,MAAM,GAAG,MAAqB,CAAC;QACrC,IAAI,MAAM,KAAK,KAAK,CAAC,UAAU,EAAE,CAAC;YAChC,OAAO,WAAW,MAAM,CAAC,WAAW,EAAE,OAAO,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;QAC7E,CAAC;QACD,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;QAC1B,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;QACtC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,kBAAkB,MAAM,GAAG,CAAC,CAAC;QAC5D,OAAO,WAAW,MAAM,CAAC,WAAW,EAAE,OAAO,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;IAC7E,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AttackCommand } from './attack.js';
|
|
2
|
+
import { CombatExchange, IStrikeProfile } from '../utilities/combat-exchange.js';
|
|
3
|
+
import { Player } from '../models/player.js';
|
|
4
|
+
import { NPC } from '../models/npc.js';
|
|
5
|
+
/**
|
|
6
|
+
* Take them alive: the same exchange machinery as attack (opposed roll,
|
|
7
|
+
* retaliation, pacing, movement lock), but the damage lands on the STUN
|
|
8
|
+
* track -- a full track is a live capture, not a kill. The tradeoffs that
|
|
9
|
+
* keep it honest: the strike ignores your gun entirely (bare-hands pool,
|
|
10
|
+
* low base damage, so it's slower than shooting), the target's retaliation
|
|
11
|
+
* is fully lethal, and beating someone far past unconsciousness overflows
|
|
12
|
+
* into their body -- you can still kill someone you meant to capture.
|
|
13
|
+
*/
|
|
14
|
+
export declare class SubdueCommand extends AttackCommand {
|
|
15
|
+
protected static verb: string;
|
|
16
|
+
protected static description: string;
|
|
17
|
+
execute(args?: string[]): Promise<string>;
|
|
18
|
+
protected usesEquippedWeapon(): boolean;
|
|
19
|
+
protected actionVerb(): string;
|
|
20
|
+
protected strikeProfile(exchange: CombatExchange, target: Player | NPC): IStrikeProfile;
|
|
21
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AttackCommand } from './attack.js';
|
|
2
|
+
/**
|
|
3
|
+
* Take them alive: the same exchange machinery as attack (opposed roll,
|
|
4
|
+
* retaliation, pacing, movement lock), but the damage lands on the STUN
|
|
5
|
+
* track -- a full track is a live capture, not a kill. The tradeoffs that
|
|
6
|
+
* keep it honest: the strike ignores your gun entirely (bare-hands pool,
|
|
7
|
+
* low base damage, so it's slower than shooting), the target's retaliation
|
|
8
|
+
* is fully lethal, and beating someone far past unconsciousness overflows
|
|
9
|
+
* into their body -- you can still kill someone you meant to capture.
|
|
10
|
+
*/
|
|
11
|
+
export class SubdueCommand extends AttackCommand {
|
|
12
|
+
static verb = 'subdue';
|
|
13
|
+
static description = 'Take someone down ALIVE -- stun damage with your bare hands. Slower than shooting, they fight back for real, and overdoing it can still kill them.';
|
|
14
|
+
async execute(args = []) {
|
|
15
|
+
// A chokehold needs hands and a neck: no grappling as a Matrix persona
|
|
16
|
+
// or an astral form. (Matrix "non-lethal" is meaningless anyway -- a
|
|
17
|
+
// crashed ice program isn't a corpse; and astral entities are put down
|
|
18
|
+
// with force, not wrestled.)
|
|
19
|
+
if (this.actor.plane !== 'meat') {
|
|
20
|
+
return `You can't grapple anything from here -- subduing takes real hands on a real body.`;
|
|
21
|
+
}
|
|
22
|
+
return super.execute(args);
|
|
23
|
+
}
|
|
24
|
+
usesEquippedWeapon() {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
actionVerb() {
|
|
28
|
+
return 'moves to subdue';
|
|
29
|
+
}
|
|
30
|
+
strikeProfile(exchange, target) {
|
|
31
|
+
const weapon = this.actor.getWeaponProfile();
|
|
32
|
+
return {
|
|
33
|
+
label: 'with a subduing hold',
|
|
34
|
+
// Bare-hands work: the weapon's quality bonus doesn't help you choke
|
|
35
|
+
// someone out, so it comes back off the pool.
|
|
36
|
+
pool: Math.max(0, this.actor.getAttackPool() - weapon.poolBonus + this.actor.consumeEdgeBoost()),
|
|
37
|
+
damageBase: 1 + Math.floor(this.actor.strength / 2),
|
|
38
|
+
soakPool: target.getSoakPool(),
|
|
39
|
+
dealStun: true,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=subdue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subdue.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/subdue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAK5C;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAc,SAAQ,aAAa;IACpC,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,oJAAoJ,CAAC;IAEpL,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,uEAAuE;QACvE,qEAAqE;QACrE,uEAAuE;QACvE,6BAA6B;QAC7B,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;YAChC,OAAO,mFAAmF,CAAC;QAC7F,CAAC;QACD,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAES,kBAAkB;QAC1B,OAAO,KAAK,CAAC;IACf,CAAC;IAES,UAAU;QAClB,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAES,aAAa,CAAC,QAAwB,EAAE,MAAoB;QACpE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;QAC7C,OAAO;YACL,KAAK,EAAE,sBAAsB;YAC7B,qEAAqE;YACrE,8CAA8C;YAC9C,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;YAChG,UAAU,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;YACnD,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE;YAC9B,QAAQ,EAAE,IAAI;SACf,CAAC;IACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Throwing your hands up, as a real mechanical act instead of just talk.
|
|
4
|
+
* The wound-aware AI guidance already nudges a losing NPC toward
|
|
5
|
+
* surrender -- this gives that nudge teeth: the flag it sets is what a
|
|
6
|
+
* GUARDED auto-fighter honors by holding fire (see utilities/auto-fight.ts;
|
|
7
|
+
* an AGGRESSIVE one doesn't have to). Surrendering also breaks the fight:
|
|
8
|
+
* both sides' combat memory clears, so walking away afterwards invites no
|
|
9
|
+
* parting shot. The flag is revoked the moment the surrendered actor
|
|
10
|
+
* initiates violence again (CombatExchange.beginExchange).
|
|
11
|
+
*
|
|
12
|
+
* Works for the player too -- surrendering to an NPC is narrated to the
|
|
13
|
+
* room and lands in the aggressor's AI history; what THEY do with it is
|
|
14
|
+
* up to them.
|
|
15
|
+
*/
|
|
16
|
+
export declare class SurrenderCommand extends Command implements ICommand {
|
|
17
|
+
protected static verb: string;
|
|
18
|
+
protected static description: string;
|
|
19
|
+
execute(_args?: string[]): Promise<string>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Throwing your hands up, as a real mechanical act instead of just talk.
|
|
4
|
+
* The wound-aware AI guidance already nudges a losing NPC toward
|
|
5
|
+
* surrender -- this gives that nudge teeth: the flag it sets is what a
|
|
6
|
+
* GUARDED auto-fighter honors by holding fire (see utilities/auto-fight.ts;
|
|
7
|
+
* an AGGRESSIVE one doesn't have to). Surrendering also breaks the fight:
|
|
8
|
+
* both sides' combat memory clears, so walking away afterwards invites no
|
|
9
|
+
* parting shot. The flag is revoked the moment the surrendered actor
|
|
10
|
+
* initiates violence again (CombatExchange.beginExchange).
|
|
11
|
+
*
|
|
12
|
+
* Works for the player too -- surrendering to an NPC is narrated to the
|
|
13
|
+
* room and lands in the aggressor's AI history; what THEY do with it is
|
|
14
|
+
* up to them.
|
|
15
|
+
*/
|
|
16
|
+
export class SurrenderCommand extends Command {
|
|
17
|
+
static verb = 'surrender';
|
|
18
|
+
static description = 'Throw your hands up and stop fighting. Ends the fight cleanly (no parting shot) -- but whether they honor it is up to them.';
|
|
19
|
+
async execute(_args = []) {
|
|
20
|
+
const actor = this.actor;
|
|
21
|
+
if (actor.isIncapacitated()) {
|
|
22
|
+
return `You're down. There's nothing left to surrender.`;
|
|
23
|
+
}
|
|
24
|
+
if (actor.surrendered) {
|
|
25
|
+
return `Your hands are already up.`;
|
|
26
|
+
}
|
|
27
|
+
if (actor.inExchange) {
|
|
28
|
+
return `Lead is flying -- wait for the exchange to resolve, then surrender in the lull.`;
|
|
29
|
+
}
|
|
30
|
+
actor.surrendered = true;
|
|
31
|
+
// Break the fight both ways: no parting shot for walking away from a
|
|
32
|
+
// surrender, and the opponent's own combat memory of you clears too.
|
|
33
|
+
const opponent = actor.combatOpponent;
|
|
34
|
+
if (opponent && opponent.combatOpponent === actor) {
|
|
35
|
+
opponent.combatOpponent = undefined;
|
|
36
|
+
}
|
|
37
|
+
actor.combatOpponent = undefined;
|
|
38
|
+
actor.performAction('surrenders', 'hands up, weapon lowered');
|
|
39
|
+
this.scene.addWorldEvent(`${actor.name} surrendered in ${actor.currentLocation?.name ?? 'the field'}.`);
|
|
40
|
+
this.logger.write(`${actor.name} surrendered.`);
|
|
41
|
+
this.scene.updateStatus();
|
|
42
|
+
return `You raise your hands -- the fight is over, as far as you're concerned. Whether they honor it is up to them.`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=surrender.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surrender.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/surrender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,gBAAiB,SAAQ,OAAO;IACjC,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,MAAM,CAAC,WAAW,GAAG,6HAA6H,CAAC;IAE7J,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IAAI,KAAK,CAAC,eAAe,EAAE,EAAE,CAAC;YAC5B,OAAO,iDAAiD,CAAC;QAC3D,CAAC;QACD,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACtB,OAAO,4BAA4B,CAAC;QACtC,CAAC;QACD,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO,iFAAiF,CAAC;QAC3F,CAAC;QAED,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;QAEzB,qEAAqE;QACrE,qEAAqE;QACrE,MAAM,QAAQ,GAAG,KAAK,CAAC,cAAc,CAAC;QACtC,IAAI,QAAQ,IAAI,QAAQ,CAAC,cAAc,KAAK,KAAK,EAAE,CAAC;YAClD,QAAQ,CAAC,cAAc,GAAG,SAAS,CAAC;QACtC,CAAC;QACD,KAAK,CAAC,cAAc,GAAG,SAAS,CAAC;QAEjC,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE,0BAA0B,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,IAAI,mBAAmB,KAAK,CAAC,eAAe,EAAE,IAAI,IAAI,WAAW,GAAG,CAAC,CAAC;QACxG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,eAAe,CAAC,CAAC;QAChD,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAE1B,OAAO,6GAA6G,CAAC;IACvH,CAAC"}
|
|
@@ -3,5 +3,13 @@ export declare class TakeCommand 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
|
+
* Sweeps the room: every item "search" would list, attempted one by one
|
|
8
|
+
* -- an item too heavy to carry is reported and skipped rather than
|
|
9
|
+
* blocking the rest of the haul. Ownership world events and the
|
|
10
|
+
* win-condition check fire per item, exactly as a one-at-a-time pickup
|
|
11
|
+
* would.
|
|
12
|
+
*/
|
|
13
|
+
private takeAll;
|
|
6
14
|
private take;
|
|
7
15
|
}
|
|
@@ -1,13 +1,69 @@
|
|
|
1
1
|
import { Command } from './command.js';
|
|
2
2
|
export class TakeCommand extends Command {
|
|
3
3
|
static verb = 'take';
|
|
4
|
-
static description = 'Pick up an item.';
|
|
4
|
+
static description = 'Pick up an item. "take all" sweeps everything here -- but only after you have searched the room.';
|
|
5
5
|
async execute(args) {
|
|
6
6
|
if (!args)
|
|
7
7
|
return '';
|
|
8
8
|
this.logger.write(`Attempting 'Take' command with item: ${args?.join(' ')}`);
|
|
9
|
+
const wanted = args.join(' ').toLowerCase().trim();
|
|
10
|
+
if (wanted === 'all' || wanted === 'everything') {
|
|
11
|
+
return this.takeAll();
|
|
12
|
+
}
|
|
9
13
|
return this.take(args);
|
|
10
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Sweeps the room: every item "search" would list, attempted one by one
|
|
17
|
+
* -- an item too heavy to carry is reported and skipped rather than
|
|
18
|
+
* blocking the rest of the haul. Ownership world events and the
|
|
19
|
+
* win-condition check fire per item, exactly as a one-at-a-time pickup
|
|
20
|
+
* would.
|
|
21
|
+
*/
|
|
22
|
+
takeAll() {
|
|
23
|
+
const room = this.actor.currentLocation;
|
|
24
|
+
// You sweep what you've SEEN: "take all" only works after this actor
|
|
25
|
+
// has actually searched this room. (When perception checks arrive,
|
|
26
|
+
// this same gate narrows further to what the search roll revealed.)
|
|
27
|
+
if (!room.searchedBy.has(this.actor.name)) {
|
|
28
|
+
return `You haven't cased this place yet -- "search" first, then sweep what you find.`;
|
|
29
|
+
}
|
|
30
|
+
// Your plane's items only: an astral form can SEE the meat world's
|
|
31
|
+
// gear but its hands pass straight through; a Matrix persona sweeps
|
|
32
|
+
// files, not furniture.
|
|
33
|
+
if (this.actor.plane === 'astral') {
|
|
34
|
+
return `Your hands pass through everything here -- the astral can look, not carry.`;
|
|
35
|
+
}
|
|
36
|
+
const items = [...room.inventory.getAllItems()].filter(i => i.plane === this.actor.plane);
|
|
37
|
+
if (items.length === 0) {
|
|
38
|
+
return `There's nothing here to take.`;
|
|
39
|
+
}
|
|
40
|
+
this.actor.performAction('take', 'everything in the room');
|
|
41
|
+
const lines = [`You sweep ${room.name}:`];
|
|
42
|
+
let tookAnything = false;
|
|
43
|
+
for (const item of items) {
|
|
44
|
+
try {
|
|
45
|
+
this.actor.addInventory(item);
|
|
46
|
+
room.inventory.removeItem(item.name);
|
|
47
|
+
tookAnything = true;
|
|
48
|
+
this.logger.write(`take all: ${this.actor.name} took "${item.name}" from ${room.name}.`);
|
|
49
|
+
lines.push(` • took the ${item.name}`);
|
|
50
|
+
if (item.owner && item.owner !== this.actor.name) {
|
|
51
|
+
this.scene.addWorldEvent(`${this.actor.name} took ${item.name} (belonging to ${item.owner}) from ${room.name}.`);
|
|
52
|
+
}
|
|
53
|
+
if (!this.scene.isWinConditionTarget(this.actor.name)) {
|
|
54
|
+
this.scene.checkWinCondition(item.name, this.actor.name);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
this.logger.write(`take all: "${item.name}" too heavy for ${this.actor.name}.`);
|
|
59
|
+
lines.push(` • the ${item.name} is too heavy to carry -- left it`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (tookAnything) {
|
|
63
|
+
this.scene.updateInventory(this.scene.getPlayer().inventory);
|
|
64
|
+
}
|
|
65
|
+
return lines.join('\n');
|
|
66
|
+
}
|
|
11
67
|
take(args) {
|
|
12
68
|
const itemName = args?.join(' ').toLowerCase();
|
|
13
69
|
const room = this.actor.currentLocation;
|
|
@@ -22,14 +78,37 @@ export class TakeCommand extends Command {
|
|
|
22
78
|
this.logger.write(`Item "${itemName}" not retrieved from ${room.name} room's inventory during 'Take' command.`);
|
|
23
79
|
return `There is no item "${itemName}" in this room.`;
|
|
24
80
|
}
|
|
81
|
+
// Plane gate, same as takeAll: astral hands can't carry, and you can
|
|
82
|
+
// only take what exists on YOUR plane (paydata needs a jacked-in
|
|
83
|
+
// persona; a gun needs a meat hand).
|
|
84
|
+
if (this.actor.plane === 'astral') {
|
|
85
|
+
return `Your hand passes straight through the ${itemName} -- the astral can look, not carry.`;
|
|
86
|
+
}
|
|
87
|
+
if (item.plane !== this.actor.plane) {
|
|
88
|
+
return item.plane === 'matrix'
|
|
89
|
+
? `The ${itemName} is DATA -- it only exists on the grid. Jack in to take it.`
|
|
90
|
+
: `The ${itemName} isn't reachable from this plane.`;
|
|
91
|
+
}
|
|
25
92
|
// Try adding the item to the player's inventory
|
|
26
93
|
try {
|
|
27
94
|
this.actor.performAction('take', itemName);
|
|
28
95
|
this.actor.addInventory(item);
|
|
29
96
|
this.logger.write(`Successfully added "${itemName}" to ${this.actor.name}'s inventory during 'Take' command.`);
|
|
97
|
+
if (item.owner && item.owner !== this.actor.name) {
|
|
98
|
+
this.scene.addWorldEvent(`${this.actor.name} took ${item.name} (belonging to ${item.owner}) from ${room.name}.`);
|
|
99
|
+
}
|
|
30
100
|
// Remove item from room's inventory
|
|
31
101
|
room.inventory.removeItem(itemName);
|
|
32
102
|
this.logger.write(`Successfully removed "${itemName}" from ${room.name} room's inventory during 'Take' command.`);
|
|
103
|
+
// Possession-based win condition: if some OTHER actor ends up with
|
|
104
|
+
// the item the win condition's target NPC wants, that counts just as
|
|
105
|
+
// much as the player handing it over directly (emergent delivery).
|
|
106
|
+
// But the target NPC grabbing their own reward off the floor doesn't
|
|
107
|
+
// count -- that's the job-giver completing their own job, not a
|
|
108
|
+
// genuine hand-off.
|
|
109
|
+
if (!this.scene.isWinConditionTarget(this.actor.name)) {
|
|
110
|
+
this.scene.checkWinCondition(item.name, this.actor.name);
|
|
111
|
+
}
|
|
33
112
|
return `You have taken the ${itemName}.`;
|
|
34
113
|
}
|
|
35
114
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"take.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/take.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"take.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/take.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,kGAAkG,CAAC;IAElI,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC,IAAI,EAAE,IAAI,CAAC,GAAG,CA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AO,EAAE,CAAC,CAAC;YACnE,OAAO,aAAa,QAAQ,0BAA0B,CAAC;QACzD,CAAC;IACH,CAAC"}
|
|
@@ -42,6 +42,7 @@ export class UnlockCommand extends Command {
|
|
|
42
42
|
const unlockMessage = room.attemptUnlockExit(direction, key.name);
|
|
43
43
|
this.logger.write(`UnlockCommand: ${this.actor.name} attempted to unlock ${direction}. Result: ${unlockMessage}`);
|
|
44
44
|
this.actor.performAction('unlocked', unlockMessage);
|
|
45
|
+
this.scene.addWorldEvent(`${this.actor.name} unlocked the ${direction} door in ${room.name}.`);
|
|
45
46
|
this.scene.updateExits(room);
|
|
46
47
|
return unlockMessage;
|
|
47
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unlock.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/unlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,gBAAgB,CAAC;IAEhD,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAEO,MAAM,CAAC,IAAc;QAC3B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;YACzD,OAAO,+CAA+C,CAAC;QACzD,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,gCAAgC;QAC7E,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;QAExC,oCAAoC;QACpC,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