@maka/maka-cli 5.6.0 → 5.8.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 +2 -2
- package/bundle/typescript/src/commands/_index.d.ts +4 -0
- package/bundle/typescript/src/commands/_index.js +4 -0
- package/bundle/typescript/src/commands/_index.js.map +1 -1
- package/bundle/typescript/src/commands/debug.js +1 -7
- package/bundle/typescript/src/commands/debug.js.map +1 -1
- package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.js +33 -32
- package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/commands/env/_index.d.ts +3 -0
- package/bundle/typescript/src/commands/env/_index.js +4 -0
- package/bundle/typescript/src/commands/env/_index.js.map +1 -0
- package/bundle/typescript/src/commands/env/env.command.d.ts +3 -0
- package/bundle/typescript/src/commands/env/env.command.js +22 -0
- package/bundle/typescript/src/commands/env/env.command.js.map +1 -0
- package/bundle/typescript/src/commands/env/get.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/env/get.sub.cmd.js +46 -0
- package/bundle/typescript/src/commands/env/get.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/env/prompt-for-env.d.ts +10 -0
- package/bundle/typescript/src/commands/env/prompt-for-env.js +27 -0
- package/bundle/typescript/src/commands/env/prompt-for-env.js.map +1 -0
- package/bundle/typescript/src/commands/env/set.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/env/set.sub.cmd.js +59 -0
- package/bundle/typescript/src/commands/env/set.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js +81 -2
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/augmentations.d.ts +31 -0
- package/bundle/typescript/src/commands/game/sideQuest/augmentations.js +125 -0
- package/bundle/typescript/src/commands/game/sideQuest/augmentations.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.d.ts +17 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js +113 -15
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.d.ts +37 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js +197 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js +21 -11
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.d.ts +3 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js +13 -5
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js +7 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js +97 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.d.ts +21 -10
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js +41 -27
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.d.ts +6 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +54 -20
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.d.ts +35 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js +306 -55
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/companions.d.ts +33 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/companions.js +137 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/companions.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js +37 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drink.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drink.js +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drink.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/eat.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/eat.js +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/eat.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +101 -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 +6 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +67 -22
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +15 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js +58 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.d.ts +26 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.js +125 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/install.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/install.js +125 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/install.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jump.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jump.js +83 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jump.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.js +76 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +7 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/order.d.ts +19 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/order.js +151 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/order.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pay.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pay.js +39 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pay.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js +5 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js +6 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.js +121 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js +60 -12
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +27 -10
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +15 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sell.d.ts +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js +125 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js +36 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js +9 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js +27 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/summon.d.ts +19 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/summon.js +112 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/summon.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/treat.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/treat.js +67 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/treat.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +7 -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 +29 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +118 -11
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/work.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/work.js +68 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/work.js.map +1 -0
- 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/scene-chunks.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +132 -5
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.d.ts +6 -2
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +10 -6
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +196 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.js +828 -31
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +28 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js +111 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +33 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +232 -10
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +111 -5
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +432 -41
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +6 -6
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +38 -14
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +48 -8
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/qualities.d.ts +44 -0
- package/bundle/typescript/src/commands/game/sideQuest/qualities.js +155 -0
- package/bundle/typescript/src/commands/game/sideQuest/qualities.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +274 -5
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.d.ts +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +82 -8
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.d.ts +13 -6
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js +28 -15
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.d.ts +15 -3
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +207 -34
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/commerce.d.ts +56 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/commerce.js +144 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/commerce.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.d.ts +7 -4
- package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js +8 -5
- package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.js +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/log-style.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js +49 -4
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/outdoors.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/outdoors.js +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/outdoors.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +107 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/terminal-reset.d.ts +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/terminal-reset.js +23 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/terminal-reset.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +51 -15
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/commands/remote/reconfig.sub.cmd.js +27 -1
- package/bundle/typescript/src/commands/remote/reconfig.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/commands/run/run.command.js +1 -7
- package/bundle/typescript/src/commands/run/run.command.js.map +1 -1
- package/bundle/typescript/src/commands/ssl.js +10 -15
- package/bundle/typescript/src/commands/ssl.js.map +1 -1
- package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.js +1 -6
- package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/generators/config.js +11 -10
- package/bundle/typescript/src/generators/config.js.map +1 -1
- package/bundle/typescript/src/templates/meteor/config/pm2.config.js +3 -3
- package/bundle/typescript/src/templates/meteor/project/gitignore +2 -1
- package/bundle/typescript/src/templates/react/kit/mui/auth/password-reset/basic-password-reset-page.js.tsx +3 -4
- package/bundle/typescript/src/tool.d.ts +2 -0
- package/bundle/typescript/src/tool.js +3 -0
- package/bundle/typescript/src/tool.js.map +1 -1
- package/bundle/typescript/src/tools/aws/aws.class.js +6 -4
- package/bundle/typescript/src/tools/aws/aws.class.js.map +1 -1
- package/bundle/typescript/src/tools/dotenvx/dotenvx.class.d.ts +24 -0
- package/bundle/typescript/src/tools/dotenvx/dotenvx.class.js +66 -0
- package/bundle/typescript/src/tools/dotenvx/dotenvx.class.js.map +1 -0
- package/bundle/typescript/src/tools/ssh/ssh.class.js +1 -1
- package/bundle/typescript/src/tools/ssh/ssh.class.js.map +1 -1
- package/bundle/typescript/src/tools/ssl/ssl.class.d.ts +8 -0
- package/bundle/typescript/src/tools/ssl/ssl.class.js +53 -0
- package/bundle/typescript/src/tools/ssl/ssl.class.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { NPC } from '../models/npc.js';
|
|
1
2
|
import { rollPool, formatRoll } from './dice.js';
|
|
2
|
-
import { leaveMatrix } from './planes.js';
|
|
3
|
+
import { leaveMatrix, leaveDrone } from './planes.js';
|
|
3
4
|
/**
|
|
4
5
|
* The shared combat-exchange engine, extracted from AttackCommand so spell
|
|
5
6
|
* combat (cast.ts) rides the exact same rails: progressive block-by-block
|
|
@@ -50,6 +51,7 @@ export class CombatExchange {
|
|
|
50
51
|
// The aggressor skips the draw when their attack isn't weapon-driven
|
|
51
52
|
// (a subdual hold, a spell) -- their hands are already busy.
|
|
52
53
|
const drawLines = [];
|
|
54
|
+
// (A jumped-in drone has mounts, not holsters -- only meat draws.)
|
|
53
55
|
const shouldDraw = (c) => c.plane === 'meat' && (c !== this.actor || opts.aggressorDraws !== false);
|
|
54
56
|
for (const combatant of [this.actor, target]) {
|
|
55
57
|
if (!shouldDraw(combatant))
|
|
@@ -65,6 +67,16 @@ export class CombatExchange {
|
|
|
65
67
|
this._combatants = [this.actor, target];
|
|
66
68
|
this.actor.inExchange = true;
|
|
67
69
|
target.inExchange = true;
|
|
70
|
+
// Attacking someone whose hands are UP is the kind of story that
|
|
71
|
+
// travels (SR5e p.368: notoriety for callous behavior / killing
|
|
72
|
+
// innocents). Player-only, once per victim -- checked before the
|
|
73
|
+
// aggressor's own flag bookkeeping below.
|
|
74
|
+
const aggressorIsPlayer = this.actor === this.scene.getPlayer();
|
|
75
|
+
if (aggressorIsPlayer && target.surrendered) {
|
|
76
|
+
if (this.actor.addNotoriety(`cut down ${target.name} mid-surrender`)) {
|
|
77
|
+
this.logger.logWithColor(`${target.name} had their hands up. That story WILL travel. (+1 Notoriety, now ${this.actor.notoriety})`, 'yellow');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
68
80
|
// Initiating violence revokes your own surrender -- hands up means
|
|
69
81
|
// hands up (see commands/surrender.ts). The TARGET's surrender flag
|
|
70
82
|
// stays: being attacked while surrendered doesn't un-surrender you.
|
|
@@ -72,6 +84,26 @@ export class CombatExchange {
|
|
|
72
84
|
// Both sides remember the fight -- this is what a parting shot keys
|
|
73
85
|
// off when either of them tries to walk away (see go.ts).
|
|
74
86
|
const now = Date.now();
|
|
87
|
+
// Combat Paralysis (SR5e p.80): the freeze hits when a FIGHT starts,
|
|
88
|
+
// not every exchange of it -- "fresh" meaning this pairing wasn't
|
|
89
|
+
// already trading blows moments ago. Armed here (before the opponent
|
|
90
|
+
// bookkeeping overwrites the evidence), cashed in by rollInitiative.
|
|
91
|
+
// The same freshness check prices a SPIRIT companion's combat: one
|
|
92
|
+
// service per FIGHT joined (RAW p.302), ticked when the fight opens.
|
|
93
|
+
const FIGHT_GAP_MS = 60000;
|
|
94
|
+
for (const [combatant, other] of [[this.actor, target], [target, this.actor]]) {
|
|
95
|
+
const freshFight = combatant.combatOpponent !== other || now - combatant.lastExchangeAt > FIGHT_GAP_MS;
|
|
96
|
+
if (freshFight && combatant.hasQuality('combat-paralysis'))
|
|
97
|
+
combatant.paralysisFreeze = true;
|
|
98
|
+
if (freshFight) {
|
|
99
|
+
const spiritEntry = this.scene.ownerGame?.companions?.find(c => c.npc === combatant && c.kind === 'spirit');
|
|
100
|
+
if (spiritEntry && (spiritEntry.services ?? 0) > 0) {
|
|
101
|
+
spiritEntry.services = (spiritEntry.services ?? 0) - 1;
|
|
102
|
+
// Resource arithmetic -- Mechanics ticker (readability pass).
|
|
103
|
+
this.logger.meta(`👥 ${combatant.name} joins the fight -- one service spent (${spiritEntry.services} left).`, 'green');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
75
107
|
this.actor.combatOpponent = target;
|
|
76
108
|
this.actor.lastExchangeAt = now;
|
|
77
109
|
target.combatOpponent = this.actor;
|
|
@@ -119,19 +151,41 @@ export class CombatExchange {
|
|
|
119
151
|
* action-economy system).
|
|
120
152
|
*/
|
|
121
153
|
rollInitiative(aggressor, defender) {
|
|
122
|
-
|
|
123
|
-
|
|
154
|
+
// Combat Paralysis cashes in here: pool halved (rounded up) for the
|
|
155
|
+
// opening roll-off of a fresh fight, then the freeze passes.
|
|
156
|
+
const freezeLines = [];
|
|
157
|
+
const initiativePool = (c) => {
|
|
158
|
+
const pool = c.getInitiativePool();
|
|
159
|
+
if (!c.paralysisFreeze)
|
|
160
|
+
return pool;
|
|
161
|
+
c.paralysisFreeze = false;
|
|
162
|
+
freezeLines.push(` ${c.name} FREEZES as it starts -- initiative halved this exchange.`);
|
|
163
|
+
return Math.ceil(pool / 2);
|
|
164
|
+
};
|
|
165
|
+
const aggRoll = rollPool(initiativePool(aggressor));
|
|
166
|
+
const defRoll = rollPool(initiativePool(defender));
|
|
124
167
|
const aggressorFirst = aggRoll.hits >= defRoll.hits;
|
|
125
168
|
const first = aggressorFirst ? aggressor : defender;
|
|
126
169
|
const second = aggressorFirst ? defender : aggressor;
|
|
127
170
|
const net = Math.abs(aggRoll.hits - defRoll.hits);
|
|
128
171
|
const extraStriker = net >= 3 ? first : null;
|
|
129
172
|
this.logger.write(`Initiative: ${aggressor.name} ${aggRoll.hits} vs ${defender.name} ${defRoll.hits} -- ${first.name} first${extraStriker ? ' with an extra strike' : ''}.`);
|
|
173
|
+
// Readability split: the dice anatomy is Mechanics-ticker material
|
|
174
|
+
// (metaLines); the world log keeps only what the player FEELS --
|
|
175
|
+
// who froze, who moves first (lines). Callers rebuild AI-history
|
|
176
|
+
// reports as [...lines, ...metaLines] so NPC memories keep the dice.
|
|
177
|
+
// One line per roller (playtest note: the single "A vs B" line was
|
|
178
|
+
// hard to read) -- each carries its own right-justified wave.
|
|
179
|
+
const metaLines = [
|
|
180
|
+
`Initiative:`,
|
|
181
|
+
` ${aggressor.name}: ${formatRoll(aggRoll)}`,
|
|
182
|
+
` ${defender.name}: ${formatRoll(defRoll)}`,
|
|
183
|
+
];
|
|
130
184
|
const lines = [
|
|
131
|
-
|
|
132
|
-
|
|
185
|
+
...freezeLines,
|
|
186
|
+
`${first.name} moves first.${extraStriker ? ` And they're FAST -- an extra strike this exchange.` : ''}`,
|
|
133
187
|
];
|
|
134
|
-
return { first, second, extraStriker, lines };
|
|
188
|
+
return { first, second, extraStriker, lines, metaLines };
|
|
135
189
|
}
|
|
136
190
|
/**
|
|
137
191
|
* The player should see a fight's blow-by-blow only when they're actually
|
|
@@ -155,10 +209,16 @@ export class CombatExchange {
|
|
|
155
209
|
* fight an NPC started. The status box refreshes with every block so the
|
|
156
210
|
* condition monitor visibly ticks as damage lands.
|
|
157
211
|
*/
|
|
158
|
-
async announce(lines) {
|
|
159
|
-
if (lines.length === 0 || !this.playerWitnesses())
|
|
212
|
+
async announce(lines, meta = []) {
|
|
213
|
+
if ((lines.length === 0 && meta.length === 0) || !this.playerWitnesses())
|
|
160
214
|
return;
|
|
161
|
-
|
|
215
|
+
// Dice anatomy ticks in the Mechanics panel; the world log gets the
|
|
216
|
+
// narrative behind a leading blank line -- the per-block separator
|
|
217
|
+
// the old wall-of-text never had (readability pass).
|
|
218
|
+
for (const m of meta)
|
|
219
|
+
this.logger.meta(m);
|
|
220
|
+
if (lines.length > 0)
|
|
221
|
+
this.logger.log(`\n${lines.join('\n')}`);
|
|
162
222
|
this.scene.updateStatus();
|
|
163
223
|
await new Promise(resolve => setTimeout(resolve, CombatExchange.BEAT_MS));
|
|
164
224
|
}
|
|
@@ -183,26 +243,56 @@ export class CombatExchange {
|
|
|
183
243
|
// An armed edge boost (see edge.ts) lands on whichever strike this
|
|
184
244
|
// builds -- the attacker's next swing.
|
|
185
245
|
const edgeBoost = attacker.consumeEdgeBoost();
|
|
246
|
+
// BARE FISTS ARE STUN (SR5e RAW: unarmed deals Stun by default --
|
|
247
|
+
// Killing Hands and the "Harder Knock" called shot exist precisely to
|
|
248
|
+
// make a punch lethal, p.310/p.195). A fistfight KOs; the overflow
|
|
249
|
+
// past a full stun track still bleeds physical, so a long enough
|
|
250
|
+
// beating still kills. Exceptions carve fists back to Physical: Bone
|
|
251
|
+
// Lacing (the skeleton IS a weapon) and an adept's killing hands.
|
|
252
|
+
// Found via a real session where a mundane's bare-knuckle loss filled
|
|
253
|
+
// the PHYSICAL track. Meat plane only -- Matrix/astral strikes keep
|
|
254
|
+
// their own damage rules.
|
|
255
|
+
const meatUnarmed = attacker.plane === 'meat' && !(attacker.weaponDrawn && attacker.getCarriedWeapon());
|
|
256
|
+
const lethalFists = attacker.hasAug('bone-lacing') || attacker.adept;
|
|
257
|
+
const fistsAreStun = (meatUnarmed && !lethalFists) || undefined;
|
|
186
258
|
if (weaponItem?.isFirearm() && (weaponItem.ammo <= 0 || weaponItem.jammed)) {
|
|
187
259
|
return {
|
|
188
260
|
label: `with bare fists -- ${weaponItem.name} is ${weaponItem.jammed ? 'locked (smartlink hacked)' : 'dry'}`,
|
|
189
261
|
pool: Math.max(0, attacker.getAttackPool() - weapon.poolBonus + edgeBoost),
|
|
190
262
|
damageBase: 2,
|
|
191
263
|
soakPool: defender.getSoakPool(),
|
|
264
|
+
dealStun: !lethalFists || undefined,
|
|
192
265
|
};
|
|
193
266
|
}
|
|
267
|
+
// ARMOR PENETRATION (RAW gear pass, see Item.armorPen): the weapon's
|
|
268
|
+
// AP eats the defender's ARMOR dice -- never their Body -- so a knife
|
|
269
|
+
// finds the gaps a club just bruises through. Only meaningful against
|
|
270
|
+
// a meat defender wearing armor; drone hulls and personas soak whole.
|
|
271
|
+
const ap = Math.abs(weapon.armorPen ?? 0);
|
|
272
|
+
const armorEaten = ap > 0 && defender.plane === 'meat' ? Math.min(ap, defender.getArmorValue()) : 0;
|
|
194
273
|
return {
|
|
195
|
-
label: `with ${weapon.name}`,
|
|
274
|
+
label: `with ${weapon.name}${armorEaten > 0 ? ` (AP -${armorEaten})` : ''}`,
|
|
196
275
|
pool: attacker.getAttackPool() + edgeBoost,
|
|
197
276
|
damageBase: weapon.damage,
|
|
198
|
-
soakPool: defender.getSoakPool(),
|
|
277
|
+
soakPool: Math.max(0, defender.getSoakPool() - armorEaten),
|
|
199
278
|
weaponItem: weaponItem ?? undefined,
|
|
279
|
+
dealStun: fistsAreStun,
|
|
200
280
|
};
|
|
201
281
|
}
|
|
202
|
-
/**
|
|
282
|
+
/**
|
|
283
|
+
* One directed strike: attack vs defense, then soak. Mutates the
|
|
284
|
+
* defender. Readability split: `meta` carries the dice anatomy
|
|
285
|
+
* (Attack/Defense/Soak rolls, net-hit math) for the Mechanics ticker;
|
|
286
|
+
* `world` carries the narrative -- one compact header with the
|
|
287
|
+
* outcome, then the damage/flavor lines the player feels. Callers
|
|
288
|
+
* rebuild AI-history reports as [...world, ...meta] so an NPC's
|
|
289
|
+
* memory of the fight keeps the dice.
|
|
290
|
+
*/
|
|
203
291
|
resolveStrike(attacker, defender, profile) {
|
|
204
292
|
const strike = profile ?? this.weaponProfile(attacker, defender);
|
|
205
|
-
const
|
|
293
|
+
const world = [];
|
|
294
|
+
const meta = [];
|
|
295
|
+
const lines = world; // the damage branches below narrate into the world
|
|
206
296
|
// Firing costs a round; the last one gets a warning line.
|
|
207
297
|
if (strike.weaponItem?.isFirearm()) {
|
|
208
298
|
strike.weaponItem.fireRound();
|
|
@@ -210,29 +300,89 @@ export class CombatExchange {
|
|
|
210
300
|
}
|
|
211
301
|
const attack = rollPool(strike.pool);
|
|
212
302
|
const defense = rollPool(defender.getDefensePool());
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
303
|
+
const header = `${attacker.name} attacks ${defender.name} ${strike.label}`;
|
|
304
|
+
meta.push(`${header}:`);
|
|
305
|
+
meta.push(` Attack: ${formatRoll(attack)}`);
|
|
306
|
+
meta.push(` Defense: ${formatRoll(defense)}`);
|
|
216
307
|
const dryWarning = strike.weaponItem?.isFirearm() && strike.weaponItem.ammo === 0
|
|
217
308
|
? [` ${attacker.name}'s ${strike.weaponItem.name} clicks empty -- that was the last round.`]
|
|
218
309
|
: [];
|
|
219
310
|
const netHits = attack.hits - defense.hits;
|
|
220
311
|
if (attack.criticalGlitch) {
|
|
221
|
-
|
|
222
|
-
return [...
|
|
312
|
+
world.push(`${header} -- and it goes catastrophically wrong: a clean miss, and everyone nearby heard it.`);
|
|
313
|
+
return { world: [...world, ...dryWarning], meta };
|
|
223
314
|
}
|
|
224
315
|
if (netHits <= 0) {
|
|
225
|
-
|
|
226
|
-
return [...
|
|
316
|
+
world.push(`${header} -- ${defender.name} evades.`);
|
|
317
|
+
return { world: [...world, ...dryWarning], meta };
|
|
227
318
|
}
|
|
228
319
|
const incoming = strike.damageBase + netHits;
|
|
229
320
|
const soak = rollPool(strike.soakPool);
|
|
230
321
|
const dealt = Math.max(0, incoming - soak.hits);
|
|
231
|
-
|
|
232
|
-
|
|
322
|
+
meta.push(` Hit! ${netHits} net -- ${incoming} damage incoming.`);
|
|
323
|
+
meta.push(` Soak: ${formatRoll(soak)}`);
|
|
233
324
|
if (dealt === 0) {
|
|
234
|
-
|
|
235
|
-
return [...
|
|
325
|
+
world.push(`${header} -- ${defender.name} shrugs it off; nothing gets through.`);
|
|
326
|
+
return { world: [...world, ...dryWarning], meta };
|
|
327
|
+
}
|
|
328
|
+
world.push(`${header} -- HIT:`);
|
|
329
|
+
// A COMPANION SHELL routes damage into its persistent DEVICE: an
|
|
330
|
+
// autonomous drone's hull (Item.droneDamage), an agent's deck (RAW
|
|
331
|
+
// p.246: attacks on the agent damage the deck -- shared monitor).
|
|
332
|
+
// No biofeedback -- nobody's brain rides a dog-brain. When the
|
|
333
|
+
// device dies, the shell's own track is filled so the caller's
|
|
334
|
+
// normal death flow (resolveDeath -> removeActor -> onActorRemoved)
|
|
335
|
+
// fires without a parallel path.
|
|
336
|
+
if (defender instanceof NPC && defender.boundDevice) {
|
|
337
|
+
const device = defender.boundDevice;
|
|
338
|
+
if (device.isDrone()) {
|
|
339
|
+
device.takeDroneDamage(dealt);
|
|
340
|
+
this.logger.write(`${attacker.name} dealt ${dealt} HULL damage to companion ${defender.name} (${device.droneDamage}/${device.maxDroneBoxes}).`);
|
|
341
|
+
lines.push(` ${defender.name} takes ${dealt} box${dealt === 1 ? '' : 'es'} to the airframe: ${device.droneSummary()}`);
|
|
342
|
+
if (device.isWrecked) {
|
|
343
|
+
defender.takeDamage(defender.maxConditionBoxes);
|
|
344
|
+
lines.push(` The frame comes apart -- rotors, casing, sparks.`);
|
|
345
|
+
}
|
|
346
|
+
return { world: [...lines, ...dryWarning], meta };
|
|
347
|
+
}
|
|
348
|
+
if (device.isCyberdeck()) {
|
|
349
|
+
device.takeDeckDamage(dealt);
|
|
350
|
+
this.logger.write(`${attacker.name} dealt ${dealt} MATRIX damage to agent ${defender.name}'s host deck (${device.deckDamage}/${device.maxDeckBoxes}).`);
|
|
351
|
+
lines.push(` The hit lands on the deck the agent runs on: ${device.deckSummary()}`);
|
|
352
|
+
if (device.isBricked) {
|
|
353
|
+
defender.takeDamage(defender.maxConditionBoxes);
|
|
354
|
+
lines.push(` The deck BRICKS -- the agent derezzes mid-instruction.`);
|
|
355
|
+
}
|
|
356
|
+
return { world: [...lines, ...dryWarning], meta };
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
// A JUMPED-IN RIGGER's presence is the airframe: every box lands on
|
|
360
|
+
// the drone's hull monitor, and HALF (rounded up) bleeds through the
|
|
361
|
+
// link as biofeedback (SR5e p.266) -- stun in cold-sim, PHYSICAL in
|
|
362
|
+
// hot. A full hull is a wreck: forced dump, dumpshock, fight over
|
|
363
|
+
// for the machine (the rider wakes up streets away in their body).
|
|
364
|
+
if (defender.plane === 'drone' && defender.riggedDrone) {
|
|
365
|
+
const drone = defender.riggedDrone;
|
|
366
|
+
drone.takeDroneDamage(dealt);
|
|
367
|
+
this.logger.write(`${attacker.name} dealt ${dealt} HULL damage to ${defender.name}'s ${drone.name} (${drone.droneDamage}/${drone.maxDroneBoxes}).`);
|
|
368
|
+
lines.push(` ${defender.name}'s ${drone.name} takes ${dealt} box${dealt === 1 ? '' : 'es'}: ${drone.droneSummary()}`);
|
|
369
|
+
const bio = Math.ceil(dealt / 2);
|
|
370
|
+
if (defender.simMode === 'hot') {
|
|
371
|
+
defender.takeDamage(bio);
|
|
372
|
+
lines.push(` The hit comes home through the hot link -- ${bio} PHYSICAL: ${defender.conditionSummary()}`);
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
const { stun, overflow } = defender.takeStun(bio);
|
|
376
|
+
lines.push(` Feedback stings down the link -- ${stun} stun: ${defender.stunSummary()}`);
|
|
377
|
+
if (overflow > 0) {
|
|
378
|
+
lines.push(` It's more than the link should carry -- ${overflow} box${overflow === 1 ? '' : 'es'} spill physical: ${defender.conditionSummary()}`);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
if (drone.isWrecked) {
|
|
382
|
+
lines.push(` ${drone.name} comes apart mid-air -- rotors, casing, sparks --`);
|
|
383
|
+
lines.push(...leaveDrone(this.scene, defender, { forced: true, reason: `The airframe dies around you.` }));
|
|
384
|
+
}
|
|
385
|
+
return { world: [...lines, ...dryWarning], meta };
|
|
236
386
|
}
|
|
237
387
|
// A jacked-in visitor takes MATRIX damage (only visitors have a
|
|
238
388
|
// simMode -- native ice's normal track IS its integrity, so it takes
|
|
@@ -261,7 +411,7 @@ export class CombatExchange {
|
|
|
261
411
|
lines.push(` ${deck.name} BRICKS -- the persona collapses into static --`);
|
|
262
412
|
lines.push(...leaveMatrix(this.scene, defender, { forced: true, reason: `The ice burns your deck out from under you.` }));
|
|
263
413
|
}
|
|
264
|
-
return [...lines, ...dryWarning];
|
|
414
|
+
return { world: [...lines, ...dryWarning], meta };
|
|
265
415
|
}
|
|
266
416
|
// Deckless: the living persona. Fall through to the stun branch.
|
|
267
417
|
}
|
|
@@ -280,7 +430,7 @@ export class CombatExchange {
|
|
|
280
430
|
this.logger.write(`${attacker.name} dealt ${dealt} boxes to ${defender.name} (${defender.damageTaken}/${defender.maxConditionBoxes}).`);
|
|
281
431
|
lines.push(` ${defender.name} takes ${dealt} box${dealt === 1 ? '' : 'es'}: ${defender.conditionSummary()}`);
|
|
282
432
|
}
|
|
283
|
-
return [...lines, ...dryWarning];
|
|
433
|
+
return { world: [...lines, ...dryWarning], meta };
|
|
284
434
|
}
|
|
285
435
|
/**
|
|
286
436
|
* Death/knockout narration is announced BEFORE the removal side effects
|
|
@@ -294,11 +444,18 @@ export class CombatExchange {
|
|
|
294
444
|
async resolveDeath(fallen, killer, opts) {
|
|
295
445
|
const room = fallen.currentLocation;
|
|
296
446
|
const isPlayer = fallen === this.scene.getPlayer();
|
|
297
|
-
// Idempotence: if this NPC was already removed
|
|
298
|
-
//
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
447
|
+
// Idempotence: if this NPC was already removed OR another resolution
|
|
448
|
+
// has already CLAIMED the kill, skip. The claim is set synchronously
|
|
449
|
+
// BEFORE the narration awaits below -- checking scene presence alone
|
|
450
|
+
// left a race window across announce()'s beats: two exchanges both
|
|
451
|
+
// passed the check mid-pause and the loser crashed the session on the
|
|
452
|
+
// second removeActor (a real mid-fight crash, autopilot vs NPC retry).
|
|
453
|
+
if (!isPlayer) {
|
|
454
|
+
if (this.scene.getActor(fallen.name) !== fallen || fallen.deathClaimed) {
|
|
455
|
+
this.logger.write(`CombatExchange: ${fallen.name} already resolved as down -- skipping duplicate death.`);
|
|
456
|
+
return [];
|
|
457
|
+
}
|
|
458
|
+
fallen.deathClaimed = true;
|
|
302
459
|
}
|
|
303
460
|
const verb = (opts?.fatal ?? true) ? 'killed' : 'knocked out';
|
|
304
461
|
this.logger.write(`CombatExchange: ${killer.name} ${verb} ${fallen.name} in ${room.name}.`);
|
|
@@ -315,9 +472,22 @@ export class CombatExchange {
|
|
|
315
472
|
});
|
|
316
473
|
return ['', ...lines];
|
|
317
474
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
475
|
+
// Companions don't die like meat. A spirit's condition track filling
|
|
476
|
+
// is a DISRUPTION -- the vessel ruptures and the spirit snaps back to
|
|
477
|
+
// its own plane (SR5e p.303). An agent derezzes with the deck it runs
|
|
478
|
+
// on, and a drone shell is just machinery coming apart -- none of
|
|
479
|
+
// them have a corpse or gear to scatter (a real session's ice kill
|
|
480
|
+
// read "gear scatters across Grid Vault" for a program).
|
|
481
|
+
const companionKind = fallen instanceof NPC ? fallen.companionKind : undefined;
|
|
482
|
+
const npcFall = companionKind === 'spirit'
|
|
483
|
+
? `${fallen.name} ruptures -- a pressure-drop like the room exhaling -- DISRUPTED, snapped back to its own plane. The binding is over.`
|
|
484
|
+
: companionKind === 'agent'
|
|
485
|
+
? `${fallen.name} DEREZZES -- its icon shears into static and rains out of the grid, gone with the deck that ran it.`
|
|
486
|
+
: companionKind === 'drone'
|
|
487
|
+
? `${fallen.name} comes apart -- rotors, plating, and sparks skidding across ${room.name}. The frame is wrecked.`
|
|
488
|
+
: (opts?.fatal ?? true)
|
|
489
|
+
? `${fallen.name} goes down -- dead before they hit the floor. Their gear scatters across ${room.name}.`
|
|
490
|
+
: `${fallen.name} collapses, out cold -- down for the count. Their gear scatters across ${room.name}.`;
|
|
321
491
|
const lines = [opts?.fallLine ?? npcFall];
|
|
322
492
|
await this.announce(lines);
|
|
323
493
|
// scene.removeActor drops everything they carried AND wore where they
|
|
@@ -342,6 +512,9 @@ export class CombatExchange {
|
|
|
342
512
|
// The fight autopilot's trigger: a settled exchange involving the
|
|
343
513
|
// player schedules their next auto action (see utilities/auto-fight.ts).
|
|
344
514
|
this.scene.notifyExchangeSettled(this._combatants);
|
|
515
|
+
// A spirit whose services ran out departs once the dust settles
|
|
516
|
+
// (RAW p.302: the bargain is spent).
|
|
517
|
+
this.scene.ownerGame?.settleSpiritServices?.();
|
|
345
518
|
if (this.actor === this.scene.getPlayer()) {
|
|
346
519
|
return '';
|
|
347
520
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combat-exchange.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/utilities/combat-exchange.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW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AC;QACvB,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAE1B,kEAAkE;QAClE,yEAAyE;QACzE,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEnD,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,CAAC;YAC1C,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,IAAI,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC;YAC3B,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAC1F,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"combat-exchange.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/utilities/combat-exchange.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAGvC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAuBtD;;;;;;;;;GASG;AACH,MAAM,OAAO,cAAc;IAaf;IACA;IACA;IAdV,kEAAkE;IAClE,MAAM,CAAU,OAAO,GAAG,GAAG,CAAC;IAE9B;;;;;OAKG;IACH,MAAM,CAAU,qBAAqB,GAAG,IAAI,CAAC;IAE7C,YACU,KAAY,EACZ,MAAc,EACd,KAAmB;QAFnB,UAAK,GAAL,KAAK,CAAO;QACZ,WAAM,GAAN,MAAM,CAAQ;QACd,UAAK,GAAL,KAAK,CAAc;IAC1B,CAAC;IAEJ;;;;;;;;OAQG;IACK,WAAW,GAAqB,EAAE,CAAC;IAE3C,aAAa,CAAC,MAAoB,EAAE,OAAqC,EAAE;QACzE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CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAE1B,kEAAkE;QAClE,yEAAyE;QACzE,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEnD,gEAAgE;QAChE,qCAAqC;QACrC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,oBAAoB,EAAE,EAAE,CAAC;QAE/C,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,CAAC;YAC1C,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,IAAI,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC;YAC3B,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAC1F,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Item } from '../models/item.js';
|
|
2
|
+
import { Player } from '../models/player.js';
|
|
3
|
+
import { Room } from '../models/room.js';
|
|
4
|
+
import { Scene } from '../models/scene.js';
|
|
5
|
+
/** Sticker price: explicit seed price, else category base x rating. A
|
|
6
|
+
* currency carrier's price INCLUDES the cred loaded on it -- otherwise a
|
|
7
|
+
* 120-nuyen credstick selling for its 25-nuyen shell prints money. */
|
|
8
|
+
export declare function priceOf(item: Item): number;
|
|
9
|
+
/** What a fence pays: 25% of sticker (SR5e RAW, p.418 Fencing Gear), no
|
|
10
|
+
* questions -- that's the service. Haggle moves it +/-5% per net hit. */
|
|
11
|
+
export declare const FENCE_RATE = 0.25;
|
|
12
|
+
export declare function fenceValueOf(item: Item): number;
|
|
13
|
+
/** Items money can't buy back: the money itself. */
|
|
14
|
+
export declare function isSellable(item: Item): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* A VENDOR is simply a live, meat-plane NPC standing in a room where
|
|
17
|
+
* items carry their name as owner -- the hub's shopkeepers qualify by
|
|
18
|
+
* construction, and any generated scene's merchant works the moment the
|
|
19
|
+
* generator tags wares with an owner. No flags, no registry.
|
|
20
|
+
*/
|
|
21
|
+
export declare function vendorsInRoom(scene: Scene, room: Room): Player[];
|
|
22
|
+
/** The wares one vendor has on offer in this room. */
|
|
23
|
+
export declare function waresOf(room: Room, vendorName: string): Item[];
|
|
24
|
+
/**
|
|
25
|
+
* A FENCE buys, not just sells: recognized by trade, not by flag -- their
|
|
26
|
+
* description or their room says pawn/fence/launder. Whisper's Union
|
|
27
|
+
* Pawnshop matches by both; generated scenes only need a pawnshop-shaped
|
|
28
|
+
* room or an NPC described as a fence.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isFence(npc: Player, room: Room): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* LIFESTYLE tiers (SR5e p.369 monthly costs, scaled to per-job-cycle
|
|
33
|
+
* upkeep collected on every homecoming -- see Game.returnToHub). The tier
|
|
34
|
+
* is real mechanics: rest dice at home (rest.ts), banked edge per job at
|
|
35
|
+
* Middle+, and a full stun reset walking in the door at High. Lives here
|
|
36
|
+
* rather than on Game so commands/lifestyle.ts can read it without an
|
|
37
|
+
* import cycle.
|
|
38
|
+
*/
|
|
39
|
+
export interface ILifestyleTier {
|
|
40
|
+
name: string;
|
|
41
|
+
upkeep: number;
|
|
42
|
+
restDice: number;
|
|
43
|
+
edgeBonus: number;
|
|
44
|
+
clearStunOnReturn: boolean;
|
|
45
|
+
blurb: string;
|
|
46
|
+
/**
|
|
47
|
+
* What "Your Hideout" reads as while living at this tier -- the room's
|
|
48
|
+
* description follows the rent (Game.syncHomeToLifestyle): climbing
|
|
49
|
+
* tiers renovates, missing upkeep visibly downgrades. Every tier keeps
|
|
50
|
+
* the stash guarantee line, because that's mechanics, not decor.
|
|
51
|
+
*/
|
|
52
|
+
homeDescription: string;
|
|
53
|
+
}
|
|
54
|
+
export declare const LIFESTYLE_TIERS: readonly ILifestyleTier[];
|
|
55
|
+
/** One-line flavor note per consumable category, shown on shop shelves. */
|
|
56
|
+
export declare function shelfNote(item: Item): string;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { Category, Rating } from '../types/shared/item-enum.js';
|
|
2
|
+
/**
|
|
3
|
+
* The street economy: one deterministic price for everything, derived
|
|
4
|
+
* from category and rating, so buy (commands/buy.ts), sell (sell.ts),
|
|
5
|
+
* and every generated scene's shop work unmodified with zero seed data.
|
|
6
|
+
* A seed can still override any single item with an explicit "price".
|
|
7
|
+
* Calibration is SR5e-RAW-anchored (core book "Buying Gear", p.96-97):
|
|
8
|
+
* an Ares Predator V runs 725 (here: RangedWeapon 240 x Rare 3 = 720),
|
|
9
|
+
* an armor jacket 1,000 (BodyArmor 900 x Standard), a Sensei commlink
|
|
10
|
+
* 1,000 (Commlink 500 x Standard-Rare), regular ammo ~20-25/mag, a
|
|
11
|
+
* medkit R6 1,500 (Medical 500 x Rare). Payouts (2-8k, per the book's
|
|
12
|
+
* 3,000-base run formula, p.371) make a Rare weapon a real decision.
|
|
13
|
+
*/
|
|
14
|
+
const CATEGORY_BASE = {
|
|
15
|
+
[Category.RangedWeapon]: 240,
|
|
16
|
+
[Category.Weapon]: 200,
|
|
17
|
+
[Category.MeleeWeapon]: 120,
|
|
18
|
+
[Category.Ammunition]: 25,
|
|
19
|
+
[Category.Explosive]: 400,
|
|
20
|
+
[Category.BodyArmor]: 900,
|
|
21
|
+
[Category.Armor]: 900,
|
|
22
|
+
[Category.ArmorClothing]: 500,
|
|
23
|
+
[Category.Shield]: 200,
|
|
24
|
+
[Category.Helmet]: 200,
|
|
25
|
+
[Category.ArmArmor]: 150,
|
|
26
|
+
[Category.LegArmor]: 150,
|
|
27
|
+
[Category.Boots]: 100,
|
|
28
|
+
[Category.Gloves]: 80,
|
|
29
|
+
[Category.Cyberware]: 1500,
|
|
30
|
+
[Category.Bioware]: 1500,
|
|
31
|
+
[Category.Commlink]: 500,
|
|
32
|
+
[Category.Cyberdeck]: 6000,
|
|
33
|
+
[Category.Drone]: 2000,
|
|
34
|
+
[Category.Electronics]: 250,
|
|
35
|
+
[Category.Software]: 200,
|
|
36
|
+
[Category.Sensor]: 250,
|
|
37
|
+
[Category.Focus]: 4000,
|
|
38
|
+
[Category.SpellFormula]: 500,
|
|
39
|
+
[Category.Grimoire]: 1200,
|
|
40
|
+
[Category.MagicalReagent]: 100,
|
|
41
|
+
[Category.Fetish]: 100,
|
|
42
|
+
[Category.AlchemicalItem]: 150,
|
|
43
|
+
[Category.Clothing]: 75,
|
|
44
|
+
[Category.Medical]: 500,
|
|
45
|
+
[Category.StimPatch]: 80,
|
|
46
|
+
[Category.SlapPatch]: 80,
|
|
47
|
+
[Category.Tool]: 250,
|
|
48
|
+
[Category.Consumable]: 20,
|
|
49
|
+
[Category.Hat]: 30,
|
|
50
|
+
[Category.Glasses]: 50,
|
|
51
|
+
[Category.Food]: 12,
|
|
52
|
+
[Category.Drink]: 8,
|
|
53
|
+
[Category.Vice]: 25,
|
|
54
|
+
[Category.Book]: 40,
|
|
55
|
+
[Category.Key]: 20,
|
|
56
|
+
[Category.Trinket]: 30,
|
|
57
|
+
[Category.Document]: 100,
|
|
58
|
+
[Category.Datachip]: 250,
|
|
59
|
+
[Category.Badge]: 60,
|
|
60
|
+
};
|
|
61
|
+
const RATING_MULT = {
|
|
62
|
+
[Rating.Common]: 0.5,
|
|
63
|
+
[Rating.Standard]: 1,
|
|
64
|
+
[Rating.Rare]: 3,
|
|
65
|
+
[Rating.Legendary]: 8,
|
|
66
|
+
[Rating.MilitaryGrade]: 12,
|
|
67
|
+
};
|
|
68
|
+
const roundTo5 = (n) => Math.max(5, Math.round(n / 5) * 5);
|
|
69
|
+
/** Sticker price: explicit seed price, else category base x rating. A
|
|
70
|
+
* currency carrier's price INCLUDES the cred loaded on it -- otherwise a
|
|
71
|
+
* 120-nuyen credstick selling for its 25-nuyen shell prints money. */
|
|
72
|
+
export function priceOf(item) {
|
|
73
|
+
const cash = item.isCurrencyCarrier() ? item.currencyAmount : 0;
|
|
74
|
+
if (typeof item.price === 'number' && item.price > 0)
|
|
75
|
+
return Math.round(item.price) + cash;
|
|
76
|
+
const base = CATEGORY_BASE[item.category] ?? 50;
|
|
77
|
+
return roundTo5(base * (RATING_MULT[item.rating] ?? 1)) + cash;
|
|
78
|
+
}
|
|
79
|
+
/** What a fence pays: 25% of sticker (SR5e RAW, p.418 Fencing Gear), no
|
|
80
|
+
* questions -- that's the service. Haggle moves it +/-5% per net hit. */
|
|
81
|
+
export const FENCE_RATE = 0.25;
|
|
82
|
+
export function fenceValueOf(item) {
|
|
83
|
+
return roundTo5(priceOf(item) * FENCE_RATE);
|
|
84
|
+
}
|
|
85
|
+
/** Items money can't buy back: the money itself. */
|
|
86
|
+
export function isSellable(item) {
|
|
87
|
+
return item.transferable && !item.isCurrencyCarrier();
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A VENDOR is simply a live, meat-plane NPC standing in a room where
|
|
91
|
+
* items carry their name as owner -- the hub's shopkeepers qualify by
|
|
92
|
+
* construction, and any generated scene's merchant works the moment the
|
|
93
|
+
* generator tags wares with an owner. No flags, no registry.
|
|
94
|
+
*/
|
|
95
|
+
export function vendorsInRoom(scene, room) {
|
|
96
|
+
const stock = room.inventory.getAllItems();
|
|
97
|
+
return scene.getActorsInRoom(room).filter(a => a.plane === 'meat' &&
|
|
98
|
+
!a.isIncapacitated() &&
|
|
99
|
+
stock.some(i => i.owner === a.name));
|
|
100
|
+
}
|
|
101
|
+
/** The wares one vendor has on offer in this room. */
|
|
102
|
+
export function waresOf(room, vendorName) {
|
|
103
|
+
return room.inventory.getAllItems().filter(i => i.owner === vendorName && i.plane === 'meat');
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* A FENCE buys, not just sells: recognized by trade, not by flag -- their
|
|
107
|
+
* description or their room says pawn/fence/launder. Whisper's Union
|
|
108
|
+
* Pawnshop matches by both; generated scenes only need a pawnshop-shaped
|
|
109
|
+
* room or an NPC described as a fence.
|
|
110
|
+
*/
|
|
111
|
+
export function isFence(npc, room) {
|
|
112
|
+
const trade = /fence|pawn|launder|no questions/i;
|
|
113
|
+
// Duck-typed rather than instanceof NPC: npc.ts imports this module for
|
|
114
|
+
// ware pricing, so importing NPC back would close an ESM cycle.
|
|
115
|
+
const description = npc.description;
|
|
116
|
+
if (typeof description === 'string' && trade.test(description))
|
|
117
|
+
return true;
|
|
118
|
+
return trade.test(`${room.roomType ?? ''} ${room.name}`);
|
|
119
|
+
}
|
|
120
|
+
export const LIFESTYLE_TIERS = [
|
|
121
|
+
{ name: 'Street', upkeep: 100, restDice: -1, edgeBonus: 0, clearStunOnReturn: false, blurb: 'a doorway, a bedroll, and whatever the rain decides',
|
|
122
|
+
homeDescription: 'A doorway with ambitions: scavenged plyboard walls, a bedroll that never quite dries, and a rain-warped crate with someone else\'s name scratched off. The chain on the door is mostly a suggestion -- but the street\'s one law holds: whatever you leave here stays here.' },
|
|
123
|
+
{ name: 'Squatter', upkeep: 250, restDice: 0, edgeBonus: 0, clearStunOnReturn: false, blurb: 'four walls, a cot, a door that locks -- the classic',
|
|
124
|
+
homeDescription: 'A cramped, windowless room you can actually call your own -- a cot, a locker, and a door that locks from the inside. Whatever you leave here stays here, no matter where the next job takes you.' },
|
|
125
|
+
{ name: 'Low', upkeep: 500, restDice: 1, edgeBonus: 0, clearStunOnReturn: false, blurb: 'heat that works, water that runs, a real mattress',
|
|
126
|
+
homeDescription: 'Four real walls and a lease under an alias: heat that works, water that runs hot enough to matter, a mattress that remembers your shape. The locker bolted to the floor keeps whatever you leave here, no matter where the next job takes you.' },
|
|
127
|
+
{ name: 'Middle', upkeep: 1000, restDice: 2, edgeBonus: 1, clearStunOnReturn: false, blurb: 'an autocook with flavor faucets and a bed you miss on runs',
|
|
128
|
+
homeDescription: 'An actual apartment: an autocook with flavor faucets, furniture nobody died on, and a bed you catch yourself missing mid-run. The closet safe keeps whatever you leave here, no matter where the next job takes you.' },
|
|
129
|
+
{ name: 'High', upkeep: 2500, restDice: 3, edgeBonus: 1, clearStunOnReturn: true, blurb: 'secure zone, housekeeping drone, a shower that erases whole jobs',
|
|
130
|
+
homeDescription: 'A secure-zone flat that still doesn\'t feel like yours: biometric door, a housekeeping drone humming somewhere, a shower that erases whole jobs. The wall vault keeps whatever you leave here waiting, no matter where the next job takes you.' },
|
|
131
|
+
];
|
|
132
|
+
/** One-line flavor note per consumable category, shown on shop shelves. */
|
|
133
|
+
export function shelfNote(item) {
|
|
134
|
+
switch (item.category) {
|
|
135
|
+
case Category.Food: return ' (hot food -- heals stun)';
|
|
136
|
+
case Category.Drink: return ' (liquid courage -- +1 on your next social roll)';
|
|
137
|
+
case Category.Medical: return ' (heals physical damage)';
|
|
138
|
+
case Category.StimPatch: return ' (clears stun fast; the crash bites)';
|
|
139
|
+
case Category.Ammunition: return ' (reloads)';
|
|
140
|
+
case Category.Cyberware: return ' (installable at a clinic -- part in hand waives the fee)';
|
|
141
|
+
default: return '';
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=commerce.js.map
|