@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka/maka-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"summary": "A command line tool for scaffolding Meteor 2.x applications using either React.",
|
|
6
6
|
"description": "A command line tool for scaffolding Meteor 2.x applications using React.",
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ICombatAttributes, Player } from './models/player.js';
|
|
2
|
+
import { Item } from './models/item.js';
|
|
3
|
+
import { Size, Category, Rating } from './types/shared/item-enum.js';
|
|
4
|
+
/**
|
|
5
|
+
* Playable archetypes -- the SR5e core-book spreads, picked at game launch
|
|
6
|
+
* (see sideQuest.sub.cmd.ts). This is deliberately archetype-pick rather
|
|
7
|
+
* than point-buy: one quick select and you're on the street. Each spread
|
|
8
|
+
* trades away as much as it gains against the balanced Runner baseline
|
|
9
|
+
* (body 4 / agility 4 / reaction 4 / skill 3 / str 3 / wil 3 / log 3 /
|
|
10
|
+
* int 3 / cha 3 / edge 2), and the premium attributes are the identity:
|
|
11
|
+
* magic makes a caster, magic+adept makes an adept, resonance makes a
|
|
12
|
+
* technomancer, logic 7 makes a decker.
|
|
13
|
+
*
|
|
14
|
+
* REQUISITES: `gear` is the archetype's signature kit, granted (and
|
|
15
|
+
* auto-equipped where wearable) at character creation ON TOP of the
|
|
16
|
+
* scene's generic starting loadout. A Decker without a deck isn't a
|
|
17
|
+
* decker -- the gear is part of the build.
|
|
18
|
+
*/
|
|
19
|
+
export interface IArchetypeGearDef {
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
size: Size;
|
|
23
|
+
category: Category;
|
|
24
|
+
rating: Rating;
|
|
25
|
+
weight: number;
|
|
26
|
+
shape: string;
|
|
27
|
+
color: string;
|
|
28
|
+
texture: string;
|
|
29
|
+
}
|
|
30
|
+
export interface IArchetype {
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
combat: ICombatAttributes;
|
|
34
|
+
gear?: IArchetypeGearDef[];
|
|
35
|
+
}
|
|
36
|
+
export declare const ARCHETYPES: IArchetype[];
|
|
37
|
+
export declare function getArchetype(name?: string): IArchetype;
|
|
38
|
+
/**
|
|
39
|
+
* Instantiates an archetype's requisite gear (see IArchetype.gear).
|
|
40
|
+
* ui.ts grants these at character creation and auto-equips the wearable
|
|
41
|
+
* ones -- a samurai starts with the Predator IN HAND, not in a duffel.
|
|
42
|
+
*/
|
|
43
|
+
export declare function createArchetypeGear(archetype: IArchetype): Item[];
|
|
44
|
+
/**
|
|
45
|
+
* Stamps an archetype onto a Player: records the archetype's name (scene
|
|
46
|
+
* generation's dossier reads it -- see buildPlayerDossier), grants the
|
|
47
|
+
* requisite gear, and equips the wearables. Shared between the real
|
|
48
|
+
* character build (ui.ts) and the throwaway dossier player the launch flow
|
|
49
|
+
* builds so even the FIRST generated run is tailored to the build
|
|
50
|
+
* (sideQuest.sub.cmd.ts) -- found via a real session where a Decker's
|
|
51
|
+
* archetype-blind first job had no Matrix content at all.
|
|
52
|
+
*/
|
|
53
|
+
export declare function outfitArchetype(player: Player, archetype: IArchetype): void;
|
|
54
|
+
/**
|
|
55
|
+
* Slots every wearable in the pack into EMPTY equipment slots -- never
|
|
56
|
+
* swapping out anything already worn, so archetype signature gear
|
|
57
|
+
* survives the scene's generic starting kit arriving after it. Run once
|
|
58
|
+
* at session load (Game.init): a session shouldn't start with the
|
|
59
|
+
* "equip all" ritual (player request). Weapons land HOLSTERED, exactly
|
|
60
|
+
* as a manual equip would.
|
|
61
|
+
*/
|
|
62
|
+
export declare function equipIntoEmptySlots(player: Player): void;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { Player } from './models/player.js';
|
|
2
|
+
import { Item } from './models/item.js';
|
|
3
|
+
import { Size, Category, Rating } from './types/shared/item-enum.js';
|
|
4
|
+
const gearDef = (partial) => ({
|
|
5
|
+
size: Size.Small,
|
|
6
|
+
weight: 1,
|
|
7
|
+
shape: 'Gear',
|
|
8
|
+
color: 'Black',
|
|
9
|
+
texture: 'Matte',
|
|
10
|
+
...partial,
|
|
11
|
+
});
|
|
12
|
+
export const ARCHETYPES = [
|
|
13
|
+
{
|
|
14
|
+
name: 'Runner',
|
|
15
|
+
description: 'The balanced default: decent at everything, spectacular at nothing.',
|
|
16
|
+
combat: { body: 4, agility: 4, reaction: 4, combatSkill: 3, strength: 3, willpower: 3, logic: 3, intuition: 3, charisma: 3, edge: 2, magic: 0,
|
|
17
|
+
skills: { firearms: 3, blades: 2, unarmed: 3, sneaking: 2, perception: 3, athletics: 2, hacking: 1, locksmith: 1, negotiation: 2, con: 1, intimidation: 1, 'first-aid': 2 } },
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'Street Samurai',
|
|
21
|
+
description: 'Chrome and trigger discipline. Hits hard, soaks harder, thinks later.',
|
|
22
|
+
combat: { body: 5, agility: 5, reaction: 4, combatSkill: 5, strength: 4, willpower: 3, logic: 2, intuition: 3, charisma: 2, edge: 2, magic: 0,
|
|
23
|
+
skills: { firearms: 6, blades: 4, unarmed: 5, athletics: 4, perception: 3, intimidation: 4, sneaking: 2, 'first-aid': 1 } },
|
|
24
|
+
gear: [
|
|
25
|
+
gearDef({ name: 'Ares Predator V', description: 'The iconic heavy pistol of the shadows -- smartgun-linked, and it never jams when it matters.', category: Category.RangedWeapon, rating: Rating.Rare, shape: 'Pistol', weight: 2 }),
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
// Physical magic: counts as Awakened (auras, assensing) but casts
|
|
30
|
+
// nothing and cannot project -- half their magic rides every meat
|
|
31
|
+
// attack and defense pool instead (see Player.adept).
|
|
32
|
+
name: 'Adept',
|
|
33
|
+
description: 'Magic as muscle: faster than chrome, no spells, no projection -- the body IS the focus.',
|
|
34
|
+
combat: { body: 4, agility: 4, reaction: 4, combatSkill: 4, strength: 4, willpower: 4, logic: 2, intuition: 3, charisma: 2, edge: 2, magic: 5, adept: true,
|
|
35
|
+
skills: { blades: 6, unarmed: 5, athletics: 5, sneaking: 4, perception: 3, assensing: 3, intimidation: 2, firearms: 2 } },
|
|
36
|
+
gear: [
|
|
37
|
+
gearDef({ name: 'Weapon Focus Katana', description: 'A blade that drinks its wielder\'s magic -- the edge sings at frequencies steel shouldn\'t reach.', category: Category.MeleeWeapon, rating: Rating.Rare, size: Size.Medium, shape: 'Sword', color: 'Silver', texture: 'Folded Steel', weight: 1.5 }),
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Covert Ops',
|
|
42
|
+
description: 'In through the vents, out before the alarm. Locks are suggestions.',
|
|
43
|
+
combat: { body: 3, agility: 5, reaction: 4, combatSkill: 3, strength: 3, willpower: 3, logic: 3, intuition: 5, charisma: 3, edge: 3, magic: 0,
|
|
44
|
+
skills: { sneaking: 6, locksmith: 5, perception: 4, athletics: 4, firearms: 3, unarmed: 3, con: 3, hacking: 2 } },
|
|
45
|
+
gear: [
|
|
46
|
+
gearDef({ name: 'Lockpick Set', description: 'Precision picks, tension bars, and a maglock passkey of arguable legality.', category: Category.Tool, rating: Rating.Standard, size: Size.Tiny, weight: 0.3 }),
|
|
47
|
+
gearDef({ name: 'Chameleon Suit', description: 'Ruthenium-coated infiltration wear that drinks the light around it.', category: Category.ArmorClothing, rating: Rating.Standard, size: Size.Medium, shape: 'Suit', color: 'Shifting Gray', texture: 'Ruthenium Weave', weight: 2 }),
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'Face',
|
|
52
|
+
description: 'Talks the job open before anyone draws. Charm, luck, and just enough gun.',
|
|
53
|
+
combat: { body: 3, agility: 3, reaction: 3, combatSkill: 3, strength: 3, willpower: 4, logic: 3, intuition: 4, charisma: 6, edge: 3, magic: 0,
|
|
54
|
+
skills: { negotiation: 6, con: 5, intimidation: 3, perception: 4, firearms: 3, unarmed: 2, sneaking: 2 } },
|
|
55
|
+
gear: [
|
|
56
|
+
gearDef({ name: 'Transys Avalon', description: 'A top-shelf commlink -- the AR overlay alone is worth the felony it took to afford it.', category: Category.Commlink, rating: Rating.Rare, size: Size.Tiny, weight: 0.2 }),
|
|
57
|
+
gearDef({ name: 'Berwick Suit', description: 'Tailored armor-weave that reads boardroom, not battlefield.', category: Category.ArmorClothing, rating: Rating.Standard, size: Size.Medium, shape: 'Suit', color: 'Charcoal', texture: 'Armored Silk', weight: 2 }),
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'Street Doc',
|
|
62
|
+
description: 'Keeps the team breathing: brains, steady hands, and a bag full of trauma kits.',
|
|
63
|
+
combat: { body: 3, agility: 3, reaction: 3, combatSkill: 2, strength: 3, willpower: 4, logic: 6, intuition: 4, charisma: 3, edge: 2, magic: 0,
|
|
64
|
+
skills: { 'first-aid': 6, perception: 4, negotiation: 3, firearms: 2, unarmed: 2, hacking: 2, con: 2 } },
|
|
65
|
+
gear: [
|
|
66
|
+
gearDef({ name: 'Trauma Kit', description: 'A doc-grade field kit: sprays, staples, and things that hiss.', category: Category.Medical, rating: Rating.Rare, weight: 1.5 }),
|
|
67
|
+
gearDef({ name: 'Kamikaze Stim Patch', description: 'A combat stim slap-patch. The crash is tomorrow\'s problem.', category: Category.StimPatch, rating: Rating.Standard, size: Size.Tiny, weight: 0.1 }),
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Combat Mage',
|
|
72
|
+
description: 'Awakened artillery: manabolts through milspec armor, if the drain doesn\'t eat you first.',
|
|
73
|
+
combat: { body: 3, agility: 3, reaction: 3, combatSkill: 2, strength: 2, willpower: 5, logic: 4, intuition: 4, charisma: 3, edge: 2, magic: 6,
|
|
74
|
+
skills: { spellcasting: 6, assensing: 4, perception: 3, unarmed: 2, firearms: 2, sneaking: 2 } },
|
|
75
|
+
gear: [
|
|
76
|
+
gearDef({ name: 'Spellcasting Focus', description: 'An orichalcum-threaded ring that gathers mana the way a lens gathers light.', category: Category.Focus, rating: Rating.Standard, size: Size.Tiny, shape: 'Ring', color: 'Gold', texture: 'Orichalcum', weight: 0.1 }),
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'Street Shaman',
|
|
81
|
+
description: 'Awakened the hard way: iron will, sharp instincts, spirits on speed dial.',
|
|
82
|
+
combat: { body: 3, agility: 2, reaction: 3, combatSkill: 2, strength: 2, willpower: 6, logic: 3, intuition: 5, charisma: 4, edge: 2, magic: 5,
|
|
83
|
+
skills: { spellcasting: 5, assensing: 5, perception: 4, negotiation: 3, unarmed: 2, con: 2 } },
|
|
84
|
+
gear: [
|
|
85
|
+
gearDef({ name: 'Spirit Talisman', description: 'Feathers, bone, and braided wire -- a focus that hums when the other world leans close.', category: Category.Focus, rating: Rating.Standard, size: Size.Tiny, shape: 'Talisman', color: 'Bone White', texture: 'Feather and Wire', weight: 0.2 }),
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
// Logic drives EVERYTHING a decker cares about: Matrix attack pools,
|
|
90
|
+
// firewall soak, thought-speed initiative, hacking hosts -- and the
|
|
91
|
+
// deck is the requisite: its quality feeds program damage and
|
|
92
|
+
// firewall, and its hardware track is what the ice chews on.
|
|
93
|
+
name: 'Decker',
|
|
94
|
+
description: 'A ghost in the grid: hosts crack, ice burns, maglocks open. Just don\'t get caught in meatspace.',
|
|
95
|
+
combat: { body: 3, agility: 2, reaction: 3, combatSkill: 2, strength: 2, willpower: 4, logic: 7, intuition: 5, charisma: 2, edge: 3, magic: 0,
|
|
96
|
+
skills: { hacking: 6, perception: 4, locksmith: 3, sneaking: 3, firearms: 2, unarmed: 2, con: 2 } },
|
|
97
|
+
gear: [
|
|
98
|
+
gearDef({ name: 'Novatech Navigator', description: 'A workhorse cyberdeck -- scuffed case, immaculate boards. Your ticket into the Matrix.', category: Category.Cyberdeck, rating: Rating.Standard, weight: 2 }),
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
// The living persona (see ICombatAttributes.resonance): no deck, no
|
|
103
|
+
// commlink -- and no hardware between their stun track and the ice.
|
|
104
|
+
name: 'Technomancer',
|
|
105
|
+
description: 'The Matrix answers when they think at it. No deck to brick -- only a mind to burn.',
|
|
106
|
+
combat: { body: 2, agility: 2, reaction: 3, combatSkill: 2, strength: 2, willpower: 5, logic: 5, intuition: 4, charisma: 3, edge: 3, magic: 0, resonance: 6,
|
|
107
|
+
skills: { hacking: 6, perception: 4, sneaking: 3, con: 3, negotiation: 2, unarmed: 2 } },
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
// The drone is the mechanic: "drone" launches the Fly-Spy for live
|
|
111
|
+
// recon of every adjacent room (see commands/drone.ts). Jumped-in
|
|
112
|
+
// drone rigging can build on this later.
|
|
113
|
+
name: 'Rigger',
|
|
114
|
+
description: 'Eyes everywhere: the Fly-Spy scouts the next room so your body never has to.',
|
|
115
|
+
combat: { body: 3, agility: 3, reaction: 5, combatSkill: 3, strength: 3, willpower: 3, logic: 5, intuition: 4, charisma: 2, edge: 2, magic: 0,
|
|
116
|
+
skills: { piloting: 6, hacking: 4, perception: 4, firearms: 3, locksmith: 3, unarmed: 2, 'first-aid': 2 } },
|
|
117
|
+
gear: [
|
|
118
|
+
gearDef({ name: 'Fly-Spy Drone', description: 'A palm-sized surveillance drone, quiet as a moth and twice as nosy.', category: Category.Drone, rating: Rating.Standard, size: Size.Tiny, shape: 'Insectoid', color: 'Gunmetal', texture: 'Micro-rotor', weight: 0.5 }),
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
];
|
|
122
|
+
export function getArchetype(name) {
|
|
123
|
+
return ARCHETYPES.find(a => a.name === name) ?? ARCHETYPES[0];
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Instantiates an archetype's requisite gear (see IArchetype.gear).
|
|
127
|
+
* ui.ts grants these at character creation and auto-equips the wearable
|
|
128
|
+
* ones -- a samurai starts with the Predator IN HAND, not in a duffel.
|
|
129
|
+
*/
|
|
130
|
+
export function createArchetypeGear(archetype) {
|
|
131
|
+
return (archetype.gear ?? []).map(def => new Item({
|
|
132
|
+
name: def.name,
|
|
133
|
+
description: def.description,
|
|
134
|
+
size: def.size,
|
|
135
|
+
category: def.category,
|
|
136
|
+
shape: def.shape,
|
|
137
|
+
color: def.color,
|
|
138
|
+
texture: def.texture,
|
|
139
|
+
rating: def.rating,
|
|
140
|
+
weight: def.weight,
|
|
141
|
+
}));
|
|
142
|
+
}
|
|
143
|
+
/** Wearable categories worn immediately at character creation. */
|
|
144
|
+
const EQUIP_ON_START = new Set([
|
|
145
|
+
Category.Weapon, Category.MeleeWeapon, Category.RangedWeapon,
|
|
146
|
+
Category.Armor, Category.BodyArmor, Category.ArmorClothing,
|
|
147
|
+
Category.Helmet, Category.Hat, Category.Gloves, Category.Boots, Category.Commlink,
|
|
148
|
+
]);
|
|
149
|
+
/**
|
|
150
|
+
* Stamps an archetype onto a Player: records the archetype's name (scene
|
|
151
|
+
* generation's dossier reads it -- see buildPlayerDossier), grants the
|
|
152
|
+
* requisite gear, and equips the wearables. Shared between the real
|
|
153
|
+
* character build (ui.ts) and the throwaway dossier player the launch flow
|
|
154
|
+
* builds so even the FIRST generated run is tailored to the build
|
|
155
|
+
* (sideQuest.sub.cmd.ts) -- found via a real session where a Decker's
|
|
156
|
+
* archetype-blind first job had no Matrix content at all.
|
|
157
|
+
*/
|
|
158
|
+
export function outfitArchetype(player, archetype) {
|
|
159
|
+
player.archetypeName = archetype.name;
|
|
160
|
+
for (const item of createArchetypeGear(archetype)) {
|
|
161
|
+
player.addInventory(item);
|
|
162
|
+
item.owner = player.name;
|
|
163
|
+
if (EQUIP_ON_START.has(item.category)) {
|
|
164
|
+
try {
|
|
165
|
+
player.equip(item);
|
|
166
|
+
}
|
|
167
|
+
catch { /* a second weapon just stays holstered */ }
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Slots every wearable in the pack into EMPTY equipment slots -- never
|
|
173
|
+
* swapping out anything already worn, so archetype signature gear
|
|
174
|
+
* survives the scene's generic starting kit arriving after it. Run once
|
|
175
|
+
* at session load (Game.init): a session shouldn't start with the
|
|
176
|
+
* "equip all" ritual (player request). Weapons land HOLSTERED, exactly
|
|
177
|
+
* as a manual equip would.
|
|
178
|
+
*/
|
|
179
|
+
export function equipIntoEmptySlots(player) {
|
|
180
|
+
for (const item of [...player.inventory.getAllItems()]) {
|
|
181
|
+
if (!EQUIP_ON_START.has(item.category))
|
|
182
|
+
continue;
|
|
183
|
+
const slotInfo = player.determineEquipmentSlot(item.category);
|
|
184
|
+
if (!slotInfo)
|
|
185
|
+
continue;
|
|
186
|
+
const groupRef = player.equipment[slotInfo.group];
|
|
187
|
+
if (!groupRef || groupRef[slotInfo.slot])
|
|
188
|
+
continue;
|
|
189
|
+
groupRef[slotInfo.slot] = item;
|
|
190
|
+
player.inventory.removeItem(item.name);
|
|
191
|
+
if (Player.isWeaponSlot(slotInfo.group, slotInfo.slot)) {
|
|
192
|
+
player.weaponDrawn = false;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=archetypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archetypes.js","sourceRoot":"","sources":["../../../../../../src/commands/game/sideQuest/archetypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAoCrE,MAAM,OAAO,GAAG,CAAC,OAA6G,EAAqB,EAAE,CAAC,CAAC;IACrJ,IAAI,EAAE,IAAI,CAAC,KAAK;IAChB,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,OAAO;IAChB,GAAG,OAAO;CACX,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAiB;IACtC;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,qEAAqE;QAClF,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC;YAC3I,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EA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,CAAC,QAAQ,CAAC,IAAI,CAAC;YAAE,SAAS;QACnD,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QAC/B,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YACvD,MAAM,CAAC,WAAW,GAAG,KAAK,CAAC;QAC7B,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Karma spending: "advance" lists every skill with its current rating and
|
|
4
|
+
* the cost to raise it; "advance <skill>" pays and raises. SR5e pricing --
|
|
5
|
+
* new rating x2 karma -- and a hard cap of 7. Training happens at HOME
|
|
6
|
+
* (any Residence room, i.e. the hideout): between jobs, not mid-run, and
|
|
7
|
+
* never mid-exchange. Karma itself is earned on job completion (see
|
|
8
|
+
* Scene.checkWinCondition).
|
|
9
|
+
*/
|
|
10
|
+
export declare class AdvanceCommand extends Command implements ICommand {
|
|
11
|
+
protected static verb: string;
|
|
12
|
+
protected static description: string;
|
|
13
|
+
private static readonly MAX_RATING;
|
|
14
|
+
execute(args?: string[]): Promise<string>;
|
|
15
|
+
private listSkills;
|
|
16
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { SKILL_NAMES } from '../models/player.js';
|
|
3
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
4
|
+
/**
|
|
5
|
+
* Karma spending: "advance" lists every skill with its current rating and
|
|
6
|
+
* the cost to raise it; "advance <skill>" pays and raises. SR5e pricing --
|
|
7
|
+
* new rating x2 karma -- and a hard cap of 7. Training happens at HOME
|
|
8
|
+
* (any Residence room, i.e. the hideout): between jobs, not mid-run, and
|
|
9
|
+
* never mid-exchange. Karma itself is earned on job completion (see
|
|
10
|
+
* Scene.checkWinCondition).
|
|
11
|
+
*/
|
|
12
|
+
export class AdvanceCommand extends Command {
|
|
13
|
+
static verb = 'advance';
|
|
14
|
+
static description = 'Spend karma to raise a skill (new rating x2). Train at your hideout: "advance" lists costs, "advance <skill>" pays.';
|
|
15
|
+
static MAX_RATING = 7;
|
|
16
|
+
async execute(args = []) {
|
|
17
|
+
const actor = this.actor;
|
|
18
|
+
if (actor.inExchange) {
|
|
19
|
+
return `Mid-exchange is no time for training montages.`;
|
|
20
|
+
}
|
|
21
|
+
if (actor.currentLocation?.roomType !== 'Residence') {
|
|
22
|
+
return `Training takes somewhere safe to drill -- head home to your hideout first.`;
|
|
23
|
+
}
|
|
24
|
+
if (actor.plane !== 'meat') {
|
|
25
|
+
return `Training is muscle and mind together -- come back to your body first.`;
|
|
26
|
+
}
|
|
27
|
+
if (!args || args.length === 0) {
|
|
28
|
+
return this.listSkills();
|
|
29
|
+
}
|
|
30
|
+
const picked = fuzzyPickName(args.join(' '), [...SKILL_NAMES]);
|
|
31
|
+
if (!picked) {
|
|
32
|
+
return `That's not a skill. Choose from: ${SKILL_NAMES.join(', ')}.`;
|
|
33
|
+
}
|
|
34
|
+
const skill = picked;
|
|
35
|
+
const current = actor.skillRating(skill);
|
|
36
|
+
if (current >= AdvanceCommand.MAX_RATING) {
|
|
37
|
+
return `Your ${skill} is already at ${current} -- there's nobody left on the street who could teach you more.`;
|
|
38
|
+
}
|
|
39
|
+
const next = current + 1;
|
|
40
|
+
const cost = next * 2;
|
|
41
|
+
if (actor.karma < cost) {
|
|
42
|
+
return `Raising ${skill} to ${next} costs ${cost} karma -- you have ${actor.karma}. Finish more jobs.`;
|
|
43
|
+
}
|
|
44
|
+
actor.karma -= cost;
|
|
45
|
+
actor.skills[skill] = next;
|
|
46
|
+
this.actor.performAction('trains', skill);
|
|
47
|
+
this.logger.write(`${actor.name} advanced ${skill} to ${next} (spent ${cost} karma, ${actor.karma} left).`);
|
|
48
|
+
this.scene.updateStatus();
|
|
49
|
+
return `You drill ${skill} until it sticks: ${current} -> ${next}. (${cost} karma spent, ${actor.karma} left.)`;
|
|
50
|
+
}
|
|
51
|
+
listSkills() {
|
|
52
|
+
const actor = this.actor;
|
|
53
|
+
const lines = [`=== TRAINING (karma: ${actor.karma}) ===`];
|
|
54
|
+
for (const skill of SKILL_NAMES) {
|
|
55
|
+
const current = actor.skillRating(skill);
|
|
56
|
+
const capped = current >= AdvanceCommand.MAX_RATING;
|
|
57
|
+
const cost = (current + 1) * 2;
|
|
58
|
+
lines.push(` ${skill.padEnd(12)} ${current}${capped ? ' (maxed)' : ` -> ${current + 1} costs ${cost} karma${actor.karma >= cost ? '' : ' (short)'}`}`);
|
|
59
|
+
}
|
|
60
|
+
lines.push('');
|
|
61
|
+
lines.push(`"advance <skill>" to train. Karma comes from finished jobs. (New rating x2, SR5e-style; unlisted combat ratings fall back to your base training.)`);
|
|
62
|
+
return lines.join('\n');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=advance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advance.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/advance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,WAAW,EAAa,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;GAOG;AACH,MAAM,OAAO,cAAe,SAAQ,OAAO;IAC/B,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC;IACxB,MAAM,CAAC,WAAW,GAAG,qHAAqH,CAAC;IAE7I,MAAM,CAAU,UAAU,GAAG,CAAC,CAAC;IAEvC,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC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 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Astral perception: read the world's auras without (or while) leaving
|
|
4
|
+
* your body. Awakened only. "assense" reads the room -- wards, the magical
|
|
5
|
+
* temperature; "assense <name>" reads a person: health, whether they're
|
|
6
|
+
* Awakened, the emotional weather on them, and the magic they carry. This
|
|
7
|
+
* is the recon tool that makes a mage the crew's lie detector and
|
|
8
|
+
* ward-spotter.
|
|
9
|
+
*/
|
|
10
|
+
export declare class AssenseCommand extends Command implements ICommand {
|
|
11
|
+
protected static verb: string;
|
|
12
|
+
protected static description: string;
|
|
13
|
+
execute(args?: string[]): Promise<string>;
|
|
14
|
+
/** The room's astral weather -- shared by the toggle-on and projecting paths. */
|
|
15
|
+
private readRoom;
|
|
16
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
3
|
+
import { rollPool, formatRoll } from '../utilities/dice.js';
|
|
4
|
+
/**
|
|
5
|
+
* Astral perception: read the world's auras without (or while) leaving
|
|
6
|
+
* your body. Awakened only. "assense" reads the room -- wards, the magical
|
|
7
|
+
* temperature; "assense <name>" reads a person: health, whether they're
|
|
8
|
+
* Awakened, the emotional weather on them, and the magic they carry. This
|
|
9
|
+
* is the recon tool that makes a mage the crew's lie detector and
|
|
10
|
+
* ward-spotter.
|
|
11
|
+
*/
|
|
12
|
+
export class AssenseCommand extends Command {
|
|
13
|
+
static verb = 'assense';
|
|
14
|
+
static description = 'Read auras (Awakened only): "assense" for the room and its wards, "assense <name>" for someone\'s health, nature, and the magic on them.';
|
|
15
|
+
async execute(args = []) {
|
|
16
|
+
const actor = this.actor;
|
|
17
|
+
if (!actor.isAwakened()) {
|
|
18
|
+
return `You squint. Nothing happens. Reading auras takes the Awakened gift.`;
|
|
19
|
+
}
|
|
20
|
+
if (actor.plane === 'matrix') {
|
|
21
|
+
return `There are no auras in here -- only geometry and other people's code.`;
|
|
22
|
+
}
|
|
23
|
+
const room = actor.currentLocation;
|
|
24
|
+
// Bare assense: TOGGLE astral perception (the player's own status-bar
|
|
25
|
+
// request: senses held open as a sustained state, -2 dice to
|
|
26
|
+
// everything while they are -- see Player.sustainingPenalty). While
|
|
27
|
+
// projecting you're all the way in; no toggle needed or possible.
|
|
28
|
+
if (!args || args.length === 0) {
|
|
29
|
+
if (actor.plane === 'astral') {
|
|
30
|
+
return this.readRoom(`Out here you ARE astral senses:`);
|
|
31
|
+
}
|
|
32
|
+
if (actor.astralPerceiving) {
|
|
33
|
+
actor.astralPerceiving = false;
|
|
34
|
+
this.scene.updateStatus();
|
|
35
|
+
return `You let the second sight close. The world flattens back to meat and neon.`;
|
|
36
|
+
}
|
|
37
|
+
actor.astralPerceiving = true;
|
|
38
|
+
actor.performAction('opens astral senses', 'eyes going distant, tracking things nobody else sees');
|
|
39
|
+
this.scene.updateStatus();
|
|
40
|
+
return this.readRoom(`You open your astral senses and HOLD them open (-2 dice to everything while sustained; "assense" again to close):`);
|
|
41
|
+
}
|
|
42
|
+
// Targeted assense: one aura, read as an ASSENSING test (Intuition +
|
|
43
|
+
// assensing; unskilled Intuition - 1). One hit reads the surface;
|
|
44
|
+
// three or more reads the depths (intent, sincerity, enchantment).
|
|
45
|
+
// Needs open senses -- reading a specific aura auto-opens them.
|
|
46
|
+
if (actor.plane !== 'astral' && !actor.astralPerceiving) {
|
|
47
|
+
actor.astralPerceiving = true;
|
|
48
|
+
actor.performAction('opens astral senses', 'eyes going distant');
|
|
49
|
+
this.scene.updateStatus();
|
|
50
|
+
}
|
|
51
|
+
const candidates = this.scene.getActorsInRoom(room).filter(a => a !== actor && actor.canPerceive(a));
|
|
52
|
+
const picked = fuzzyPickName(args.join(' '), candidates.map(a => a.name));
|
|
53
|
+
const target = picked ? candidates.find(a => a.name === picked) : undefined;
|
|
54
|
+
if (!target) {
|
|
55
|
+
const present = candidates.map(a => a.name).join(', ') || 'no one';
|
|
56
|
+
return `No aura by that name here. Present: ${present}.`;
|
|
57
|
+
}
|
|
58
|
+
const skill = actor.skillRating('assensing');
|
|
59
|
+
const pool = Math.max(1, actor.intuition + (skill > 0 ? skill : -1) + actor.woundModifier - actor.sustainingPenalty);
|
|
60
|
+
const roll = rollPool(pool);
|
|
61
|
+
const lines = [`You read ${target.name}'s aura -- Assensing: ${formatRoll(roll)}`];
|
|
62
|
+
if (roll.hits === 0) {
|
|
63
|
+
lines.push(` The aura swims and blurs -- nothing you can hold onto. (Look again.)`);
|
|
64
|
+
return lines.join('\n');
|
|
65
|
+
}
|
|
66
|
+
// 1+ hits: the surface -- health and the spark.
|
|
67
|
+
const physHurt = target.damageTaken > 0;
|
|
68
|
+
const stunHurt = target.stunTaken > 0;
|
|
69
|
+
const health = !physHurt && !stunHurt
|
|
70
|
+
? `whole and unhurt`
|
|
71
|
+
: `marred${physHurt ? ` -- physical trauma (${target.damageTaken}/${target.maxConditionBoxes})` : ''}${stunHurt ? ` -- exhaustion and shock (${target.stunTaken}/${target.maxStunBoxes})` : ''}`;
|
|
72
|
+
lines.push(` • Health: ${health}.`);
|
|
73
|
+
lines.push(target.isAwakened()
|
|
74
|
+
? ` • They BURN -- Awakened, magic ${target.magic}. Treat accordingly.`
|
|
75
|
+
: ` • Mundane -- no spark in them.`);
|
|
76
|
+
// 3+ hits: the depths -- intent, sincerity, and what clings to them.
|
|
77
|
+
if (roll.hits >= 3) {
|
|
78
|
+
if (target.surrendered) {
|
|
79
|
+
lines.push(` • The fight has gone out of them entirely -- the surrender is genuine.`);
|
|
80
|
+
}
|
|
81
|
+
else if (target.combatOpponent) {
|
|
82
|
+
lines.push(` • Violence swirls close to the surface -- they're in a fight, or barely out of one.`);
|
|
83
|
+
}
|
|
84
|
+
const magicGear = target.inventory.getAllItems().filter(i => {
|
|
85
|
+
const c = String(i.category).toLowerCase();
|
|
86
|
+
return c.includes('focus') || c.includes('grimoire') || c.includes('spellformula') || c.includes('spell formula');
|
|
87
|
+
});
|
|
88
|
+
if (magicGear.length > 0) {
|
|
89
|
+
lines.push(` • Enchantment clings to their gear: ${magicGear.map(i => i.name).join(', ')}.`);
|
|
90
|
+
}
|
|
91
|
+
if (target.plane === 'meat' && actor.plane === 'astral') {
|
|
92
|
+
lines.push(` • They can't see you watching.`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
lines.push(` (The deeper layers slide past -- more hits would read intent and enchantment.)`);
|
|
97
|
+
}
|
|
98
|
+
this.logger.write(`${actor.name} assensed ${target.name} (${roll.hits} hits).`);
|
|
99
|
+
return lines.join('\n');
|
|
100
|
+
}
|
|
101
|
+
/** The room's astral weather -- shared by the toggle-on and projecting paths. */
|
|
102
|
+
readRoom(header) {
|
|
103
|
+
const actor = this.actor;
|
|
104
|
+
const room = actor.currentLocation;
|
|
105
|
+
const lines = [header];
|
|
106
|
+
lines.push(room.warded
|
|
107
|
+
? ` • This place is WARDED -- an astral barrier seals it against projection.`
|
|
108
|
+
: ` • No wards here -- the astral is open ground.`);
|
|
109
|
+
if (room.hasNode) {
|
|
110
|
+
lines.push(` • The room's tech hums with dataflow -- a live Matrix node (nothing astral, but a decker would care).`);
|
|
111
|
+
}
|
|
112
|
+
const others = this.scene.getActorsInRoom(room).filter(a => a !== actor && actor.canPerceive(a));
|
|
113
|
+
if (others.length === 0) {
|
|
114
|
+
lines.push(` • No living auras nearby.`);
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
lines.push(` • Auras present: ${others.map(a => a.name).join(', ')} -- "assense <name>" to read one.`);
|
|
118
|
+
}
|
|
119
|
+
return lines.join('\n');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=assense.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assense.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/assense.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc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KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,iFAAiF;IACzE,QAAQ,CAAC,MAAc;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,IAAI,GAAG,KAAK,CAAC,eAAe,CAAC;QACnC,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM;YACpB,CAAC,CAAC,4EAA4E;YAC9E,CAAC,CAAC,iDAAiD,CAAC,CAAC;QACvD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,KAAK,CAAC,IAAI,CAAC,yGAAyG,CAAC,CAAC;QACxH,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;QACjG,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,KAAK,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;QAC5C,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,sBAAsB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;QAC1G,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.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
|
+
* Shadowrun-style dice-pool combat, one full exchange per command:
|
|
7
|
+
*
|
|
8
|
+
* 1. Attacker rolls Agility + combat skill + weapon bonus, opposed by the
|
|
9
|
+
* defender's Reaction. Net hits land the blow.
|
|
10
|
+
* 2. Damage = weapon DV + net hits, soaked by Body + armor (each soak hit
|
|
11
|
+
* cancels one box).
|
|
12
|
+
* 3. Whatever gets through fills the defender's condition monitor; a full
|
|
13
|
+
* track is death.
|
|
14
|
+
* 4. If the defender survives, they immediately strike back with the same
|
|
15
|
+
* math reversed -- starting a fight means eating one, so a fight is a
|
|
16
|
+
* real decision, not a free action.
|
|
17
|
+
*
|
|
18
|
+
* Wound modifiers (-1 die per 3 boxes taken) apply to every pool on both
|
|
19
|
+
* sides, so a fight tilts as it goes. Pools/derivations live on Player
|
|
20
|
+
* (getAttackPool() etc.); narration pacing, strike resolution, and death
|
|
21
|
+
* handling live in CombatExchange (shared with spell combat -- see
|
|
22
|
+
* cast.ts). This command only orchestrates the weapon exchange.
|
|
23
|
+
*/
|
|
24
|
+
export declare class AttackCommand extends Command implements ICommand {
|
|
25
|
+
protected static verb: string;
|
|
26
|
+
protected static description: string;
|
|
27
|
+
execute(args?: string[]): Promise<string>;
|
|
28
|
+
/** subdue.ts overrides to false: its strike ignores the equipped gun entirely. */
|
|
29
|
+
protected usesEquippedWeapon(): boolean;
|
|
30
|
+
/** Overridden by subdue.ts to swap in a stun-dealing strike. undefined = weapon default. */
|
|
31
|
+
protected strikeProfile(_exchange: CombatExchange, _target: Player | NPC): IStrikeProfile | undefined;
|
|
32
|
+
/** The verb observers see ("attacks" / "moves to subdue"). */
|
|
33
|
+
protected actionVerb(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Post-strike incapacitation, both flavors: a full physical track is a
|
|
36
|
+
* death; a full stun track (only reachable via a stun-dealing strike,
|
|
37
|
+
* or its overflow) is a live capture. Returns the narration, or null if
|
|
38
|
+
* the fallen still stands. Either combatant can be the one who falls --
|
|
39
|
+
* initiative order means the aggressor eats preemptive strikes too.
|
|
40
|
+
*/
|
|
41
|
+
protected resolveTakedown(exchange: CombatExchange, fallen: Player | NPC, killer: Player | NPC): Promise<string[] | null>;
|
|
42
|
+
}
|