@maka/maka-cli 5.3.17 → 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/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,176 @@
|
|
|
1
|
+
import { BypassCommand } from './bypass-command.js';
|
|
2
|
+
import { playHackMinigame } from '../minigames/hack-minigame.js';
|
|
3
|
+
import { rollPool, formatRoll } from '../utilities/dice.js';
|
|
4
|
+
import { Door } from '../models/door.js';
|
|
5
|
+
import { leaveMatrix } from '../utilities/planes.js';
|
|
6
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
7
|
+
export class HackCommand extends BypassCommand {
|
|
8
|
+
static verb = 'hack';
|
|
9
|
+
static description = 'Hack a terminal or system (failed terminal hacks are fatal). From inside the Matrix, "hack" cracks a host node: the room\'s maglocks unlock for real. "hack <name>" cracks someone\'s PAN (needs a cyberdeck or being jacked in): jams their smartgun or kills their AR; against a silent target it forces their link loud first.';
|
|
10
|
+
bypassType = 'hack';
|
|
11
|
+
noPuzzleMessage = "There's nothing here to hack.";
|
|
12
|
+
async execute(args = []) {
|
|
13
|
+
// PAN warfare: "hack <name>" cracks a meat actor's personal area
|
|
14
|
+
// network -- from inside the Matrix, or right here in AR with a
|
|
15
|
+
// working deck in hand (which is also how enemy deckers get YOU).
|
|
16
|
+
// Tried first so a name never falls through to the barrier-bypass
|
|
17
|
+
// path; misses fall through untouched.
|
|
18
|
+
if (args && args.length > 0) {
|
|
19
|
+
const panResult = await this.tryPanHack(args);
|
|
20
|
+
if (panResult)
|
|
21
|
+
return panResult;
|
|
22
|
+
}
|
|
23
|
+
// The Matrix branch: hacking FROM INSIDE a host node reaches the
|
|
24
|
+
// room's physical systems -- the meatspace payoff of jacking in. A
|
|
25
|
+
// failed crack means the host bites back (Matrix damage, routed by
|
|
26
|
+
// sim mode like ice hits), not the meat-world instant-fatal of
|
|
27
|
+
// hardwiring into a puzzle terminal.
|
|
28
|
+
if (this.actor.plane === 'matrix') {
|
|
29
|
+
const room = this.actor.currentLocation;
|
|
30
|
+
if (!room.hasNode) {
|
|
31
|
+
return `Thin grid out here -- no host node to crack. Find a room whose systems actually live on the Matrix.`;
|
|
32
|
+
}
|
|
33
|
+
const lockedDoors = Array.from(room.exits.values())
|
|
34
|
+
.filter((exit) => exit instanceof Door && exit.checkIfLocked());
|
|
35
|
+
this.actor.performAction('hacks the host', room.name);
|
|
36
|
+
const success = await this.determineOutcome();
|
|
37
|
+
if (!success) {
|
|
38
|
+
const bite = rollPool(this.actor.getSoakPool());
|
|
39
|
+
const dealt = Math.max(0, 3 - bite.hits);
|
|
40
|
+
const lines = [`The host's defenses snap shut around your intrusion --`, ` Firewall: ${formatRoll(bite)}`];
|
|
41
|
+
if (dealt > 0) {
|
|
42
|
+
// Same routing as ice hits: hardware eats it when there's
|
|
43
|
+
// hardware; a technomancer's living persona (and any hot-sim
|
|
44
|
+
// rider) takes it in the meat of the mind.
|
|
45
|
+
if (this.actor.simMode === 'hot' || this.actor.isTechnomancer()) {
|
|
46
|
+
this.actor.takeStun(dealt);
|
|
47
|
+
lines.push(` Feedback burns -- ${dealt} stun (biofeedback): ${this.actor.stunSummary()}`);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this.actor.takeMatrixDamage(dealt);
|
|
51
|
+
lines.push(` Your deck's boards sizzle -- ${dealt} box${dealt === 1 ? '' : 'es'}: ${this.actor.matrixSummary()}`);
|
|
52
|
+
if (this.actor.matrixCrashed) {
|
|
53
|
+
lines.push(` The deck BRICKS under the counterstrike --`);
|
|
54
|
+
lines.push(...leaveMatrix(this.scene, this.actor, { forced: true, reason: `The host burns your deck out from under you.` }));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
lines.push(` You shed the counterstrike and back off clean.`);
|
|
60
|
+
}
|
|
61
|
+
this.scene.updateStatus();
|
|
62
|
+
return lines.join('\n');
|
|
63
|
+
}
|
|
64
|
+
if (lockedDoors.length === 0) {
|
|
65
|
+
return `You're in -- the host peels open. Nothing here is locked down, but the node's systems are yours to read.`;
|
|
66
|
+
}
|
|
67
|
+
for (const door of lockedDoors) {
|
|
68
|
+
door.isLocked = false;
|
|
69
|
+
}
|
|
70
|
+
this.scene.addWorldEvent(`${this.actor.name} hacked the ${room.name} host -- its maglocks released.`);
|
|
71
|
+
this.logger.write(`${this.actor.name} hacked ${room.name}'s node: ${lockedDoors.length} door(s) unlocked.`);
|
|
72
|
+
return [
|
|
73
|
+
`You're in. The host's sculpted security folds back layer by layer --`,
|
|
74
|
+
` ${lockedDoors.length} maglock${lockedDoors.length === 1 ? '' : 's'} release${lockedDoors.length === 1 ? 's' : ''} in the MEAT world. The way is open, out there.`,
|
|
75
|
+
].join('\n');
|
|
76
|
+
}
|
|
77
|
+
return super.execute(args);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The PAN duel: opposed roll, attacker's Logic + deck quality (a
|
|
81
|
+
* technomancer uses half resonance instead of a deck) vs the target's
|
|
82
|
+
* Logic + master-device firewall -- slaving, simplified -- with +2 to
|
|
83
|
+
* the defense while running silent (a hidden PAN must be FOUND).
|
|
84
|
+
*
|
|
85
|
+
* Effects, in priority order on a LOUD target: jam the equipped smart
|
|
86
|
+
* firearm; else cut the AR overlay (initiative bonus gone, calls
|
|
87
|
+
* dropped). Against a SILENT target, a win only forces the PAN loud --
|
|
88
|
+
* the follow-up crack is its own attempt. "reboot" clears everything.
|
|
89
|
+
*
|
|
90
|
+
* Returns null when the args don't name a hackable actor here, so
|
|
91
|
+
* barrier names and directions fall through to the puzzle path.
|
|
92
|
+
*/
|
|
93
|
+
async tryPanHack(args) {
|
|
94
|
+
const actor = this.actor;
|
|
95
|
+
const room = actor.currentLocation;
|
|
96
|
+
const candidates = this.scene.getActorsInRoom(room)
|
|
97
|
+
.filter(a => a !== actor && a.plane === 'meat' && !a.isIncapacitated());
|
|
98
|
+
const picked = fuzzyPickName(args.join(' '), candidates.map(a => a.name));
|
|
99
|
+
const target = picked ? candidates.find(a => a.name === picked) : undefined;
|
|
100
|
+
if (!target)
|
|
101
|
+
return null;
|
|
102
|
+
// Reach: riding the Matrix, a living persona, or AR with a working
|
|
103
|
+
// deck in hand. A bare commlink can't crack anything.
|
|
104
|
+
const arDeck = actor.getCyberdeck();
|
|
105
|
+
if (actor.plane !== 'matrix' && !actor.isTechnomancer() && !arDeck) {
|
|
106
|
+
return `You'd need to be jacked in, or have a working cyberdeck in hand, to crack ${target.name}'s PAN.`;
|
|
107
|
+
}
|
|
108
|
+
if (actor.plane === 'astral') {
|
|
109
|
+
return `The Matrix doesn't answer to spirits -- no PAN hacking from the astral.`;
|
|
110
|
+
}
|
|
111
|
+
const master = target.getPanMaster();
|
|
112
|
+
if (!master) {
|
|
113
|
+
return `${target.name} runs no devices at all -- nothing to crack. Respect, almost.`;
|
|
114
|
+
}
|
|
115
|
+
const atkQuality = actor.isTechnomancer()
|
|
116
|
+
? Math.floor(actor.resonance / 2)
|
|
117
|
+
: (actor.activeDeck ?? arDeck)?.qualityBonus ?? 0;
|
|
118
|
+
const attack = rollPool(Math.max(0, actor.logic + atkQuality + actor.woundModifier));
|
|
119
|
+
const defense = rollPool(target.getPanDefensePool());
|
|
120
|
+
actor.performAction('runs a PAN intrusion', target.name);
|
|
121
|
+
this.logger.write(`${actor.name} PAN-hacks ${target.name}: ${attack.hits} vs ${defense.hits} (silent=${target.runningSilent}).`);
|
|
122
|
+
const lines = [
|
|
123
|
+
`You reach into ${target.name}'s PAN${target.runningSilent ? ' -- or where it SHOULD be; they\'re running silent' : ''}:`,
|
|
124
|
+
` Intrusion: ${formatRoll(attack)}`,
|
|
125
|
+
` Firewall: ${formatRoll(defense)}`,
|
|
126
|
+
];
|
|
127
|
+
if (attack.hits <= defense.hits) {
|
|
128
|
+
lines.push(` The master ${master.name} slams the door -- and ${target.name}'s link just pinged them a probe warning.`);
|
|
129
|
+
target.performAction('notices a Matrix probe', 'their link flashing an intrusion warning');
|
|
130
|
+
return lines.join('\n');
|
|
131
|
+
}
|
|
132
|
+
if (target.runningSilent) {
|
|
133
|
+
target.runningSilent = false;
|
|
134
|
+
lines.push(` FOUND. You wrench the hidden PAN into the open -- ${target.name}'s link screams back to life, broadcasting for everyone.`);
|
|
135
|
+
target.performAction('is forced loud', 'their silent commlink lighting up against their will');
|
|
136
|
+
this.scene.addWorldEvent(`${actor.name} forced ${target.name}'s PAN loud.`);
|
|
137
|
+
this.scene.updateStatus();
|
|
138
|
+
return lines.join('\n');
|
|
139
|
+
}
|
|
140
|
+
const gun = target.equipment.rightHand?.weapon ?? target.equipment.leftHand?.weapon;
|
|
141
|
+
if (gun?.isFirearm() && !gun.jammed) {
|
|
142
|
+
gun.jammed = true;
|
|
143
|
+
lines.push(` IN. The ${gun.name}'s smartlink seizes mid-handshake -- LOCKED. ${target.name} is down to fists and harsh language until they reboot.`);
|
|
144
|
+
target.performAction('suffers a PAN crack', `their ${gun.name} smartlink locking dead`);
|
|
145
|
+
this.scene.addWorldEvent(`${actor.name} jammed ${target.name}'s ${gun.name} through their PAN.`);
|
|
146
|
+
}
|
|
147
|
+
else if (!target.arOffline && target.equipment.head?.commlink) {
|
|
148
|
+
target.arOffline = true;
|
|
149
|
+
const partner = target.activeCallPartner;
|
|
150
|
+
if (partner) {
|
|
151
|
+
target.activeCallPartner = undefined;
|
|
152
|
+
partner.activeCallPartner = undefined;
|
|
153
|
+
lines.push(` Their call drops mid-word.`);
|
|
154
|
+
}
|
|
155
|
+
lines.push(` IN. You cut ${target.name}'s AR overlay dead -- no tactical feed, no calls, until they reboot.`);
|
|
156
|
+
target.performAction('suffers a PAN crack', 'their AR overlay dying around them');
|
|
157
|
+
this.scene.addWorldEvent(`${actor.name} cut ${target.name}'s AR through their PAN.`);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
lines.push(` IN -- but there's nothing left to crack: their gear is already dark or dead.`);
|
|
161
|
+
}
|
|
162
|
+
this.scene.updateStatus();
|
|
163
|
+
return lines.join('\n');
|
|
164
|
+
}
|
|
165
|
+
async determineOutcome() {
|
|
166
|
+
// No live screen (e.g. an NPC attempting this -- see command-registry.ts,
|
|
167
|
+
// which never passes one): hacking is a LOGIC test, not a coin flip --
|
|
168
|
+
// roll Logic + 3 needing 2 hits (a logic-3 actor sits near the old
|
|
169
|
+
// 50/50; a genius decker NPC actually earns its reputation).
|
|
170
|
+
if (!this.screen) {
|
|
171
|
+
return rollPool(this.actor.logic + 3).hits >= 2;
|
|
172
|
+
}
|
|
173
|
+
return playHackMinigame(this.screen);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=hack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hack.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/hack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAA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AAI,sEAAsE,CAAC,CAAC;YAC/G,MAAM,CAAC,aAAa,CAAC,qBAAqB,EAAE,oCAAoC,CAAC,CAAC;YAClF,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,IAAI,QAAQ,MAAM,CAAC,IAAI,0BAA0B,CAAC,CAAC;QACvF,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,gFAAgF,CAAC,CAAC;QAC/F,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAES,KAAK,CAAC,gBAAgB;QAC9B,0EAA0E;QAC1E,uEAAuE;QACvE,mEAAmE;QACnE,6DAA6D;QAC7D,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* On-demand inventory panel, replacing the always-on blessed sidebar box
|
|
4
|
+
* (same freeing-up-the-log treatment as equipment.ts and map.ts -- the
|
|
5
|
+
* spells command set the pattern). Registered as both "inv" and
|
|
6
|
+
* "inventory".
|
|
7
|
+
*/
|
|
8
|
+
export declare class InventoryCommand extends Command implements ICommand {
|
|
9
|
+
protected static verb: string;
|
|
10
|
+
protected static description: string;
|
|
11
|
+
execute(_args?: string[]): Promise<string>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { capitalCase } from 'change-case';
|
|
3
|
+
/**
|
|
4
|
+
* On-demand inventory panel, replacing the always-on blessed sidebar box
|
|
5
|
+
* (same freeing-up-the-log treatment as equipment.ts and map.ts -- the
|
|
6
|
+
* spells command set the pattern). Registered as both "inv" and
|
|
7
|
+
* "inventory".
|
|
8
|
+
*/
|
|
9
|
+
export class InventoryCommand extends Command {
|
|
10
|
+
static verb = 'inv';
|
|
11
|
+
static description = 'Your pack: everything you carry, the weight of it, and your nuyen.';
|
|
12
|
+
async execute(_args = []) {
|
|
13
|
+
const actor = this.actor;
|
|
14
|
+
const items = actor.inventory.getAllItems();
|
|
15
|
+
const currencyName = capitalCase(this.scene.getCurrencyType());
|
|
16
|
+
const lines = ['=== INVENTORY ==='];
|
|
17
|
+
let currencyTotal = 0;
|
|
18
|
+
const itemLines = [];
|
|
19
|
+
for (const item of items) {
|
|
20
|
+
let line = ` • ${item.name} -- ${item.rating} ${item.category}`;
|
|
21
|
+
if (item.isCurrencyCarrier?.() && item.currencyAmount > 0) {
|
|
22
|
+
line += ` [${item.currencyAmount} ${currencyName.toLowerCase()}]`;
|
|
23
|
+
currencyTotal += item.currencyAmount;
|
|
24
|
+
}
|
|
25
|
+
itemLines.push(line);
|
|
26
|
+
}
|
|
27
|
+
lines.push(`Total ${currencyName}: ${currencyTotal}`);
|
|
28
|
+
lines.push(`Carrying: ${actor.currentWeight.toFixed(1)} / ${actor.maxCarryingWeight} kg (equipped gear included)`);
|
|
29
|
+
lines.push('');
|
|
30
|
+
if (itemLines.length === 0) {
|
|
31
|
+
lines.push(`Your pack is empty. Whatever you're wearing or holding is under "equipment".`);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
lines.push(...itemLines);
|
|
35
|
+
}
|
|
36
|
+
return lines.join('\n');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=inv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inv.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/inv.ts"],"names":[],"mappings":"AAAA,OAAO,E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AA8B,CAAC,CAAC;QACnH,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAEf,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC,8EAA8E,CAAC,CAAC;QAC7F,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;QAC3B,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* The Matrix door, both directions: "jack in [hot|cold]" and "jack out".
|
|
4
|
+
* Needs a working CYBERDECK carried (a commlink is calls and AR only) --
|
|
5
|
+
* unless you're a technomancer, whose brain is the deck. Matrix combat
|
|
6
|
+
* damage lands on the deck's hardware track (bricked = forced dump, rest
|
|
7
|
+
* to repair); hot-sim adds real stun biofeedback on top and dumps out as
|
|
8
|
+
* PHYSICAL. A technomancer skips the hardware entirely and takes every
|
|
9
|
+
* box as real stun. Your body slumps where you jacked in -- pick the room
|
|
10
|
+
* like your life depends on it, because it does (see planes.ts
|
|
11
|
+
* resolveBodyAttack).
|
|
12
|
+
*/
|
|
13
|
+
export declare class JackCommand extends Command implements ICommand {
|
|
14
|
+
protected static verb: string;
|
|
15
|
+
protected static description: string;
|
|
16
|
+
execute(args?: string[]): Promise<string>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { enterMatrix, leaveMatrix } from '../utilities/planes.js';
|
|
3
|
+
/**
|
|
4
|
+
* The Matrix door, both directions: "jack in [hot|cold]" and "jack out".
|
|
5
|
+
* Needs a working CYBERDECK carried (a commlink is calls and AR only) --
|
|
6
|
+
* unless you're a technomancer, whose brain is the deck. Matrix combat
|
|
7
|
+
* damage lands on the deck's hardware track (bricked = forced dump, rest
|
|
8
|
+
* to repair); hot-sim adds real stun biofeedback on top and dumps out as
|
|
9
|
+
* PHYSICAL. A technomancer skips the hardware entirely and takes every
|
|
10
|
+
* box as real stun. Your body slumps where you jacked in -- pick the room
|
|
11
|
+
* like your life depends on it, because it does (see planes.ts
|
|
12
|
+
* resolveBodyAttack).
|
|
13
|
+
*/
|
|
14
|
+
export class JackCommand extends Command {
|
|
15
|
+
static verb = 'jack';
|
|
16
|
+
static description = 'Enter or leave the Matrix: "jack in" (cold-sim), "jack in hot" (faster, harder, biofeedback is real), "jack out". Takes a working cyberdeck -- or being a technomancer. Your body slumps where you leave it.';
|
|
17
|
+
async execute(args = []) {
|
|
18
|
+
const actor = this.actor;
|
|
19
|
+
const sub = args[0]?.toLowerCase();
|
|
20
|
+
if (sub === 'out') {
|
|
21
|
+
if (actor.plane !== 'matrix') {
|
|
22
|
+
return `You're not jacked in.`;
|
|
23
|
+
}
|
|
24
|
+
if (actor.inExchange) {
|
|
25
|
+
return `The ice has your persona locked in the exchange -- survive it first, then jack out in the lull.`;
|
|
26
|
+
}
|
|
27
|
+
const lines = leaveMatrix(this.scene, actor);
|
|
28
|
+
return lines.join('\n');
|
|
29
|
+
}
|
|
30
|
+
if (sub === 'in' || sub === undefined || sub === 'hot' || sub === 'cold') {
|
|
31
|
+
if (actor.plane === 'matrix') {
|
|
32
|
+
return `You're already in. "jack out" to leave.`;
|
|
33
|
+
}
|
|
34
|
+
if (actor.plane === 'astral') {
|
|
35
|
+
return `You're projecting -- an astral form can't touch a deck. "return" to your body first.`;
|
|
36
|
+
}
|
|
37
|
+
if (actor.isIncapacitated()) {
|
|
38
|
+
return `You're down. Nobody jacks in from the floor.`;
|
|
39
|
+
}
|
|
40
|
+
// A technomancer IS the hardware: no deck, no commlink, no
|
|
41
|
+
// broadcast to silence -- their brain touches the Matrix bare. The
|
|
42
|
+
// price is paid on the other side: every point of Matrix damage
|
|
43
|
+
// lands on their REAL stun track (see combat-exchange routing).
|
|
44
|
+
if (!actor.isTechnomancer()) {
|
|
45
|
+
const deck = actor.getCyberdeck();
|
|
46
|
+
if (!deck) {
|
|
47
|
+
const bricked = actor.getAnyCyberdeck();
|
|
48
|
+
return bricked
|
|
49
|
+
? `Your ${bricked.name} is BRICKED (${bricked.deckSummary()}) -- dead boards don't jack in. Rest somewhere safe to repair it.`
|
|
50
|
+
: `No cyberdeck, no Matrix. A commlink gets you calls and AR -- riding the grid takes a real deck.`;
|
|
51
|
+
}
|
|
52
|
+
if (actor.runningSilent) {
|
|
53
|
+
return `You're running silent -- no broadcast, no Matrix. Go loud first ("silent").`;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const mode = (sub === 'hot' || args[1]?.toLowerCase() === 'hot') ? 'hot' : 'cold';
|
|
57
|
+
const lines = enterMatrix(this.scene, actor, mode);
|
|
58
|
+
this.scene.updateStatus();
|
|
59
|
+
return lines.join('\n');
|
|
60
|
+
}
|
|
61
|
+
return `Try "jack in", "jack in hot", or "jack out".`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=jack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jack.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/jack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAElE;;;;;;;;;;GAUG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,8MAA8M,CAAC;IAE9O,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;QAEnC,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C;gBACvF,CAAC;YACH,CAAC;YACD,MAAM,IAAI,GAAG,CAAC,GAAG,KAAK,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;YAClF,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;YACnD,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;YAC1B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QAED,OAAO,8CAA8C,CAAC;IACxD,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { AttackCommand } from './attack.js';
|
|
2
|
+
/**
|
|
3
|
+
* "kill" used to be an instant, unconditional delete-from-scene -- no roll,
|
|
4
|
+
* no counterplay, which also meant a hostile NPC issuing "kill <player>"
|
|
5
|
+
* (e.g. a "will kill on sight" description) ended the game on the spot with
|
|
6
|
+
* nothing the player could do about it. Now it's just an alias for the real
|
|
7
|
+
* dice-pool combat in attack.ts: same verb NPC prompts already know, actual
|
|
8
|
+
* fight underneath.
|
|
9
|
+
*/
|
|
10
|
+
export declare class KillCommand extends AttackCommand {
|
|
3
11
|
protected static verb: string;
|
|
4
12
|
protected static description: string;
|
|
5
|
-
execute(args?: string[]): Promise<string>;
|
|
6
13
|
}
|
|
@@ -1,36 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { AttackCommand } from './attack.js';
|
|
2
|
+
/**
|
|
3
|
+
* "kill" used to be an instant, unconditional delete-from-scene -- no roll,
|
|
4
|
+
* no counterplay, which also meant a hostile NPC issuing "kill <player>"
|
|
5
|
+
* (e.g. a "will kill on sight" description) ended the game on the spot with
|
|
6
|
+
* nothing the player could do about it. Now it's just an alias for the real
|
|
7
|
+
* dice-pool combat in attack.ts: same verb NPC prompts already know, actual
|
|
8
|
+
* fight underneath.
|
|
9
|
+
*/
|
|
10
|
+
export class KillCommand extends AttackCommand {
|
|
3
11
|
static verb = 'kill';
|
|
4
|
-
static description = '
|
|
5
|
-
async execute(args = []) {
|
|
6
|
-
if (!args)
|
|
7
|
-
return '';
|
|
8
|
-
if (args.length === 0) {
|
|
9
|
-
return 'Who do you want to kill? Try: `kill [character name]`';
|
|
10
|
-
}
|
|
11
|
-
const targetName = args.join(' ').toLowerCase();
|
|
12
|
-
const currentRoom = this.actor.currentLocation;
|
|
13
|
-
const scene = this.scene;
|
|
14
|
-
if (!currentRoom || !scene) {
|
|
15
|
-
return 'You are not in a valid location to perform this action.';
|
|
16
|
-
}
|
|
17
|
-
const possibleTargets = scene.getActorsInRoom(currentRoom).filter(actor => actor !== this.actor);
|
|
18
|
-
const target = possibleTargets.find(actor => actor.name.toLowerCase() === targetName);
|
|
19
|
-
const possibleTargetNames = possibleTargets.map(a => a.name).join(', ');
|
|
20
|
-
this.logger.write(`KillCommand: Possible targets in ${currentRoom.name}: ${possibleTargetNames}`);
|
|
21
|
-
if (!target) {
|
|
22
|
-
return `You don’t see anyone named "${targetName}" here.`;
|
|
23
|
-
}
|
|
24
|
-
const isPlayer = target === scene.getPlayer();
|
|
25
|
-
scene.removeActor(target.name);
|
|
26
|
-
this.logger.write(`KillCommand: ${this.actor.name} killed ${target.name} in ${currentRoom.name}`);
|
|
27
|
-
this.actor.performAction('kills', target.name);
|
|
28
|
-
if (isPlayer) {
|
|
29
|
-
await this.scene.endGame();
|
|
30
|
-
this.logger.logWithColor(`Game Over: ${target.name} (the player) was killed by ${this.actor.name}.`, 'red');
|
|
31
|
-
this.logger.logWithColor(`Press ctrl-c to quit`, 'red');
|
|
32
|
-
}
|
|
33
|
-
return `You swiftly end ${target.name}'s life. Their body collapses in ${currentRoom.name}.`;
|
|
34
|
-
}
|
|
12
|
+
static description = 'Alias for "attack" -- resolves as real dice-pool combat, not an instant kill.';
|
|
35
13
|
}
|
|
36
14
|
//# sourceMappingURL=kill.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kill.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/kill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"kill.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/kill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,OAAO,WAAY,SAAQ,aAAa;IAClC,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,+EAA+E,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Door } from '../models/door.js';
|
|
2
|
+
import { NPC } from '../models/npc.js';
|
|
2
3
|
import { Category } from '../types/shared/item-enum.js';
|
|
3
4
|
import { Command } from './command.js';
|
|
5
|
+
import { shellsInRoom } from '../utilities/planes.js';
|
|
4
6
|
export class LookCommand extends Command {
|
|
5
7
|
static verb = 'look';
|
|
6
8
|
static description = 'Examine your surroundings';
|
|
@@ -24,10 +26,11 @@ export class LookCommand extends Command {
|
|
|
24
26
|
return this.lookOutside(target);
|
|
25
27
|
}
|
|
26
28
|
else {
|
|
27
|
-
// Check if it's another player or NPC in the room
|
|
29
|
+
// Check if it's another player or NPC in the room (that this
|
|
30
|
+
// actor's plane can perceive -- see Player.canPerceive)
|
|
28
31
|
const actorMatch = this.scene
|
|
29
32
|
.getActorsInRoom(this.actor.currentLocation)
|
|
30
|
-
.find(a => a.name.toLowerCase() === target.toLowerCase());
|
|
33
|
+
.find(a => a.name.toLowerCase() === target.toLowerCase() && this.actor.canPerceive(a));
|
|
31
34
|
if (actorMatch) {
|
|
32
35
|
return this.inspectActor(actorMatch.name);
|
|
33
36
|
}
|
|
@@ -46,13 +49,38 @@ export class LookCommand extends Command {
|
|
|
46
49
|
return "You're not in a valid room.";
|
|
47
50
|
}
|
|
48
51
|
let description = (room.details) ? room.details : room.description;
|
|
52
|
+
// Plane dressing: what a room IS depends on where you're standing.
|
|
53
|
+
if (this.actor.plane === 'matrix') {
|
|
54
|
+
description += room.hasNode
|
|
55
|
+
? `\n\n{cyan-fg}A host node burns here -- sculpted ice geometry over the room's systems. This is hackable ground.{/cyan-fg}`
|
|
56
|
+
: `\n\n{cyan-fg}Thin grid out here -- ambient AR clutter, nothing worth cracking.{/cyan-fg}`;
|
|
57
|
+
}
|
|
58
|
+
else if (this.actor.plane === 'astral') {
|
|
59
|
+
description += room.warded
|
|
60
|
+
? `\n\n{magenta-fg}The walls here are SEALED -- a ward's lattice hums across every surface.{/magenta-fg}`
|
|
61
|
+
: `\n\n{magenta-fg}The meat world glows dim below you; emotions stain the walls like old smoke.{/magenta-fg}`;
|
|
62
|
+
}
|
|
63
|
+
// Only what this plane perceives (see Player.canPerceive); an astral
|
|
64
|
+
// viewer sees meat actors as auras.
|
|
49
65
|
const otherActors = this.scene
|
|
50
66
|
.getActorsInRoom(room)
|
|
51
|
-
.filter(a => a.name !== this.actor.name);
|
|
67
|
+
.filter(a => a.name !== this.actor.name && this.actor.canPerceive(a));
|
|
52
68
|
if (otherActors.length > 0) {
|
|
53
|
-
const actorList = otherActors.map(a =>
|
|
69
|
+
const actorList = otherActors.map(a => {
|
|
70
|
+
const aura = this.actor.plane === 'astral' && a.plane === 'meat' ? ' (an aura, dim and physical)' : '';
|
|
71
|
+
return `• ${a.name}${aura}`;
|
|
72
|
+
}).join('\n');
|
|
54
73
|
description += `\n\nYou see:\n${actorList}`;
|
|
55
74
|
}
|
|
75
|
+
// Empty bodies slump in plain sight of the meat plane -- and the
|
|
76
|
+
// astral, which watches over it.
|
|
77
|
+
if (this.actor.plane !== 'matrix') {
|
|
78
|
+
const shells = shellsInRoom(this.scene, room).filter(s => s !== this.actor);
|
|
79
|
+
if (shells.length > 0) {
|
|
80
|
+
const shellList = shells.map(s => `• ${s.name}'s body -- slumped and vacant, nobody home`).join('\n');
|
|
81
|
+
description += `\n\n${shellList}`;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
56
84
|
// --- Add exits here ---
|
|
57
85
|
const exits = Array.from(room.exits.entries())
|
|
58
86
|
.map(([direction, exit]) => {
|
|
@@ -116,6 +144,9 @@ export class LookCommand extends Command {
|
|
|
116
144
|
}
|
|
117
145
|
const lines = [];
|
|
118
146
|
lines.push(`${target.name} is here.`);
|
|
147
|
+
if (target instanceof NPC && target.appearance) {
|
|
148
|
+
lines.push(target.appearance);
|
|
149
|
+
}
|
|
119
150
|
const equipment = target.equipment;
|
|
120
151
|
for (const groupKey of Object.keys(equipment)) {
|
|
121
152
|
const group = equipment[groupKey];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"look.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/look.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"look.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/look.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,2BAA2B,CAAC;IAE3D,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAE/C,MAAM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QACrD,CAAC;QAED,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,WAAW,CAAC,CAAC;QAEtC,IAAI,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YAC/C,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAChC,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAEnC,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAA+B,EAAE,CAAC;YAC5E,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;YAClC,IAAI,CAAC,KAAK;gBAAE,SAAS;YAErB,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzC,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;gBAC5B,IAAI,IAAI,EAAE,CAAC;oBACT,KAAK,CAAC,IAAI,CAAC,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;gBACvD,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,yCAAyC,CAAC,CAAC;QACtE,CAAC;QAED,OAAO,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* On-demand exits panel, replacing the always-on blessed sidebar box.
|
|
4
|
+
* Registered as both "map" and "exits". Locked ways out matter most, so
|
|
5
|
+
* each exit carries its lock state, and any barrier (room puzzle or
|
|
6
|
+
* puzzle-guarded door) gets a line too.
|
|
7
|
+
*/
|
|
8
|
+
export declare class MapCommand extends Command implements ICommand {
|
|
9
|
+
protected static verb: string;
|
|
10
|
+
protected static description: string;
|
|
11
|
+
execute(_args?: string[]): Promise<string>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { Door } from '../models/door.js';
|
|
3
|
+
import { capitalCase } from 'change-case';
|
|
4
|
+
/**
|
|
5
|
+
* On-demand exits panel, replacing the always-on blessed sidebar box.
|
|
6
|
+
* Registered as both "map" and "exits". Locked ways out matter most, so
|
|
7
|
+
* each exit carries its lock state, and any barrier (room puzzle or
|
|
8
|
+
* puzzle-guarded door) gets a line too.
|
|
9
|
+
*/
|
|
10
|
+
export class MapCommand extends Command {
|
|
11
|
+
static verb = 'map';
|
|
12
|
+
static description = 'Where you are and every way out, with lock states.';
|
|
13
|
+
async execute(_args = []) {
|
|
14
|
+
const room = this.actor.currentLocation;
|
|
15
|
+
if (!room) {
|
|
16
|
+
return "You're nowhere. This is a bug.";
|
|
17
|
+
}
|
|
18
|
+
const lines = [`=== ${room.name.toUpperCase()} ===`];
|
|
19
|
+
if (room.exits.size === 0) {
|
|
20
|
+
lines.push('There are no exits here.');
|
|
21
|
+
return lines.join('\n');
|
|
22
|
+
}
|
|
23
|
+
lines.push('Exits:');
|
|
24
|
+
for (const [direction, exit] of room.exits.entries()) {
|
|
25
|
+
if (exit instanceof Door) {
|
|
26
|
+
const target = exit.getOtherSideToName(room);
|
|
27
|
+
const state = exit.checkIfLocked() ? ' (locked)' : exit.checkIfLockable() ? ' (unlocked)' : '';
|
|
28
|
+
lines.push(` • ${capitalCase(direction)}: ${target}${state}`);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
lines.push(` • ${capitalCase(direction)}: ${exit}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const barriers = room.getPuzzleTargets();
|
|
35
|
+
if (barriers.length > 0) {
|
|
36
|
+
lines.push('');
|
|
37
|
+
for (const barrier of barriers) {
|
|
38
|
+
lines.push(barrier.direction
|
|
39
|
+
? `A barrier blocks the way ${barrier.direction} -- "search" for a closer look.`
|
|
40
|
+
: `There's a barrier here -- "search" for a closer look.`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return lines.join('\n');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,OAAO,UAAW,SAAQ,OAAO;IAC3B,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,MAAM,CAAC,WAAW,GAAG,oDAAoD,CAAC;IAEpF,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;QACxC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,gCAAgC,CAAC;QAC1C,CAAC;QAED,MAAM,KAAK,GAAa,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAE/D,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YAC1B,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;YACvC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrB,KAAK,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACrD,IAAI,IAAI,YAAY,IAAI,EAAE,CAAC;gBACzB,MAAM,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;gBAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC/F,KAAK,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,SAAS,CAAC,KAAK,MAAM,GAAG,KAAK,EAAE,CAAC,CAAC;YACjE,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACzC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;gBAC/B,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS;oBAC1B,CAAC,CAAC,4BAA4B,OAAO,CAAC,SAAS,iCAAiC;oBAChF,CAAC,CAAC,uDAAuD,CAAC,CAAC;YAC/D,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* The PAN dashboard: your personal area network at a glance -- master
|
|
4
|
+
* device and its firewall, every slaved device with what it grants while
|
|
5
|
+
* loud, and the silent-vs-loud tradeoff spelled out. This is the screen
|
|
6
|
+
* you check before deciding whether the AR bonus is worth being hackable.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PanCommand extends Command implements ICommand {
|
|
9
|
+
protected static verb: string;
|
|
10
|
+
protected static description: string;
|
|
11
|
+
execute(_args?: string[]): Promise<string>;
|
|
12
|
+
}
|