Primo capitolo: la torcia nella fessura del bastione mostra il palio e due occhi gialli
- le impronte portano a una fessura nel bastione; con la torcia si vede un angolo del palio (l'omino con la maglia rossa del quadro vero, già descritto sul manifesto) e due occhi gialli: fine del primo capitolo - la soluzione passa per indovinello, oratorio e catena del ghiacciolo; tragitti calcolati dalle uscite - il Trebbio ha un indizio per ogni tappa della torcia - tools/pronuncia.json: le parole che XTTS legge male, riscritte solo per la voce («celo» → «ce l'ho») - voci delle battute nuove Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ApqNBvNbNCwXqR2RLo8QJh
This commit is contained in:
+13
-2
@@ -40,7 +40,11 @@ async function settle(page) {
|
||||
throw new Error('il gioco non si ferma');
|
||||
}
|
||||
|
||||
const hotspotCenter = (page, id) => page.evaluate(id => { const h = game.hotspot(id); return [h.box[0] + h.box[2] / 2, h.box[1] + h.box[3] / 2]; }, id);
|
||||
const hotspotCenter = async (page, id) => {
|
||||
const c = await page.evaluate(id => { const h = game.hotspot(id); return h && [h.box[0] + h.box[2] / 2, h.box[1] + h.box[3] / 2]; }, id);
|
||||
if (!c) throw new Error(`non c'è ${id} in ${await page.evaluate(() => game.state.scene)}`);
|
||||
return c;
|
||||
};
|
||||
|
||||
try {
|
||||
const page = await open({ width: 1280, height: 860 });
|
||||
@@ -163,10 +167,17 @@ try {
|
||||
await page.click(`#verbs [data-verb="${verb}"]`);
|
||||
await page.click(`#inventory [data-item="${item}"]`);
|
||||
} else if (!smart) await page.click(`#verbs [data-verb="${verb}"]`);
|
||||
await clickScene(page, await hotspotCenter(page, target));
|
||||
// Un oggetto dell'inventario su un altro (cedrata col ghiacciolo) si clicca nell'inventario, non nella scena.
|
||||
if (await page.evaluate(t => !!game.story.items[t], target)) await page.click(`#inventory [data-item="${target}"]`);
|
||||
else await clickScene(page, await hotspotCenter(page, target));
|
||||
}
|
||||
await page.waitForTimeout(80);
|
||||
if (verb === 'talk') await page.screenshot({ path: `${OUT}/03-dialogo.png` });
|
||||
// La torcia nella fessura: il palio illuminato e i due occhi gialli, prima che spariscano.
|
||||
if (target === 'fessura' && item) {
|
||||
await page.waitForFunction(() => game.state.flags.occhi_regolo, null, { timeout: 30000 });
|
||||
await page.screenshot({ path: `${OUT}/05b-occhi.png` });
|
||||
}
|
||||
await settle(page);
|
||||
if (target === 'cosa_luccicante') await page.screenshot({ path: `${OUT}/04-squama.png` });
|
||||
if (target === 'su_fortezza') await page.screenshot({ path: `${OUT}/05-fortezza.png` });
|
||||
|
||||
Reference in New Issue
Block a user