feat(engine): costs on start, unlock checks, queue completion advancement

This commit is contained in:
ginnoir
2026-06-11 18:19:16 -05:00
parent ea2fb0afab
commit f514eeedf8
5 changed files with 232 additions and 36 deletions
+2 -2
View File
@@ -31,8 +31,8 @@ describe('loadGame()', () => {
const result = await loadGame(content, backend, 1000 + 9000); // 9s offline
expect(result.offlineMs).toBe(9000);
expect(result.state.resources.gold).toBe(13); // 10 + 9000/3000
expect(result.state.activeActionId).toBe('forage');
expect(result.state.resources.gold).toBe(11); // 10 + one completion
expect(result.state.activeActionId).toBeNull();
});
it('falls back to a fresh game on a corrupt save instead of throwing', async () => {