@maka/maka-cli 5.3.17 → 5.5.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 +62 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js +196 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js +65 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js +122 -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 +243 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js +39 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js +82 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.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 +219 -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 +397 -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 +72 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +1 -1
- 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 +59 -2
- 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 +50 -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 +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +147 -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 +199 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js +75 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.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 +43 -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 +47 -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/persuade.d.ts +18 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js +100 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js +33 -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 +31 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +71 -7
- 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 +58 -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/sneak.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js +35 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.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 +86 -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 +138 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js +6 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.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 +102 -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 +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.d.ts +175 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +673 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -0
- 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 +139 -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 +174 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +647 -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 +138 -9
- package/bundle/typescript/src/commands/game/sideQuest/game.js +757 -197
- 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 +27 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +312 -50
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +278 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +661 -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 +199 -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 +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +53 -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 +73 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +208 -3
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +319 -70
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +661 -227
- 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 +42 -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 +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +8 -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 -6
- 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 +145 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +354 -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 +77 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +265 -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 +78 -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 +42 -0
- package/bundle/typescript/src/tools/ai/ai.class.js +117 -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 +3 -2
- package/bundle/typescript/src/tools/https/https.class.js +51 -2
- package/bundle/typescript/src/tools/https/https.class.js.map +1 -1
- package/bundle/typescript/src/tools/https/https.interface.d.ts +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { Category } from '../types/shared/item-enum.js';
|
|
3
|
+
/**
|
|
4
|
+
* The spellbook: how a player actually discovers what they can cast and
|
|
5
|
+
* why. Especially load-bearing for INNATE casting -- an Awakened character
|
|
6
|
+
* has no formula item in their pack to stumble over, so without this
|
|
7
|
+
* command there'd be no way to learn you have the talent at all. Also
|
|
8
|
+
* breaks down the casting pool and shows sustained-spell state, so magic
|
|
9
|
+
* is never invisible bookkeeping.
|
|
10
|
+
*/
|
|
11
|
+
export class SpellsCommand extends Command {
|
|
12
|
+
static verb = 'spells';
|
|
13
|
+
static description = 'Your spellbook: what you can cast, where the talent comes from, and your casting pool.';
|
|
14
|
+
async execute(_args = []) {
|
|
15
|
+
const actor = this.actor;
|
|
16
|
+
// An adept asks the same question everyone else does -- give them
|
|
17
|
+
// their actual answer, not the mundane's. isCaster() is deliberately
|
|
18
|
+
// false for adepts (body-magic, no spells -- see Player.knowsSpell),
|
|
19
|
+
// which sent a magic-5 Adept to the "You're mundane" line in a real
|
|
20
|
+
// session; factually wrong twice over, since they were also carrying a
|
|
21
|
+
// grimoire the message claimed they didn't have.
|
|
22
|
+
if (actor.adept) {
|
|
23
|
+
const half = Math.floor(actor.magic / 2);
|
|
24
|
+
return [
|
|
25
|
+
`You reach for spells and find something better: your own body.`,
|
|
26
|
+
`You are an ADEPT (magic ${actor.magic}) -- the power is real, but it flows inward. +${half} dice already ride your every meat-plane attack and defense; no incantations, no formulas, no astral projection.`,
|
|
27
|
+
`A grimoire in your pack is just a book to you. "assense" still works, though -- the Sight comes with the gift.`,
|
|
28
|
+
].join('\n');
|
|
29
|
+
}
|
|
30
|
+
if (!actor.isCaster()) {
|
|
31
|
+
return `You page through your memory for anything arcane and come up empty. You're mundane -- no innate talent, no spell formulas, no grimoire, no focus. Magic is something that happens to other people.`;
|
|
32
|
+
}
|
|
33
|
+
const lines = ['=== SPELLBOOK ==='];
|
|
34
|
+
// Projecting changes what the whole book can touch -- say so up top,
|
|
35
|
+
// or the list below reads like a promise it can't keep (real session:
|
|
36
|
+
// an astral mage tried manabolt on a meat target right after reading
|
|
37
|
+
// this very output).
|
|
38
|
+
if (actor.plane === 'astral') {
|
|
39
|
+
lines.push(`You are PROJECTING: every spell below only touches ASTRAL targets (spirits, other projections). The meat world is read-only until you "return".`);
|
|
40
|
+
}
|
|
41
|
+
// Where the talent comes from.
|
|
42
|
+
if (actor.isAwakened()) {
|
|
43
|
+
lines.push(`You are AWAKENED (magic ${actor.magic}) -- the talent is in your blood. You know every spell innately.`);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const grimoires = actor.inventory.getAllItems().filter(i => i.category === Category.Grimoire);
|
|
47
|
+
const formulas = actor.inventory.getAllItems().filter(i => i.category === Category.SpellFormula);
|
|
48
|
+
const sources = [...grimoires, ...formulas].map(i => i.name).join(', ');
|
|
49
|
+
lines.push(`You are mundane, casting from study: ${sources || 'a focus alone (no spells known)'}.`);
|
|
50
|
+
}
|
|
51
|
+
// The pool, broken down so the numbers aren't a mystery.
|
|
52
|
+
const focus = actor.getBestFocus();
|
|
53
|
+
const parts = [actor.isAwakened() ? `talent ${Math.max(5, actor.magic + 2)}` : `base 5`];
|
|
54
|
+
if (focus)
|
|
55
|
+
parts.push(`${focus.name} +${1 + focus.qualityBonus}`);
|
|
56
|
+
if (actor.woundModifier < 0)
|
|
57
|
+
parts.push(`wounds ${actor.woundModifier}`);
|
|
58
|
+
if (actor.sustainingPenalty > 0)
|
|
59
|
+
parts.push(`sustaining -${actor.sustainingPenalty}`);
|
|
60
|
+
lines.push(`Casting pool: ${actor.getMagicPool()}d6 (${parts.join(', ')})`);
|
|
61
|
+
if (actor.sustainedArmor > 0) {
|
|
62
|
+
lines.push(`Sustained: armor spell, +${actor.sustainedArmor} soak (-2 dice to everything else). Cast armor again to release.`);
|
|
63
|
+
}
|
|
64
|
+
// The spells themselves -- only what this actor actually knows.
|
|
65
|
+
lines.push('');
|
|
66
|
+
lines.push('Spells you know:');
|
|
67
|
+
const known = [];
|
|
68
|
+
if (actor.knowsSpell('manabolt')) {
|
|
69
|
+
known.push(` manabolt -- hurl raw mana; resisted by Body, armor is useless against it. Drain 3. (cast manabolt at <target>)`);
|
|
70
|
+
}
|
|
71
|
+
if (actor.knowsSpell('heal')) {
|
|
72
|
+
known.push(` heal -- knit physical wounds closed, yours or an ally's (touch range). Drain 2. (cast heal [on <ally>])`);
|
|
73
|
+
}
|
|
74
|
+
if (actor.knowsSpell('armor')) {
|
|
75
|
+
known.push(` armor -- a sustained protective weave on you or an ally, +soak at -2 dice for its bearer. Drain 2. (cast armor [on <ally>])`);
|
|
76
|
+
}
|
|
77
|
+
if (known.length === 0) {
|
|
78
|
+
known.push(` (none -- a focus channels power, but the spells themselves take a formula, a grimoire, or the Awakened gift)`);
|
|
79
|
+
}
|
|
80
|
+
lines.push(...known);
|
|
81
|
+
lines.push('');
|
|
82
|
+
lines.push(`Drain is the cost of every cast: resisted with Body, and what gets through fills your STUN track (${actor.stunSummary()}). Fill it and you're out cold; overflow spills into your body.`);
|
|
83
|
+
return lines.join('\n');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=spells.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spells.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/spells.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,wFAAwF,CAAC;IAExH,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,kEAAkE;QAClE,qEAAqE;QACrE,qEAAqE;QACrE,oEAAoE;QACpE,uEAAuE;QACvE,iDAAiD;QACjD,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YACzC,OAAO;gBACL,gEAAgE;gBAChE,2BAA2B,KAAK,CAAC,KAAK,iDAAiD,IAAI,kHAAkH;gBAC7M,gHAAgH;aACjH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACf,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;YACtB,OAAO,oMAAoM,CAAC;QAC9M,CAAC;QAED,MAAM,KAAK,GAAa,CAAC,mBAAmB,CAAC,CAAC;QAE9C,qEAAqE;QACrE,sEAAsE;QACtE,qEAAqE;QACrE,qBAAqB;QACrB,IAAI,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,iJAAiJ,CAAC,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AAC;QAEtM,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* The typed twin of the Tab key: set (or inspect) the fight-or-flight
|
|
4
|
+
* autopilot temperature. Tab cycles manual -> guarded -> aggressive in the
|
|
5
|
+
* UI; this command jumps straight to one by name, typo-tolerant. The full
|
|
6
|
+
* semantics live in utilities/auto-fight.ts.
|
|
7
|
+
*/
|
|
8
|
+
export declare class StanceCommand extends Command implements ICommand {
|
|
9
|
+
protected static verb: string;
|
|
10
|
+
protected static description: string;
|
|
11
|
+
execute(args?: string[]): Promise<string>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { STANCE_CYCLE } from '../models/player.js';
|
|
3
|
+
import { AutoFight } from '../utilities/auto-fight.js';
|
|
4
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
5
|
+
/**
|
|
6
|
+
* The typed twin of the Tab key: set (or inspect) the fight-or-flight
|
|
7
|
+
* autopilot temperature. Tab cycles manual -> guarded -> aggressive in the
|
|
8
|
+
* UI; this command jumps straight to one by name, typo-tolerant. The full
|
|
9
|
+
* semantics live in utilities/auto-fight.ts.
|
|
10
|
+
*/
|
|
11
|
+
export class StanceCommand extends Command {
|
|
12
|
+
static verb = 'stance';
|
|
13
|
+
static description = 'Set your fight autopilot: manual, guarded (subdues, honors surrender), or aggressive (to the death). Tab also cycles it.';
|
|
14
|
+
async execute(args = []) {
|
|
15
|
+
const actor = this.actor;
|
|
16
|
+
if (!args || args.length === 0) {
|
|
17
|
+
const lines = [
|
|
18
|
+
`Stance: ${actor.autoStance.toUpperCase()} -- ${AutoFight.describe(actor.autoStance)}.`,
|
|
19
|
+
'',
|
|
20
|
+
...STANCE_CYCLE.map(s => ` ${s.padEnd(10)} -- ${AutoFight.describe(s)}`),
|
|
21
|
+
'',
|
|
22
|
+
`Set with "stance <name>", or Tab to cycle. Flight is never automated -- running is always your call.`,
|
|
23
|
+
];
|
|
24
|
+
return lines.join('\n');
|
|
25
|
+
}
|
|
26
|
+
const picked = fuzzyPickName(args.join(' '), [...STANCE_CYCLE]);
|
|
27
|
+
if (!picked) {
|
|
28
|
+
return `That's not a stance. Choose: ${STANCE_CYCLE.join(', ')}.`;
|
|
29
|
+
}
|
|
30
|
+
const stance = picked;
|
|
31
|
+
if (stance === actor.autoStance) {
|
|
32
|
+
return `Already ${stance.toUpperCase()} -- ${AutoFight.describe(stance)}.`;
|
|
33
|
+
}
|
|
34
|
+
actor.autoStance = stance;
|
|
35
|
+
this.game?.autoFight?.cancelPending();
|
|
36
|
+
this.scene.updateStatus();
|
|
37
|
+
this.logger.write(`${actor.name} set stance to ${stance}.`);
|
|
38
|
+
return `Stance: ${stance.toUpperCase()} -- ${AutoFight.describe(stance)}.`;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=stance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stance.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/stance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,YAAY,EAAe,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,0HAA0H,CAAC;IAE1J,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IAAI,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M,CAAC,GAAG,CAAC;IAC7E,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AttackCommand } from './attack.js';
|
|
2
|
+
import { CombatExchange, IStrikeProfile } from '../utilities/combat-exchange.js';
|
|
3
|
+
import { Player } from '../models/player.js';
|
|
4
|
+
import { NPC } from '../models/npc.js';
|
|
5
|
+
/**
|
|
6
|
+
* Take them alive: the same exchange machinery as attack (opposed roll,
|
|
7
|
+
* retaliation, pacing, movement lock), but the damage lands on the STUN
|
|
8
|
+
* track -- a full track is a live capture, not a kill. The tradeoffs that
|
|
9
|
+
* keep it honest: the strike ignores your gun entirely (bare-hands pool,
|
|
10
|
+
* low base damage, so it's slower than shooting), the target's retaliation
|
|
11
|
+
* is fully lethal, and beating someone far past unconsciousness overflows
|
|
12
|
+
* into their body -- you can still kill someone you meant to capture.
|
|
13
|
+
*/
|
|
14
|
+
export declare class SubdueCommand extends AttackCommand {
|
|
15
|
+
protected static verb: string;
|
|
16
|
+
protected static description: string;
|
|
17
|
+
execute(args?: string[]): Promise<string>;
|
|
18
|
+
protected usesEquippedWeapon(): boolean;
|
|
19
|
+
protected actionVerb(): string;
|
|
20
|
+
protected strikeProfile(exchange: CombatExchange, target: Player | NPC): IStrikeProfile;
|
|
21
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AttackCommand } from './attack.js';
|
|
2
|
+
/**
|
|
3
|
+
* Take them alive: the same exchange machinery as attack (opposed roll,
|
|
4
|
+
* retaliation, pacing, movement lock), but the damage lands on the STUN
|
|
5
|
+
* track -- a full track is a live capture, not a kill. The tradeoffs that
|
|
6
|
+
* keep it honest: the strike ignores your gun entirely (bare-hands pool,
|
|
7
|
+
* low base damage, so it's slower than shooting), the target's retaliation
|
|
8
|
+
* is fully lethal, and beating someone far past unconsciousness overflows
|
|
9
|
+
* into their body -- you can still kill someone you meant to capture.
|
|
10
|
+
*/
|
|
11
|
+
export class SubdueCommand extends AttackCommand {
|
|
12
|
+
static verb = 'subdue';
|
|
13
|
+
static description = 'Take someone down ALIVE -- stun damage with your bare hands. Slower than shooting, they fight back for real, and overdoing it can still kill them.';
|
|
14
|
+
async execute(args = []) {
|
|
15
|
+
// A chokehold needs hands and a neck: no grappling as a Matrix persona
|
|
16
|
+
// or an astral form. (Matrix "non-lethal" is meaningless anyway -- a
|
|
17
|
+
// crashed ice program isn't a corpse; and astral entities are put down
|
|
18
|
+
// with force, not wrestled.)
|
|
19
|
+
if (this.actor.plane !== 'meat') {
|
|
20
|
+
return `You can't grapple anything from here -- subduing takes real hands on a real body.`;
|
|
21
|
+
}
|
|
22
|
+
return super.execute(args);
|
|
23
|
+
}
|
|
24
|
+
usesEquippedWeapon() {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
actionVerb() {
|
|
28
|
+
return 'moves to subdue';
|
|
29
|
+
}
|
|
30
|
+
strikeProfile(exchange, target) {
|
|
31
|
+
return {
|
|
32
|
+
label: 'with a subduing hold',
|
|
33
|
+
// Bare-hands work: rolled on the UNARMED skill regardless of what's
|
|
34
|
+
// drawn -- a pistol's quality (or your firearms training) doesn't
|
|
35
|
+
// help you choke someone out. See Player.getUnarmedAttackPool.
|
|
36
|
+
pool: Math.max(0, this.actor.getUnarmedAttackPool() + this.actor.consumeEdgeBoost()),
|
|
37
|
+
damageBase: 1 + Math.floor(this.actor.strength / 2),
|
|
38
|
+
soakPool: target.getSoakPool(),
|
|
39
|
+
dealStun: true,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=subdue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subdue.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/subdue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAK5C;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAc,SAAQ,aAAa;IACpC,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,oJAAoJ,CAAC;IAEpL,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,uEAAuE;QACvE,qEAAqE;QACrE,uEAAuE;QACvE,6BAA6B;QAC7B,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;YAChC,OAAO,mFAAmF,CAAC;QAC7F,CAAC;QACD,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAES,kBAAkB;QAC1B,OAAO,KAAK,CAAC;IACf,CAAC;IAES,UAAU;QAClB,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAES,aAAa,CAAC,QAAwB,EAAE,MAAoB;QACpE,OAAO;YACL,KAAK,EAAE,sBAAsB;YAC7B,oEAAoE;YACpE,kEAAkE;YAClE,+DAA+D;YAC/D,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,oBAAoB,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;YACpF,UAAU,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;YACnD,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE;YAC9B,QAAQ,EAAE,IAAI;SACf,CAAC;IACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Throwing your hands up, as a real mechanical act instead of just talk.
|
|
4
|
+
* The wound-aware AI guidance already nudges a losing NPC toward
|
|
5
|
+
* surrender -- this gives that nudge teeth: the flag it sets is what a
|
|
6
|
+
* GUARDED auto-fighter honors by holding fire (see utilities/auto-fight.ts;
|
|
7
|
+
* an AGGRESSIVE one doesn't have to). Surrendering also breaks the fight:
|
|
8
|
+
* both sides' combat memory clears, so walking away afterwards invites no
|
|
9
|
+
* parting shot. The flag is revoked the moment the surrendered actor
|
|
10
|
+
* initiates violence again (CombatExchange.beginExchange).
|
|
11
|
+
*
|
|
12
|
+
* Works for the player too -- surrendering to an NPC is narrated to the
|
|
13
|
+
* room and lands in the aggressor's AI history; what THEY do with it is
|
|
14
|
+
* up to them.
|
|
15
|
+
*/
|
|
16
|
+
export declare class SurrenderCommand extends Command implements ICommand {
|
|
17
|
+
protected static verb: string;
|
|
18
|
+
protected static description: string;
|
|
19
|
+
execute(_args?: string[]): Promise<string>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Throwing your hands up, as a real mechanical act instead of just talk.
|
|
4
|
+
* The wound-aware AI guidance already nudges a losing NPC toward
|
|
5
|
+
* surrender -- this gives that nudge teeth: the flag it sets is what a
|
|
6
|
+
* GUARDED auto-fighter honors by holding fire (see utilities/auto-fight.ts;
|
|
7
|
+
* an AGGRESSIVE one doesn't have to). Surrendering also breaks the fight:
|
|
8
|
+
* both sides' combat memory clears, so walking away afterwards invites no
|
|
9
|
+
* parting shot. The flag is revoked the moment the surrendered actor
|
|
10
|
+
* initiates violence again (CombatExchange.beginExchange).
|
|
11
|
+
*
|
|
12
|
+
* Works for the player too -- surrendering to an NPC is narrated to the
|
|
13
|
+
* room and lands in the aggressor's AI history; what THEY do with it is
|
|
14
|
+
* up to them.
|
|
15
|
+
*/
|
|
16
|
+
export class SurrenderCommand extends Command {
|
|
17
|
+
static verb = 'surrender';
|
|
18
|
+
static description = 'Throw your hands up and stop fighting. Ends the fight cleanly (no parting shot) -- but whether they honor it is up to them.';
|
|
19
|
+
async execute(_args = []) {
|
|
20
|
+
const actor = this.actor;
|
|
21
|
+
if (actor.isIncapacitated()) {
|
|
22
|
+
return `You're down. There's nothing left to surrender.`;
|
|
23
|
+
}
|
|
24
|
+
if (actor.surrendered) {
|
|
25
|
+
return `Your hands are already up.`;
|
|
26
|
+
}
|
|
27
|
+
if (actor.inExchange) {
|
|
28
|
+
return `Lead is flying -- wait for the exchange to resolve, then surrender in the lull.`;
|
|
29
|
+
}
|
|
30
|
+
actor.surrendered = true;
|
|
31
|
+
// Break the fight both ways: no parting shot for walking away from a
|
|
32
|
+
// surrender, and the opponent's own combat memory of you clears too.
|
|
33
|
+
const opponent = actor.combatOpponent;
|
|
34
|
+
if (opponent && opponent.combatOpponent === actor) {
|
|
35
|
+
opponent.combatOpponent = undefined;
|
|
36
|
+
}
|
|
37
|
+
actor.combatOpponent = undefined;
|
|
38
|
+
actor.performAction('surrenders', 'hands up, weapon lowered');
|
|
39
|
+
this.scene.addWorldEvent(`${actor.name} surrendered in ${actor.currentLocation?.name ?? 'the field'}.`);
|
|
40
|
+
this.logger.write(`${actor.name} surrendered.`);
|
|
41
|
+
this.scene.updateStatus();
|
|
42
|
+
return `You raise your hands -- the fight is over, as far as you're concerned. Whether they honor it is up to them.`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=surrender.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surrender.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/surrender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,gBAAiB,SAAQ,OAAO;IACjC,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,MAAM,CAAC,WAAW,GAAG,6HAA6H,CAAC;IAE7J,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IAAI,KAAK,CAAC,eAAe,EAAE,EAAE,CAAC;YAC5B,OAAO,iDAAiD,CAAC;QAC3D,CAAC;QACD,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACtB,OAAO,4BAA4B,CAAC;QACtC,CAAC;QACD,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO,iFAAiF,CAAC;QAC3F,CAAC;QAED,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;QAEzB,qEAAqE;QACrE,qEAAqE;QACrE,MAAM,QAAQ,GAAG,KAAK,CAAC,cAAc,CAAC;QACtC,IAAI,QAAQ,IAAI,QAAQ,CAAC,cAAc,KAAK,KAAK,EAAE,CAAC;YAClD,QAAQ,CAAC,cAAc,GAAG,SAAS,CAAC;QACtC,CAAC;QACD,KAAK,CAAC,cAAc,GAAG,SAAS,CAAC;QAEjC,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE,0BAA0B,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,IAAI,mBAAmB,KAAK,CAAC,eAAe,EAAE,IAAI,IAAI,WAAW,GAAG,CAAC,CAAC;QACxG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,eAAe,CAAC,CAAC;QAChD,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAE1B,OAAO,6GAA6G,CAAC;IACvH,CAAC"}
|
|
@@ -3,5 +3,13 @@ export declare class TakeCommand extends Command implements ICommand {
|
|
|
3
3
|
protected static verb: string;
|
|
4
4
|
protected static description: string;
|
|
5
5
|
execute(args: string[]): Promise<string>;
|
|
6
|
+
/**
|
|
7
|
+
* Sweeps the room: every item "search" would list, attempted one by one
|
|
8
|
+
* -- an item too heavy to carry is reported and skipped rather than
|
|
9
|
+
* blocking the rest of the haul. Ownership world events and the
|
|
10
|
+
* win-condition check fire per item, exactly as a one-at-a-time pickup
|
|
11
|
+
* would.
|
|
12
|
+
*/
|
|
13
|
+
private takeAll;
|
|
6
14
|
private take;
|
|
7
15
|
}
|
|
@@ -1,13 +1,107 @@
|
|
|
1
1
|
import { Command } from './command.js';
|
|
2
|
+
import { canReachHost } from '../utilities/planes.js';
|
|
2
3
|
export class TakeCommand extends Command {
|
|
3
4
|
static verb = 'take';
|
|
4
|
-
static description = 'Pick up an item.';
|
|
5
|
+
static description = 'Pick up an item. "take all" sweeps everything here -- but only after you have searched the room.';
|
|
5
6
|
async execute(args) {
|
|
6
7
|
if (!args)
|
|
7
8
|
return '';
|
|
8
9
|
this.logger.write(`Attempting 'Take' command with item: ${args?.join(' ')}`);
|
|
10
|
+
const wanted = args.join(' ').toLowerCase().trim();
|
|
11
|
+
if (wanted === 'all' || wanted === 'everything') {
|
|
12
|
+
return this.takeAll();
|
|
13
|
+
}
|
|
9
14
|
return this.take(args);
|
|
10
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Sweeps the room: every item "search" would list, attempted one by one
|
|
18
|
+
* -- an item too heavy to carry is reported and skipped rather than
|
|
19
|
+
* blocking the rest of the haul. Ownership world events and the
|
|
20
|
+
* win-condition check fire per item, exactly as a one-at-a-time pickup
|
|
21
|
+
* would.
|
|
22
|
+
*/
|
|
23
|
+
takeAll() {
|
|
24
|
+
const room = this.actor.currentLocation;
|
|
25
|
+
// Your plane's items only: an astral form can SEE the meat world's
|
|
26
|
+
// gear but its hands pass straight through; a Matrix persona sweeps
|
|
27
|
+
// files, not furniture.
|
|
28
|
+
if (this.actor.plane === 'astral') {
|
|
29
|
+
return `Your hands pass through everything here -- the astral can look, not carry.`;
|
|
30
|
+
}
|
|
31
|
+
// A matrix-plane sweep only ever contains the host's files -- which
|
|
32
|
+
// stay vaulted until the host is cracked, and unreachable entirely
|
|
33
|
+
// when it's air-gapped and the persona rode in wireless (see the
|
|
34
|
+
// single-take gate below for the same rules one item at a time).
|
|
35
|
+
if (this.actor.plane === 'matrix' && room.hasNode) {
|
|
36
|
+
if (!canReachHost(this.actor, room)) {
|
|
37
|
+
return `The host here is AIR-GAPPED -- its files never touch the wireless grid. Jack in from a hard line INSIDE ${room.name} (get your body here first).`;
|
|
38
|
+
}
|
|
39
|
+
if (!room.hostCracked && room.inventory.getAllItems().some(i => i.plane === 'matrix')) {
|
|
40
|
+
return `The files here are sealed inside the host's data vault. Crack the node first ("hack") -- then sweep it clean.`;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// You sweep what you've SEEN. Normally that means having searched this
|
|
44
|
+
// room -- but gear that arrived in the open in front of you (a dead
|
|
45
|
+
// NPC's scattered kit, a witnessed drop; see Room.plainSightItems)
|
|
46
|
+
// never needed casing, so an unsearched sweep grabs exactly that
|
|
47
|
+
// subset. (When perception checks arrive, the searched gate narrows
|
|
48
|
+
// further to what the search roll revealed.)
|
|
49
|
+
const searched = room.searchedBy.has(this.actor.name);
|
|
50
|
+
let items = [...room.inventory.getAllItems()].filter(i => i.plane === this.actor.plane);
|
|
51
|
+
if (!searched) {
|
|
52
|
+
items = items.filter(i => room.plainSightItems.has(i.name.toLowerCase()));
|
|
53
|
+
if (items.length === 0) {
|
|
54
|
+
return `You haven't cased this place yet -- "search" first, then sweep what you find.`;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (items.length === 0) {
|
|
58
|
+
return `There's nothing here to take.`;
|
|
59
|
+
}
|
|
60
|
+
this.actor.performAction('take', 'everything in the room');
|
|
61
|
+
const lines = [`You sweep ${room.name}:`];
|
|
62
|
+
let tookAnything = false;
|
|
63
|
+
const taken = [];
|
|
64
|
+
for (const item of items) {
|
|
65
|
+
try {
|
|
66
|
+
this.actor.addInventory(item);
|
|
67
|
+
room.inventory.removeItem(item.name);
|
|
68
|
+
room.plainSightItems.delete(item.name.toLowerCase());
|
|
69
|
+
tookAnything = true;
|
|
70
|
+
taken.push(item.name);
|
|
71
|
+
this.logger.write(`take all: ${this.actor.name} took "${item.name}" from ${room.name}.`);
|
|
72
|
+
lines.push(` • took the ${item.name}`);
|
|
73
|
+
if (item.owner && item.owner !== this.actor.name) {
|
|
74
|
+
this.scene.addWorldEvent(`${this.actor.name} took ${item.name} (belonging to ${item.owner}) from ${room.name}.`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
this.logger.write(`take all: "${item.name}" too heavy for ${this.actor.name}.`);
|
|
79
|
+
lines.push(` • the ${item.name} is too heavy to carry -- left it`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (!searched) {
|
|
83
|
+
lines.push(` (just what was lying in the open -- "search" to case the rest of the place)`);
|
|
84
|
+
}
|
|
85
|
+
if (tookAnything) {
|
|
86
|
+
this.scene.updateInventory(this.scene.getPlayer().inventory);
|
|
87
|
+
}
|
|
88
|
+
// Win-condition checks run AFTER the sweep summary renders: the check
|
|
89
|
+
// logs the JOB COMPLETE banner itself, and running it per-item used to
|
|
90
|
+
// splice the banner between "took the..." lines mid-list. For the
|
|
91
|
+
// player, print the summary directly and return nothing (the combat
|
|
92
|
+
// self-announce pattern); an NPC actor still gets the text back for
|
|
93
|
+
// its AI history, where ordering doesn't matter.
|
|
94
|
+
const isPlayer = this.actor === this.scene.getPlayer();
|
|
95
|
+
if (isPlayer) {
|
|
96
|
+
this.logger.log(lines.join('\n'));
|
|
97
|
+
}
|
|
98
|
+
if (!this.scene.isWinConditionTarget(this.actor.name)) {
|
|
99
|
+
for (const name of taken) {
|
|
100
|
+
this.scene.checkWinCondition(name, this.actor.name);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return isPlayer ? '' : lines.join('\n');
|
|
104
|
+
}
|
|
11
105
|
take(args) {
|
|
12
106
|
const itemName = args?.join(' ').toLowerCase();
|
|
13
107
|
const room = this.actor.currentLocation;
|
|
@@ -22,15 +116,57 @@ export class TakeCommand extends Command {
|
|
|
22
116
|
this.logger.write(`Item "${itemName}" not retrieved from ${room.name} room's inventory during 'Take' command.`);
|
|
23
117
|
return `There is no item "${itemName}" in this room.`;
|
|
24
118
|
}
|
|
119
|
+
// Plane gate, same as takeAll: astral hands can't carry, and you can
|
|
120
|
+
// only take what exists on YOUR plane (paydata needs a jacked-in
|
|
121
|
+
// persona; a gun needs a meat hand).
|
|
122
|
+
if (this.actor.plane === 'astral') {
|
|
123
|
+
return `Your hand passes straight through the ${itemName} -- the astral can look, not carry.`;
|
|
124
|
+
}
|
|
125
|
+
if (item.plane !== this.actor.plane) {
|
|
126
|
+
return item.plane === 'matrix'
|
|
127
|
+
? `The ${itemName} is DATA -- it only exists on the grid. Jack in to take it.`
|
|
128
|
+
: `The ${itemName} isn't reachable from this plane.`;
|
|
129
|
+
}
|
|
130
|
+
// The host is the vault: files in a node room stay sealed until the
|
|
131
|
+
// host is cracked ("hack") -- and an air-gapped host doesn't even talk
|
|
132
|
+
// to personas who rode in over the wireless grid (planes.canReachHost).
|
|
133
|
+
if (item.plane === 'matrix' && room.hasNode) {
|
|
134
|
+
if (!canReachHost(this.actor, room)) {
|
|
135
|
+
return `The host here is AIR-GAPPED -- its files never touch the wireless grid. Jack in from a hard line INSIDE ${room.name} (get your body here first).`;
|
|
136
|
+
}
|
|
137
|
+
if (!room.hostCracked) {
|
|
138
|
+
return `The ${item.name} is sealed inside the host's data vault. Crack the node first ("hack") -- then it's yours.`;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
25
141
|
// Try adding the item to the player's inventory
|
|
26
142
|
try {
|
|
27
143
|
this.actor.performAction('take', itemName);
|
|
28
144
|
this.actor.addInventory(item);
|
|
29
145
|
this.logger.write(`Successfully added "${itemName}" to ${this.actor.name}'s inventory during 'Take' command.`);
|
|
146
|
+
if (item.owner && item.owner !== this.actor.name) {
|
|
147
|
+
this.scene.addWorldEvent(`${this.actor.name} took ${item.name} (belonging to ${item.owner}) from ${room.name}.`);
|
|
148
|
+
}
|
|
30
149
|
// Remove item from room's inventory
|
|
31
150
|
room.inventory.removeItem(itemName);
|
|
151
|
+
room.plainSightItems.delete(item.name.toLowerCase());
|
|
32
152
|
this.logger.write(`Successfully removed "${itemName}" from ${room.name} room's inventory during 'Take' command.`);
|
|
33
|
-
|
|
153
|
+
// Possession-based win condition: if some OTHER actor ends up with
|
|
154
|
+
// the item the win condition's target NPC wants, that counts just as
|
|
155
|
+
// much as the player handing it over directly (emergent delivery).
|
|
156
|
+
// But the target NPC grabbing their own reward off the floor doesn't
|
|
157
|
+
// count -- that's the job-giver completing their own job, not a
|
|
158
|
+
// genuine hand-off. Same ordering rule as takeAll(): the check logs
|
|
159
|
+
// the JOB COMPLETE banner itself, so the pickup confirmation must
|
|
160
|
+
// render BEFORE it -- print directly for the player, return the text
|
|
161
|
+
// for an NPC actor's AI history.
|
|
162
|
+
const isPlayer = this.actor === this.scene.getPlayer();
|
|
163
|
+
if (isPlayer) {
|
|
164
|
+
this.logger.log(`You have taken the ${itemName}.`);
|
|
165
|
+
}
|
|
166
|
+
if (!this.scene.isWinConditionTarget(this.actor.name)) {
|
|
167
|
+
this.scene.checkWinCondition(item.name, this.actor.name);
|
|
168
|
+
}
|
|
169
|
+
return isPlayer ? '' : `You have taken the ${itemName}.`;
|
|
34
170
|
}
|
|
35
171
|
catch (error) {
|
|
36
172
|
this.logger.error(`Error during 'Take' command: ${error.message}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"take.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/take.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"take.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/take.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;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,kGAAkG,CAAC;IAElI,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC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45
45
|
if (target === speaker) {
|
|
46
46
|
return "You can't talk to yourself (try 'say' instead).";
|
|
47
47
|
}
|
|
48
|
+
// Cross-plane whisper goes nowhere -- target.hear() would drop it
|
|
49
|
+
// silently (see Player.canPerceive), so refuse with the actual rule
|
|
50
|
+
// instead of confirming a conversation that never happened.
|
|
51
|
+
if (!target.canPerceive(speaker)) {
|
|
52
|
+
return speaker.plane === 'astral'
|
|
53
|
+
? `${target.name} can't hear you -- you're astral, they're meat. Your voice doesn't cross the veil; "return" to your body to talk to the living.`
|
|
54
|
+
: `${target.name} can't perceive you from the plane you're on.`;
|
|
55
|
+
}
|
|
48
56
|
// Private communication
|
|
49
57
|
await speaker.hear(speaker, `(to ${target.name}) ${message}`);
|
|
50
58
|
await target.hear(speaker, `(privately) ${message}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"talk.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/talk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAuB,MAAM,cAAc,CAAC;AAG5D,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAC/C,MAAM,KAAK,GAAG,kBAAkB,CAAC;IACjC,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,KAAK,CAAC;IACV,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC5C,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YACb,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAGD,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC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AAC,OAAO,CAAC,EAAE,CAAC;YACjC,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ;gBAC/B,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,iIAAiI;gBACjJ,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,+CAA+C,CAAC;QACpE,CAAC;QAED,wBAAwB;QACxB,MAAM,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,MAAM,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC;QAC9D,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,OAAO,EAAE,CAAC,CAAC;QAErD,OAAO,eAAe,MAAM,CAAC,IAAI,gBAAgB,OAAO,GAAG,CAAC;IAC9D,CAAC"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { Command } from './command.js';
|
|
2
2
|
export class UnequipCommand extends Command {
|
|
3
|
-
static verb = '
|
|
3
|
+
static verb = 'unequip';
|
|
4
4
|
static description = 'Unequip an item.';
|
|
5
5
|
async execute(args) {
|
|
6
6
|
const slotName = args.join(' ').toLowerCase();
|
|
7
7
|
const response = this.actor.unequip(slotName);
|
|
8
|
-
this.logger.write(`UnequipCommand: ${this.actor.name}
|
|
9
|
-
|
|
8
|
+
this.logger.write(`UnequipCommand: ${this.actor.name} unequipped ${response}`);
|
|
9
|
+
// The slot/item the player NAMED, not the full response sentence --
|
|
10
|
+
// witnesses previously read "Maka unqeuip You unequipped X from your
|
|
11
|
+
// rightHand.weapon slot.", second person and all.
|
|
12
|
+
this.actor.performAction('unequips', slotName);
|
|
10
13
|
return response;
|
|
11
14
|
}
|
|
12
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unequip.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/unequip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,cAAe,SAAQ,OAAO;IAC/B,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC;IACxB,MAAM,CAAC,WAAW,GAAG,kBAAkB,CAAC;IAElD,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,IAAI,CAAC,KAAK,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"unequip.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/unequip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,cAAe,SAAQ,OAAO;IAC/B,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC;IACxB,MAAM,CAAC,WAAW,GAAG,kBAAkB,CAAC;IAElD,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,IAAI,CAAC,KAAK,CAAC,IAAI,eAAe,QAAQ,EAAE,CAAC,CAAC;QAC/E,oEAAoE;QACpE,qEAAqE;QACrE,kDAAkD;QAClD,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAE/C,OAAO,QAAQ,CAAC;IAClB,CAAC"}
|
|
@@ -42,6 +42,7 @@ export class UnlockCommand extends Command {
|
|
|
42
42
|
const unlockMessage = room.attemptUnlockExit(direction, key.name);
|
|
43
43
|
this.logger.write(`UnlockCommand: ${this.actor.name} attempted to unlock ${direction}. Result: ${unlockMessage}`);
|
|
44
44
|
this.actor.performAction('unlocked', unlockMessage);
|
|
45
|
+
this.scene.addWorldEvent(`${this.actor.name} unlocked the ${direction} door in ${room.name}.`);
|
|
45
46
|
this.scene.updateExits(room);
|
|
46
47
|
return unlockMessage;
|
|
47
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unlock.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/unlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,gBAAgB,CAAC;IAEhD,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAEO,MAAM,CAAC,IAAc;QAC3B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;YACzD,OAAO,+CAA+C,CAAC;QACzD,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,gCAAgC;QAC7E,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;QAExC,oCAAoC;QACpC,IAAI,SAAS,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAC5C,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,MAAM,CACpD,CAAC;QAEF,8DAA8D;QA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{
|
|
|
4
4
|
protected static description: string;
|
|
5
5
|
execute(args: string[]): Promise<string>;
|
|
6
6
|
private use;
|
|
7
|
+
/**
|
|
8
|
+
* Healing, matching combat's texture (see commands/attack.ts): a visible
|
|
9
|
+
* first-aid dice pool scaled by the item's quality, applied to the
|
|
10
|
+
* condition monitor. Pool is 2 * (1 + quality) d6 (a common medkit rolls
|
|
11
|
+
* 2d6, a military-grade one 10d6) and the recovery is hits + 1 + quality
|
|
12
|
+
* -- the floor guarantees even an all-miss roll isn't a wasted kit, and
|
|
13
|
+
* quality dominates, since gear is the game's whole progression system.
|
|
14
|
+
* Single-use: the kit is consumed. Healing also restores wound-modifier
|
|
15
|
+
* dice, since those derive from current damage.
|
|
16
|
+
*
|
|
17
|
+
* Deliberately refuses BEFORE consuming when there's nothing to heal --
|
|
18
|
+
* burning a medkit at full health would just be a trap -- and when the
|
|
19
|
+
* user is already down: death is death, not a big wound.
|
|
20
|
+
*/
|
|
21
|
+
private applyFirstAid;
|
|
22
|
+
/**
|
|
23
|
+
* Stim patches are the STUN answer (spell drain fills stun; medkits only
|
|
24
|
+
* touch physical): same quality-scaled pool and consumable economy as a
|
|
25
|
+
* medkit, but with the classic stim tradeoff -- the CRASH. After the
|
|
26
|
+
* lift, 1 box of real physical damage lands. Slapping a stim while
|
|
27
|
+
* already bleeding out can genuinely kill you; that's the gamble, and
|
|
28
|
+
* the reason a safe rest (see rest.ts) exists as the free alternative.
|
|
29
|
+
*/
|
|
30
|
+
private applyStim;
|
|
7
31
|
}
|