Align projectile lifecycle wiring test

This commit is contained in:
Admin 2026-09-18 07:09:21 +00:00
parent 618a881268
commit 3612b502bb

View File

@ -220,8 +220,9 @@ test('processed player hits drive sprite and HUD hit reactions', async () => {
test('processed pirate shots are consumed and later projectiles start clean', async () => {
const source = await read('src/game-v4.js');
assert.match(source, /if \(group === this\.pirateShots\) shot\.setData\('playerHitQueued', false\)/);
assert.match(source, /for \(const impact of hits\) \{[\s\S]*?if \(impact\.shot\?\.active\) impact\.shot\.destroy\(\)/);
assert.match(source, /shot\.setData\('projectileOwner', actor\)/);
assert.match(source, /if \(actor === 'pirate'\) shot\.setData\('playerHitQueued', false\)/);
assert.match(source, /shot !== this\.player[\s\S]*?projectileOwner'\) === 'pirate'[\s\S]*?shot\.destroy\(\)/);
assert.match(source, /if \(shot\.getData\('playerHitQueued'\)\) return/);
});