Align projectile lifecycle wiring test
This commit is contained in:
parent
618a881268
commit
3612b502bb
@ -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 () => {
|
test('processed pirate shots are consumed and later projectiles start clean', async () => {
|
||||||
const source = await read('src/game-v4.js');
|
const source = await read('src/game-v4.js');
|
||||||
|
|
||||||
assert.match(source, /if \(group === this\.pirateShots\) shot\.setData\('playerHitQueued', false\)/);
|
assert.match(source, /shot\.setData\('projectileOwner', actor\)/);
|
||||||
assert.match(source, /for \(const impact of hits\) \{[\s\S]*?if \(impact\.shot\?\.active\) impact\.shot\.destroy\(\)/);
|
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/);
|
assert.match(source, /if \(shot\.getData\('playerHitQueued'\)\) return/);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user