0.2.6-dev: 魂灵之影 only on a board of its field (#557, PR #558 by IceCodeNew adapted) — shadowTile requires Battle.onFieldBoard: a teammate's half counts, a boss field's hand / 临时整备区 rows and a solo boss field's empty half do not, no summon when nothing fits (the PR cut the bench rows by number, which left an empty half legal); the PR's test plus a solo / pair case; DESIGN §3, §31.10, SIM; golden: unchanged
This commit is contained in:
1 parent
1df530f2b9
commit
347343d739
6 files changed
+71
-3
No files matched your search
@@ -184,6 +184,42 @@ test('T2 死魂灵的余息: a 魂灵之影 (the form\'s stats, 禁疗, no attac
|
||||
done(h);
|
||||
});
|
||||
|
||||
test('user #557 (PR #558 by IceCodeNew): Given a bottom-row boss lineup, When the talent and S3 summon, Then shadows skip the bench and use only free combat tiles', () => {
|
||||
for (const kind of ['boss', 'hidden']) for (const side of ['L', 'R']) for (const free of [false, true]) {
|
||||
// Board (9, 7) becomes field (2, 7)/(2, 13). Row 1 is the temporary bench, inside BOSS_RECT.
|
||||
const units = [{ uid: 1, chessId: SLOT[5], diy: { charId: WD, skillIndex: 2 }, row: 9, col: 7, dir: 'DOWN' }];
|
||||
for (let col = 5; col <= 9; col++) {
|
||||
if (col === 7 || free && col === 8) continue;
|
||||
units.push({ uid: col, chessId: 'chess_char_1_01_a', row: 9, col });
|
||||
}
|
||||
const h = makeBattle({ kind, stageId: 'act2autochess_m02', players: [{ playerId: 'p1', side, units }], autoFinish: false });
|
||||
h.step();
|
||||
const u = h.unit(1);
|
||||
const expected = free ? [[2, side === 'L' ? 8 : 12]] : [];
|
||||
assert.deepEqual(shadowsOf(h, u).map(t => [t.tileR, t.tileC]), expected, `${kind}/${side}/${free}: deployment talent`);
|
||||
assert.ok(h.runUntil(() => u.skill.activations === 1, 40), 'S3 actually activates without an enemy');
|
||||
assert.deepEqual(shadowsOf(h, u).map(t => [t.tileR, t.tileC]), expected, `${kind}/${side}/${free}: S3 cannot spill into the bench`);
|
||||
done(h);
|
||||
}
|
||||
});
|
||||
|
||||
test('#557: a shadow may stand on the teammate\'s half of a pair field (Battle.onFieldBoard), never on the empty half of a solo boss field — no summon when nothing else fits', () => {
|
||||
// board (10, 8) facing RIGHT = field (3, 8) on the left half / (3, 12) mirrored; her own free tiles of range filled,
|
||||
// the bench tile (1, 8 / 12) and the other half's (2, 11 / 9) and (3, 12 / 8) stay in range
|
||||
for (const kind of ['boss', 'hidden']) for (const side of ['L', 'R']) for (const pair of [false, true]) {
|
||||
const units = [{ uid: 1, chessId: SLOT[6], diy: { charId: WD, skillIndex: 0 }, row: 10, col: 8, dir: 'RIGHT' },
|
||||
...[[9, 8], [11, 8], [12, 8], [9, 9]].map(([row, col], i) => ({ uid: 2 + i, chessId: 'chess_char_1_01_a', row, col }))];
|
||||
const players = [{ playerId: 'p1', side, units }];
|
||||
if (pair) players.push({ playerId: 'p2', side: side === 'L' ? 'R' : 'L', units: [{ uid: 11, chessId: 'chess_char_1_01_a', row: 12, col: 2 }] });
|
||||
const h = makeBattle({ kind, stageId: 'act2autochess_m02', players, autoFinish: false });
|
||||
h.step();
|
||||
const u = h.unit(1);
|
||||
const expected = pair ? [[2, side === 'L' ? 11 : 9]] : [];
|
||||
assert.deepEqual(shadowsOf(h, u).map(t => [t.tileR, t.tileC]), expected, `${kind}/${side}/${pair ? 'pair' : 'solo'}`);
|
||||
done(h);
|
||||
}
|
||||
});
|
||||
|
||||
test('魂灵之影\'s skill: every 5 SP (time; +0–2 after each cast) a ground enemy of 维什戴尔\'s range — unmarked first — takes its ATK as arts damage, 停顿 1 s and her 残影; never an air unit', () => {
|
||||
for (const [tier, elite] of [[5, false], [6, true]]) {
|
||||
const v = shadowOf(tier, elite);
|
||||
|
||||
Reference in new issue
Block a user