@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
|
@@ -16,6 +16,11 @@ export class Item extends AbstractItem {
|
|
|
16
16
|
content;
|
|
17
17
|
details;
|
|
18
18
|
satisfiesLifestyle;
|
|
19
|
+
plane = 'meat';
|
|
20
|
+
// PAN warfare (see commands/hack.ts): a cracked smart-device locks up.
|
|
21
|
+
// A jammed firearm can't fire (fists until cleared); "reboot" clears
|
|
22
|
+
// every jammed device you carry, in the lull.
|
|
23
|
+
jammed = false;
|
|
19
24
|
_transferable;
|
|
20
25
|
// New currency-related fields
|
|
21
26
|
_currencyAmount = 0;
|
|
@@ -45,9 +50,15 @@ export class Item extends AbstractItem {
|
|
|
45
50
|
this.content = options.content;
|
|
46
51
|
this.satisfiesLifestyle = options.satisfiesLifestyle;
|
|
47
52
|
this._transferable = options.transferable !== false; // default true
|
|
53
|
+
this.plane = options.plane ?? 'meat';
|
|
48
54
|
this._id = uuidv4();
|
|
49
|
-
// Optional: you can define capacity by size
|
|
50
|
-
|
|
55
|
+
// Optional: you can define capacity by size. Deliberately scoped to
|
|
56
|
+
// CurrencyContainer only (a physical wallet/pouch) -- a Credstick is
|
|
57
|
+
// digital storage, not physically size-limited, so it's left uncapped
|
|
58
|
+
// (falls through to Infinity in addCurrency()). Capping it here would
|
|
59
|
+
// silently truncate a seed's declared "currencyAmount" down to the
|
|
60
|
+
// size-based cap the moment Credstick became a currency carrier.
|
|
61
|
+
if (this.category === Category.CurrencyContainer) {
|
|
51
62
|
switch (this.size) {
|
|
52
63
|
case Size.Small:
|
|
53
64
|
this._currencyCapacity = 100;
|
|
@@ -60,6 +71,34 @@ export class Item extends AbstractItem {
|
|
|
60
71
|
break;
|
|
61
72
|
}
|
|
62
73
|
}
|
|
74
|
+
// Firearms track ammunition: a flat magazine, starting full. Melee
|
|
75
|
+
// weapons never touch it. See fireRound()/reload() and combat-exchange.
|
|
76
|
+
if (this.isFirearm()) {
|
|
77
|
+
this.ammo = Item.MAGAZINE_CAPACITY;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
// ======================== Ammunition ========================
|
|
81
|
+
static MAGAZINE_CAPACITY = 10;
|
|
82
|
+
/** Rounds left in the magazine. Only meaningful for firearms. */
|
|
83
|
+
ammo = 0;
|
|
84
|
+
/** Any weapon that shoots -- everything weapon-ish except melee. */
|
|
85
|
+
isFirearm() {
|
|
86
|
+
return this.category === Category.RangedWeapon || this.category === Category.Weapon;
|
|
87
|
+
}
|
|
88
|
+
/** Spends one round; returns false on an empty magazine. */
|
|
89
|
+
fireRound() {
|
|
90
|
+
if (!this.isFirearm())
|
|
91
|
+
return true; // knives don't run dry
|
|
92
|
+
if (this.ammo <= 0)
|
|
93
|
+
return false;
|
|
94
|
+
this.ammo -= 1;
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
/** Refills the magazine (the spent Ammunition item is the caller's job). */
|
|
98
|
+
reload() {
|
|
99
|
+
if (this.isFirearm()) {
|
|
100
|
+
this.ammo = Item.MAGAZINE_CAPACITY;
|
|
101
|
+
}
|
|
63
102
|
}
|
|
64
103
|
get owner() {
|
|
65
104
|
return this._owner;
|
|
@@ -76,6 +115,61 @@ export class Item extends AbstractItem {
|
|
|
76
115
|
use() {
|
|
77
116
|
return `You use the ${this.name}. Nothing special happens.`;
|
|
78
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* How much this item's quality tier is worth in game mechanics: extra
|
|
120
|
+
* weapon damage/attack dice, armor soak, medkit healing (see
|
|
121
|
+
* Player.getWeaponProfile/getArmorValue and commands/use.ts). Gear
|
|
122
|
+
* quality is the game's whole progression system, so every mechanic
|
|
123
|
+
* that gear feeds scales off this one number.
|
|
124
|
+
*/
|
|
125
|
+
get qualityBonus() {
|
|
126
|
+
switch (this.rating) {
|
|
127
|
+
case Rating.Common: return 0;
|
|
128
|
+
case Rating.Standard: return 1;
|
|
129
|
+
case Rating.Rare: return 2;
|
|
130
|
+
case Rating.Legendary: return 3;
|
|
131
|
+
case Rating.MilitaryGrade: return 4;
|
|
132
|
+
default: return 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
// ================= Device condition monitor (cyberdecks) =================
|
|
136
|
+
// Matrix combat damage lands on HARDWARE: the deck you jacked in with
|
|
137
|
+
// (see combat-exchange.ts routing and Player.takeMatrixDamage). A full
|
|
138
|
+
// track BRICKS the deck -- forced dump, and no jacking in on it again
|
|
139
|
+
// until it's repaired (rest somewhere safe -- see rest.ts). Damage
|
|
140
|
+
// persists across jack-outs; rebooting doesn't un-melt circuitry.
|
|
141
|
+
_deckDamage = 0;
|
|
142
|
+
isCyberdeck() {
|
|
143
|
+
return this.category === Category.Cyberdeck;
|
|
144
|
+
}
|
|
145
|
+
/** Better decks have more board to burn through: 8 + 2 per quality step. */
|
|
146
|
+
get maxDeckBoxes() {
|
|
147
|
+
return 8 + 2 * this.qualityBonus;
|
|
148
|
+
}
|
|
149
|
+
get deckDamage() {
|
|
150
|
+
return this._deckDamage;
|
|
151
|
+
}
|
|
152
|
+
/** Returns boxes actually taken. Full track = bricked. */
|
|
153
|
+
takeDeckDamage(boxes) {
|
|
154
|
+
const taken = Math.max(0, Math.floor(boxes));
|
|
155
|
+
this._deckDamage = Math.min(this.maxDeckBoxes, this._deckDamage + taken);
|
|
156
|
+
return taken;
|
|
157
|
+
}
|
|
158
|
+
get isBricked() {
|
|
159
|
+
return this._deckDamage >= this.maxDeckBoxes;
|
|
160
|
+
}
|
|
161
|
+
/** Clears boxes; returns how many were actually repaired. */
|
|
162
|
+
repairDeck(boxes) {
|
|
163
|
+
const before = this._deckDamage;
|
|
164
|
+
this._deckDamage = Math.max(0, before - Math.max(0, Math.floor(boxes)));
|
|
165
|
+
return before - this._deckDamage;
|
|
166
|
+
}
|
|
167
|
+
/** The deck track, same rendering as the body's condition monitors. */
|
|
168
|
+
deckSummary() {
|
|
169
|
+
const max = this.maxDeckBoxes;
|
|
170
|
+
const filled = Math.min(max, this._deckDamage);
|
|
171
|
+
return `${'■'.repeat(filled)}${'□'.repeat(max - filled)} (${filled}/${max})`;
|
|
172
|
+
}
|
|
79
173
|
supportsAddiction(addiction) {
|
|
80
174
|
return this.satisfiesLifestyle?.addictionTypes?.includes(addiction) ?? false;
|
|
81
175
|
}
|
|
@@ -83,8 +177,17 @@ export class Item extends AbstractItem {
|
|
|
83
177
|
return this.satisfiesLifestyle?.habitTags?.includes(habit) ?? false;
|
|
84
178
|
}
|
|
85
179
|
// --- Currency Support ---
|
|
180
|
+
/**
|
|
181
|
+
* The generation schema explicitly allows "currencyAmount" on either a
|
|
182
|
+
* "Credstick" or "CurrencyContainer" item (see scene-seed-generator.ts),
|
|
183
|
+
* but this only ever recognized the latter -- so a Credstick's nuyen
|
|
184
|
+
* silently never got set at all (item-factory.ts gates addCurrency() on
|
|
185
|
+
* this), and never counted toward the inventory panel's Total. Found via
|
|
186
|
+
* a real session where a 1,000-nuyen credstick added nothing to the
|
|
187
|
+
* displayed total.
|
|
188
|
+
*/
|
|
86
189
|
isCurrencyCarrier() {
|
|
87
|
-
return this.category === Category.CurrencyContainer;
|
|
190
|
+
return this.category === Category.CurrencyContainer || this.category === Category.Credstick;
|
|
88
191
|
}
|
|
89
192
|
get currencyAmount() {
|
|
90
193
|
return this._currencyAmount;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/models/item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"item.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/models/item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAyB5D,MAAM,OAAO,IAAK,SAAQ,YAAY;IAC5B,GAAG,CAAS;IACZ,MAAM,CAAsB;IAC7B,IAAI,CAAS;IACb,WAAW,CAAS;IACpB,IAAI,CAAO;IACX,QAAQ,CAAW;IACnB,KAAK,CAAS;IACd,KAAK,CAAS;IACd,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,MAAM,CAAS;IACf,OAAO,CAAU;IACjB,OAAO,CAAU;IACjB,kBAAkB,CAGvB;IACK,KAAK,GAAiC,MAAM,CAAC;IAEpD,uEAAuE;IACvE,qEAAqE;IACrE,8CAA8C;IACvC,MAAM,GAAG,KAAK,CAAC;IAEd,aAAa,CAAU;IAE/B,8BAA8B;IACpB,eAAe,GAAW,CAAC,CAAC;IAC5B,iBAAiB,CAAU;IAErC,YAAY,OAA+B;QACzC,KAAK,EAAE,CAAC;QAER,uBAAuB;QACvB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,Q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CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,0BAA0B;YAEtE,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;gBACzC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;gBAClB,CAAC,CAAC,KAAK,CAAC;YAEV,OAAO,GAAG,YAAY,KAAK,cAAc,EAAE,CAAC;QAC9C,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC"}
|
|
@@ -10,8 +10,11 @@ export interface INPCConstructorConfig {
|
|
|
10
10
|
export declare class NPC extends Player {
|
|
11
11
|
private _dialogue;
|
|
12
12
|
private _description;
|
|
13
|
+
private _appearance?;
|
|
14
|
+
private hasAIAppearance;
|
|
13
15
|
private _scene?;
|
|
14
16
|
private _commandHelp;
|
|
17
|
+
private _objective?;
|
|
15
18
|
private _history;
|
|
16
19
|
private readonly _maxHistory;
|
|
17
20
|
private commandRegistry;
|
|
@@ -21,13 +24,37 @@ export declare class NPC extends Player {
|
|
|
21
24
|
private static npcSeeCooldownMs;
|
|
22
25
|
private _maxRecursion;
|
|
23
26
|
private waitingForPlayer;
|
|
27
|
+
private _spokeThisStimulus;
|
|
28
|
+
private static readonly RESPOND_WORTHY_VERB;
|
|
24
29
|
constructor(npcConfig: INPCConstructorConfig, commandRegistry: CommandRegistry);
|
|
25
30
|
set scene(scene: Scene);
|
|
26
31
|
get description(): string;
|
|
27
32
|
set description(description: string);
|
|
33
|
+
get appearance(): string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Generates a spoiler-free, player-facing first impression once per scene
|
|
36
|
+
* load. Deliberately kept separate from `_description`, which holds
|
|
37
|
+
* GM-only behavior notes (e.g. "will kill on sight") that would ruin the
|
|
38
|
+
* game if surfaced through `look at <npc>`.
|
|
39
|
+
*/
|
|
40
|
+
ensureAIAppearance(sceneContext: string): Promise<void>;
|
|
28
41
|
act(commandString: string): Promise<void>;
|
|
29
42
|
hear(actor: Player, message: string): Promise<void>;
|
|
30
43
|
see(actor: Player, verb: string, details?: string): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* The NPC's own condition, in words its AI can act on -- without this,
|
|
46
|
+
* an NPC literally cannot perceive being hurt: found via a real session
|
|
47
|
+
* where a nearly-dead fighter battled on exactly like a fresh one,
|
|
48
|
+
* because nothing ever put its wounds in its prompt. The badly-wounded
|
|
49
|
+
* nudge is what lets flee/surrender/beg behavior emerge.
|
|
50
|
+
*/
|
|
51
|
+
/**
|
|
52
|
+
* Off-plane natives get told WHAT they are, so the AI plays ice like a
|
|
53
|
+
* program and a spirit like a spirit -- and neither wanders off its
|
|
54
|
+
* post or tries to pick up physical objects it can't touch.
|
|
55
|
+
*/
|
|
56
|
+
private buildPlaneSummary;
|
|
57
|
+
private buildConditionSummary;
|
|
31
58
|
private _addToHistory;
|
|
32
59
|
private getHistorySummary;
|
|
33
60
|
speak(message?: string): string;
|