v0.1.0 — undo, the crew's reach on the board, workers on the card, and four engine bugs
Fifteen items from two playtest sessions. Three that read as drawing faults were engine bugs: cars could be added to a train that was not being made up (50 offers in 8 games), the make-up panel merged two trains and could couple a car to the wrong one, and an Office upgrade silently deleted what a Modifier had added. A fourth was a sentinel inside a coordinate's own value range — a Mainline placement travelling as row -1, which is an ordinary district row. Trains are now drawn the way they stand: west on the left, nose toward the way the engine faces, on both the district card and the Division chip. Undo steps back through the game by replaying the save without its last intent. The switching walk keeps its rejections, so the board can say why a square is not offered. Laborers and Porters are on the card, and the rule that a district only grows outwards is finally written down. Versions start here: third digit for fixes, second for a feature set, 1.0 for a release. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgtkX8JnvKa8y2tuJ8aQf4
This commit is contained in:
+12
-9
@@ -143,17 +143,20 @@ function localOpsCandidates(s: GameState, player: PlayerIndex): Intent[] {
|
||||
const kind = s.cards.get(cardId)?.kind;
|
||||
/**
|
||||
* Enhancements ATTACH to a card already down, so their candidates are the occupied cells — with
|
||||
* one exception. ABS Signals goes on a MAINLINE card, and `checkEnhancementPlacement` reads
|
||||
* `placement.col` as a Division node index for it. Offering it grid squares meant the engine
|
||||
* accepted "(0, 1)" because node 1 happened to be a Mainline card: the label said one thing and
|
||||
* the placement meant another, so the card appeared to be playable all over the Office Area.
|
||||
* one exception. ABS Signals goes on a MAINLINE card, which is not a grid square at all, so it
|
||||
* is offered as a Division NODE and never as a coordinate.
|
||||
*
|
||||
* It used to be offered as `{ row: -1, col: node }`. Row −1 is a real district row — the first
|
||||
* one below the Running Track, where most districts start — so the card appeared to be playable
|
||||
* all over the Office Area, and ordinary placements on that row were labelled as Mainline ones.
|
||||
*/
|
||||
const onMainline = kind?.kind === 'enhancement' && enhancementRule(kind.key)?.placement === 'mainlineCard';
|
||||
const targets = onMainline
|
||||
? s.division.nodes.map((_, node) => ({ row: -1, col: node }))
|
||||
: kind?.kind === 'enhancement'
|
||||
? attachments
|
||||
: placements;
|
||||
if (onMainline) {
|
||||
for (let node = 0; node < s.division.nodes.length; node++) {
|
||||
out.push({ type: 'card.play', cardId, node });
|
||||
}
|
||||
}
|
||||
const targets = onMainline ? [] : kind?.kind === 'enhancement' ? attachments : placements;
|
||||
// Orientation is chosen on placement, and a printed card turns but never flips, so the widest
|
||||
// variant set is TWO. Anything that is not track has a single orientation and needs one entry.
|
||||
const rotations = kind?.kind === 'track' ? variantsFor(kind.geometry, kind.hand).length : 1;
|
||||
|
||||
Reference in New Issue
Block a user