Add combat action sprite sheets

This commit is contained in:
2026-06-22 15:06:27 +09:00
parent 3538a3aaaa
commit f30b99a78e
11 changed files with 279 additions and 12 deletions

View File

@@ -74,6 +74,22 @@ try {
throw new Error(`Debug battle state was not available: ${JSON.stringify(result.battleState)}`);
}
const actionTexturesLoaded = await page.evaluate(() => {
const textures = window.__HEROS_GAME__?.textures;
return [
'unit-liu-bei-actions',
'unit-guan-yu-actions',
'unit-zhang-fei-actions',
'unit-rebel-actions',
'unit-rebel-archer-actions',
'unit-rebel-cavalry-actions',
'unit-rebel-leader-actions'
].every((key) => textures?.exists(key));
});
if (!actionTexturesLoaded) {
throw new Error('Expected all unit action textures to be loaded.');
}
const cameraBeforeScroll = result.battleState.camera;
if (
!cameraBeforeScroll ||