@maka/maka-cli 5.48.0 → 5.50.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/commands/attack.js +20 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +9 -8
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.d.ts +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js +27 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +43 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +6 -24
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/loot.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/loot.js +93 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/loot.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.d.ts +5 -15
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.js +36 -132
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/move.d.ts +32 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/move.js +313 -17
- package/bundle/typescript/src/commands/game/sideQuest/commands/move.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/note.d.ts +25 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/note.js +57 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/note.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +20 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js +9 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.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 +13 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +66 -9
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +37 -1
- 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 +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +59 -6
- package/bundle/typescript/src/commands/game/sideQuest/game.js +250 -49
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/headless.js +42 -2
- package/bundle/typescript/src/commands/game/sideQuest/headless.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +63 -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 +40 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +49 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +5 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +24 -6
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +85 -2
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +182 -2
- 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 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +17 -7
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +17 -13
- package/bundle/typescript/src/commands/game/sideQuest/types/save-file.d.ts +32 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.d.ts +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.d.ts +5 -1
- package/bundle/typescript/src/commands/game/sideQuest/ui.d.ts +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +17 -11
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +87 -8
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/map-view.d.ts +70 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/map-view.js +289 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/map-view.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js +34 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.d.ts +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/prefs.d.ts +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/prefs.js +44 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/prefs.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/range.d.ts +22 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/range.js +69 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/range.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-grid.d.ts +186 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-grid.js +742 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-grid.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-view.d.ts +34 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-view.js +524 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-view.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/shared-run.js +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/shared-run.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.d.ts +273 -3
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js +890 -24
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +5 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/tools/ai/ai.class.d.ts +15 -0
- package/bundle/typescript/src/tools/ai/ai.class.js +20 -0
- package/bundle/typescript/src/tools/ai/ai.class.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Command } from './command.js';
|
|
2
|
+
import { hint } from '../utilities/hints.js';
|
|
2
3
|
import { GoCommand } from './go.js';
|
|
3
4
|
import { NPC } from '../models/npc.js';
|
|
4
5
|
import { fuzzyPickName } from '../utilities/fuzzy-match.js';
|
|
5
6
|
import { heldBy, holding } from '../utilities/grapple.js';
|
|
6
|
-
import { spotsActive, resolveSpot, spotOf, describeSpotRoster, OPEN_FLOOR } from '../utilities/spots.js';
|
|
7
|
+
import { spotsActive, resolveSpot, spotOf, describeSpotRoster, OPEN_FLOOR, pathBetweenSpots, spotDistanceMeters, spotClimbSteps, blockingRegion, terrainRefusal, reseatOpenFloor, routeForMove, stepFrom, spotForCell, actorCell, standingRoomNear, furnitureCells, approachCellFor, } from '../utilities/spots.js';
|
|
8
|
+
import { fallDamageDV, METERS_PER_CELL, key } from '../utilities/room-grid.js';
|
|
9
|
+
import { rollPool, formatRoll } from '../utilities/dice.js';
|
|
7
10
|
/**
|
|
8
11
|
* "walk to <spot>" / "run to <spot>" / "sprint to <spot>" -- crossing
|
|
9
12
|
* the CURRENT room to one of its "at" spots (see utilities/spots.ts;
|
|
@@ -15,13 +18,14 @@ import { spotsActive, resolveSpot, spotOf, describeSpotRoster, OPEN_FLOOR } from
|
|
|
15
18
|
* clean (Phase 2; v1 refuses spot moves mid-exchange like go.ts does
|
|
16
19
|
* room moves).
|
|
17
20
|
*
|
|
18
|
-
* "move" and "approach" alias walk. A Direction argument
|
|
19
|
-
*
|
|
20
|
-
* direction wins, documented here
|
|
21
|
+
* "move" and "approach" alias walk. A Direction argument is a STEP
|
|
22
|
+
* across this room's grid ("move south 2"), never a room change -- on a
|
|
23
|
+
* name collision the direction wins, documented here. "go" is the only
|
|
24
|
+
* verb that leaves a room.
|
|
21
25
|
*/
|
|
22
26
|
export class MoveCommand extends Command {
|
|
23
27
|
static verb = 'walk';
|
|
24
|
-
static description = 'Cross the room to a named spot or person: "move to bar", "move to Brick" (also "walk"/"approach"; "run to"/"sprint to" are the fast crossings). Bare "move" lists the room\'s spots. You must share a spot with someone to talk or trade with them.';
|
|
28
|
+
static description = 'Cross the room to a named spot or person: "move to bar", "move to Brick" (also "walk"/"approach"; "run to"/"sprint to" are the fast crossings). "move south 2" paces you across the room by cells instead -- use "go" to leave the room entirely. Bare "move" lists the room\'s spots. You must share a spot with someone to talk or trade with them.';
|
|
25
29
|
/** Which movement mode this registration answers to (see subclasses). */
|
|
26
30
|
mode() {
|
|
27
31
|
return 'walk';
|
|
@@ -36,9 +40,38 @@ export class MoveCommand extends Command {
|
|
|
36
40
|
words = words.slice(1);
|
|
37
41
|
if (/^(the|a|an)$/i.test(words[0] ?? ''))
|
|
38
42
|
words = words.slice(1);
|
|
39
|
-
// "move
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
// "move south" / "move south 2": a STEP across the room's grid
|
|
44
|
+
// (player request 2026-08-25) -- one cell per unit, default one.
|
|
45
|
+
// "move" NEVER changes rooms; "go" is the only verb that does.
|
|
46
|
+
// It used to fall through to "go" in a room with no grid, which
|
|
47
|
+
// meant the same words paced you across a bar but teleported you
|
|
48
|
+
// out of a street (playtest: "I can 'move north' and it'll actually
|
|
49
|
+
// move me into the next room"). One verb, one meaning -- a room
|
|
50
|
+
// with nowhere to pace says so and names the verb that leaves.
|
|
51
|
+
// A PLACE NAMED AFTER A DIRECTION IS STILL A PLACE (player note
|
|
52
|
+
// 2026-08-25: `move to north gate` was interpreted as `move north`).
|
|
53
|
+
// A bare direction, or a direction plus a count, is a step; anything
|
|
54
|
+
// else that names a real spot -- "north gate", "east door", "south
|
|
55
|
+
// stairs" -- is a crossing to it. Only fall back to stepping when
|
|
56
|
+
// the words don't resolve to somewhere you could stand.
|
|
57
|
+
const stepArgs = words.length === 1
|
|
58
|
+
|| (words.length === 2 && /^\d+$/.test(words[1]));
|
|
59
|
+
// "north door" names a DOORWAY, not a heading -- so does "east
|
|
60
|
+
// exit". Those go to the doorway crossing below; only a bare
|
|
61
|
+
// heading (or heading + count) is a step.
|
|
62
|
+
const namesADoor = MoveCommand.DOORISH.test(words.join(' '));
|
|
63
|
+
if (words.length > 0 && this.isValidDirection(words[0].toLowerCase())
|
|
64
|
+
&& !namesADoor
|
|
65
|
+
&& (stepArgs || !resolveSpot(room, words.join(' ')))) {
|
|
66
|
+
const direction = words[0].toLowerCase();
|
|
67
|
+
const count = Math.max(1, Math.min(20, parseInt(words[1] ?? '1', 10) || 1));
|
|
68
|
+
if (actor.plane !== 'meat') {
|
|
69
|
+
return `Spots are a meat-world concern -- your present form is everywhere in the room at once.`;
|
|
70
|
+
}
|
|
71
|
+
if (!room.ensureGrid()) {
|
|
72
|
+
return `There's no ground to pace off here.${hint(` ("go ${direction}" to leave.)`)}`;
|
|
73
|
+
}
|
|
74
|
+
return await this.stepAcross(direction, count);
|
|
42
75
|
}
|
|
43
76
|
// GRAPPLED (p.195): held fast means no crossing the room either --
|
|
44
77
|
// and a holder's hands are full (see commands/grapple.ts).
|
|
@@ -50,14 +83,21 @@ export class MoveCommand extends Command {
|
|
|
50
83
|
if (gripHeld) {
|
|
51
84
|
return `You're holding ${gripHeld.name} -- "release" before you move off.`;
|
|
52
85
|
}
|
|
53
|
-
if (!spotsActive(room)) {
|
|
54
|
-
return `There's nowhere more specific to stand here.`;
|
|
55
|
-
}
|
|
56
86
|
if (actor.plane !== 'meat') {
|
|
57
87
|
return `Spots are a meat-world concern -- your present form is everywhere in the room at once.`;
|
|
58
88
|
}
|
|
89
|
+
// The spotless-room refusal used to sit HERE, ahead of everything,
|
|
90
|
+
// which is why a room with no seeded places had nothing to walk to
|
|
91
|
+
// at all -- not even its own doors. Doorways, bodies and people are
|
|
92
|
+
// all real destinations now, so only the LISTING falls back.
|
|
59
93
|
if (words.length === 0) {
|
|
60
|
-
|
|
94
|
+
const ways = [...room.exits.keys()].map(d => ` • the ${d} way out`);
|
|
95
|
+
if (!spotsActive(room)) {
|
|
96
|
+
return ways.length > 0
|
|
97
|
+
? [`${room.name} has no named places -- but it has ways out:`, ...ways].join('\n')
|
|
98
|
+
: `There's nowhere more specific to stand here.`;
|
|
99
|
+
}
|
|
100
|
+
return [`Places in ${room.name}:`, ...describeSpotRoster(room, actor).map(l => ` • ${l}`), ...ways].join('\n');
|
|
61
101
|
}
|
|
62
102
|
// Spot names first (unchanged behavior); then PEOPLE (player
|
|
63
103
|
// request: "move to Brick") -- walking to someone means walking to
|
|
@@ -74,25 +114,117 @@ export class MoveCommand extends Command {
|
|
|
74
114
|
// there's no fixed ground to cross to, and none needed.
|
|
75
115
|
return `${target.name} is drifting the room -- already in reach right where you stand.`;
|
|
76
116
|
}
|
|
117
|
+
// SHARING A SPOT IS NOT STANDING TOGETHER (player note
|
|
118
|
+
// 2026-08-25: "I should be able to move to Ms. Cinder's
|
|
119
|
+
// location"). Since bodies get their own cells, two people "on
|
|
120
|
+
// the open floor" can be metres apart -- so asking to walk to
|
|
121
|
+
// someone you already share a spot with should close the last
|
|
122
|
+
// gap, not answer "you're already there".
|
|
123
|
+
if (spotOf(actor) === theirSpot)
|
|
124
|
+
return this.crossToActor(target);
|
|
77
125
|
spot = room.spots.find(s => s.name === theirSpot) ?? { name: theirSpot };
|
|
78
126
|
toWhom = target.name;
|
|
79
127
|
}
|
|
80
128
|
}
|
|
129
|
+
// THE FALLEN are somewhere to walk to as well. They hold a cell but
|
|
130
|
+
// no spot, so they can't come through resolveSpot -- and "move to
|
|
131
|
+
// Mr. Krow" is exactly what a player types before looting him
|
|
132
|
+
// (playtest 2026-08-25).
|
|
81
133
|
if (!spot) {
|
|
82
|
-
|
|
134
|
+
const body = this.resolveBodyTarget(room, words.join(' '));
|
|
135
|
+
if (body)
|
|
136
|
+
return this.crossToBody(body);
|
|
83
137
|
}
|
|
84
|
-
|
|
138
|
+
// SO ARE DOORS (player note 2026-08-25: "there are no locations --
|
|
139
|
+
// doors should be locations I can 'move to'"). Every room is
|
|
140
|
+
// matrixed now, so a doorway always has a cell even where the seed
|
|
141
|
+
// named no places at all -- which is most rooms, and exactly the
|
|
142
|
+
// ones that felt empty. "move to north door", "move to the east
|
|
143
|
+
// exit", or plain "move to door" when there's only one.
|
|
144
|
+
if (!spot) {
|
|
145
|
+
const door = this.resolveDoorTarget(room, words.join(' '));
|
|
146
|
+
if (door !== undefined)
|
|
147
|
+
return this.crossToDoorway(door);
|
|
148
|
+
}
|
|
149
|
+
if (!spot) {
|
|
150
|
+
const named = (room.spots ?? []).map(s => s.name);
|
|
151
|
+
const ways = [...room.exits.keys()].map(d => `${d} way out`);
|
|
152
|
+
const options = [...named, ...ways];
|
|
153
|
+
return options.length > 0
|
|
154
|
+
? `No "${words.join(' ')}" here. You could go to: ${options.join(', ')}.`
|
|
155
|
+
: `No "${words.join(' ')}" here.`;
|
|
156
|
+
}
|
|
157
|
+
const mine = spotOf(actor);
|
|
158
|
+
if (mine === spot.name) {
|
|
85
159
|
return toWhom
|
|
86
160
|
? `You're already at the ${spot.name} with ${toWhom}.`
|
|
87
161
|
: `You're already at the ${spot.name}.`;
|
|
88
162
|
}
|
|
163
|
+
// ROOM GRIDS (spatial wave 2026-08-25): a terrain barrier refuses
|
|
164
|
+
// the crossing outright -- checked before the combat gate, so a
|
|
165
|
+
// blocked route reads as "clear it", never as a mid-exchange excuse.
|
|
166
|
+
// Only pays for the pathfind when the actor actually has a
|
|
167
|
+
// position to path FROM (a circulating actor already reaches
|
|
168
|
+
// everywhere, sacred rule 2).
|
|
169
|
+
if (mine !== undefined && room.ensureGrid() && !pathBetweenSpots(room, mine, spot.name)) {
|
|
170
|
+
const blocked = blockingRegion(room, mine, spot.name);
|
|
171
|
+
if (blocked)
|
|
172
|
+
return terrainRefusal(blocked.region, spot.name, blocked.puzzle);
|
|
173
|
+
}
|
|
89
174
|
// Mid-exchange, nobody strolls (same rule as go.ts room moves): the
|
|
90
175
|
// player is refused; an NPC's AI retries in the lull. Phase 2 will
|
|
91
176
|
// route this through the crossing-exposure machinery instead.
|
|
92
177
|
if (actor.inExchange) {
|
|
93
178
|
return `You're mid-exchange -- crossing open floor now means eating lead. Let it settle.`;
|
|
94
179
|
}
|
|
180
|
+
// ROOM GRIDS (spatial wave 2026-08-25): a CLIMB route (the riskier
|
|
181
|
+
// alternative to a level's own stairs/ladder) is an Athletics(2)
|
|
182
|
+
// test -- fail it and gravity collects, SR5 p.172: DV = meters
|
|
183
|
+
// fallen (only past 3m -- a single level's worth never counts),
|
|
184
|
+
// AP -4, resisted with Body + Armor (Player.getSoakPool). A
|
|
185
|
+
// successful climb still lands you at the spot; a failed one never
|
|
186
|
+
// does -- you're back where you started, hurt.
|
|
187
|
+
const climbSteps = mine !== undefined ? spotClimbSteps(room, mine, spot.name) : undefined;
|
|
188
|
+
if (climbSteps !== undefined) {
|
|
189
|
+
const athleticsSkill = actor.skillRating('athletics');
|
|
190
|
+
const pool = Math.max(1, actor.agility + (athleticsSkill > 0 ? athleticsSkill : -1) + actor.qualityBonus('athletics') + actor.woundModifier - actor.sustainingPenalty);
|
|
191
|
+
const climb = rollPool(pool);
|
|
192
|
+
this.logger.meta(` Climb -- Athletics: ${formatRoll(climb)} (2+ makes it)`);
|
|
193
|
+
if (climb.hits < 2) {
|
|
194
|
+
const dv = fallDamageDV(climbSteps);
|
|
195
|
+
let fallNote = `You lose your grip on the way up and drop back down.`;
|
|
196
|
+
if (dv > 0) {
|
|
197
|
+
const soak = rollPool(actor.getSoakPool());
|
|
198
|
+
const dealt = Math.max(0, dv - soak.hits);
|
|
199
|
+
this.logger.meta(` Fall damage: DV ${dv}, Soak: ${formatRoll(soak)}`);
|
|
200
|
+
if (dealt > 0) {
|
|
201
|
+
actor.takeDamage(dealt);
|
|
202
|
+
fallNote += ` The landing costs you ${dealt} box${dealt === 1 ? '' : 'es'}: ${actor.conditionSummary()}`;
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
fallNote += ` You hit hard but the armor eats it.`;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
this.actor.performAction('falls from', `a climb toward the ${spot.name}`);
|
|
209
|
+
return fallNote;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// "Away" is wherever the room's empty ground currently IS -- re-seat
|
|
213
|
+
// it on the loneliest reachable cell before measuring the crossing
|
|
214
|
+
// or committing the move (see spots.ts reseatOpenFloor).
|
|
215
|
+
if (spot.name === OPEN_FLOOR)
|
|
216
|
+
reseatOpenFloor(room, actor);
|
|
217
|
+
// The route a body actually walks -- around the furniture and
|
|
218
|
+
// around other people (spots.ts routeForMove). A crowded floor
|
|
219
|
+
// can force a squeeze, never a refusal.
|
|
220
|
+
const route = mine !== undefined ? routeForMove(room, actor, spot.name) : { squeezed: false };
|
|
221
|
+
const crossing = mine !== undefined && room.ensureGrid()
|
|
222
|
+
? spotDistanceMeters(room, mine, spot.name)
|
|
223
|
+
: undefined;
|
|
95
224
|
actor.atSpot = spot.name;
|
|
225
|
+
// Crossing to a named place gives up any stepped-to square: you're
|
|
226
|
+
// AT the bar now, and seating puts you beside it (spots.ts).
|
|
227
|
+
actor.atCell = undefined;
|
|
96
228
|
// A mundane verb on purpose: crossing a room shouldn't wake every
|
|
97
229
|
// NPC in it (that's the exact wall-of-attention this feature
|
|
98
230
|
// removes). NPC.see makes ONE exception -- an approach that ends AT
|
|
@@ -109,26 +241,190 @@ export class MoveCommand extends Command {
|
|
|
109
241
|
}
|
|
110
242
|
}
|
|
111
243
|
this.scene.updateStatus();
|
|
244
|
+
// Room-crossing changes atSpot -- the docked ROOM minimap (game.ts
|
|
245
|
+
// updateExits / utilities/room-view.ts) needs this too, not just
|
|
246
|
+
// the HUD line.
|
|
247
|
+
this.scene.updateExits(room);
|
|
112
248
|
if (actor instanceof NPC) {
|
|
113
249
|
return `${actor.name} moves to the ${spot.name}.`;
|
|
114
250
|
}
|
|
115
251
|
const here = room.getActors()
|
|
116
252
|
.filter(a => a !== actor && a.atSpot === spot.name && actor.canPerceive(a) && a.name !== toWhom)
|
|
117
253
|
.map(a => a.name);
|
|
254
|
+
// ROOM GRIDS (spatial wave 2026-08-25): a real distance tier, when
|
|
255
|
+
// the room's synthesized grid has one to offer -- short crossings
|
|
256
|
+
// stay silent (the old, unadorned phrasing), longer ones say so.
|
|
257
|
+
const crossNote = (crossing === undefined || crossing < 6 ? ''
|
|
258
|
+
: crossing < 14 ? ' -- a fair crossing'
|
|
259
|
+
: ' -- a long crossing')
|
|
260
|
+
+ (route.squeezed ? ', squeezing past bodies on the way' : '');
|
|
118
261
|
// The neutral ground gets its own verb: you peel off, you don't
|
|
119
262
|
// "cross to" a place that isn't one.
|
|
120
263
|
if (spot.name === OPEN_FLOOR) {
|
|
121
264
|
if (toWhom) {
|
|
122
|
-
return `You step out onto the open floor where ${toWhom} stands.${here.length > 0 ? ` Also out here: ${here.join(', ')}.` : ''}`;
|
|
265
|
+
return `You step out onto the open floor where ${toWhom} stands${crossNote}.${here.length > 0 ? ` Also out here: ${here.join(', ')}.` : ''}`;
|
|
123
266
|
}
|
|
124
|
-
return `You peel off to the open floor -- nobody's company but your own.${here.length > 0 ? ` Out here with you: ${here.join(', ')}.` : ''}`;
|
|
267
|
+
return `You peel off to the open floor${crossNote} -- nobody's company but your own.${here.length > 0 ? ` Out here with you: ${here.join(', ')}.` : ''}`;
|
|
125
268
|
}
|
|
126
269
|
const pace = this.mode() === 'walk' ? 'cross to' : this.mode() === 'run' ? 'hustle over to' : 'sprint to';
|
|
127
270
|
const spotDesc = spot.description ? ` ${spot.description}` : '';
|
|
128
271
|
const company = toWhom
|
|
129
272
|
? `, coming up beside ${toWhom}.`
|
|
130
273
|
: '.';
|
|
131
|
-
return `You ${pace} the ${spot.name}${company}${spotDesc}${here.length > 0 ? ` Here: ${here.join(', ')}.` : ''}`;
|
|
274
|
+
return `You ${pace} the ${spot.name}${crossNote}${company}${spotDesc}${here.length > 0 ? ` Here: ${here.join(', ')}.` : ''}`;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* "move south 2" -- a tactical step across the room's own grid, as
|
|
278
|
+
* opposed to crossing to a named place. Stops at whatever it runs
|
|
279
|
+
* into and says so; mid-exchange it's refused like any other
|
|
280
|
+
* crossing. The step sets Player.atCell (the exact square) and
|
|
281
|
+
* re-derives atSpot from it, so every interaction gate keeps working
|
|
282
|
+
* off the place you now stand beside.
|
|
283
|
+
*/
|
|
284
|
+
async stepAcross(direction, count) {
|
|
285
|
+
const actor = this.actor;
|
|
286
|
+
const room = actor.currentLocation;
|
|
287
|
+
// STEPPING THROUGH A DOOR YOU ARE STANDING IN. "move" never crosses
|
|
288
|
+
// rooms from open floor -- that was the surprise this rule was
|
|
289
|
+
// written to stop -- but a threshold is different: you are already
|
|
290
|
+
// in the doorway, and the next pace that way goes through it.
|
|
291
|
+
// Refusing it reported the door as a wall (playtest 2026-08-25: "I
|
|
292
|
+
// tried to move through the door, and I was told it is a wall").
|
|
293
|
+
// Deliberately narrow: only from the doorway cell itself, and only
|
|
294
|
+
// in that door's own direction.
|
|
295
|
+
const grid = room.ensureGrid();
|
|
296
|
+
const here = actorCell(room, actor);
|
|
297
|
+
const doorCell = grid?.exitCells.get(direction);
|
|
298
|
+
if (grid && here && doorCell && here.x === doorCell.x && here.y === doorCell.y && here.z === doorCell.z) {
|
|
299
|
+
return await new GoCommand({ actor, scene: this.scene, game: this.game }).execute([direction]);
|
|
300
|
+
}
|
|
301
|
+
// Anyone unpositioned is standing SOMEWHERE -- they just never
|
|
302
|
+
// claimed it (the circulating compat state). Stepping is a claim:
|
|
303
|
+
// put them on the open floor first, then move them off it. Without
|
|
304
|
+
// this you could not pace a street you had simply been placed in.
|
|
305
|
+
if (spotOf(actor) === undefined)
|
|
306
|
+
actor.atSpot = OPEN_FLOOR;
|
|
307
|
+
if (actor.inExchange) {
|
|
308
|
+
return `You're mid-exchange -- crossing open floor now means eating lead. Let it settle.`;
|
|
309
|
+
}
|
|
310
|
+
const { cell, taken, blockedBy } = stepFrom(room, actor, direction, count);
|
|
311
|
+
if (!cell || taken === 0) {
|
|
312
|
+
const why = blockedBy === 'someone' ? `someone's in the way`
|
|
313
|
+
: blockedBy === 'furniture' ? `there's furniture in the way`
|
|
314
|
+
: blockedBy === 'terrain' ? `the way is blocked`
|
|
315
|
+
: `there's a wall`;
|
|
316
|
+
return `You can't step ${direction} -- ${why}.`;
|
|
317
|
+
}
|
|
318
|
+
actor.atCell = cell;
|
|
319
|
+
actor.atSpot = spotForCell(room, cell);
|
|
320
|
+
actor.performAction('steps', `${taken} ${taken === 1 ? 'pace' : 'paces'} ${direction}`);
|
|
321
|
+
this.scene.updateStatus();
|
|
322
|
+
this.scene.updateExits(room);
|
|
323
|
+
const meters = taken * METERS_PER_CELL;
|
|
324
|
+
const shortNote = taken < count
|
|
325
|
+
? ` -- pulled up short after ${meters} m: ${blockedBy === 'someone' ? 'someone is standing there'
|
|
326
|
+
: blockedBy === 'furniture' ? 'furniture blocks the way'
|
|
327
|
+
: blockedBy === 'terrain' ? 'the way is blocked' : 'the wall'}`
|
|
328
|
+
: '';
|
|
329
|
+
const place = actor.atSpot === OPEN_FLOOR
|
|
330
|
+
? `open floor`
|
|
331
|
+
: `the ${actor.atSpot}`;
|
|
332
|
+
return `You step ${taken * 1} ${taken === 1 ? 'pace' : 'paces'} ${direction}${shortNote}. You're at ${place} now.`;
|
|
333
|
+
}
|
|
334
|
+
/** Closes the last few paces to someone already at your own spot --
|
|
335
|
+
* you end up beside them rather than merely in the same zone. */
|
|
336
|
+
crossToActor(target) {
|
|
337
|
+
const actor = this.actor;
|
|
338
|
+
const room = actor.currentLocation;
|
|
339
|
+
if (actor.inExchange) {
|
|
340
|
+
return `You're mid-exchange -- crossing open floor now means eating lead. Let it settle.`;
|
|
341
|
+
}
|
|
342
|
+
const theirs = actorCell(room, target);
|
|
343
|
+
const cell = theirs ? standingRoomNear(room, theirs, actor) : undefined;
|
|
344
|
+
if (!cell || (actor.atCell && actor.atCell.x === cell.x && actor.atCell.y === cell.y && actor.atCell.z === cell.z)) {
|
|
345
|
+
return `You're already standing with ${target.name}.`;
|
|
346
|
+
}
|
|
347
|
+
actor.atCell = cell;
|
|
348
|
+
actor.atSpot = spotForCell(room, cell);
|
|
349
|
+
actor.performAction('steps up beside', target.name);
|
|
350
|
+
this.scene.updateStatus();
|
|
351
|
+
this.scene.updateExits(room);
|
|
352
|
+
return `You close the last few paces and stand with ${target.name}.`;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* "move to north door" / "move to the east exit" / "move to door".
|
|
356
|
+
* Matches a direction word anywhere in the phrase, and accepts a bare
|
|
357
|
+
* doorway word when the room has exactly one way out to be confused
|
|
358
|
+
* about. Returns the Direction, or undefined when nothing matches.
|
|
359
|
+
*/
|
|
360
|
+
static DOORISH = /\b(door|doorway|exit|way out|threshold|gate|entrance)\b/i;
|
|
361
|
+
resolveDoorTarget(room, query) {
|
|
362
|
+
const q = query.trim().toLowerCase();
|
|
363
|
+
if (!q)
|
|
364
|
+
return undefined;
|
|
365
|
+
const doorish = MoveCommand.DOORISH.test(q);
|
|
366
|
+
for (const dir of room.exits.keys()) {
|
|
367
|
+
if (new RegExp(`\\b${String(dir).toLowerCase()}\\b`).test(q))
|
|
368
|
+
return dir;
|
|
369
|
+
}
|
|
370
|
+
if (!doorish)
|
|
371
|
+
return undefined;
|
|
372
|
+
const ways = [...room.exits.keys()];
|
|
373
|
+
return ways.length === 1 ? ways[0] : undefined;
|
|
374
|
+
}
|
|
375
|
+
/** Walks to a doorway's own cell -- the threshold when it's open, the
|
|
376
|
+
* cell it's reached from when it's shut (a locked door is solid). */
|
|
377
|
+
crossToDoorway(direction) {
|
|
378
|
+
const actor = this.actor;
|
|
379
|
+
const room = actor.currentLocation;
|
|
380
|
+
if (actor.inExchange) {
|
|
381
|
+
return `You're mid-exchange -- crossing open floor now means eating lead. Let it settle.`;
|
|
382
|
+
}
|
|
383
|
+
const grid = room.ensureGrid();
|
|
384
|
+
const door = grid?.exitCells.get(direction);
|
|
385
|
+
if (!grid || !door)
|
|
386
|
+
return `There's no way ${direction} from here.`;
|
|
387
|
+
const target = furnitureCells(room).has(key(door))
|
|
388
|
+
? (approachCellFor(room, direction) ?? door)
|
|
389
|
+
: door;
|
|
390
|
+
const cell = standingRoomNear(room, target, actor);
|
|
391
|
+
if (!cell)
|
|
392
|
+
return `There's no room to stand at the ${direction} way out.`;
|
|
393
|
+
actor.atCell = cell;
|
|
394
|
+
actor.atSpot = spotForCell(room, cell);
|
|
395
|
+
actor.performAction('moves to', `the ${direction} doorway`);
|
|
396
|
+
this.scene.updateStatus();
|
|
397
|
+
this.scene.updateExits(room);
|
|
398
|
+
return `You cross to the ${direction} way out.${hint(` ("go ${direction}" to step through.)`)}`;
|
|
399
|
+
}
|
|
400
|
+
/** "move to Mr. Krow" when Mr. Krow is face-down on the floor. */
|
|
401
|
+
resolveBodyTarget(room, query) {
|
|
402
|
+
if (room.bodies.length === 0 || !query.trim())
|
|
403
|
+
return undefined;
|
|
404
|
+
const exact = room.bodies.find(b => b.name.toLowerCase() === query.trim().toLowerCase());
|
|
405
|
+
if (exact)
|
|
406
|
+
return exact;
|
|
407
|
+
const picked = fuzzyPickName(query, room.bodies.map(b => b.name));
|
|
408
|
+
return picked ? room.bodies.find(b => b.name === picked) : undefined;
|
|
409
|
+
}
|
|
410
|
+
/** Walks to a body's square (or the nearest standing room beside it)
|
|
411
|
+
* and re-derives which place that counts as. */
|
|
412
|
+
crossToBody(body) {
|
|
413
|
+
const actor = this.actor;
|
|
414
|
+
const room = actor.currentLocation;
|
|
415
|
+
if (actor.inExchange) {
|
|
416
|
+
return `You're mid-exchange -- crossing open floor now means eating lead. Let it settle.`;
|
|
417
|
+
}
|
|
418
|
+
const cell = standingRoomNear(room, body.cell, actor);
|
|
419
|
+
if (!cell)
|
|
420
|
+
return `There's no room to stand over ${body.name}.`;
|
|
421
|
+
actor.atCell = cell;
|
|
422
|
+
actor.atSpot = spotForCell(room, cell);
|
|
423
|
+
actor.performAction('stands over', `${body.name}'s body`);
|
|
424
|
+
this.scene.updateStatus();
|
|
425
|
+
this.scene.updateExits(room);
|
|
426
|
+
const carried = body.inventory.getAllItems().length;
|
|
427
|
+
return `You cross to ${body.name}'s body.${carried > 0 ? hint(` ("loot ${body.name}" to go through it.)`) : ` Nothing left on it.`}`;
|
|
132
428
|
}
|
|
133
429
|
/**
|
|
134
430
|
* "move to Brick": fuzzy-resolves the words as a person in this room
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"move.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/move.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEzG;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,qPAAqP,CAAC;IAErR,yEAAyE;IAC/D,IAAI;QACZ,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,IAAI,GAAG,KAAK,CAAC,eAAe,CAAC;QAEnC,gEAAgE;QAChE,gCAAgC;QAChC,IAAI,KAAK,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;QAC9B,IAAI,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AC,IAAI,WAAW,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAC,sBAAsB,EAAE,CAAC;IACvI,CAAC;IAED;;;;OAIG;IACK,kBAAkB,CAAC,IAAU,EAAE,KAAa;QAClD,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/F,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACjE,OAAO,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACtE,CAAC;;AAGH,8EAA8E;AAC9E,MAAM,OAAO,UAAW,SAAQ,WAAW;IAC/B,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,MAAM,CAAC,WAAW,GAAG,yGAAyG,CAAC;IAC/H,IAAI;QACZ,OAAO,KAAK,CAAC;IACf,CAAC;;AAGH,oEAAoE;AACpE,MAAM,OAAO,aAAc,SAAQ,WAAW;IAClC,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,6DAA6D,CAAC;IACnF,IAAI;QACZ,OAAO,QAAQ,CAAC;IAClB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Command, ICommand } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* "note <text>" -- a playtest note, written straight to disk.
|
|
4
|
+
*
|
|
5
|
+
* Born from how these were actually being left: typed as `say NOTE: ...`
|
|
6
|
+
* so the words at least landed in the session transcript, then dug back
|
|
7
|
+
* out of it afterwards by grep. That worked, but it broadcast the note
|
|
8
|
+
* to every NPC in earshot (they answered it), it scattered the notes
|
|
9
|
+
* across per-session logs, and it lost them the moment a transcript was
|
|
10
|
+
* cleaned up.
|
|
11
|
+
*
|
|
12
|
+
* These are notes ABOUT the game, not IN it: nothing here touches the
|
|
13
|
+
* fiction, no NPC hears it, no world event fires. Appended to one
|
|
14
|
+
* per-character file so a whole playtest reads in order.
|
|
15
|
+
*/
|
|
16
|
+
export declare class NoteCommand extends Command implements ICommand {
|
|
17
|
+
protected static verb: string;
|
|
18
|
+
protected static description: string;
|
|
19
|
+
/** ~/.meteor/.maka/side-quest-notes/<character>.md -- beside the
|
|
20
|
+
* session logs, one file per runner, newest last. */
|
|
21
|
+
private notePath;
|
|
22
|
+
execute(args?: string[]): Promise<string>;
|
|
23
|
+
/** Bare "note": the tail of this runner's notes, newest last. */
|
|
24
|
+
private recent;
|
|
25
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { appendFileSync, existsSync, mkdirSync, readFileSync } from 'fs';
|
|
2
|
+
import { dirname, join } from 'path';
|
|
3
|
+
import { homedir } from 'os';
|
|
4
|
+
import { Command } from './command.js';
|
|
5
|
+
import { hint } from '../utilities/hints.js';
|
|
6
|
+
/**
|
|
7
|
+
* "note <text>" -- a playtest note, written straight to disk.
|
|
8
|
+
*
|
|
9
|
+
* Born from how these were actually being left: typed as `say NOTE: ...`
|
|
10
|
+
* so the words at least landed in the session transcript, then dug back
|
|
11
|
+
* out of it afterwards by grep. That worked, but it broadcast the note
|
|
12
|
+
* to every NPC in earshot (they answered it), it scattered the notes
|
|
13
|
+
* across per-session logs, and it lost them the moment a transcript was
|
|
14
|
+
* cleaned up.
|
|
15
|
+
*
|
|
16
|
+
* These are notes ABOUT the game, not IN it: nothing here touches the
|
|
17
|
+
* fiction, no NPC hears it, no world event fires. Appended to one
|
|
18
|
+
* per-character file so a whole playtest reads in order.
|
|
19
|
+
*/
|
|
20
|
+
export class NoteCommand extends Command {
|
|
21
|
+
static verb = 'note';
|
|
22
|
+
static description = 'Jot a playtest note to disk: "note the door is on the wrong wall". Nobody in the fiction hears it. Bare "note" reads back the last few.';
|
|
23
|
+
/** ~/.meteor/.maka/side-quest-notes/<character>.md -- beside the
|
|
24
|
+
* session logs, one file per runner, newest last. */
|
|
25
|
+
notePath() {
|
|
26
|
+
const who = (this.actor?.name ?? 'unknown').replace(/[^\w.-]+/g, '_');
|
|
27
|
+
return join(homedir(), '.meteor', '.maka', 'side-quest-notes', `${who}.md`);
|
|
28
|
+
}
|
|
29
|
+
async execute(args = []) {
|
|
30
|
+
const path = this.notePath();
|
|
31
|
+
const text = (args ?? []).join(' ').trim();
|
|
32
|
+
if (!text)
|
|
33
|
+
return this.recent(path);
|
|
34
|
+
try {
|
|
35
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
36
|
+
const stamp = new Date().toISOString();
|
|
37
|
+
const where = this.actor?.currentLocation?.name ?? 'nowhere';
|
|
38
|
+
appendFileSync(path, `- [${stamp}] (${where}) ${text}\n`, 'utf8');
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
this.logger.write(`NoteCommand: could not write ${path}: ${err instanceof Error ? err.message : String(err)}`);
|
|
42
|
+
return `Couldn't write that note down -- see the game log for why.`;
|
|
43
|
+
}
|
|
44
|
+
this.logger.write(`NOTE [${this.actor?.name}]: ${text}`);
|
|
45
|
+
return `{gray-fg}Noted.${hint(` (${path})`)}{/gray-fg}`;
|
|
46
|
+
}
|
|
47
|
+
/** Bare "note": the tail of this runner's notes, newest last. */
|
|
48
|
+
recent(path) {
|
|
49
|
+
if (!existsSync(path)) {
|
|
50
|
+
return `No notes yet.${hint(` ("note <something you noticed>" writes one down.)`)}`;
|
|
51
|
+
}
|
|
52
|
+
const lines = readFileSync(path, 'utf8').split('\n').filter(l => l.trim().length > 0);
|
|
53
|
+
const tail = lines.slice(-10);
|
|
54
|
+
return [`=== NOTES (${lines.length} total, showing ${tail.length}) ===`, ...tail].join('\n');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=note.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/note.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC5B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,WAAW,GAAG,yIAAyI,CAAC;IAEzK;0DACsD;IAC9C,QAAQ;QACd,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,GAAG,KAAK,CAAC,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE;QAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAE3C,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC,MA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,CAAC,EAAE,CAAC,CAAC;QAC9B,OAAO,CAAC,cAAc,KAAK,CAAC,MAAM,mBAAmB,IAAI,CAAC,MAAM,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/F,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Command } from './command.js';
|
|
2
2
|
import { hint } from '../utilities/hints.js';
|
|
3
|
-
import { planeTintItemName, canReachHost } from '../utilities/planes.js';
|
|
3
|
+
import { planeTintItemName, emphasizeFind, canReachHost } from '../utilities/planes.js';
|
|
4
4
|
import { rollPool, formatRoll } from '../utilities/dice.js';
|
|
5
|
-
import { canReach, exitSpot, spotsActive } from '../utilities/spots.js';
|
|
5
|
+
import { canReach, exitSpot, spotsActive, revealWithPerception } from '../utilities/spots.js';
|
|
6
6
|
/**
|
|
7
7
|
* Barrier rendering (2026-08-24 playtest: "I don't see THE THING I'm
|
|
8
8
|
* supposed to act on -- just a description... and I still see the
|
|
@@ -12,6 +12,15 @@ import { canReach, exitSpot, spotsActive } from '../utilities/spots.js';
|
|
|
12
12
|
* spots.
|
|
13
13
|
*/
|
|
14
14
|
function describeBarriers(room, actor) {
|
|
15
|
+
// A BARRIER IS MEAT-WORLD FURNITURE (player note 2026-08-25: "I
|
|
16
|
+
// shouldn't see meat-world barriers"). Collapsed rubble and a maglock
|
|
17
|
+
// are physical objects: a persona out on the grid sees the HOST, not
|
|
18
|
+
// the wreckage in the room its body is standing in -- `look` already
|
|
19
|
+
// routes the Matrix plane to gridLook for exactly this reason, and
|
|
20
|
+
// `search` was still printing them underneath. Astral and jumped-in
|
|
21
|
+
// drones DO perceive the physical room, so they keep seeing them.
|
|
22
|
+
if (actor.plane === 'matrix')
|
|
23
|
+
return '';
|
|
15
24
|
let out = '';
|
|
16
25
|
for (const target of room.getPuzzleTargets()) {
|
|
17
26
|
const anchor = target.direction && spotsActive(room) ? exitSpot(room, target.direction) : undefined;
|
|
@@ -90,7 +99,7 @@ export class SearchCommand extends Command {
|
|
|
90
99
|
// Plain lowercase for the log/AI history; the SCREEN list is tinted
|
|
91
100
|
// per plane (see planeTintItemName) so paydata reads as data.
|
|
92
101
|
const itemsList = found.map(i => i.name.toLowerCase()).join(', ');
|
|
93
|
-
const displayList = found.map(i => planeTintItemName(i, this.actor.plane)).join(', ');
|
|
102
|
+
const displayList = found.map(i => emphasizeFind(planeTintItemName(i, this.actor.plane))).join(', ');
|
|
94
103
|
this.logger.write(`SearchCommand: ${this.actor.name} found the following items: ${itemsList}`);
|
|
95
104
|
this.actor.performAction('search', itemsList);
|
|
96
105
|
description += `You search the area and find: ${displayList}`;
|
|
@@ -98,6 +107,14 @@ export class SearchCommand extends Command {
|
|
|
98
107
|
if (elsewhereSpots.length > 0) {
|
|
99
108
|
description += `\nSomething catches your eye over at the ${elsewhereSpots.join(', the ')} -- worth a closer look from there.`;
|
|
100
109
|
}
|
|
110
|
+
// Casing a room turns up PEOPLE, not just goods: the same roll runs
|
|
111
|
+
// against anyone tucked at a cover-tagged spot, and whoever it beats
|
|
112
|
+
// is banked (utilities/spots.ts revealWithPerception) so they stay
|
|
113
|
+
// on the room map from here on.
|
|
114
|
+
const spotted = revealWithPerception(room, this.actor, roll.hits);
|
|
115
|
+
if (spotted.length > 0) {
|
|
116
|
+
description += `\n{yellow-fg}You pick ${spotted.map(a => a.name).join(', ')} out of the shadows -- ${spotted.length === 1 ? 'they were' : 'they were'} there the whole time.{/yellow-fg}`;
|
|
117
|
+
}
|
|
101
118
|
// Data is LOOT -- say so while the persona is standing on it, with the
|
|
102
119
|
// vault state attached: sealed files need the host cracked first. A
|
|
103
120
|
// real session's decker found the paydata jacked-in, didn't realize it
|