All'Ingorgo Andrea ha la sua birra (foglio di Codex): camminando la tiene davanti al petto, parlando pure, e fermo alza il bicchiere schiumante a tempo con la folla (Andrea)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GiECd9RWGMKV7n3K1mdy8T
This commit is contained in:
2026-10-31 15:20:22 +01:00
co-authored by Claude Opus 5.5
parent 70f4e641dc
commit 3ba108cf88
6 changed files with 93 additions and 18 deletions
+12 -1
View File
@@ -179,7 +179,8 @@ export function render(ctx, game, { hover, spots, debug, time = performance.now(
for (const shape of art) if (!shape.top) drawShape(ctx, shape);
// Andrea e i personaggi della scena, dal più lontano al più vicino.
const andrea = sprites.get('andrea');
const drawAndreaNow = () => andrea ? drawSprite(ctx, andrea, game.pose(), s.x, s.y, game.scaleAt(s.y), s.facing)
const party = festa(game, time), drawAndreaNow = () => party ? drawSprite(ctx, party.sheet, party.pose, s.x, s.y, game.scaleAt(s.y), s.facing)
: andrea ? drawSprite(ctx, andrea, game.pose(), s.x, s.y, game.scaleAt(s.y), s.facing)
: drawAndrea(ctx, s.x, s.y, game.scaleAt(s.y), s.facing, game.walking ? game.stride / 6 : null);
// Durante il risveglio si guarda dagli occhi di Andrea: lui non si vede.
const pov = game.closeup && game.story.closeups?.[game.closeup.id]?.type === 'risveglio';
@@ -765,6 +766,16 @@ export const EFFECTS = {
ctx.restore();
},
};
// All'Ingorgo Andrea ha la sua birra (Andrea, 31 ottobre): camminando la tiene davanti al petto, parlando pure; fermo
// alza il braccio col bicchiere e lo muove a tempo con la folla. Prendere e voltarsi restano quelli di sempre.
const CHEER = ['cheer_1', 'cheer_2', 'cheer_1', 'cheer_3'];
export function festa(game, time) {
const sheet = sprites.get('andrea_birra'), band = (game.scene.effects ?? []).find(e => e.type === 'crowd' && onNow(e, game));
if (!sheet || !band) return null;
const pose = game.pose(), beat = Math.floor(time / 60000 * (band.bpm ?? 120)) % CHEER.length;
const mine = pose === 'stand' ? CHEER[beat] : pose;
return sheet.atlas.frames[mine] ? { sheet, pose: mine } : null;
}
// Andrea dentro la folla dell'Ingorgo (Andrea, 31 ottobre: «sembra di volare fra le persone»): sopra di lui, dalla
// vita in giù, si ridisegna la gente dello sfondo che gli sta davanti. A strisce come l'effetto `crowd`, con lo stesso
// sobbalzo a tempo (così le teste davanti saltano con le altre) e il bordo in alto a teste, mai dritto.