From f705797a862f6644eac972cfb7f030cc6db2bb88 Mon Sep 17 00:00:00 2001 From: sganggs Date: Sat, 3 Oct 2026 04:23:43 +0800 Subject: [PATCH] =?UTF-8?q?feedback1d=20WN:=20test=20that=20=E6=9A=B4?= =?UTF-8?q?=E9=B8=B0's=20bomb=20in=20the=20air=20lands=20after=20the=20dro?= =?UTF-8?q?ne=20dies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/sim/feedback1d-bombd.test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/sim/feedback1d-bombd.test.js b/test/sim/feedback1d-bombd.test.js index d6d36a79..4402895c 100644 --- a/test/sim/feedback1d-bombd.test.js +++ b/test/sim/feedback1d-bombd.test.js @@ -112,6 +112,18 @@ describe('D4 暴鸰: the bomb leaves the drone and lands', () => { assert.ok(other.stats.taken > 0, 'its neighbour takes the splash at the landing point'); }); + test('the drone killed after the release: the bomb in the air still lands (projectile_bombd keeps flying)', () => { + const h = arena([{ chessId: 't_a', row: 10, col: 5 }]); + h.step(); + const e = put(h, [10, 7]); + h.runUntil(() => (ability(e)?.casts ?? 0) > 0, 5); + h.run(RELEASE + TICK); + assert.ok(h.eventsOf('atk').some((ev) => ev[1] === e.id), 'released'); + h.b.kill(e, null); + h.run(1.5); + assert.ok(Math.abs(h.unit('t_a').stats.taken - e.s.atk) < 1e-6, 'hit for the ATK it had at the release'); + }); + test('the drone killed before the release: no bomb, no mode change', () => { const h = arena([{ chessId: 't_a', row: 10, col: 6 }]); h.step();