Adaptive Music v0.8.1 combat automation fixes
Validate and generate manual release / package (push) Waiting to run

This commit is contained in:
Jason committed 2026-12-05 13:37:05 -05:00
1 parent 95b0427aa1
commit 357c904d1b
26 files changed
+1387 -138

No files matched your search

+29
View File
@@ -67,6 +67,35 @@ test('scene change during manual never resurrects previous scene', async () => {
await f.controller.update({scene:scene('B'),overrides}); await f.controller.update({scene:scene('B')});
assert.equal(f.playback.items[0],'B'); assert.equal(f.controller.frames.length,0);
});
test('a scene excursion during a live encounter keeps only its interrupted ambient snapshot',async()=>{
const f=fixture();
const a=scene(), b=scene('B'), fight=combat();
const original={scene:a,combats:[fight]};
await f.controller.update({scene:a});
f.playback={...f.playback,offset:36};
await f.controller.update(original);
await f.controller.update({scene:b,combats:[fight],retainedAmbient:[a]});
assert.equal(f.playback.items[0],'B');
await f.controller.update(original);
assert.equal(f.controller.current.mode,'combat');
await f.controller.update({scene:a});
assert.equal(f.controller.current.mode,'ambient');
assert.equal(f.playback.offset,36);
await f.controller.update(original);
await f.controller.update({scene:b,combats:[fight],retainedAmbient:[a]});
await f.controller.update({scene:b});
assert.equal(f.controller.frames.length,0);
assert.equal((await f.controller.update({scene:a})).restored,false);
});
test('same playlist may change combat mode to boss without restarting the queue',async()=>{
const f=fixture(), fight=combat(), state={scene:scene(),combats:[fight]};
await f.controller.update(state);
const before=f.log.length;
await f.controller.update({...state,combats:[{...fight,bossPlaylist:fight.playlist}]});
assert.equal(f.controller.current.mode,'boss');
assert.equal(f.log.length,before);
});
test('boss removed during manual and deleted combat cannot return', async () => {
const f=fixture(); const base={scene:scene()}, big={...base,combats:[combat([boss()])]};
await f.controller.update(base); await f.controller.update(big);