@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 @@
|
|
|
1
|
+
{"version":3,"file":"edge.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,yGAAyG,CAAC;IAEzI,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IAAI,KAAK,CAAC,eAAe,EAAE,EAAE,CAAC;YAC5B,OAAO,8CAA8C,CAAC;QACxD,CAAC;QACD,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;YACzB,OAAO,qDAAqD,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,IAAI,oBAAoB,CAAC;QACpH,CAAC;QACD,IAAI,KAAK,CAAC,aAAa,IAAI,CAAC,EAAE,CAAC;YAC7B,OAAO,2EAA2E,CAAC;QACrF,CAAC;QAED,KAAK,CAAC,aAAa,IAAI,CAAC,CAAC;QACzB,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,0BAA0B,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,IAAI,SAAS,CAAC,CAAC;QACrG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAE1B,OAAO,kFAAkF,KAAK,CAAC,IAAI,WAAW,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,IAAI,uBAAuB,CAAC;IACzK,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { NPC } from '../models/npc.js';
|
|
3
|
+
import { CALL_ICON, CALL_COLOR } from '../utilities/comm-style.js';
|
|
4
|
+
export class EndCallCommand extends Command {
|
|
5
|
+
static verb = 'end-call';
|
|
6
|
+
static description = 'Hang up your current commlink call.';
|
|
7
|
+
async execute() {
|
|
8
|
+
const partner = this.actor.activeCallPartner;
|
|
9
|
+
if (!partner) {
|
|
10
|
+
return `You're not on a call.`;
|
|
11
|
+
}
|
|
12
|
+
this.actor.activeCallPartner = undefined;
|
|
13
|
+
partner.activeCallPartner = undefined;
|
|
14
|
+
this.actor.performAction('ends call', partner.name);
|
|
15
|
+
this.logger.write(`${this.actor.name} ends the call with ${partner.name}.`);
|
|
16
|
+
// Only a player-typed command's own return value reaches the screen
|
|
17
|
+
// through ui.ts's normal response pipeline -- an NPC ending the call on
|
|
18
|
+
// its own initiative (via recursiveReflect) would otherwise leave the
|
|
19
|
+
// player watching a call that quietly went nowhere, with no way to
|
|
20
|
+
// tell it was actually over. Announce it directly in that case.
|
|
21
|
+
if (this.actor instanceof NPC && partner === this.scene.getPlayer()) {
|
|
22
|
+
this.logger.logWithColor(`${CALL_ICON} ${this.actor.name} ends the call.`, CALL_COLOR);
|
|
23
|
+
}
|
|
24
|
+
return `{${CALL_COLOR}-fg}${CALL_ICON} You end the call with ${partner.name}.{/${CALL_COLOR}-fg}`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=end-call.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"end-call.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/end-call.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,OAAO,cAAe,SAAQ,OAAO;IAC/B,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,MAAM,CAAC,WAAW,GAAG,qCAAqC,CAAC;IAErE,KAAK,CAAC,OAAO;QACX,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC;QAC7C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,uBAAuB,CAAC;QACjC,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,iBAAiB,GAAG,SAAS,CAAC;QACzC,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;QAEtC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,uBAAuB,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC;QAE5E,oEAAoE;QACpE,wEAAwE;QACxE,sEAAsE;QACtE,mEAAmE;QACnE,gEAAgE;QAChE,IAAI,IAAI,CAAC,KAAK,YAAY,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,CAAC;YACpE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,iBAAiB,EAAE,UAAU,CAAC,CAAC;QACzF,CAAC;QAED,OAAO,IAAI,UAAU,OAAO,SAAS,0BAA0B,OAAO,CAAC,IAAI,MAAM,UAAU,MAAM,CAAC;IACpG,CAAC"}
|
|
@@ -4,4 +4,8 @@ export declare class EquipCommand extends Command implements ICommand {
|
|
|
4
4
|
protected static description: string;
|
|
5
5
|
execute(args: string[]): Promise<string>;
|
|
6
6
|
private equip;
|
|
7
|
+
/** The no-slot explanation for kit devices, or null for wearable gear. */
|
|
8
|
+
private static kitDeviceNote;
|
|
9
|
+
/** Resolves "equip deck"/"cyberdeck"/"drone" to the carried kit device's note. */
|
|
10
|
+
private resolveKitDevice;
|
|
7
11
|
}
|
|
@@ -20,6 +20,15 @@ export class EquipCommand extends Command {
|
|
|
20
20
|
}
|
|
21
21
|
const results = [];
|
|
22
22
|
for (const item of items) {
|
|
23
|
+
// Kit devices are never worn -- they work straight from the bag.
|
|
24
|
+
// Answer with HOW they work instead of a slot error (a real
|
|
25
|
+
// session's "equip all" told the player their new cyberdeck
|
|
26
|
+
// "could not be equipped", which read as broken).
|
|
27
|
+
const kitNote = EquipCommand.kitDeviceNote(item.category, item.name);
|
|
28
|
+
if (kitNote) {
|
|
29
|
+
results.push(kitNote);
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
23
32
|
if (this.actor.canEquip(item)) {
|
|
24
33
|
const slotInfo = this.actor.determineEquipmentSlot(item.category);
|
|
25
34
|
if (slotInfo) {
|
|
@@ -45,6 +54,12 @@ export class EquipCommand extends Command {
|
|
|
45
54
|
}
|
|
46
55
|
// EQUIP ONE
|
|
47
56
|
const itemName = input;
|
|
57
|
+
// "equip deck" / "equip cyberdeck" / "equip drone": these are kit
|
|
58
|
+
// devices with no slot -- resolve by category keyword and explain how
|
|
59
|
+
// they actually work rather than failing the name lookup.
|
|
60
|
+
const kitKeyword = this.resolveKitDevice(itemName);
|
|
61
|
+
if (kitKeyword)
|
|
62
|
+
return kitKeyword;
|
|
48
63
|
let itemToEquip = this.actor.inventory.getItem(itemName);
|
|
49
64
|
// If not in inventory, try to grab from the room (single-item only)
|
|
50
65
|
if (!itemToEquip) {
|
|
@@ -60,10 +75,35 @@ export class EquipCommand extends Command {
|
|
|
60
75
|
return `You don't have "${itemName}" and it's not in the room either.`;
|
|
61
76
|
}
|
|
62
77
|
}
|
|
78
|
+
// Named the kit device outright ("equip Novatech Navigator")? Same
|
|
79
|
+
// helpful answer as the keyword path.
|
|
80
|
+
const kitNote = EquipCommand.kitDeviceNote(itemToEquip.category, itemToEquip.name);
|
|
81
|
+
if (kitNote)
|
|
82
|
+
return kitNote;
|
|
63
83
|
this.actor.performAction('equip', itemToEquip.name);
|
|
64
84
|
const equipResponse = this.actor.equip(itemToEquip);
|
|
65
85
|
this.logger.write(`EquipCommand: ${equipResponse}`);
|
|
66
86
|
return equipResponse;
|
|
67
87
|
}
|
|
88
|
+
/** The no-slot explanation for kit devices, or null for wearable gear. */
|
|
89
|
+
static kitDeviceNote(category, name) {
|
|
90
|
+
if (category === Category.Cyberdeck) {
|
|
91
|
+
return `The ${name} doesn't wear -- it works from your kit. "jack in" when you're ready to ride it, "pan" to see your network.`;
|
|
92
|
+
}
|
|
93
|
+
if (category === Category.Drone) {
|
|
94
|
+
return `The ${name} doesn't wear -- it launches from your kit. "drone" to send it scouting.`;
|
|
95
|
+
}
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
/** Resolves "equip deck"/"cyberdeck"/"drone" to the carried kit device's note. */
|
|
99
|
+
resolveKitDevice(input) {
|
|
100
|
+
const wants = (cat, keywords) => {
|
|
101
|
+
if (!keywords.includes(input))
|
|
102
|
+
return null;
|
|
103
|
+
const item = this.actor.inventory.getAllItems().find(i => i.category === cat);
|
|
104
|
+
return item ? EquipCommand.kitDeviceNote(item.category, item.name) : null;
|
|
105
|
+
};
|
|
106
|
+
return wants(Category.Cyberdeck, ['deck', 'cyberdeck']) ?? wants(Category.Drone, ['drone']);
|
|
107
|
+
}
|
|
68
108
|
}
|
|
69
109
|
//# sourceMappingURL=equip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equip.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/equip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,MAAM,OAAO,YAAa,SAAQ,OAAO;IAC7B,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;IACtB,MAAM,CAAC,WAAW,GAAG,gDAAgD,CAAC;IAEhF,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAEO,KAAK,CAAC,IAAc;QAC1B,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAEnD,YAAY;QACZ,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;YACpB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;YACjD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACvB,OAAO,4BAA4B,CAAC;YACtC,CAAC;YAED,MAAM,OAAO,GAAa,EAAE,CAAC;YAE7B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC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CAAC;IACvB,CAAC;IAED,0EAA0E;IAClE,MAAM,CAAC,aAAa,CAAC,QAAgB,EAAE,IAAY;QACzD,IAAI,QAAQ,KAAK,QAAQ,CAAC,SAAS,EAAE,CAAC;YACpC,OAAO,OAAO,IAAI,6GAA6G,CAAC;QAClI,CAAC;QACD,IAAI,QAAQ,KAAK,QAAQ,CAAC,KAAK,EAAE,CAAC;YAChC,OAAO,OAAO,IAAI,0EAA0E,CAAC;QAC/F,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kFAAkF;IAC1E,gBAAgB,CAAC,KAAa;QACpC,MAAM,KAAK,GAAG,CAAC,GAAa,EAAE,QAAkB,EAAE,EAAE;YAClD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAC;YAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,GAAG,CAAC,CAAC;YAC9E,OAAO,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC5E,CAAC,CAAC;QACF,OAAO,KAAK,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9F,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* On-demand equipment panel, replacing the always-on blessed sidebar box.
|
|
4
|
+
* Beyond the raw slot listing the old box showed, this also surfaces the
|
|
5
|
+
* combat numbers the gear actually derives to (weapon damage/dice, armor
|
|
6
|
+
* soak) -- the panel should answer "how ready for a fight am I", not just
|
|
7
|
+
* "what am I wearing". Registered as both "equipment" and "eq".
|
|
8
|
+
*/
|
|
9
|
+
export declare class EquipmentCommand extends Command implements ICommand {
|
|
10
|
+
protected static verb: string;
|
|
11
|
+
protected static description: string;
|
|
12
|
+
execute(_args?: string[]): Promise<string>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* On-demand equipment panel, replacing the always-on blessed sidebar box.
|
|
4
|
+
* Beyond the raw slot listing the old box showed, this also surfaces the
|
|
5
|
+
* combat numbers the gear actually derives to (weapon damage/dice, armor
|
|
6
|
+
* soak) -- the panel should answer "how ready for a fight am I", not just
|
|
7
|
+
* "what am I wearing". Registered as both "equipment" and "eq".
|
|
8
|
+
*/
|
|
9
|
+
export class EquipmentCommand extends Command {
|
|
10
|
+
static verb = 'equipment';
|
|
11
|
+
static description = "What you're wearing and wielding, with the combat numbers it adds up to.";
|
|
12
|
+
async execute(_args = []) {
|
|
13
|
+
const actor = this.actor;
|
|
14
|
+
const equipment = actor.equipment;
|
|
15
|
+
const lines = ['=== EQUIPMENT ==='];
|
|
16
|
+
// The derived numbers first -- they're what the player is usually
|
|
17
|
+
// actually asking.
|
|
18
|
+
const weapon = actor.getWeaponProfile();
|
|
19
|
+
const weaponItem = actor.equipment.rightHand?.weapon ?? actor.equipment.leftHand?.weapon;
|
|
20
|
+
const ammoNote = weaponItem?.isFirearm() ? ` -- ${weaponItem.ammo}/${10} rounds${weaponItem.ammo === 0 ? ' (DRY -- "reload")' : ''}` : '';
|
|
21
|
+
lines.push(`Weapon: ${weapon.name} -- damage ${weapon.damage}${weapon.poolBonus > 0 ? `, +${weapon.poolBonus} attack dice` : ''}${ammoNote}`);
|
|
22
|
+
const armor = actor.getArmorValue();
|
|
23
|
+
lines.push(`Armor: +${armor} soak dice${actor.sustainedArmor > 0 ? ` (+${actor.sustainedArmor} more from the sustained armor spell)` : ''}`);
|
|
24
|
+
lines.push('');
|
|
25
|
+
let anythingEquipped = false;
|
|
26
|
+
for (const [groupName, group] of Object.entries(equipment)) {
|
|
27
|
+
if (!group)
|
|
28
|
+
continue;
|
|
29
|
+
const equipped = Object.entries(group)
|
|
30
|
+
.filter(([, item]) => item !== null)
|
|
31
|
+
.map(([slot, item]) => ` ${groupName}.${slot}: ${item.name}`);
|
|
32
|
+
if (equipped.length > 0) {
|
|
33
|
+
anythingEquipped = true;
|
|
34
|
+
lines.push(...equipped);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (!anythingEquipped) {
|
|
38
|
+
lines.push(`Nothing equipped -- bare fists and street clothes. "equip <item>" to fix that.`);
|
|
39
|
+
}
|
|
40
|
+
return lines.join('\n');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=equipment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equipment.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/equipment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAGjD;;;;;;GAMG;AACH,MAAM,OAAO,gBAAiB,SAAQ,OAAO;IACjC,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,MAAM,CAAC,WAAW,GAAG,0EAA0E,CAAC;IAE1G,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QAClC,MAAM,KAAK,GAAa,CAAC,mBAAmB,CAAC,CAAC;QAE9C,kEAAkE;QAClE,mBAAmB;QACnB,MAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,EAAE,CAAC;QACxC,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC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,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACxB,gBAAgB,GAAG,IAAI,CAAC;gBACxB,KAAK,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;QAED,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,CAAC,gFAAgF,CAAC,CAAC;QAC/F,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -49,9 +49,15 @@ export class GiveCommand extends Command {
|
|
|
49
49
|
this.actor.performAction('did not give', `item cannot be given`);
|
|
50
50
|
return `You cannot give that item away`;
|
|
51
51
|
}
|
|
52
|
-
this.scene.updateInventory(
|
|
52
|
+
this.scene.updateInventory(this.scene.getPlayer().inventory);
|
|
53
53
|
this.actor.performAction('give', `${item.name} to ${recipient.name}`);
|
|
54
54
|
this.logger.write(`${this.actor.name} gave item "${item.name}" to ${recipient.name}`);
|
|
55
|
+
// Possession-based, not actor-based: whether the player handed it over
|
|
56
|
+
// or an NPC grabbed it on their own initiative (via take.ts), the
|
|
57
|
+
// target NPC ending up with it is what completes the job. The
|
|
58
|
+
// completion banner announces itself directly to the screen, since the
|
|
59
|
+
// trigger here might not even be the player's own action.
|
|
60
|
+
this.scene.checkWinCondition(item.name, recipient.name);
|
|
55
61
|
return `You gave ${item.name} to ${recipient.name}.`;
|
|
56
62
|
}
|
|
57
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"give.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/give.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,mCAAmC,CAAC;IAEnE,KAAK,CAAC,O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AkE;QAClE,8DAA8D;QAC9D,uEAAuE;QACvE,0DAA0D;QAC1D,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QAExD,OAAO,YAAY,IAAI,CAAC,IAAI,OAAO,SAAS,CAAC,IAAI,GAAG,CAAC;IACvD,CAAC"}
|
|
@@ -3,5 +3,16 @@ export declare class GoCommand 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
|
+
* Walking out on a live, recent combat opponent who's still in the room
|
|
8
|
+
* hands them one unanswered strike at your back. Survive it and the
|
|
9
|
+
* fight is considered broken (both sides' opponent link clears -- no
|
|
10
|
+
* second toll without a fresh exchange); drop, and you never make the
|
|
11
|
+
* door. Applies to fleeing NPCs just the same. Returns the terminal
|
|
12
|
+
* result when movement is cancelled (the fleer went down), else null.
|
|
13
|
+
*/
|
|
14
|
+
private resolvePartingShot;
|
|
6
15
|
private go;
|
|
16
|
+
/** Wards block astral forms and nothing else. Returns the refusal, or null. */
|
|
17
|
+
private checkWard;
|
|
7
18
|
}
|
|
@@ -1,19 +1,108 @@
|
|
|
1
1
|
import { Door } from '../models/door.js';
|
|
2
|
+
import { CombatExchange } from '../utilities/combat-exchange.js';
|
|
2
3
|
import { Command } from './command.js';
|
|
3
4
|
export class GoCommand extends Command {
|
|
4
5
|
static verb = 'go';
|
|
5
|
-
static description = 'Move in the specified direction.';
|
|
6
|
+
static description = 'Move in the specified direction. Fleeing someone you just fought hands them one free parting shot.';
|
|
6
7
|
async execute(args) {
|
|
7
8
|
if (!args)
|
|
8
9
|
return '';
|
|
9
10
|
this.logger.write(`${this.actor.name} is attempting 'Go' command with direction: ${args?.join(' ')}`);
|
|
10
11
|
return this.go(args);
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Walking out on a live, recent combat opponent who's still in the room
|
|
15
|
+
* hands them one unanswered strike at your back. Survive it and the
|
|
16
|
+
* fight is considered broken (both sides' opponent link clears -- no
|
|
17
|
+
* second toll without a fresh exchange); drop, and you never make the
|
|
18
|
+
* door. Applies to fleeing NPCs just the same. Returns the terminal
|
|
19
|
+
* result when movement is cancelled (the fleer went down), else null.
|
|
20
|
+
*/
|
|
21
|
+
async resolvePartingShot() {
|
|
22
|
+
const fleer = this.actor;
|
|
23
|
+
const opponent = fleer.combatOpponent;
|
|
24
|
+
if (!opponent)
|
|
25
|
+
return null;
|
|
26
|
+
const RECENT_MS = 60_000;
|
|
27
|
+
const engaged = Date.now() - fleer.lastExchangeAt < RECENT_MS &&
|
|
28
|
+
!opponent.isIncapacitated() &&
|
|
29
|
+
opponent.currentLocation === fleer.currentLocation;
|
|
30
|
+
// Either way, walking is what breaks the engagement.
|
|
31
|
+
fleer.combatOpponent = undefined;
|
|
32
|
+
opponent.combatOpponent = undefined;
|
|
33
|
+
if (!engaged)
|
|
34
|
+
return null;
|
|
35
|
+
const exchange = new CombatExchange(this.scene, this.logger, opponent);
|
|
36
|
+
const lines = [
|
|
37
|
+
`${opponent.name} takes a parting shot as ${fleer.name} breaks for the exit!`,
|
|
38
|
+
...exchange.resolveStrike(opponent, fleer),
|
|
39
|
+
];
|
|
40
|
+
await exchange.announce(lines);
|
|
41
|
+
this.scene.addWorldEvent(`${opponent.name} fired on ${fleer.name} as they fled ${fleer.currentLocation.name}.`);
|
|
42
|
+
this.scene.updateStatus();
|
|
43
|
+
if (fleer.isDown()) {
|
|
44
|
+
const death = await exchange.resolveDeath(fleer, opponent, {
|
|
45
|
+
fallLine: fleer === this.scene.getPlayer()
|
|
46
|
+
? `The shot catches you square in the back. The door was two steps away.`
|
|
47
|
+
: `${fleer.name} drops mid-stride, two steps from the door. Their gear scatters across ${fleer.currentLocation.name}.`,
|
|
48
|
+
});
|
|
49
|
+
return exchange.finishExchange([...lines, ...death]);
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
async go(args) {
|
|
13
54
|
if (args.length === 0) {
|
|
14
55
|
this.logger.write(`${this.actor.name}'s 'Go' command failed: No direction specified.`);
|
|
15
56
|
return 'Please specify a direction to go.';
|
|
16
57
|
}
|
|
58
|
+
// No walking out from between the narration beats of a combat exchange
|
|
59
|
+
// you're part of (see CombatExchange.beginExchange) -- found via a real
|
|
60
|
+
// session where the player slipped rooms mid-exchange. The pause
|
|
61
|
+
// BETWEEN exchanges is the window to run.
|
|
62
|
+
// Applies to every combatant, NPCs included -- an NPC's AI loop firing
|
|
63
|
+
// "go" while its own exchange still resolves is how a fleeing target
|
|
64
|
+
// once got shot mid-exchange by interleaved resolutions.
|
|
65
|
+
if (this.actor.inExchange || (this.actor === this.scene.getPlayer() && this.scene.isPlayerExchangeActive())) {
|
|
66
|
+
// The player is refused (they can retype in the lull). An NPC's flee
|
|
67
|
+
// attempt instead WAITS for the lull and then goes -- its AI decides
|
|
68
|
+
// to run exactly once, mid-exchange, and discarding that meant a
|
|
69
|
+
// wounded NPC trying to disengage just stood there forever while the
|
|
70
|
+
// player wondered why the fight had stalled (see
|
|
71
|
+
// CombatExchange.waitForLull). The parting-shot toll below still
|
|
72
|
+
// applies when they finally make their break.
|
|
73
|
+
if (this.actor === this.scene.getPlayer()) {
|
|
74
|
+
this.logger.write(`GoCommand: ${this.actor.name} tried to move mid-exchange -- blocked.`);
|
|
75
|
+
return `Lead is flying -- you can't disengage until the exchange resolves. (The lull after it is your chance to run.)`;
|
|
76
|
+
}
|
|
77
|
+
if (this.actor.waitingForLull) {
|
|
78
|
+
return `You're already waiting for an opening -- one move at a time.`;
|
|
79
|
+
}
|
|
80
|
+
this.actor.waitingForLull = true;
|
|
81
|
+
try {
|
|
82
|
+
const settled = await CombatExchange.waitForLull([this.actor]);
|
|
83
|
+
if (!settled) {
|
|
84
|
+
this.logger.write(`GoCommand: ${this.actor.name} tried to move mid-exchange -- blocked (wait timed out).`);
|
|
85
|
+
return `Lead is flying -- you can't disengage until the exchange resolves. (The lull after it is your chance to run.)`;
|
|
86
|
+
}
|
|
87
|
+
if (this.actor.isIncapacitated()) {
|
|
88
|
+
return `You're down. You aren't going anywhere.`;
|
|
89
|
+
}
|
|
90
|
+
this.logger.write(`GoCommand: ${this.actor.name} waited out an exchange and now makes their move.`);
|
|
91
|
+
return await this.go(args);
|
|
92
|
+
}
|
|
93
|
+
finally {
|
|
94
|
+
this.actor.waitingForLull = false;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// Disengaging isn't free: walking out on a live, recent opponent who's
|
|
98
|
+
// still in the room hands them one unanswered PARTING SHOT at your
|
|
99
|
+
// back. Survive it and you're gone (the fight is considered broken --
|
|
100
|
+
// no second toll if you come back and flee again without a new
|
|
101
|
+
// exchange); drop, and you never make the door. Applies to fleeing
|
|
102
|
+
// NPCs just the same.
|
|
103
|
+
const partingShot = await this.resolvePartingShot();
|
|
104
|
+
if (partingShot)
|
|
105
|
+
return partingShot;
|
|
17
106
|
const direction = args[0].toLowerCase();
|
|
18
107
|
if (!this.isValidDirection(direction)) {
|
|
19
108
|
this.logger.write(`${this.actor.name} attempted to go ${direction} which is not valid.`);
|
|
@@ -31,7 +120,11 @@ export class GoCommand extends Command {
|
|
|
31
120
|
}
|
|
32
121
|
// If it's a Door, determine the target room
|
|
33
122
|
if (exit instanceof Door) {
|
|
34
|
-
|
|
123
|
+
// Locks are a MEAT problem: an astral form drifts through the
|
|
124
|
+
// physical door, a Matrix persona rides the grid past it. Wards are
|
|
125
|
+
// the astral's locks (checked below); nodes gate nothing for
|
|
126
|
+
// movement -- the grid overlays everything.
|
|
127
|
+
if (exit.checkIfLocked() && this.actor.plane === 'meat') {
|
|
35
128
|
this.actor.performAction('is prevented by locked door', currentRoom.name);
|
|
36
129
|
return `The door in the direction "${direction}" is locked.`;
|
|
37
130
|
}
|
|
@@ -41,6 +134,9 @@ export class GoCommand extends Command {
|
|
|
41
134
|
this.logger.error(`${this.actor.name} 'Go' command failed: Unable to determine the other side of the door.`);
|
|
42
135
|
return 'There seems to be an error with the door you\'re trying to go through.';
|
|
43
136
|
}
|
|
137
|
+
const wardBlock = this.checkWard(targetRoom);
|
|
138
|
+
if (wardBlock)
|
|
139
|
+
return wardBlock;
|
|
44
140
|
this.actor.performAction('exits', `${this.actor.currentLocation.name} to ${targetRoom.name}`);
|
|
45
141
|
this.actor.currentLocation = targetRoom; // Update player's location
|
|
46
142
|
this.actor.performAction('enters', targetRoom.name);
|
|
@@ -52,12 +148,27 @@ export class GoCommand extends Command {
|
|
|
52
148
|
this.logger.error(`${this.actor.name} 'Go' command failed: Room "${exit}" not found.`);
|
|
53
149
|
return 'There seems to be an error with the room you\'re trying to go to.';
|
|
54
150
|
}
|
|
151
|
+
const wardBlock = this.checkWard(nextRoom);
|
|
152
|
+
if (wardBlock)
|
|
153
|
+
return wardBlock;
|
|
55
154
|
this.actor.currentLocation = nextRoom;
|
|
56
155
|
this.actor.performAction('enters', nextRoom.name);
|
|
57
156
|
}
|
|
58
|
-
|
|
157
|
+
// Astral movement accrues the snap-back debt (see planes.ts).
|
|
158
|
+
if (this.actor.plane === 'astral') {
|
|
159
|
+
this.actor.astralTicks += 1;
|
|
160
|
+
}
|
|
161
|
+
this.logger.write(`${this.actor.name} moved to room: ${this.actor.currentLocation.name || 'Unnamed room'} (${this.actor.plane}).`);
|
|
59
162
|
// Use the LookCommand to get the description of the new room
|
|
60
163
|
return this.actor.currentLocation.description;
|
|
61
164
|
}
|
|
165
|
+
/** Wards block astral forms and nothing else. Returns the refusal, or null. */
|
|
166
|
+
checkWard(target) {
|
|
167
|
+
if (this.actor.plane === 'astral' && target.warded) {
|
|
168
|
+
this.actor.performAction('is repelled by a ward', target.name);
|
|
169
|
+
return `A ward seals ${target.name} -- the barrier flares at your touch and holds. No astral form passes without tearing it down.`;
|
|
170
|
+
}
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
62
173
|
}
|
|
63
174
|
//# sourceMappingURL=go.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"go.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/go.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,SAAU,SAAQ,OAAO;IAC1B,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"go.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/go.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,SAAU,SAAQ,OAAO;IAC1B,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,WAAW,GAAG,oGAAoG,CAAC;IAEpI,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,+CAA+C,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACtG,OAAO,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACK,KAAK,CAAC,kBAAkB;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,QAAQ,GAAG,KAAK,CAAC,cAAc,CAAC;QACtC,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC;QAE3B,MAAM,SAAS,GAAG,MAAM,CAAC;QAC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C,uBAAuB,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;YAC/D,OAAO,gBAAgB,MAAM,CAAC,IAAI,gGAAgG,CAAC;QACrI,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BypassCommand } from './bypass-command.js';
|
|
2
|
+
import { PuzzleBypassType } from '../types/seed/puzzle-seed.js';
|
|
3
|
+
export declare class HackCommand extends BypassCommand {
|
|
4
|
+
protected static verb: string;
|
|
5
|
+
protected static description: string;
|
|
6
|
+
protected bypassType: PuzzleBypassType;
|
|
7
|
+
protected noPuzzleMessage: string;
|
|
8
|
+
execute(args?: string[]): Promise<string>;
|
|
9
|
+
/**
|
|
10
|
+
* The PAN duel: opposed roll, attacker's Logic + deck quality (a
|
|
11
|
+
* technomancer uses half resonance instead of a deck) vs the target's
|
|
12
|
+
* Logic + master-device firewall -- slaving, simplified -- with +2 to
|
|
13
|
+
* the defense while running silent (a hidden PAN must be FOUND).
|
|
14
|
+
*
|
|
15
|
+
* Effects, in priority order on a LOUD target: jam the equipped smart
|
|
16
|
+
* firearm; else cut the AR overlay (initiative bonus gone, calls
|
|
17
|
+
* dropped). Against a SILENT target, a win only forces the PAN loud --
|
|
18
|
+
* the follow-up crack is its own attempt. "reboot" clears everything.
|
|
19
|
+
*
|
|
20
|
+
* Returns null when the args don't name a hackable actor here, so
|
|
21
|
+
* barrier names and directions fall through to the puzzle path.
|
|
22
|
+
*/
|
|
23
|
+
private tryPanHack;
|
|
24
|
+
protected determineOutcome(): Promise<boolean>;
|
|
25
|
+
}
|