@maka/maka-cli 5.6.0 → 5.7.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 +17 -1
- 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 +79 -0
- 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 +193 -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 +10 -3
- 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 +12 -4
- 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 +277 -44
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -1
- 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 +4 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +15 -11
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +3 -3
- 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 +62 -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/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 +5 -2
- 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 +6 -2
- 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/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 +131 -4
- 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 +115 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.js +464 -25
- 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.js +70 -7
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +109 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +423 -39
- 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/scene.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +41 -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 +50 -3
- 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 +25 -14
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +100 -10
- 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/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 +84 -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/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/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/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pay.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/pay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CA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Q,GAAG,CAAC,EAAE,CAAC;YAC3B,OAAO,WAAW,IAAI,6BAA6B,IAAI,CAAC,IAAI,CAAC,QAAQ,uEAAuE,CAAC;QAC/I,CAAC;QACD,OAAO,uBAAuB,IAAI,6DAA6D,CAAC;IAClG,CAAC"}
|
|
@@ -57,7 +57,11 @@ export class PersuadeCommand extends Command {
|
|
|
57
57
|
// Talking someone around is not a quiet activity (see sneak.ts).
|
|
58
58
|
actor.sneaking = false;
|
|
59
59
|
const negotiation = actor.skillRating('negotiation');
|
|
60
|
-
|
|
60
|
+
// A drink beforehand loosens the delivery (see use.ts liquid courage).
|
|
61
|
+
// First Impression (p.74) rides the job's opening social play, same
|
|
62
|
+
// consumable shape as the liquid-courage die. Reputation rides every
|
|
63
|
+
// one (Player.socialRep): a known name talks from higher ground.
|
|
64
|
+
const pool = Math.max(1, actor.charisma + (negotiation > 0 ? negotiation : -1) + actor.consumeLiquidCourage() + actor.consumeFirstImpression() + actor.socialRep + actor.woundModifier - actor.sustainingPenalty);
|
|
61
65
|
const theirs = Math.max(1, target.charisma + target.skillRating('negotiation'));
|
|
62
66
|
const mine = rollPool(pool);
|
|
63
67
|
const resistance = rollPool(theirs);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persuade.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/persuade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,eAAgB,SAAQ,OAAO;IAChC,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,MAAM,CAAC,WAAW,GAAG,wJAAwJ,CAAC;IAExL,KAAK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YAC5M,OAAO,GAAG,uBAAuB,MAAM,CAAC,IAAI,mBAAmB,CAAC;QAClE,CAAC;aAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC;YACpB,IAAI,GAAG,iBAAiB,KAAK,CAAC,IAAI,wHAAwH,CAAC;YAC3J,OAAO,GAAG,GAAG,MAAM,CAAC,IAAI,kBAAkB,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,kFAAkF,CAAC;YAC1F,OAAO,GAAG,GAAG,MAAM,CAAC,IAAI,kDAAkD,CAAC;QAC7E,CAAC;QAED,KAAK,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,2CAA2C,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACtH,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,mCAAmC,GAAG,EAAE,CAAC,CAAC;QAC5E,CAAC,CAAC,CAAC;QAEH,OAAO;YACL,eAAe,MAAM,CAAC,IAAI,GAAG;YAC7B,kBAAkB,UAAU,CAAC,IAAI,CAAC,EAAE;YACpC,KAAK,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,UAAU,CAAC,EAAE;YAC7C,KAAK,OAAO,EAAE;SACf,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { BypassCommand } from './bypass-command.js';
|
|
|
2
2
|
import { rollPool, formatRoll } from '../utilities/dice.js';
|
|
3
3
|
export class PickCommand extends BypassCommand {
|
|
4
4
|
static verb = 'pick';
|
|
5
|
-
static description = 'Pick a lock -- skips needing the code,
|
|
5
|
+
static description = 'Pick a lock -- Agility + locksmith, skips needing the code. Fail, and the mechanism seizes for good (the code still works) -- and the noise carries. "pick north" or "pick <name>" if there\'s more than one barrier.';
|
|
6
6
|
bypassType = 'lockpick';
|
|
7
7
|
noPuzzleMessage = "There's nothing here to pick.";
|
|
8
8
|
async execute(args) {
|
|
@@ -15,12 +15,15 @@ export class PickCommand extends BypassCommand {
|
|
|
15
15
|
if (this.actor.plane === 'astral') {
|
|
16
16
|
return `Astral fingers pass straight through tumblers. "return" to your body to work a physical lock.`;
|
|
17
17
|
}
|
|
18
|
+
if (this.actor.plane === 'drone') {
|
|
19
|
+
return `Rotors and a camera don't pick locks -- and your picks are streets away with your body.`;
|
|
20
|
+
}
|
|
18
21
|
return super.execute(args);
|
|
19
22
|
}
|
|
20
23
|
async determineOutcome() {
|
|
21
24
|
// A LOCKSMITH test (Agility + locksmith, 2 hits; unskilled defaults to
|
|
22
25
|
// Agility - 1) -- the character's training decides the odds now, not a
|
|
23
|
-
// minigame or a coin flip.
|
|
26
|
+
// minigame or a coin flip. Failure burns the route and goes loud.
|
|
24
27
|
const skill = this.actor.skillRating('locksmith');
|
|
25
28
|
const pool = Math.max(1, this.actor.agility + (skill > 0 ? skill : -1) + this.actor.woundModifier - this.actor.sustainingPenalty);
|
|
26
29
|
const roll = rollPool(pool);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pick.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/pick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,OAAO,WAAY,SAAQ,aAAa;IAClC,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"pick.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/pick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAA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,CAAC,SAAS,EAAE,EAAE,CAAC;YAC1C,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;IACxB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Quality trading in play, at the book's own rates (SR5e p.106-107):
|
|
4
|
+
* gain a positive quality at listed karma x2; buy OFF a negative at its
|
|
5
|
+
* bonus value x2. One verb, direction inferred -- an unowned positive
|
|
6
|
+
* gets bought, an owned negative gets bought off; nothing else is for
|
|
7
|
+
* sale (RAW doesn't price shedding a positive or acquiring a flaw --
|
|
8
|
+
* the GM assigns those, and this game's "GM" does it through incidents,
|
|
9
|
+
* see Player.addNotoriety). Happens at HOME, like all training. The
|
|
10
|
+
* reputation math follows automatically: burning a Criminal SIN drops a
|
|
11
|
+
* point of notoriety the moment the record clears (Player.notoriety
|
|
12
|
+
* reads the live quality set).
|
|
13
|
+
*/
|
|
14
|
+
export declare class QualityTradeCommand extends Command implements ICommand {
|
|
15
|
+
protected static verb: string;
|
|
16
|
+
protected static description: string;
|
|
17
|
+
execute(args?: string[]): Promise<string>;
|
|
18
|
+
private buyPositive;
|
|
19
|
+
private buyOffNegative;
|
|
20
|
+
private listBoard;
|
|
21
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { QUALITIES } from '../qualities.js';
|
|
3
|
+
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
4
|
+
/**
|
|
5
|
+
* Quality trading in play, at the book's own rates (SR5e p.106-107):
|
|
6
|
+
* gain a positive quality at listed karma x2; buy OFF a negative at its
|
|
7
|
+
* bonus value x2. One verb, direction inferred -- an unowned positive
|
|
8
|
+
* gets bought, an owned negative gets bought off; nothing else is for
|
|
9
|
+
* sale (RAW doesn't price shedding a positive or acquiring a flaw --
|
|
10
|
+
* the GM assigns those, and this game's "GM" does it through incidents,
|
|
11
|
+
* see Player.addNotoriety). Happens at HOME, like all training. The
|
|
12
|
+
* reputation math follows automatically: burning a Criminal SIN drops a
|
|
13
|
+
* point of notoriety the moment the record clears (Player.notoriety
|
|
14
|
+
* reads the live quality set).
|
|
15
|
+
*/
|
|
16
|
+
export class QualityTradeCommand extends Command {
|
|
17
|
+
static verb = 'qualities';
|
|
18
|
+
static description = 'Trade qualities with karma at your hideout (SR5e x2 rates): "qualities" lists, "qualities <name>" buys a positive or buys off a negative.';
|
|
19
|
+
async execute(args = []) {
|
|
20
|
+
const actor = this.actor;
|
|
21
|
+
if (actor.inExchange) {
|
|
22
|
+
return `Reinventing yourself mid-firefight is called dying.`;
|
|
23
|
+
}
|
|
24
|
+
if (actor.currentLocation?.roomType !== 'Residence') {
|
|
25
|
+
return `Who you are changes at home, quietly -- head back to your hideout first.`;
|
|
26
|
+
}
|
|
27
|
+
if (actor.plane !== 'meat') {
|
|
28
|
+
return `Come back to your body before rearranging what it is.`;
|
|
29
|
+
}
|
|
30
|
+
if (!args || args.length === 0) {
|
|
31
|
+
return this.listBoard();
|
|
32
|
+
}
|
|
33
|
+
// Exact key first ("qualities sinner-criminal" works verbatim), then
|
|
34
|
+
// fuzzy over display names ONLY -- names and keys together made every
|
|
35
|
+
// single-word quality ambiguous with its own key.
|
|
36
|
+
const input = args.join(' ');
|
|
37
|
+
const byKey = QUALITIES.find(q => q.key === input.toLowerCase().replace(/\s+/g, '-'));
|
|
38
|
+
const picked = byKey?.name ?? fuzzyPickName(input, QUALITIES.map(q => q.name));
|
|
39
|
+
const quality = QUALITIES.find(q => q.name === picked);
|
|
40
|
+
if (!quality) {
|
|
41
|
+
return `That's not a quality this street knows. "qualities" lists the board.`;
|
|
42
|
+
}
|
|
43
|
+
if (quality.kind === 'positive') {
|
|
44
|
+
return this.buyPositive(quality);
|
|
45
|
+
}
|
|
46
|
+
return this.buyOffNegative(quality);
|
|
47
|
+
}
|
|
48
|
+
buyPositive(quality) {
|
|
49
|
+
const actor = this.actor;
|
|
50
|
+
if (actor.hasQuality(quality.key)) {
|
|
51
|
+
return `${quality.name} is already part of who you are.`;
|
|
52
|
+
}
|
|
53
|
+
// RAW forbids the one stacking this catalog can produce: High Pain
|
|
54
|
+
// Tolerance never combines with a pain editor (p.74).
|
|
55
|
+
if (quality.key === 'high-pain-tolerance' && actor.hasAug('pain-editor')) {
|
|
56
|
+
return `The pain editor already owns that circuit -- High Pain Tolerance can't grow where chrome filters first (SR5e p.74).`;
|
|
57
|
+
}
|
|
58
|
+
const cost = quality.karma * 2;
|
|
59
|
+
if (actor.karma < cost) {
|
|
60
|
+
return `${quality.name} costs ${cost} karma in play (listed ${quality.karma} x2, ${quality.page}) -- you have ${actor.karma}.`;
|
|
61
|
+
}
|
|
62
|
+
actor.karma -= cost;
|
|
63
|
+
actor.addQuality(quality.key);
|
|
64
|
+
this.actor.performAction('grows into', quality.name);
|
|
65
|
+
this.logger.write(`${actor.name} bought quality ${quality.key} (${cost} karma, ${actor.karma} left).`);
|
|
66
|
+
this.scene.updateStatus();
|
|
67
|
+
return `It took the downtime to make it true, but it's true now: ${quality.name}. ${quality.effect}. (${cost} karma spent, ${actor.karma} left.)`;
|
|
68
|
+
}
|
|
69
|
+
buyOffNegative(quality) {
|
|
70
|
+
const actor = this.actor;
|
|
71
|
+
if (!actor.hasQuality(quality.key)) {
|
|
72
|
+
return `${quality.name} isn't your problem. Count the small blessings.`;
|
|
73
|
+
}
|
|
74
|
+
const cost = quality.karma * 2;
|
|
75
|
+
if (actor.karma < cost) {
|
|
76
|
+
return `Shedding ${quality.name} costs ${cost} karma (bonus ${quality.karma} x2, SR5e p.107) -- you have ${actor.karma}.`;
|
|
77
|
+
}
|
|
78
|
+
const notorietyBefore = actor.notoriety;
|
|
79
|
+
actor.karma -= cost;
|
|
80
|
+
actor.qualities.delete(quality.key);
|
|
81
|
+
this.actor.performAction('sheds', quality.name);
|
|
82
|
+
this.logger.write(`${actor.name} bought off quality ${quality.key} (${cost} karma, ${actor.karma} left).`);
|
|
83
|
+
this.scene.updateStatus();
|
|
84
|
+
// Flavor the big ones; the mechanics already followed the delete.
|
|
85
|
+
const flavor = quality.key.startsWith('sinner')
|
|
86
|
+
? `A very quiet talismonger of the paperwork arts burns the old file. The system forgets your number.`
|
|
87
|
+
: quality.key.startsWith('incompetent')
|
|
88
|
+
? `Something finally clicks that never clicked before. It's trainable now ("advance").`
|
|
89
|
+
: `The work of shedding it happens in a hundred small moments of downtime -- and then it's just gone.`;
|
|
90
|
+
const repNote = actor.notoriety < notorietyBefore
|
|
91
|
+
? ` (Notoriety ${notorietyBefore} -> ${actor.notoriety} -- the record cleans up with it.)`
|
|
92
|
+
: '';
|
|
93
|
+
return `${flavor} ${quality.name} is behind you. (${cost} karma spent, ${actor.karma} left.)${repNote}`;
|
|
94
|
+
}
|
|
95
|
+
listBoard() {
|
|
96
|
+
const actor = this.actor;
|
|
97
|
+
const lines = [`=== QUALITIES (karma: ${actor.karma} -- SR5e in-play rates, p.106-107) ===`];
|
|
98
|
+
const owned = QUALITIES.filter(q => actor.hasQuality(q.key));
|
|
99
|
+
if (owned.length > 0) {
|
|
100
|
+
lines.push(`Yours:`);
|
|
101
|
+
for (const q of owned) {
|
|
102
|
+
const trade = q.kind === 'negative'
|
|
103
|
+
? ` buy off for ${q.karma * 2} karma${actor.karma >= q.karma * 2 ? '' : ' (short)'}`
|
|
104
|
+
: ` (yours to keep)`;
|
|
105
|
+
lines.push(` ${(q.kind === 'positive' ? '+ ' : '- ') + q.name.padEnd(24)} ${q.effect}${trade}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const buyable = QUALITIES.filter(q => q.kind === 'positive' && !actor.hasQuality(q.key));
|
|
109
|
+
if (buyable.length > 0) {
|
|
110
|
+
lines.push(`On the board (listed x2 to learn in play):`);
|
|
111
|
+
for (const q of buyable) {
|
|
112
|
+
const blocked = q.key === 'high-pain-tolerance' && actor.hasAug('pain-editor');
|
|
113
|
+
lines.push(` + ${q.name.padEnd(24)} ${q.effect} -- ${q.karma * 2} karma${blocked ? ' (BLOCKED: pain editor)' : actor.karma >= q.karma * 2 ? '' : ' (short)'}`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
lines.push('');
|
|
117
|
+
lines.push(`"qualities <name>" buys a positive or buys off a negative. Negatives can't be taken on for karma -- the street hands those out for free (see your sheet's Stains).`);
|
|
118
|
+
return lines.join('\n');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=quality-trade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-trade.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/quality-trade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,SAAS,EAAY,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,mBAAoB,SAAQ,OAAO;IACpC,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,MAAM,CAAC,WAAW,GAAG,2IAA2I,CAAC;IAE3K,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO,qDAAqD,CAAC;QAC/D,CAAC;QACD,IAAI,KAAK,CAAC,eAAe,EAAE,QAAQ,KAAK,WAAW,EAAE,CAAC;YACpD,OAAO,0EAA0E,CAAC;QACpF,CAAC;QACD,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;YAC3B,OAAO,uDAAuD,CAAC;QACjE,CAAC;QAED,IAAI,CAAC,IAAI,IA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C,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;YAClK,CAAC;QACH,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,oKAAoK,CAAC,CAAC;QACjL,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -21,34 +21,82 @@ export class RestCommand extends Command {
|
|
|
21
21
|
if (actor === this.scene.getPlayer() && this.scene.isPlayerExchangeActive()) {
|
|
22
22
|
return `Rest? Lead is flying. Survive first.`;
|
|
23
23
|
}
|
|
24
|
-
// Downtime also covers bench work: any damaged cyberdeck
|
|
25
|
-
// repaired alongside the nap (Logic roll -- soldering
|
|
24
|
+
// Downtime also covers bench work: any damaged cyberdeck or drone
|
|
25
|
+
// carried gets repaired alongside the nap (Logic roll -- soldering
|
|
26
|
+
// and rotor-truing are both brainwork; Juryrigger helps both).
|
|
26
27
|
const damagedDecks = actor.inventory.getAllItems().filter(i => i.isCyberdeck() && i.deckDamage > 0);
|
|
27
|
-
|
|
28
|
-
return `Your head's already clear -- nothing to sleep off.`;
|
|
29
|
-
}
|
|
28
|
+
const damagedDrones = actor.inventory.getAllItems().filter(i => i.isDrone() && i.droneDamage > 0);
|
|
30
29
|
const othersHere = this.scene.getActorsInRoom(room).filter(a => a !== actor);
|
|
31
30
|
const isResidence = room.roomType?.toLowerCase() === 'residence';
|
|
31
|
+
if (actor.stunTaken === 0 && damagedDecks.length === 0 && damagedDrones.length === 0) {
|
|
32
|
+
// Nothing to heal -- but sleeping is its own point now (needs
|
|
33
|
+
// system: edge refills only fed-and-slept, see Game.
|
|
34
|
+
// applyDepartureNeeds). A bed you own still counts slept-in even
|
|
35
|
+
// with a clear head.
|
|
36
|
+
if (isResidence && !actor.sleptThisCycle) {
|
|
37
|
+
actor.markSlept();
|
|
38
|
+
actor.performAction('sleeps', 'a full night');
|
|
39
|
+
return `Nothing to sleep off -- so you just SLEEP: a real eight hours in your own bed. It counts.`;
|
|
40
|
+
}
|
|
41
|
+
return `Your head's already clear -- nothing to sleep off.`;
|
|
42
|
+
}
|
|
32
43
|
if (!isResidence && othersHere.length > 0) {
|
|
33
44
|
return `Too exposed to rest here with ${othersHere.map(a => a.name).join(', ')} around. Find your hideout, or an empty room.`;
|
|
34
45
|
}
|
|
35
|
-
|
|
46
|
+
// Home with the rent unpaid barely counts as home: no heat, cold
|
|
47
|
+
// water, recovery halved until the tab's squared (see pay.ts).
|
|
48
|
+
const inDebtAtHome = isResidence && (this.game?.rentDebt ?? 0) > 0;
|
|
49
|
+
// A rest in a REAL BED is sleep (needs system): the sleep debt resets
|
|
50
|
+
// and sleep-locked fatigue unlocks -- before the recovery roll below,
|
|
51
|
+
// so tonight's sleep can heal the very boxes it just released.
|
|
52
|
+
// Jobsite corners rest the body but don't count as a night's sleep.
|
|
53
|
+
const sleptNow = isResidence && !actor.sleptThisCycle;
|
|
54
|
+
if (isResidence)
|
|
55
|
+
actor.markSlept();
|
|
56
|
+
const lines = [inDebtAtHome
|
|
57
|
+
? `You find the cot in the cold -- the landlord cut the heat over the ${this.game.rentDebt} you owe ("pay" to square it).`
|
|
58
|
+
: `You find a corner, close your eyes, and let the static drain out.`];
|
|
59
|
+
if (sleptNow)
|
|
60
|
+
lines.push(` A real night's sleep, in a bed that's yours. It counts.`);
|
|
36
61
|
if (actor.stunTaken > 0) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
62
|
+
// Home comfort is dice: the lifestyle tier adds (or, on the Street,
|
|
63
|
+
// subtracts) from the recovery roll -- but only AT HOME. A corner of
|
|
64
|
+
// a job site is the same corner for everyone.
|
|
65
|
+
const tierDice = isResidence ? (this.game?.lifestyle?.restDice ?? 0) : 0;
|
|
66
|
+
// Quick Healer (p.77): +2 on every healing test, this one included.
|
|
67
|
+
const healerDice = actor.qualityBonus('healing');
|
|
68
|
+
const roll = rollPool(Math.max(1, actor.body + tierDice + healerDice));
|
|
69
|
+
let recovery = roll.hits + 1;
|
|
70
|
+
// Insomnia (p.81): the sleep that comes is thin -- half the boxes.
|
|
71
|
+
const insomnia = actor.hasQuality('insomnia');
|
|
72
|
+
if (insomnia)
|
|
73
|
+
recovery = Math.max(1, Math.ceil(recovery / 2));
|
|
74
|
+
if (inDebtAtHome)
|
|
75
|
+
recovery = Math.max(1, Math.ceil(recovery / 2));
|
|
76
|
+
const recovered = actor.healStun(recovery);
|
|
77
|
+
this.logger.write(`RestCommand: ${actor.name} rested and recovered ${recovered} stun (${actor.stunTaken}/${actor.maxStunBoxes})${inDebtAtHome ? ' [halved: rent debt]' : ''}${insomnia ? ' [halved: insomnia]' : ''}${tierDice !== 0 ? ` [lifestyle ${tierDice > 0 ? '+' : ''}${tierDice}d]` : ''}${healerDice ? ` [quick healer +${healerDice}d]` : ''}.`);
|
|
78
|
+
lines.push(` Rest: ${formatRoll(roll)}${tierDice > 0 ? ` (+${tierDice} -- a real bed)` : tierDice < 0 ? ` (${tierDice} -- the Street sleeps badly)` : ''}${healerDice ? ` (+${healerDice} -- quick healer)` : ''}${insomnia ? ' (halved -- sleep never comes easy)' : ''}${inDebtAtHome ? ' (halved -- shivering is not sleeping)' : ''}`);
|
|
41
79
|
lines.push(` ${recovered} stun recovered: ${actor.stunSummary()}`);
|
|
42
80
|
}
|
|
43
81
|
for (const deck of damagedDecks) {
|
|
44
82
|
const wasBricked = deck.isBricked;
|
|
45
|
-
|
|
83
|
+
// Juryrigger (p.75): +2 on the bench -- coaxing boards back to life
|
|
84
|
+
// is exactly the intuitive-hardware knack the quality describes.
|
|
85
|
+
const repairRoll = rollPool(actor.logic + actor.qualityBonus('piloting'));
|
|
46
86
|
const repaired = deck.repairDeck(repairRoll.hits + 1);
|
|
47
87
|
this.logger.write(`RestCommand: ${actor.name} repaired ${repaired} boxes on ${deck.name} (${deck.deckDamage}/${deck.maxDeckBoxes}).`);
|
|
48
88
|
lines.push(` Bench work on the ${deck.name}: ${formatRoll(repairRoll)}`);
|
|
49
89
|
lines.push(` ${repaired} box${repaired === 1 ? '' : 'es'} repaired: ${deck.deckSummary()}${wasBricked && !deck.isBricked ? ' -- it boots again.' : ''}`);
|
|
50
90
|
}
|
|
51
|
-
|
|
91
|
+
for (const drone of damagedDrones) {
|
|
92
|
+
const wasWrecked = drone.isWrecked;
|
|
93
|
+
const repairRoll = rollPool(actor.logic + actor.qualityBonus('piloting'));
|
|
94
|
+
const repaired = drone.repairDrone(repairRoll.hits + 1);
|
|
95
|
+
this.logger.write(`RestCommand: ${actor.name} repaired ${repaired} hull boxes on ${drone.name} (${drone.droneDamage}/${drone.maxDroneBoxes}).`);
|
|
96
|
+
lines.push(` Airframe work on the ${drone.name}: ${formatRoll(repairRoll)}`);
|
|
97
|
+
lines.push(` ${repaired} box${repaired === 1 ? '' : 'es'} trued and patched: ${drone.droneSummary()}${wasWrecked && !drone.isWrecked ? ' -- the rotors answer again.' : ''}`);
|
|
98
|
+
}
|
|
99
|
+
lines.push(actor.stunTaken === 0 && !damagedDecks.some(d => d.deckDamage > 0) && !damagedDrones.some(d => d.droneDamage > 0)
|
|
52
100
|
? ` Head clear, gear humming. Back to work.`
|
|
53
101
|
: ` (Rest again to keep recovering.)`);
|
|
54
102
|
this.actor.performAction('rests', '');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/rest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE5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_ICON} ` : '';
|
|
31
31
|
this.logger.logWithColor(`${prefix}${message}`, inCall ? CALL_COLOR : 'yellow');
|
|
32
32
|
}
|
|
33
|
-
// Only the current actor says something in their room
|
|
34
|
-
currentPlayer.currentLocation.say(currentPlayer, message);
|
|
35
33
|
// "say" and "call" are deliberately similar -- once a call connects
|
|
36
34
|
// (see call.ts), the two ends keep talking with the same "say" command
|
|
37
35
|
// they already know, but it also reaches whoever they're on the line
|
|
38
|
-
// with, regardless of room.
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
36
|
+
// with, regardless of room.
|
|
37
|
+
//
|
|
38
|
+
// ON A CALL, the room's bystanders get a different delivery: they can
|
|
39
|
+
// hear ONE SIDE of your call (that's how phones work on a street
|
|
40
|
+
// corner), but they're not being spoken to -- and without saying so,
|
|
41
|
+
// their AI treated your side of the call as conversation and butted
|
|
42
|
+
// in (a real session: Skitter answered the player's "I could use it
|
|
43
|
+
// -- sure" that was meant for Mr. Johnson). The tag keeps the
|
|
44
|
+
// eavesdrop -- Wu's rumor network SHOULD notice you taking work --
|
|
45
|
+
// while telling them it's not their conversation.
|
|
46
|
+
//
|
|
47
|
+
// Partner delivery is deliberately NOT awaited (same as call.ts): the
|
|
48
|
+
// reply is an AI round trip that announces itself when it arrives --
|
|
49
|
+
// awaiting it held the input box hostage for seconds in a real session.
|
|
45
50
|
const partner = currentPlayer.activeCallPartner;
|
|
46
|
-
if (partner
|
|
51
|
+
if (partner) {
|
|
52
|
+
const overheard = `${message} [System note: ${currentPlayer.name} is speaking into their commlink -- you're overhearing ONE SIDE of someone else's call, not being addressed. It's not your conversation: stay silent unless what you overheard genuinely concerns you.]`;
|
|
53
|
+
for (const bystander of currentPlayer.currentLocation.getActors()) {
|
|
54
|
+
if (bystander === currentPlayer || bystander === partner)
|
|
55
|
+
continue;
|
|
56
|
+
void Promise.resolve(bystander.hear(currentPlayer, overheard)).catch(err => {
|
|
57
|
+
this.logger.error(`${bystander.name} failed to overhear the call: ${err}`);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
47
60
|
void Promise.resolve(partner.hear(currentPlayer, message)).catch(err => {
|
|
48
61
|
this.logger.error(`${partner.name} failed to hear ${currentPlayer.name} over the call: ${err}`);
|
|
49
62
|
});
|
|
50
63
|
}
|
|
64
|
+
else {
|
|
65
|
+
// Not on a call: ordinary room speech, addressed to the room.
|
|
66
|
+
currentPlayer.currentLocation.say(currentPlayer, message);
|
|
67
|
+
}
|
|
51
68
|
// An astral voice never reaches meat ears (hear() drops it silently on
|
|
52
69
|
// their end -- see Player.canPerceive), so without this note a
|
|
53
70
|
// projecting player gets no hint their words went nowhere.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"say.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/say.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAuB,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,OAAO,UAAW,SAAQ,OAAO;IAC3B,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,MAAM,CAAC,WAAW,GAAG,sDAAsD,CAAC;IAC5E,OAAO,CAAsB;IAEvC,YAAY,OAA4B;QACtC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO,0BAA0B,CAAC;QACpC,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,MAAM,aAAa,GAAG,IAAI,CAAC,K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
14
14
|
// maglock you're staring at.
|
|
15
15
|
const perception = this.actor.skillRating('perception');
|
|
16
|
-
const pool = Math.max(1, this.actor.intuition + (perception > 0 ? perception : -1) + this.actor.woundModifier - this.actor.sustainingPenalty);
|
|
16
|
+
const pool = Math.max(1, this.actor.intuition + (perception > 0 ? perception : -1) + this.actor.augBonus('perception') + this.actor.woundModifier - this.actor.sustainingPenalty);
|
|
17
17
|
const roll = rollPool(pool);
|
|
18
18
|
if (roll.hits === 0) {
|
|
19
19
|
let missed = `Perception: ${formatRoll(roll)}\nYou sweep the room and come up empty... you think.`;
|
|
@@ -32,7 +32,11 @@ export class SearchCommand extends Command {
|
|
|
32
32
|
// persona that rode in remotely doesn't even see them (canReachHost).
|
|
33
33
|
const hostReachable = canReachHost(this.actor, room);
|
|
34
34
|
const found = room.inventory.getAllItems()
|
|
35
|
-
.filter(i => i.plane === this.actor.plane
|
|
35
|
+
.filter(i => i.plane === this.actor.plane
|
|
36
|
+
|| (this.actor.plane === 'astral' && i.plane === 'meat')
|
|
37
|
+
// Drone sensors sweep the PHYSICAL room -- meat items show
|
|
38
|
+
// (looking is free; taking still needs hands, see take.ts).
|
|
39
|
+
|| (this.actor.plane === 'drone' && i.plane === 'meat'))
|
|
36
40
|
.filter(i => !(i.plane === 'matrix' && room.hasNode && !hostReachable));
|
|
37
41
|
let description = `Perception: ${formatRoll(roll)}\n`;
|
|
38
42
|
if (found.length === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,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M,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YACxF,WAAW,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,aAAa,EAAE,CAAC;YAC7D,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;YACjD,IAAI,UAAU,EAAE,CAAC;gBACf,WAAW,IAAI,KAAK,UAAU,EAAE,CAAC;YACnC,CAAC;YACD,IAAI,MAAM,EAAE,CAAC;gBACX,WAAW,IAAI,gEAAgE,CAAC;YAClF,CAAC;QACH,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Fencing loot: "sell <item>" in front of a fence (Whisper's pawnshop, or
|
|
4
|
+
* any generated NPC/room in the trade -- see commerce.isFence) quotes 40%
|
|
5
|
+
* of street value, no questions. Repeat the sell to close at the standing
|
|
6
|
+
* offer, or "haggle" first to push the rate (once per piece, opposed
|
|
7
|
+
* negotiation -- see haggle.ts's pending-sale branch). The quote lives on
|
|
8
|
+
* Game.pendingSale and dies if you walk or quote something else.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SellCommand extends Command implements ICommand {
|
|
11
|
+
protected static verb: string;
|
|
12
|
+
protected static description: string;
|
|
13
|
+
execute(args?: string[]): Promise<string>;
|
|
14
|
+
/** Completes the standing quote: goods across the counter, cred back. */
|
|
15
|
+
private close;
|
|
16
|
+
private listSellables;
|
|
17
|
+
}
|