fix(sim): keep Wisdel shadows off the boss bench (#557)

This commit is contained in:
IceCodeNew committed 2026-10-12 17:59:40 +00:00
1 parent cf7a940027
commit cc3c210779
5 files changed
+40 -2

No files matched your search

+19
View File
@@ -184,6 +184,25 @@ test('T2 死魂灵的余息: a 魂灵之影 (the form\'s stats, 禁疗, no attac
done(h);
});
test('user #557: 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('魂灵之影\'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);