feedback3 WF: the initial deployment goes by column — the left column first, top to bottom within a column (PRTS 从上到下>从左到右 read as a scan, the 阿戈尔 devour's order; mirrored boss side from its own left); a merge's elite among several deployed copies follows it (server and client); tests whose target was the latest deployed keep it

This commit is contained in:
sganggs committed 2026-10-04 19:50:42 +08:00
1 parent 0e3429aa1f
commit ca3d0572ad
25 files changed
+94 -69

No files matched your search

+4 -3
View File
@@ -86,11 +86,12 @@ test('buy: one deployed copy + one hand copy → the elite takes the deployed co
m.dispose();
});
test('buy: two deployed copies → the copy that deploys first (row desc, then col asc) gives its tile and facing, in either placement order', () => {
test('buy: two deployed copies → the copy that deploys first (col asc, then row desc: by column from the left) gives its tile and facing, in either placement order', () => {
for (const order of ['first-placed-first', 'first-placed-last']) {
const { m, ps } = prep({ seed: 42 });
const [id] = meleeTier1(m);
// two legal tiles, the first of them in deploy order
// two legal tiles, the first of them in deploy order (legalTileFor walks the top row left to right: on one row, the
// deploy order)
const t1 = legalTileFor(m, ps, id);
const t2 = legalTileFor(m, ps, id, new Set([tileKey(...t1)]));
const [early, late] = order === 'first-placed-first' ? [t1, t2] : [t2, t1];
@@ -101,7 +102,7 @@ test('buy: two deployed copies → the copy that deploys first (row desc, then c
stock(m, ps, id);
assert.deepEqual(m.handle('p_0', { t: 'g.buy', slot: 0 }), { ok: true });
const want = mergeTile([t1, t2].map((t) => ({ key: tileKey(...t) })));
assert.equal(want.key, tileKey(...t1), 'legalTileFor walks the deploy order');
assert.equal(want.key, tileKey(...t1), 'the first in deploy order');
const elite = ps.board.get(want.key);
assert.ok(elite && m.gd.isGolden(elite.id), `${order}: the elite on ${want.key}`);
assert.equal(elite.dir, want.key === tileKey(...early) ? 'UP' : 'LEFT', `${order}: the facing of the copy that stood there`);