@maka/maka-cli 5.5.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 +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +63 -7
- 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,125 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { priceOf, fenceValueOf, isSellable, isFence } from '../utilities/commerce.js';
|
|
3
|
+
/**
|
|
4
|
+
* Fencing loot: "sell <item>" in front of a fence (Whisper's pawnshop, or
|
|
5
|
+
* any generated NPC/room in the trade -- see commerce.isFence) quotes 40%
|
|
6
|
+
* of street value, no questions. Repeat the sell to close at the standing
|
|
7
|
+
* offer, or "haggle" first to push the rate (once per piece, opposed
|
|
8
|
+
* negotiation -- see haggle.ts's pending-sale branch). The quote lives on
|
|
9
|
+
* Game.pendingSale and dies if you walk or quote something else.
|
|
10
|
+
*/
|
|
11
|
+
export class SellCommand extends Command {
|
|
12
|
+
static verb = 'sell';
|
|
13
|
+
static description = 'Fence loot at a pawnshop: "sell <item>" quotes 25% of street value (first of a category: +50%), "haggle" pushes the rate, sell again to close. Fences ask no questions.';
|
|
14
|
+
async execute(args = []) {
|
|
15
|
+
const actor = this.actor;
|
|
16
|
+
if (actor.plane !== 'meat') {
|
|
17
|
+
return `The fence deals in things a hand can pass over a counter. Come back to your body.`;
|
|
18
|
+
}
|
|
19
|
+
if (actor.inExchange) {
|
|
20
|
+
return `Mid-firefight is a seller's market for exactly nothing.`;
|
|
21
|
+
}
|
|
22
|
+
const fence = this.scene.getActorsInRoom(actor.currentLocation)
|
|
23
|
+
.find(a => a !== actor && a.plane === 'meat' && !a.isIncapacitated() && isFence(a, actor.currentLocation));
|
|
24
|
+
if (!fence) {
|
|
25
|
+
return `Nobody here buys the kind of thing you're selling. Fences work out of pawnshops -- there's one on the Underside.`;
|
|
26
|
+
}
|
|
27
|
+
const wanted = (args ?? []).join(' ').trim();
|
|
28
|
+
const pending = this.game?.pendingSale;
|
|
29
|
+
// Bare "sell": close the standing quote, or show what's fenceable.
|
|
30
|
+
if (!wanted) {
|
|
31
|
+
if (pending && pending.fence === fence.name && actor.inventory.hasItem(pending.itemName)) {
|
|
32
|
+
return this.close(fence);
|
|
33
|
+
}
|
|
34
|
+
return this.listSellables(fence);
|
|
35
|
+
}
|
|
36
|
+
const item = actor.inventory.getItem(wanted);
|
|
37
|
+
if (!item) {
|
|
38
|
+
return `You're not carrying any "${wanted}" to sell.`;
|
|
39
|
+
}
|
|
40
|
+
if (!isSellable(item)) {
|
|
41
|
+
return `${fence.name} taps the counter: "That's money, chummer. I sell things FOR money. Circular deals bore me."`;
|
|
42
|
+
}
|
|
43
|
+
// The job's objective is nobody's merchandise.
|
|
44
|
+
const wc = this.scene.getWinCondition();
|
|
45
|
+
if (wc && !this.scene.isCompleted() && wc.item?.toLowerCase() === item.name.toLowerCase()) {
|
|
46
|
+
return `${fence.name} slides it straight back. "That one's radioactive right now. Finish whatever it's tangled in, THEN we talk."`;
|
|
47
|
+
}
|
|
48
|
+
// Same item as the standing quote: that's acceptance.
|
|
49
|
+
if (pending && pending.fence === fence.name && pending.itemName.toLowerCase() === item.name.toLowerCase()) {
|
|
50
|
+
return this.close(fence);
|
|
51
|
+
}
|
|
52
|
+
// New quote (replaces any previous one). FIRST-OF-ITS-KIND bounty:
|
|
53
|
+
// the fence pays a 50% premium on the first item of each category to
|
|
54
|
+
// cross her counter -- variety in your looting is worth real cred,
|
|
55
|
+
// once per category per session.
|
|
56
|
+
const novel = this.game ? !this.game.fencedCategories.has(item.category) : false;
|
|
57
|
+
const offer = novel
|
|
58
|
+
? Math.max(5, Math.round(fenceValueOf(item) * 1.5 / 5) * 5)
|
|
59
|
+
: fenceValueOf(item);
|
|
60
|
+
if (this.game) {
|
|
61
|
+
this.game.pendingSale = { itemName: item.name, price: offer, fence: fence.name, haggled: false };
|
|
62
|
+
}
|
|
63
|
+
actor.performAction('offers to sell', `${item.name} to ${fence.name}`);
|
|
64
|
+
this.logger.write(`SellCommand: ${actor.name} quoted ${item.name} at ${offer} by ${fence.name} (street ${priceOf(item)}${novel ? ', first-of-kind premium' : ''}).`);
|
|
65
|
+
return [
|
|
66
|
+
`${fence.name} turns the ${item.name} over once. "Quarter of street. No questions is the service you're paying for."`,
|
|
67
|
+
...(novel ? [` A pause. "...First ${item.category} anyone's brought me in a while. I'll go half again on it."`] : []),
|
|
68
|
+
` ${item.name}: ${priceOf(item)} street -> ${offer} nuyen offered.`,
|
|
69
|
+
` "sell ${item.name.toLowerCase()}" again to take it -- or "haggle" to push the rate.`,
|
|
70
|
+
].join('\n');
|
|
71
|
+
}
|
|
72
|
+
/** Completes the standing quote: goods across the counter, cred back. */
|
|
73
|
+
close(fence) {
|
|
74
|
+
const actor = this.actor;
|
|
75
|
+
const sale = this.game.pendingSale;
|
|
76
|
+
const item = actor.inventory.getItem(sale.itemName);
|
|
77
|
+
if (!item) {
|
|
78
|
+
this.game.pendingSale = undefined;
|
|
79
|
+
return `The ${sale.itemName} isn't on you anymore -- the deal evaporates.`;
|
|
80
|
+
}
|
|
81
|
+
actor.inventory.removeItem(item.name);
|
|
82
|
+
item.owner = fence.name;
|
|
83
|
+
try {
|
|
84
|
+
fence.addInventory(item);
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
actor.currentLocation.inventory.addItem(item);
|
|
88
|
+
}
|
|
89
|
+
actor.adjustCurrency(sale.price);
|
|
90
|
+
this.game.pendingSale = undefined;
|
|
91
|
+
// The first-of-its-kind premium (see the quote path) is spent now.
|
|
92
|
+
this.game.fencedCategories.add(item.category);
|
|
93
|
+
actor.performAction('sells', `${item.name} to ${fence.name}`);
|
|
94
|
+
this.logger.write(`SellCommand: ${actor.name} sold ${item.name} to ${fence.name} for ${sale.price} (${actor.currency} carried).`);
|
|
95
|
+
this.scene.addWorldEvent(`${actor.name} fenced ${item.name} at ${actor.currentLocation.name}.`);
|
|
96
|
+
this.scene.updateInventory(this.scene.getPlayer().inventory);
|
|
97
|
+
this.scene.updateStatus();
|
|
98
|
+
void Promise.resolve(fence.hear(actor, `Done -- it's yours. [System note: the sale closed at ${sale.price} nuyen for the ${item.name}; it's in your stock now. React briefly, in character.]`)).catch(err => {
|
|
99
|
+
this.logger.error(`${fence.name} failed to hear the sale: ${err}`);
|
|
100
|
+
});
|
|
101
|
+
// Moving goods both ways builds the relationship -- the fence's
|
|
102
|
+
// ledger counts value THROUGH the counter, not just spent at it.
|
|
103
|
+
const bond = this.game?.touchContact(fence.name, 'trade', sale.price);
|
|
104
|
+
return [
|
|
105
|
+
`The ${item.name} disappears under the counter; ${sale.price} nuyen appears over it.`,
|
|
106
|
+
` (You're carrying ${actor.currency} nuyen.)`,
|
|
107
|
+
...(bond ? [bond] : []),
|
|
108
|
+
].join('\n');
|
|
109
|
+
}
|
|
110
|
+
listSellables(fence) {
|
|
111
|
+
const goods = this.actor.inventory.getAllItems().filter(isSellable);
|
|
112
|
+
if (goods.length === 0) {
|
|
113
|
+
return `${fence.name} glances at your empty hands. "Come back when you're carrying something interesting."`;
|
|
114
|
+
}
|
|
115
|
+
const lines = [`${fence.name} waits. What you could put on the counter:`];
|
|
116
|
+
for (const item of goods) {
|
|
117
|
+
const dots = '.'.repeat(Math.max(2, 28 - item.name.length));
|
|
118
|
+
lines.push(` ${item.name} ${dots} ~${fenceValueOf(item)} nuyen`);
|
|
119
|
+
}
|
|
120
|
+
lines.push('');
|
|
121
|
+
lines.push(`"sell <item>" for a firm quote. (Worn gear must be unequipped first.)`);
|
|
122
|
+
return lines.join('\n');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=sell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sell.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/sell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAGtF;;;;;;;GAOG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,yKAAyK,CAAC;IAEzM,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,KAAK,CAAC,KAAK,KAAK,M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AAC;QACf,KAAK,CAAC,IAAI,CAAC,uEAAuE,CAAC,CAAC;QACpF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Command } from './command.js';
|
|
2
2
|
import { SKILL_NAMES } from '../models/player.js';
|
|
3
|
+
import { AUGMENTATIONS } from '../augmentations.js';
|
|
4
|
+
import { QUALITIES } from '../qualities.js';
|
|
5
|
+
import { METAMAGICS } from './initiate.js';
|
|
3
6
|
/**
|
|
4
7
|
* The character sheet: every attribute and the derived numbers they feed,
|
|
5
8
|
* in the same on-demand panel style as spells/inv/equipment. What each
|
|
@@ -24,12 +27,31 @@ export class SheetCommand extends Command {
|
|
|
24
27
|
attr('Logic', a.logic, 'first aid, hacking'),
|
|
25
28
|
attr('Intuition', a.intuition, 'defense (half), perception'),
|
|
26
29
|
attr('Charisma', a.charisma, 'presence -- the talking stats are coming'),
|
|
27
|
-
attr('Magic', a.magic, a.adept
|
|
30
|
+
attr('Magic', a.magic, (a.adept
|
|
28
31
|
? 'ADEPT -- body-magic: half rides every meat attack/defense; no spells, no projection'
|
|
29
|
-
: a.isAwakened() ? 'AWAKENED -- innate casting (see "spells")' : 'mundane')
|
|
30
|
-
|
|
32
|
+
: a.isAwakened() ? 'AWAKENED -- innate casting (see "spells")' : a.baseMagic > 0 ? 'burned out' : 'mundane')
|
|
33
|
+
+ (a.baseMagic > a.magic ? ` (was ${a.baseMagic} -- essence loss)` : '')),
|
|
34
|
+
...(a.baseResonance > 0 ? [attr('Resonance', a.resonance, 'TECHNOMANCER -- the Matrix without a deck; all Matrix damage is REAL stun'
|
|
35
|
+
+ (a.baseResonance > a.resonance ? ` (was ${a.baseResonance} -- essence loss)` : ''))] : []),
|
|
31
36
|
attr('Edge', a.edge, `luck -- ${a.edgeRemaining}/${a.edge} left this job${a.edgeBoostArmed ? ', a boost is BURNING now' : ''} ("edge" to burn one)`),
|
|
37
|
+
` ${'Essence'.padEnd(10)} ${a.essence.toFixed(1).padStart(3)} -- what chrome hasn't claimed ("install" at a clinic to trade more away)`,
|
|
38
|
+
...(this.game?.hasHub ? [` ${'Lifestyle'.padEnd(10)} ${this.game.lifestyleTier.padStart(3)} -- ${this.game.lifestyle.upkeep}/job upkeep${this.game.rentDebt > 0 ? `, ${this.game.rentDebt} OWED ("pay")` : ''} ("lifestyle" to move)`] : []),
|
|
32
39
|
'',
|
|
40
|
+
// The chrome itself, when any is in: name, essence toll, and what it
|
|
41
|
+
// actually does to the dice.
|
|
42
|
+
...(a.augmentations.size > 0 ? [
|
|
43
|
+
`'Ware installed:`,
|
|
44
|
+
...AUGMENTATIONS.filter(w => a.hasAug(w.key)).map(w => ` ${w.name.padEnd(18)} -${w.essence.toFixed(1)} ess ${w.effect}`),
|
|
45
|
+
'',
|
|
46
|
+
] : []),
|
|
47
|
+
// The traits that make the spread a person (SR5e p.71-85): positive
|
|
48
|
+
// qualities cost creation karma, negative ones refunded it -- the
|
|
49
|
+
// ledger is why different archetypes start with different karma.
|
|
50
|
+
...(a.qualities.size > 0 ? [
|
|
51
|
+
`Qualities (creation karma paid for the good, the bad paid you back):`,
|
|
52
|
+
...QUALITIES.filter(q => a.hasQuality(q.key)).map(q => ` ${(q.kind === 'positive' ? '+ ' : '- ') + q.name.padEnd(24)} ${q.effect} (${q.kind === 'positive' ? `${q.karma} karma, ` : `+${q.karma} karma, `}${q.page})`),
|
|
53
|
+
'',
|
|
54
|
+
] : []),
|
|
33
55
|
// Rated skills only -- fifteen zero lines is noise; "advance" shows
|
|
34
56
|
// the full trainable list. The old generic Skill attribute is gone
|
|
35
57
|
// from the sheet: pools now roll the SPECIFIC skill (firearms /
|
|
@@ -49,6 +71,17 @@ export class SheetCommand extends Command {
|
|
|
49
71
|
` Physical: ${a.conditionSummary()}`,
|
|
50
72
|
` Stun: ${a.stunSummary()}`,
|
|
51
73
|
...(a.getAnyCyberdeck() ? [` Deck: ${a.getAnyCyberdeck().name} ${a.matrixSummary()}${a.getAnyCyberdeck().isBricked ? ' -- BRICKED (rest to repair)' : ''}`] : []),
|
|
74
|
+
// Carried airframes with their hull tracks ("jump" to ride one).
|
|
75
|
+
...a.inventory.getAllItems().filter(i => i.isDrone()).map(d => ` Drone: ${d.name} ${d.droneSummary()}${d.isWrecked ? ' -- WRECKED (rest to repair)' : a.riggedDrone === d ? ' -- JUMPED IN' : ''}`),
|
|
76
|
+
` Needs: ${a.ateThisCycle ? 'fed' : `HUNGRY${a.hungerStreak > 0 ? ` (${a.hungerStreak} job${a.hungerStreak === 1 ? '' : 's'} running)` : ''} -- eat something`}, ${a.sleptThisCycle ? 'slept' : `SHORT ON SLEEP${a.sleepStreak > 0 ? ` (${a.sleepStreak} job${a.sleepStreak === 1 ? '' : 's'})` : ''} -- rest in a real bed`}${a.ateThisCycle && a.sleptThisCycle ? ' (edge refills at the next job)' : ' (edge will NOT refill)'}`,
|
|
77
|
+
// Reputation (SR5e p.367-368): cred from career karma, notoriety
|
|
78
|
+
// from qualities + incidents, awareness from both. The numbers are
|
|
79
|
+
// live pool modifiers, so the sheet says exactly where they bite.
|
|
80
|
+
` Rep: Street Cred ${a.streetCred} (career karma ${a.careerKarma}) / Notoriety ${a.notoriety} / Awareness ${a.publicAwareness}${a.socialRep > 0 ? ` -- +${a.socialRep} dice on haggle/persuade` : ''}${a.notoriety > 0 ? `; threats +${Math.min(3, a.notoriety)}` : ''}${a.publicAwareness > 0 ? `; cons -${Math.min(2, a.publicAwareness)}` : ''}`,
|
|
81
|
+
...(a.notorietyReasons.length > 0 ? [` Stains: ${a.notorietyReasons.join('; ')}`] : []),
|
|
82
|
+
// Initiation/submersion (p.324-326/p.257-258): grade + the picks.
|
|
83
|
+
...(a.initiationGrade > 0 ? [` ${a.isTechnomancer() ? 'Submersion' : 'Initiation'}: grade ${a.initiationGrade} -- ${METAMAGICS.filter(m => a.hasMetamagic(m.key)).map(m => m.name).join(', ')} (talent ceiling ${6 + a.initiationGrade})`] : []),
|
|
84
|
+
...(a.lockedFatigue > 0 ? [` Fatigue: ${a.lockedFatigue} stun LOCKED -- it will not heal until the need behind it is met`] : []),
|
|
52
85
|
...(a.woundModifier < 0 ? [` Wounds: ${a.woundModifier} dice on everything`] : []),
|
|
53
86
|
...(a.sustainedArmor > 0 ? [` Sustained: armor +${a.sustainedArmor} soak (-2 dice)`] : []),
|
|
54
87
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/sheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"sheet.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/sheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,OAAO,YAAa,SAAQ,OAAO;IAC7B,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;IACtB,MAAM,CAAC,WAAW,GAAG,oEAAoE,CAAC;IAEpG,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAErB,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,KAAa,EAAE,IAAY,EAAE,EAAE,CAC1D,KAAK,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAA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C,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACnP,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,aAAa,kEAAkE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACtI,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,aAAa,qBAAqB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACzF,GAAG,CAAC,CAAC,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,cAAc,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC/F,CAAC;QAEF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -29,7 +29,15 @@ export class SneakCommand extends Command {
|
|
|
29
29
|
actor.sneaking = true;
|
|
30
30
|
this.logger.write(`${actor.name} starts sneaking.`);
|
|
31
31
|
this.scene.updateStatus();
|
|
32
|
-
|
|
32
|
+
// Set expectations honestly: the opposed test happens at each DOOR, so
|
|
33
|
+
// anyone in THIS room already has you -- a real session read "sneak
|
|
34
|
+
// isn't working" when the goons standing right there kept reacting.
|
|
35
|
+
const watchers = this.scene.getActorsInRoom(actor.currentLocation)
|
|
36
|
+
.filter(a => a !== actor && a.plane === actor.plane && !a.isIncapacitated());
|
|
37
|
+
const watcherNote = watchers.length > 0
|
|
38
|
+
? ` (${watchers.map(a => a.name).join(', ')} watched you do it -- the ghost's walk only beats eyes that haven't found you yet.)`
|
|
39
|
+
: '';
|
|
40
|
+
return `You drop into a ghost's walk -- low, quiet, out of the light. Each room you ENTER is an opposed Sneaking-vs-Perception roll per witness; anything loud gives you away.${watcherNote}`;
|
|
33
41
|
}
|
|
34
42
|
}
|
|
35
43
|
//# sourceMappingURL=sneak.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sneak.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/sneak.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD;;;;;;;;GAQG;AACH,MAAM,OAAO,YAAa,SAAQ,OAAO;IAC7B,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;IACtB,MAAM,CAAC,WAAW,GAAG,8IAA8I,CAAC;IAE9K,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;YAC3B,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ;gBAC7B,CAAC,CAAC,4FAA4F;gBAC9F,CAAC,CAAC,+CAA+C,CAAC;QACtD,CAAC;QACD,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO,+DAA+D,CAAC;QACzE,CAAC;QAED,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACnB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC;YACvB,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;YAC1B,OAAO,kDAAkD,CAAC;QAC5D,CAAC;QAED,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,mBAAmB,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"sneak.js","source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AAC,CAAC;QAC/E,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC;YACrC,CAAC,CAAC,KAAK,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,qFAAqF;YAChI,CAAC,CAAC,EAAE,CAAC;QACP,OAAO,yKAAyK,WAAW,EAAE,CAAC;IAChM,CAAC"}
|
|
@@ -61,25 +61,48 @@ export class SpellsCommand extends Command {
|
|
|
61
61
|
if (actor.sustainedArmor > 0) {
|
|
62
62
|
lines.push(`Sustained: armor spell, +${actor.sustainedArmor} soak (-2 dice to everything else). Cast armor again to release.`);
|
|
63
63
|
}
|
|
64
|
+
if (actor.sustainedInvisibility) {
|
|
65
|
+
lines.push(`Sustained: invisibility, +3 on sneak contests (-2 dice to everything else). Cast invisibility again to release.`);
|
|
66
|
+
}
|
|
67
|
+
if (actor.sustainedReflexes) {
|
|
68
|
+
lines.push(`Sustained: increase reflexes, +2 initiative (-2 dice to everything else). Cast it again to release.`);
|
|
69
|
+
}
|
|
64
70
|
// The spells themselves -- only what this actor actually knows.
|
|
71
|
+
// Grouped RAW-style (p.283-293): combat's direct/indirect split is
|
|
72
|
+
// the tactical decision, so the book spells it out.
|
|
65
73
|
lines.push('');
|
|
66
74
|
lines.push('Spells you know:');
|
|
67
75
|
const known = [];
|
|
68
76
|
if (actor.knowsSpell('manabolt')) {
|
|
69
|
-
known.push(` manabolt --
|
|
77
|
+
known.push(` manabolt -- direct mana: resisted by WILLPOWER alone; armor and muscle mean nothing. Damage F-2, drain F-3. (cast manabolt [force] at <target>)`);
|
|
78
|
+
}
|
|
79
|
+
if (actor.knowsSpell('stunbolt')) {
|
|
80
|
+
known.push(` stunbolt -- direct mana, merciful: same reach as manabolt but the damage is STUN. Damage F-2, drain F-3. (cast stunbolt at <target>)`);
|
|
81
|
+
}
|
|
82
|
+
if (actor.knowsSpell('powerbolt')) {
|
|
83
|
+
known.push(` powerbolt -- direct physical: resisted by BODY alone; armor still means nothing. Damage F-2, drain F-3. (cast powerbolt at <target>)`);
|
|
84
|
+
}
|
|
85
|
+
if (actor.knowsSpell('fireball')) {
|
|
86
|
+
known.push(` fireball -- indirect elemental: soaked like a gunshot (Body + armor, AP F/3) but it hits at FULL Force. Drain F-2. (cast fireball at <target>)`);
|
|
70
87
|
}
|
|
71
88
|
if (actor.knowsSpell('heal')) {
|
|
72
|
-
known.push(` heal -- knit physical wounds closed, yours or an ally's (touch range). Drain
|
|
89
|
+
known.push(` heal -- knit physical wounds closed, yours or an ally's (touch range); Force caps the boxes. Drain F-4. (cast heal [on <ally>])`);
|
|
73
90
|
}
|
|
74
91
|
if (actor.knowsSpell('armor')) {
|
|
75
|
-
known.push(` armor --
|
|
92
|
+
known.push(` armor -- sustained weave, +ceil(F/3)+focus soak at -2 dice for its bearer. Drain F-4. (cast armor [on <ally>])`);
|
|
93
|
+
}
|
|
94
|
+
if (actor.knowsSpell('invisibility')) {
|
|
95
|
+
known.push(` invisibility -- sustained: light slides around the bearer, +3 on sneak contests at -2 dice. Drain F-4. (cast invisibility [on <ally>])`);
|
|
96
|
+
}
|
|
97
|
+
if (actor.knowsSpell('reflexes')) {
|
|
98
|
+
known.push(` increase reflexes -- sustained: +2 initiative for the bearer at -2 dice. Drain F-3. (cast increase reflexes [on <ally>])`);
|
|
76
99
|
}
|
|
77
100
|
if (known.length === 0) {
|
|
78
101
|
known.push(` (none -- a focus channels power, but the spells themselves take a formula, a grimoire, or the Awakened gift)`);
|
|
79
102
|
}
|
|
80
103
|
lines.push(...known);
|
|
81
104
|
lines.push('');
|
|
82
|
-
lines.push(`
|
|
105
|
+
lines.push(`FORCE is the dial (SR5e p.281): "cast <spell> <force> ...". Leave it off and the spell casts at its drain-neutral Force (F3 for an F-3 spell -- costs nothing); every point higher buys power and bills drain, resisted with Willpower onto your STUN track (${actor.stunSummary()}). Cast PAST your talent${actor.isAwakened() ? ` (${actor.magic})` : ' (4, book-taught)'} and the drain turns PHYSICAL -- overcasting is how legends and corpses are made. Twice your talent is the hard ceiling.`);
|
|
83
106
|
return lines.join('\n');
|
|
84
107
|
}
|
|
85
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spells.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/spells.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,wFAAwF,CAAC;IAExH,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,kEAAkE;QAClE,qEAAqE;QACrE,qEAAqE;QACrE,oEAAoE;QACpE,uEAAuE;QACvE,iDAAiD;QACjD,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YACzC,OAAO;gBACL,gEAAgE;gBAChE,2BAA2B,KAAK,CAAC,KAAK,iDAAiD,IAAI,kHAAkH;gBAC7M,gHAAgH;aACjH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACf,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;YACtB,OAAO,oMAAoM,CAAC;QAC9M,CAAC;QAED,MAAM,KAAK,GAAa,CAAC,mBAAmB,CAAC,CAAC;QAE9C,qEAAqE;QACrE,sEAAsE;QACtE,qEAAqE;QACrE,qBAAqB;QACrB,IAAI,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC7B,KAAK,CAAC,IAA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AC;QACD,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;QAErB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,gQAAgQ,KAAK,CAAC,WAAW,EAAE,2BAA2B,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,mBAAmB,0HAA0H,CAAC,CAAC;QAEnf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -10,7 +10,7 @@ import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
|
10
10
|
*/
|
|
11
11
|
export class StanceCommand extends Command {
|
|
12
12
|
static verb = 'stance';
|
|
13
|
-
static description = 'Set your fight autopilot: manual, guarded (subdues, honors surrender),
|
|
13
|
+
static description = 'Set your fight autopilot. You ALWAYS counter when struck; the stance decides who presses: manual (you type it), guarded (auto, subdues, honors surrender), aggressive (auto, to the death). Tab cycles.';
|
|
14
14
|
async execute(args = []) {
|
|
15
15
|
const actor = this.actor;
|
|
16
16
|
if (!args || args.length === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stance.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/stance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,YAAY,EAAe,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"stance.js","sourceRoot":"","sources":["../../../../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;QACrC,IAAI,MAAM,KAAK,KAAK,CAAC,UAAU,EAAE,CAAC;YAChC,OAAO,WAAW,MAAM,CAAC,WAAW,EAAE,OAAO,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;QAC7E,CAAC;QACD,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;QAC1B,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;QACtC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,kBAAkB,MAAM,GAAG,CAAC,CAAC;QAC5D,OAAO,WAAW,MAAM,CAAC,WAAW,EAAE,OAAO,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;IAC7E,CAAC"}
|
|
@@ -28,6 +28,11 @@ export class TakeCommand extends Command {
|
|
|
28
28
|
if (this.actor.plane === 'astral') {
|
|
29
29
|
return `Your hands pass through everything here -- the astral can look, not carry.`;
|
|
30
30
|
}
|
|
31
|
+
// A drone has cameras and rotors, not hands -- and your PACK is on a
|
|
32
|
+
// body that's streets away. Nothing it "grabbed" could reach it.
|
|
33
|
+
if (this.actor.plane === 'drone') {
|
|
34
|
+
return `The ${this.actor.riggedDrone?.name ?? 'drone'} has no hands, and your pack is wherever your body is. Look all you want -- carrying is a meat job.`;
|
|
35
|
+
}
|
|
31
36
|
// A matrix-plane sweep only ever contains the host's files -- which
|
|
32
37
|
// stay vaulted until the host is cracked, and unreachable entirely
|
|
33
38
|
// when it's air-gapped and the persona rode in wireless (see the
|
|
@@ -122,6 +127,9 @@ export class TakeCommand extends Command {
|
|
|
122
127
|
if (this.actor.plane === 'astral') {
|
|
123
128
|
return `Your hand passes straight through the ${itemName} -- the astral can look, not carry.`;
|
|
124
129
|
}
|
|
130
|
+
if (this.actor.plane === 'drone') {
|
|
131
|
+
return `The ${this.actor.riggedDrone?.name ?? 'drone'} noses at the ${itemName}, but it has no hands -- and your pack is streets away with your body.`;
|
|
132
|
+
}
|
|
125
133
|
if (item.plane !== this.actor.plane) {
|
|
126
134
|
return item.plane === 'matrix'
|
|
127
135
|
? `The ${itemName} is DATA -- it only exists on the grid. Jack in to take it.`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"take.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/take.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,kGAAkG,CAAC;IAElI,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAE7E,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;QACnD,IAAI,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,YAAY,EAAE,CAAC;YAChD,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;QACxB,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAED;;;;;;OAMG;IACK,OAAO;QACb,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;QAExC,mEAAmE;QACnE,oEAAoE;QACpE,wBAAwB;QACxB,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAClC,OAAO,4EAA4E,CAAC;QACtF,CAAC;QAED,oEAAo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,KAAK,CAAC,gCAAgC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACnE,OAAO,aAAa,QAAQ,0BAA0B,CAAC;QACzD,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Street-doc services (SR5e p.42, "Staying Healthy"): paid physical
|
|
4
|
+
* healing at a clinic -- the certain, expensive alternative to burning
|
|
5
|
+
* medkits and rolling first aid. 100 nuyen per box (the book's medkit-
|
|
6
|
+
* supply price point), the doc treats as many boxes as you can pay for,
|
|
7
|
+
* no roll, no risk. Stun stays your own problem: sleep is free.
|
|
8
|
+
*/
|
|
9
|
+
export declare class TreatCommand extends Command implements ICommand {
|
|
10
|
+
protected static verb: string;
|
|
11
|
+
protected static description: string;
|
|
12
|
+
private static readonly PRICE_PER_BOX;
|
|
13
|
+
execute(_args?: string[]): Promise<string>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Street-doc services (SR5e p.42, "Staying Healthy"): paid physical
|
|
4
|
+
* healing at a clinic -- the certain, expensive alternative to burning
|
|
5
|
+
* medkits and rolling first aid. 100 nuyen per box (the book's medkit-
|
|
6
|
+
* supply price point), the doc treats as many boxes as you can pay for,
|
|
7
|
+
* no roll, no risk. Stun stays your own problem: sleep is free.
|
|
8
|
+
*/
|
|
9
|
+
export class TreatCommand extends Command {
|
|
10
|
+
static verb = 'treat';
|
|
11
|
+
static description = 'Pay a street doc to close your physical wounds -- 100 nuyen per box, no dice, no risk. Works at a clinic with the doc present.';
|
|
12
|
+
static PRICE_PER_BOX = 100;
|
|
13
|
+
async execute(_args = []) {
|
|
14
|
+
const actor = this.actor;
|
|
15
|
+
if (actor.plane !== 'meat') {
|
|
16
|
+
return `The doc can't stitch a persona. Come back to your body.`;
|
|
17
|
+
}
|
|
18
|
+
if (actor.inExchange) {
|
|
19
|
+
return `Nobody operates in a firefight.`;
|
|
20
|
+
}
|
|
21
|
+
if (actor.isDown()) {
|
|
22
|
+
return `You're past treatment.`;
|
|
23
|
+
}
|
|
24
|
+
const room = actor.currentLocation;
|
|
25
|
+
const isClinic = room.roomType === 'Clinic' || /clinic|infirmary|surgery/.test(`${room.roomType ?? ''} ${room.name}`.toLowerCase());
|
|
26
|
+
if (!isClinic) {
|
|
27
|
+
return `Treatment happens at a clinic -- there's one on Market Row.`;
|
|
28
|
+
}
|
|
29
|
+
const doc = this.scene.getActorsInRoom(room)
|
|
30
|
+
.find((a) => a !== actor && a.plane === 'meat' && !a.isIncapacitated() && a.skillRating('first-aid') >= 4);
|
|
31
|
+
if (!doc) {
|
|
32
|
+
return `The clinic's open but nobody with steady hands is in it.`;
|
|
33
|
+
}
|
|
34
|
+
if (actor.damageTaken === 0) {
|
|
35
|
+
return `${doc.name} looks you over. "You're intact. Go be somebody's problem elsewhere."`;
|
|
36
|
+
}
|
|
37
|
+
const price = TreatCommand.PRICE_PER_BOX;
|
|
38
|
+
const affordable = Math.floor(actor.currency / price);
|
|
39
|
+
const boxes = Math.min(actor.damageTaken, affordable);
|
|
40
|
+
if (boxes === 0) {
|
|
41
|
+
return `${doc.name} names the rate -- ${price} a box, ${actor.damageTaken} box${actor.damageTaken === 1 ? '' : 'es'} of trouble -- and you're carrying ${actor.currency}. "Medicine isn't charity, chummer."`;
|
|
42
|
+
}
|
|
43
|
+
const cost = boxes * price;
|
|
44
|
+
actor.adjustCurrency(-cost);
|
|
45
|
+
const healed = actor.healDamage(boxes);
|
|
46
|
+
actor.performAction('gets patched up by', doc.name);
|
|
47
|
+
this.logger.write(`TreatCommand: ${doc.name} healed ${healed} boxes for ${cost} (${actor.currency} left; ${actor.damageTaken}/${actor.maxConditionBoxes}).`);
|
|
48
|
+
this.scene.addWorldEvent(`${actor.name} paid for treatment at ${room.name}.`);
|
|
49
|
+
this.scene.updateStatus();
|
|
50
|
+
void Promise.resolve(doc.hear(actor, `Patch me up. [System note: you just treated ${actor.name} for ${cost} nuyen, ${healed} boxes closed${actor.damageTaken > 0 ? ' -- more damage remains but they ran out of cred' : ''}. React briefly, in character.]`)).catch(err => {
|
|
51
|
+
this.logger.error(`${doc.name} failed to hear the treatment: ${err}`);
|
|
52
|
+
});
|
|
53
|
+
const lines = [
|
|
54
|
+
`${doc.name} works without small talk -- staples, sprays, the good anesthetic.`,
|
|
55
|
+
` ${healed} box${healed === 1 ? '' : 'es'} closed for ${cost} nuyen (${actor.currency} left): ${actor.conditionSummary()}`,
|
|
56
|
+
];
|
|
57
|
+
if (actor.damageTaken > 0) {
|
|
58
|
+
lines.push(` "${actor.damageTaken} more when you can afford it. Try not to reopen my work."`);
|
|
59
|
+
}
|
|
60
|
+
// Bleeding on someone's table is how you get to know them.
|
|
61
|
+
const bond = this.game?.touchContact(doc.name, 'trade', cost);
|
|
62
|
+
if (bond)
|
|
63
|
+
lines.push(bond);
|
|
64
|
+
return lines.join('\n');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=treat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treat.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/treat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAGjD;;;;;;GAMG;AACH,MAAM,OAAO,YAAa,SAAQ,OAAO;IAC7B,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;IACtB,MAAM,CAAC,WAAW,GAAG,gIAAgI,CAAC;IAExJ,MAAM,CAAU,aAAa,GAAG,GAAG,CAAC;IAE5C,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;YAC3B,OAAO,yDAAyD,CAAC;QACnE,CAAC;QACD,IAAI,K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YAC/E,KAAK,MAAM,OAAO,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,eAAe,IAAI,WAAW,KAAK,CAAC,QAAQ,WAAW,KAAK,CAAC,gBAAgB,EAAE,EAAE;SAC5H,CAAC;QACF,IAAI,KAAK,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC;YAC1B,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,WAAW,2DAA2D,CAAC,CAAC;QACjG,CAAC;QACD,2DAA2D;QAC3D,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QAC9D,IAAI,IAAI;YAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -7,6 +7,13 @@ export class UnlockCommand extends Command {
|
|
|
7
7
|
return this.unlock(args);
|
|
8
8
|
}
|
|
9
9
|
unlock(args) {
|
|
10
|
+
// Keys are physical and so is turning them -- and any key you own is
|
|
11
|
+
// in the pack riding with your BODY.
|
|
12
|
+
if (this.actor.plane !== 'meat') {
|
|
13
|
+
return this.actor.plane === 'drone'
|
|
14
|
+
? `The ${this.actor.riggedDrone?.name ?? 'drone'} can't turn a key it isn't carrying -- your keys are with your body.`
|
|
15
|
+
: `Keys need the hands you left with your body.`;
|
|
16
|
+
}
|
|
10
17
|
if (args.length === 0) {
|
|
11
18
|
this.logger.error('UnlockCommand: No target specified.');
|
|
12
19
|
return 'Please specify which door you want to unlock.';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unlock.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/unlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE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
import { Command, ICommand } from './command.js';
|
|
2
|
+
import { Category } from '../types/shared/item-enum.js';
|
|
2
3
|
export declare class UseCommand extends Command implements ICommand {
|
|
3
4
|
protected static verb: string;
|
|
4
5
|
protected static description: string;
|
|
6
|
+
/** Set by the eat/drink subclasses: what the verb is FOR. Lets "eat
|
|
7
|
+
* noodles" find the Bowl of Laksa -- a real session ordered noodles,
|
|
8
|
+
* got served the bowl, then couldn't eat it because "noodles" isn't
|
|
9
|
+
* the item's exact name. */
|
|
10
|
+
protected preferredCategory?: Category;
|
|
11
|
+
protected verbNoun: string;
|
|
5
12
|
execute(args: string[]): Promise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Resolution ladder: exact name -> unique substring of a carried item's
|
|
15
|
+
* name ("laksa" -> Bowl of Laksa) -> for eat/drink, whatever food/drink
|
|
16
|
+
* you're actually carrying (exactly one: that's what you meant; several:
|
|
17
|
+
* ask). Menu-speak ("eat noodles") shouldn't lose to item naming.
|
|
18
|
+
*/
|
|
19
|
+
private resolveItem;
|
|
6
20
|
private use;
|
|
7
21
|
/**
|
|
8
22
|
* Healing, matching combat's texture (see commands/attack.ts): a visible
|
|
@@ -19,6 +33,21 @@ export declare class UseCommand extends Command implements ICommand {
|
|
|
19
33
|
* user is already down: death is death, not a big wound.
|
|
20
34
|
*/
|
|
21
35
|
private applyFirstAid;
|
|
36
|
+
/**
|
|
37
|
+
* Hot food is the slow, cheap, pleasant road to stun recovery -- the
|
|
38
|
+
* noodle-stand alternative to a stim's crash or a nap's downtime. Flat
|
|
39
|
+
* 2 + quality boxes, no roll, always worth what you paid. Eating while
|
|
40
|
+
* fine isn't refused (a good meal needs no justification); it just
|
|
41
|
+
* doesn't heal what isn't hurt.
|
|
42
|
+
*/
|
|
43
|
+
private eat;
|
|
44
|
+
/**
|
|
45
|
+
* A drink pours LIQUID COURAGE: +1 die on the next social roll
|
|
46
|
+
* (persuade, haggle, bluff -- they call consumeLiquidCourage). It
|
|
47
|
+
* doesn't stack; drinking on top of an unspent drink is just one too
|
|
48
|
+
* many, and costs a stun box.
|
|
49
|
+
*/
|
|
50
|
+
private drink;
|
|
22
51
|
/**
|
|
23
52
|
* Stim patches are the STUN answer (spell drain fills stun; medkits only
|
|
24
53
|
* touch physical): same quality-scaled pool and consumable economy as a
|