@maka/maka-cli 5.4.0 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/typescript/package.json +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.d.ts +20 -1
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js +76 -11
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js +65 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.d.ts +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js +72 -29
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js +21 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js +39 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js +82 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +71 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js +21 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js +13 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +19 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js +9 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +33 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +43 -20
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js +75 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/inv.js +5 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/inv.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +16 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.d.ts +18 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js +100 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js +22 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +55 -8
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js +11 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js +35 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/subdue.js +4 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/subdue.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +70 -13
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js +6 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +5 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.d.ts +175 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +673 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.d.ts +64 -9
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +265 -434
- 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 +69 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.js +388 -67
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +92 -3
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +66 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +151 -15
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +29 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +35 -3
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +275 -105
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +662 -233
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.d.ts +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +6 -3
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +19 -20
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.d.ts +6 -4
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +31 -5
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.d.ts +34 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +72 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +27 -3
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/tools/ai/ai.class.d.ts +8 -1
- package/bundle/typescript/src/tools/ai/ai.class.js +8 -3
- package/bundle/typescript/src/tools/ai/ai.class.js.map +1 -1
- package/bundle/typescript/src/tools/https/https.class.d.ts +2 -2
- package/bundle/typescript/src/tools/https/https.class.js +10 -4
- package/bundle/typescript/src/tools/https/https.class.js.map +1 -1
- package/bundle/typescript/src/tools/https/https.interface.d.ts +2 -0
- package/package.json +1 -1
|
@@ -16,9 +16,16 @@ export class EquipmentCommand extends Command {
|
|
|
16
16
|
// The derived numbers first -- they're what the player is usually
|
|
17
17
|
// actually asking.
|
|
18
18
|
const weapon = actor.getWeaponProfile();
|
|
19
|
-
const weaponItem = actor.
|
|
19
|
+
const weaponItem = actor.getCarriedWeapon();
|
|
20
20
|
const ammoNote = weaponItem?.isFirearm() ? ` -- ${weaponItem.ammo}/${10} rounds${weaponItem.ammo === 0 ? ' (DRY -- "reload")' : ''}` : '';
|
|
21
|
-
|
|
21
|
+
// Holstered means the PROFILE says bare fists -- lead with the carried
|
|
22
|
+
// weapon and how to get it out, or the numbers lie about readiness.
|
|
23
|
+
if (actor.plane === 'meat' && weaponItem && !actor.weaponDrawn) {
|
|
24
|
+
lines.push(`Weapon: ${weaponItem.name} (HOLSTERED -- "brandish" to draw)${ammoNote}`);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
lines.push(`Weapon: ${weapon.name} -- damage ${weapon.damage}${weapon.poolBonus > 0 ? `, +${weapon.poolBonus} attack dice` : ''}${ammoNote}`);
|
|
28
|
+
}
|
|
22
29
|
const armor = actor.getArmorValue();
|
|
23
30
|
lines.push(`Armor: +${armor} soak dice${actor.sustainedArmor > 0 ? ` (+${actor.sustainedArmor} more from the sustained armor spell)` : ''}`);
|
|
24
31
|
lines.push('');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equipment.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/equipment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAGjD;;;;;;GAMG;AACH,MAAM,OAAO,gBAAiB,SAAQ,OAAO;IACjC,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,MAAM,CAAC,WAAW,GAAG,0EAA0E,CAAC;IAE1G,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QAClC,MAAM,KAAK,GAAa,CAAC,mBAAmB,CAAC,CAAC;QAE9C,kEAAkE;QAClE,mBAAmB;QACnB,MAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,EAAE,CAAC;QACxC,MAAM,UAAU,GAAG,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"equipment.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/equipment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAGjD;;;;;;GAMG;AACH,MAAM,OAAO,gBAAiB,SAAQ,OAAO;IACjC,MAAM,CAAC,I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AAC,CAAC,CAAC,MAAM,KAAK,CAAC,cAAc,uCAAuC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9I,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAEf,IAAI,gBAAgB,GAAG,KAAK,CAAC;QAC7B,KAAK,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;YAC3D,IAAI,CAAC,KAAK;gBAAE,SAAS;YACrB,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,KAAoC,CAAC;iBAClE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC;iBACnC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,KAAK,SAAS,IAAI,IAAI,KAAK,IAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YAClE,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACxB,gBAAgB,GAAG,IAAI,CAAC;gBACxB,KAAK,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;QAED,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,CAAC,gFAAgF,CAAC,CAAC;QAC/F,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -13,6 +13,8 @@ export declare class GoCommand extends Command implements ICommand {
|
|
|
13
13
|
*/
|
|
14
14
|
private resolvePartingShot;
|
|
15
15
|
private go;
|
|
16
|
+
/** The direction that undoes a move -- feeds the HUD breadcrumb. */
|
|
17
|
+
private static opposite;
|
|
16
18
|
/** Wards block astral forms and nothing else. Returns the refusal, or null. */
|
|
17
19
|
private checkWard;
|
|
18
20
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Door } from '../models/door.js';
|
|
2
2
|
import { CombatExchange } from '../utilities/combat-exchange.js';
|
|
3
|
+
import { rollPool, formatRoll } from '../utilities/dice.js';
|
|
3
4
|
import { Command } from './command.js';
|
|
4
5
|
export class GoCommand extends Command {
|
|
5
6
|
static verb = 'go';
|
|
@@ -33,8 +34,23 @@ export class GoCommand extends Command {
|
|
|
33
34
|
if (!engaged)
|
|
34
35
|
return null;
|
|
35
36
|
const exchange = new CombatExchange(this.scene, this.logger, opponent);
|
|
37
|
+
// ATHLETICS buys the clean break: Agility + athletics (unskilled
|
|
38
|
+
// Agility - 1), two hits and you're through the door before the
|
|
39
|
+
// muzzle comes up -- no shot at all. Anything less eats the strike as
|
|
40
|
+
// before. Applies to fleeing NPCs just the same.
|
|
41
|
+
const athletics = fleer.skillRating('athletics');
|
|
42
|
+
const sprint = rollPool(Math.max(1, fleer.agility + (athletics > 0 ? athletics : -1) + fleer.woundModifier - fleer.sustainingPenalty));
|
|
43
|
+
if (sprint.hits >= 2) {
|
|
44
|
+
const clean = [
|
|
45
|
+
`${fleer.name} breaks for the exit -- Athletics: ${formatRoll(sprint)}`,
|
|
46
|
+
` Too fast. ${opponent.name} never gets the shot off.`,
|
|
47
|
+
];
|
|
48
|
+
await exchange.announce(clean);
|
|
49
|
+
this.scene.addWorldEvent(`${fleer.name} broke clean away from ${opponent.name} in ${fleer.currentLocation.name}.`);
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
36
52
|
const lines = [
|
|
37
|
-
`${
|
|
53
|
+
`${fleer.name} breaks for the exit -- Athletics: ${formatRoll(sprint)} -- not fast enough. ${opponent.name} takes a parting shot!`,
|
|
38
54
|
...exchange.resolveStrike(opponent, fleer),
|
|
39
55
|
];
|
|
40
56
|
await exchange.announce(lines);
|
|
@@ -138,6 +154,7 @@ export class GoCommand extends Command {
|
|
|
138
154
|
if (wardBlock)
|
|
139
155
|
return wardBlock;
|
|
140
156
|
this.actor.performAction('exits', `${this.actor.currentLocation.name} to ${targetRoom.name}`);
|
|
157
|
+
this.actor.cameFrom = { room: this.actor.currentLocation.name, back: GoCommand.opposite(direction) };
|
|
141
158
|
this.actor.currentLocation = targetRoom; // Update player's location
|
|
142
159
|
this.actor.performAction('enters', targetRoom.name);
|
|
143
160
|
}
|
|
@@ -151,6 +168,7 @@ export class GoCommand extends Command {
|
|
|
151
168
|
const wardBlock = this.checkWard(nextRoom);
|
|
152
169
|
if (wardBlock)
|
|
153
170
|
return wardBlock;
|
|
171
|
+
this.actor.cameFrom = { room: this.actor.currentLocation.name, back: GoCommand.opposite(direction) };
|
|
154
172
|
this.actor.currentLocation = nextRoom;
|
|
155
173
|
this.actor.performAction('enters', nextRoom.name);
|
|
156
174
|
}
|
|
@@ -158,10 +176,24 @@ export class GoCommand extends Command {
|
|
|
158
176
|
if (this.actor.plane === 'astral') {
|
|
159
177
|
this.actor.astralTicks += 1;
|
|
160
178
|
}
|
|
179
|
+
// HUB sessions: walking into your hideout with the job WRAPPED is
|
|
180
|
+
// going home -- the door opens back onto the hub (see
|
|
181
|
+
// Game.returnToHub). This replaced the retired "continue" command:
|
|
182
|
+
// finishing a run ends in fiction, not in a system verb.
|
|
183
|
+
if (this.game?.hasHub && !this.scene.isHub && this.scene.isCompleted()
|
|
184
|
+
&& this.actor === this.scene.getPlayer()
|
|
185
|
+
&& this.actor.currentLocation === this.game.homeRoom) {
|
|
186
|
+
return await this.game.continueToNextScene();
|
|
187
|
+
}
|
|
161
188
|
this.logger.write(`${this.actor.name} moved to room: ${this.actor.currentLocation.name || 'Unnamed room'} (${this.actor.plane}).`);
|
|
162
189
|
// Use the LookCommand to get the description of the new room
|
|
163
190
|
return this.actor.currentLocation.description;
|
|
164
191
|
}
|
|
192
|
+
/** The direction that undoes a move -- feeds the HUD breadcrumb. */
|
|
193
|
+
static opposite(direction) {
|
|
194
|
+
const map = { north: 'south', south: 'north', east: 'west', west: 'east', up: 'down', down: 'up' };
|
|
195
|
+
return map[direction] ?? direction;
|
|
196
|
+
}
|
|
165
197
|
/** Wards block astral forms and nothing else. Returns the refusal, or null. */
|
|
166
198
|
checkWard(target) {
|
|
167
199
|
if (this.actor.plane === 'astral' && target.warded) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"go.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/go.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"go.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/go.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,SAAU,SAAQ,OAAO;IAC1B,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,WAAW,GAAG,oGAAoG,CAAC;IAEpI,KAAK,CAAC,OAAO,CAAC,IAAc;QAC1B,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,+CAA+C,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACtG,OAAO,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACK,KAAK,CAAC,kBAAkB;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,QAAQ,GAAG,KAAK,CAAC,cAAc,CAAC;QACtC,IAAI,CAAC,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C,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,mBAAmB,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,IAAI,cAAc,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC;QAEnI,6DAA6D;QAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,WAAW,CAAC;IAChD,CAAC;IAED,oEAAoE;IAC5D,MAAM,CAAC,QAAQ,CAAC,SAAiB;QACvC,MAAM,GAAG,GAA2B,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAC3H,OAAO,GAAG,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC;IACrC,CAAC;IAED,+EAA+E;IACvE,SAAS,CAAC,MAAY;QAC5B,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YACnD,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,uBAAuB,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;YAC/D,OAAO,gBAAgB,MAAM,CAAC,IAAI,gGAAgG,CAAC;QACrI,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { BypassCommand } from './bypass-command.js';
|
|
2
|
-
import { playHackMinigame } from '../minigames/hack-minigame.js';
|
|
3
2
|
import { rollPool, formatRoll } from '../utilities/dice.js';
|
|
4
3
|
import { Door } from '../models/door.js';
|
|
5
|
-
import { leaveMatrix } from '../utilities/planes.js';
|
|
4
|
+
import { leaveMatrix, canReachHost } from '../utilities/planes.js';
|
|
6
5
|
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
7
6
|
export class HackCommand extends BypassCommand {
|
|
8
7
|
static verb = 'hack';
|
|
@@ -30,6 +29,16 @@ export class HackCommand extends BypassCommand {
|
|
|
30
29
|
if (!room.hasNode) {
|
|
31
30
|
return `Thin grid out here -- no host node to crack. Find a room whose systems actually live on the Matrix.`;
|
|
32
31
|
}
|
|
32
|
+
// An air-gapped host doesn't answer personas that rode in over the
|
|
33
|
+
// wireless grid -- it only opens to a hard line, i.e. a body jacked
|
|
34
|
+
// in INSIDE this room (see planes.canReachHost). This is what makes
|
|
35
|
+
// physical infiltration matter to a datarun.
|
|
36
|
+
if (!canReachHost(this.actor, room)) {
|
|
37
|
+
return `The host here is AIR-GAPPED -- dark to the wireless grid, no matter how close your persona drifts. It only opens to a hard line: get your body into ${room.name} and "jack in" from there.`;
|
|
38
|
+
}
|
|
39
|
+
if (room.hostCracked) {
|
|
40
|
+
return `This host is already cracked open -- its security hangs in shreds. Whatever it guarded is yours to take.`;
|
|
41
|
+
}
|
|
33
42
|
const lockedDoors = Array.from(room.exits.values())
|
|
34
43
|
.filter((exit) => exit instanceof Door && exit.checkIfLocked());
|
|
35
44
|
this.actor.performAction('hacks the host', room.name);
|
|
@@ -61,18 +70,27 @@ export class HackCommand extends BypassCommand {
|
|
|
61
70
|
this.scene.updateStatus();
|
|
62
71
|
return lines.join('\n');
|
|
63
72
|
}
|
|
64
|
-
|
|
65
|
-
|
|
73
|
+
// Cracking the host buys everything it guards at once: the room's
|
|
74
|
+
// physical maglocks AND its data vault (matrix items were sealed
|
|
75
|
+
// until now -- see take.ts). The host is the vault, not the door.
|
|
76
|
+
room.hostCracked = true;
|
|
77
|
+
const vaultedFiles = room.inventory.getAllItems().filter(i => i.plane === 'matrix');
|
|
78
|
+
const lines = [`You're in. The host's sculpted security folds back layer by layer --`];
|
|
79
|
+
if (lockedDoors.length > 0) {
|
|
80
|
+
for (const door of lockedDoors) {
|
|
81
|
+
door.isLocked = false;
|
|
82
|
+
}
|
|
83
|
+
lines.push(` ${lockedDoors.length} maglock${lockedDoors.length === 1 ? '' : 's'} release${lockedDoors.length === 1 ? 's' : ''} in the MEAT world. The way is open, out there.`);
|
|
66
84
|
}
|
|
67
|
-
|
|
68
|
-
|
|
85
|
+
if (vaultedFiles.length > 0) {
|
|
86
|
+
lines.push(` {cyan-fg}The data vault unseals -- ${vaultedFiles.map(i => i.name).join(', ')} ${vaultedFiles.length === 1 ? 'is' : 'are'} yours to "take".{/cyan-fg}`);
|
|
69
87
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
88
|
+
if (lockedDoors.length === 0 && vaultedFiles.length === 0) {
|
|
89
|
+
lines.push(` Nothing here is locked down, but the node's systems are yours to read.`);
|
|
90
|
+
}
|
|
91
|
+
this.scene.addWorldEvent(`${this.actor.name} hacked the ${room.name} host -- its security is down.`);
|
|
92
|
+
this.logger.write(`${this.actor.name} hacked ${room.name}'s node: ${lockedDoors.length} door(s) unlocked, ${vaultedFiles.length} file(s) unsealed.`);
|
|
93
|
+
return lines.join('\n');
|
|
76
94
|
}
|
|
77
95
|
return super.execute(args);
|
|
78
96
|
}
|
|
@@ -115,7 +133,10 @@ export class HackCommand extends BypassCommand {
|
|
|
115
133
|
const atkQuality = actor.isTechnomancer()
|
|
116
134
|
? Math.floor(actor.resonance / 2)
|
|
117
135
|
: (actor.activeDeck ?? arDeck)?.qualityBonus ?? 0;
|
|
118
|
-
|
|
136
|
+
// Logic + HACKING + gear: the skill joined the duel with the rest of
|
|
137
|
+
// the skill system -- a trained decker now out-fences a smart amateur
|
|
138
|
+
// holding the same deck.
|
|
139
|
+
const attack = rollPool(Math.max(0, actor.logic + actor.skillRating('hacking') + atkQuality + actor.woundModifier));
|
|
119
140
|
const defense = rollPool(target.getPanDefensePool());
|
|
120
141
|
actor.performAction('runs a PAN intrusion', target.name);
|
|
121
142
|
this.logger.write(`${actor.name} PAN-hacks ${target.name}: ${attack.hits} vs ${defense.hits} (silent=${target.runningSilent}).`);
|
|
@@ -163,14 +184,16 @@ export class HackCommand extends BypassCommand {
|
|
|
163
184
|
return lines.join('\n');
|
|
164
185
|
}
|
|
165
186
|
async determineOutcome() {
|
|
166
|
-
//
|
|
167
|
-
//
|
|
168
|
-
//
|
|
169
|
-
//
|
|
170
|
-
|
|
171
|
-
|
|
187
|
+
// A HACKING test (Logic + hacking, 2 hits) -- the skill replaced the
|
|
188
|
+
// old flat Logic + 3 and the minigame both; hacking falls back to
|
|
189
|
+
// combatSkill for skill-less NPCs (see Player.skillRating), so an old
|
|
190
|
+
// seed's enforcer still fumbles terminals about like it used to.
|
|
191
|
+
const pool = Math.max(1, this.actor.logic + this.actor.skillRating('hacking') + this.actor.woundModifier - this.actor.sustainingPenalty);
|
|
192
|
+
const roll = rollPool(pool);
|
|
193
|
+
if (this.actor === this.scene.getPlayer()) {
|
|
194
|
+
this.logger.log(`Hacking: ${formatRoll(roll)} (2+ to crack)`);
|
|
172
195
|
}
|
|
173
|
-
return
|
|
196
|
+
return roll.hits >= 2;
|
|
174
197
|
}
|
|
175
198
|
}
|
|
176
199
|
//# sourceMappingURL=hack.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hack.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/hack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"hack.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/hack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM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AoC,CAAC,CAAC;YAClF,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,IAAI,QAAQ,MAAM,CAAC,IAAI,0BAA0B,CAAC,CAAC;QACvF,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,gFAAgF,CAAC,CAAC;QAC/F,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAES,KAAK,CAAC,gBAAgB;QAC9B,qEAAqE;QACrE,kEAAkE;QAClE,sEAAsE;QACtE,iEAAiE;QACjE,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACzI,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,CAAC;YAC1C,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;IACxB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Negotiation's mechanic: haggle the job's payout, ONCE per job, over a
|
|
4
|
+
* live call with whoever's paying (the fixer, or the win condition's
|
|
5
|
+
* recipient). Opposed Charisma + negotiation. Each net hit is +5% on the
|
|
6
|
+
* agreed figure (capped +25%); losing means the offer stands; a critical
|
|
7
|
+
* glitch INSULTS them -- 10% off. The engine pays whatever number wins
|
|
8
|
+
* here, and every NPC quotes it (their prompt reads the live payout), so
|
|
9
|
+
* the negotiation is mechanically real, not flavor.
|
|
10
|
+
*/
|
|
11
|
+
export declare class HaggleCommand extends Command implements ICommand {
|
|
12
|
+
protected static verb: string;
|
|
13
|
+
protected static description: string;
|
|
14
|
+
execute(_args?: string[]): Promise<string>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Command } from './command.js';
|
|
2
|
+
import { rollPool, formatRoll } from '../utilities/dice.js';
|
|
3
|
+
import { CALL_ICON, CALL_COLOR } from '../utilities/comm-style.js';
|
|
4
|
+
/**
|
|
5
|
+
* Negotiation's mechanic: haggle the job's payout, ONCE per job, over a
|
|
6
|
+
* live call with whoever's paying (the fixer, or the win condition's
|
|
7
|
+
* recipient). Opposed Charisma + negotiation. Each net hit is +5% on the
|
|
8
|
+
* agreed figure (capped +25%); losing means the offer stands; a critical
|
|
9
|
+
* glitch INSULTS them -- 10% off. The engine pays whatever number wins
|
|
10
|
+
* here, and every NPC quotes it (their prompt reads the live payout), so
|
|
11
|
+
* the negotiation is mechanically real, not flavor.
|
|
12
|
+
*/
|
|
13
|
+
export class HaggleCommand extends Command {
|
|
14
|
+
static verb = 'haggle';
|
|
15
|
+
static description = 'Negotiate the job\'s payout over a live call -- opposed Charisma + negotiation, once per job. A bad enough roll worsens the offer.';
|
|
16
|
+
async execute(_args = []) {
|
|
17
|
+
const actor = this.actor;
|
|
18
|
+
const partner = actor.activeCallPartner;
|
|
19
|
+
// A PENDING offer (hub flow: Johnson pitched, nothing accepted yet)
|
|
20
|
+
// is the prime negotiating moment -- haggling mutates the pending
|
|
21
|
+
// seed's payout, which flows into the run when "travel" installs it.
|
|
22
|
+
// Otherwise the live scene's win condition is the table.
|
|
23
|
+
const pending = this.game?.pendingRun;
|
|
24
|
+
const wc = pending?.winCondition ?? this.scene.getWinCondition();
|
|
25
|
+
if (!wc || typeof wc.payout !== 'number' || wc.payout <= 0) {
|
|
26
|
+
return `There's no pay on the table to argue about.`;
|
|
27
|
+
}
|
|
28
|
+
if (!pending && this.scene.isCompleted()) {
|
|
29
|
+
return `The job's done and the cred's transferred -- that ship has sailed.`;
|
|
30
|
+
}
|
|
31
|
+
if (!partner) {
|
|
32
|
+
return `Haggling happens on a live call -- "call" whoever's paying first.`;
|
|
33
|
+
}
|
|
34
|
+
if (actor.haggledThisJob) {
|
|
35
|
+
return `You already pushed on the number once this job. Push again and you're negotiating yourself out of work.`;
|
|
36
|
+
}
|
|
37
|
+
actor.haggledThisJob = true;
|
|
38
|
+
const negotiation = actor.skillRating('negotiation');
|
|
39
|
+
const pool = Math.max(1, actor.charisma + (negotiation > 0 ? negotiation : -1) + actor.woundModifier - actor.sustainingPenalty);
|
|
40
|
+
const theirs = Math.max(1, partner.charisma + partner.skillRating('negotiation'));
|
|
41
|
+
const mine = rollPool(pool);
|
|
42
|
+
const resistance = rollPool(theirs);
|
|
43
|
+
actor.performAction('haggles over the pay with', partner.name);
|
|
44
|
+
this.logger.write(`${actor.name} haggles with ${partner.name}: ${mine.hits} vs ${resistance.hits} on ${wc.payout}.`);
|
|
45
|
+
const lines = [
|
|
46
|
+
`You lean on the number:`,
|
|
47
|
+
` Negotiation: ${formatRoll(mine)}`,
|
|
48
|
+
` ${partner.name}: ${formatRoll(resistance)}`,
|
|
49
|
+
];
|
|
50
|
+
const oldPayout = wc.payout;
|
|
51
|
+
const net = mine.hits - resistance.hits;
|
|
52
|
+
let note;
|
|
53
|
+
if (mine.criticalGlitch) {
|
|
54
|
+
wc.payout = Math.max(500, Math.round(oldPayout * 0.9 / 100) * 100);
|
|
55
|
+
note = `You overplay it badly -- ${partner.name} goes cold. The offer DROPS: ${oldPayout} -> ${wc.payout} nuyen.`;
|
|
56
|
+
}
|
|
57
|
+
else if (net <= 0) {
|
|
58
|
+
note = `${partner.name} doesn't blink. The number stands: ${wc.payout} nuyen.`;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
const bump = Math.min(0.25, net * 0.05);
|
|
62
|
+
wc.payout = Math.round(oldPayout * (1 + bump) / 100) * 100;
|
|
63
|
+
note = `${partner.name} sighs -- and the number moves: ${oldPayout} -> ${wc.payout} nuyen.`;
|
|
64
|
+
}
|
|
65
|
+
lines.push(` ${note}`);
|
|
66
|
+
// The partner's AI hears the renegotiation as part of the call, with
|
|
67
|
+
// the binding figure spelled out -- their payoutSummary reads the live
|
|
68
|
+
// win condition, so from here on they QUOTE the new number too.
|
|
69
|
+
void Promise.resolve(partner.hear(actor, `The rate needs another look. [System note: after negotiation, the agreed payout is now EXACTLY ${wc.payout} nuyen -- this figure is binding.]`)).catch(err => {
|
|
70
|
+
this.logger.error(`${partner.name} failed to hear the haggle: ${err}`);
|
|
71
|
+
});
|
|
72
|
+
return `{${CALL_COLOR}-fg}${CALL_ICON} ${lines.join('\n')}{/${CALL_COLOR}-fg}`;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=haggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"haggle.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/haggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAc,SAAQ,OAAO;IAC9B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,oIAAoI,CAAC;IAEpK,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,OAAO,GAAG,KAAK,CAAC,iBAAiB,CAAC;QAExC,oE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,GAAG,OAAO,CAAC,IAAI,mCAAmC,SAAS,OAAO,EAAE,CAAC,MAAM,SAAS,CAAC;QAC9F,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QAExB,qEAAqE;QACrE,uEAAuE;QACvE,gEAAgE;QAChE,KAAK,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,kGAAkG,EAAE,CAAC,MAAM,oCAAoC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACrM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,IAAI,+BAA+B,GAAG,EAAE,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,UAAU,OAAO,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,UAAU,MAAM,CAAC;IACjF,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command } from './command.js';
|
|
2
2
|
import { capitalCase } from 'change-case';
|
|
3
|
+
import { planeTintItemName } from '../utilities/planes.js';
|
|
3
4
|
/**
|
|
4
5
|
* On-demand inventory panel, replacing the always-on blessed sidebar box
|
|
5
6
|
* (same freeing-up-the-log treatment as equipment.ts and map.ts -- the
|
|
@@ -17,7 +18,10 @@ export class InventoryCommand extends Command {
|
|
|
17
18
|
let currencyTotal = 0;
|
|
18
19
|
const itemLines = [];
|
|
19
20
|
for (const item of items) {
|
|
20
|
-
|
|
21
|
+
// Carried data keeps its plane tint (cyan [data]) so the pack view
|
|
22
|
+
// matches how search showed it. 'meat' as viewer: the astral
|
|
23
|
+
// annotation is for room floors, not your own pack.
|
|
24
|
+
let line = ` • ${planeTintItemName(item, 'meat')} -- ${item.rating} ${item.category}`;
|
|
21
25
|
if (item.isCurrencyCarrier?.() && item.currencyAmount > 0) {
|
|
22
26
|
line += ` [${item.currencyAmount} ${currencyName.toLowerCase()}]`;
|
|
23
27
|
currencyTotal += item.currencyAmount;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inv.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/inv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"inv.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/inv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,OAAO;IACjC,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,MAAM,CAAC,WAAW,GAAG,oEAAoE,CAAC;IAEpG,KAAK,CAAC,OAAO,CAAC,QAAkB,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;QAC5C,MAAM,YAAY,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,CAAC;QAE/D,MAAM,KAAK,GAAa,CAAC,mBAAmB,CAAC,CAAC;QAE9C,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,MAAM,SAAS,GAAa,EAAE,CAAC;QAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,mEAAmE;YACnE,6DAA6D;YAC7D,oDAAoD;YACpD,IAAI,IAAI,GAAG,OAAO,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACvF,IAAI,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,IAAI,CAAC,cAAc,GAAG,CAAC,EAAE,CAAC;gBAC1D,IAAI,IAAI,KAAK,IAAI,CAAC,cAAc,IAAI,YAAY,CAAC,WAAW,EAAE,GAAG,CAAC;gBAClE,aAAa,IAAI,IAAI,CAAC,cAAc,CAAC;YACvC,CAAC;YACD,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,SAAS,YAAY,KAAK,aAAa,EAAE,CAAC,CAAC;QACtD,KAAK,CAAC,IAAI,CAAC,aAAa,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,iBAAiB,8BAA8B,CAAC,CAAC;QACnH,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAEf,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC,8EAA8E,CAAC,CAAC;QAC7F,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;QAC3B,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { Door } from '../models/door.js';
|
|
|
2
2
|
import { NPC } from '../models/npc.js';
|
|
3
3
|
import { Category } from '../types/shared/item-enum.js';
|
|
4
4
|
import { Command } from './command.js';
|
|
5
|
-
import { shellsInRoom } from '../utilities/planes.js';
|
|
5
|
+
import { shellsInRoom, canReachHost } from '../utilities/planes.js';
|
|
6
6
|
export class LookCommand extends Command {
|
|
7
7
|
static verb = 'look';
|
|
8
8
|
static description = 'Examine your surroundings';
|
|
@@ -50,10 +50,22 @@ export class LookCommand extends Command {
|
|
|
50
50
|
}
|
|
51
51
|
let description = (room.details) ? room.details : room.description;
|
|
52
52
|
// Plane dressing: what a room IS depends on where you're standing.
|
|
53
|
+
// A node reads differently by state: burning (hackable), dark
|
|
54
|
+
// (air-gapped, hard line only -- see planes.canReachHost), or cracked
|
|
55
|
+
// open (already yours).
|
|
53
56
|
if (this.actor.plane === 'matrix') {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
if (!room.hasNode) {
|
|
58
|
+
description += `\n\n{cyan-fg}Thin grid out here -- ambient AR clutter, nothing worth cracking.{/cyan-fg}`;
|
|
59
|
+
}
|
|
60
|
+
else if (!canReachHost(this.actor, room)) {
|
|
61
|
+
description += `\n\n{cyan-fg}A host squats here, DARK -- air-gapped, no wireless presence at all. It only opens to a hard line: jack in from inside this room.{/cyan-fg}`;
|
|
62
|
+
}
|
|
63
|
+
else if (room.hostCracked) {
|
|
64
|
+
description += `\n\n{cyan-fg}The host here hangs cracked open, security in shreds -- whatever it guarded is unsealed.{/cyan-fg}`;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
description += `\n\n{cyan-fg}A host node burns here -- sculpted ice geometry over the room's systems. This is hackable ground.{/cyan-fg}`;
|
|
68
|
+
}
|
|
57
69
|
}
|
|
58
70
|
else if (this.actor.plane === 'astral') {
|
|
59
71
|
description += room.warded
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"look.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/look.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"look.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/look.ts"],"names":[],"mappings":"AACA,OAAO,E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AC,QAAQ,CAAC,CAAC;YAClC,IAAI,CAAC,KAAK;gBAAE,SAAS;YAErB,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzC,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;gBAC5B,IAAI,IAAI,EAAE,CAAC;oBACT,KAAK,CAAC,IAAI,CAAC,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;gBACvD,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,yCAAyC,CAAC,CAAC;QACtE,CAAC;QAED,OAAO,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* The NEGOTIATION skill against a PERSON: "persuade <name> [your pitch]"
|
|
4
|
+
* rolls opposed Charisma + negotiation, and the OUTCOME is mechanically
|
|
5
|
+
* fed into the target's AI as a disposition note -- a won roll makes them
|
|
6
|
+
* genuinely inclined to cooperate (share what they know, drop absurd
|
|
7
|
+
* demands), a strong win makes them an ally for the scene, a lost roll
|
|
8
|
+
* leaves them unmoved, and a critical glitch actively sours them. Once
|
|
9
|
+
* per target per job -- people notice being worked twice. Born from a
|
|
10
|
+
* real Face session stonewalled by a bartender demanding the entire job's
|
|
11
|
+
* payout for one answer, with charisma 6 / negotiation 6 and no verb to
|
|
12
|
+
* spend them on.
|
|
13
|
+
*/
|
|
14
|
+
export declare class PersuadeCommand extends Command implements ICommand {
|
|
15
|
+
protected static verb: string;
|
|
16
|
+
protected static description: string;
|
|
17
|
+
execute(args?: string[]): Promise<string>;
|
|
18
|
+
}
|