The burning ball and the gore grade (v389)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
wuwiandClaude Opus 5.5 committed 2026-10-16 15:41:02 +02:00
1 parent 0c67d32519
commit f18680d497
6 files changed
+94 -6

No files matched your search

+29
View File
@@ -1310,6 +1310,35 @@ test('a groundstroke a little off PERFECT is a little worse, not a weak ball (no
} finally { TUNE.autoAssist = assist; }
});
test('THE BURNING BALL: a perfect strike marks its ball for the flight, and the reply clears it', () => {
// render reads ball.hotT (the white-hot impact frame, the halo, the gold streak); the state is here
const assist = TUNE.autoAssist; TUNE.autoAssist = 1.15;
try {
startMatch(); G.interlude.introT = 0; G.match.opp = 6;
for (let i = 0; i < 2.2 * 60; i++) update(DT);
let armed = false, perfect = 0, marked = 0, cleared = 0, hot = false;
for (let i = 0; i < 60 * 60; i++) {
G.modal = null; G.modalQ.length = 0; G.hp = G.hpMax; G.match.opp = 6;
if (G.phase === 'pretoss' && !(G.interlude && G.interlude.introT > 0)) { if (i % 40 === 0) keyPressed('Space'); }
else if (G.phase === 'toss') { if (ball.vy < 0.4 && ball.y > 2.4) keyPressed('Space'); }
else if (G.phase === 'rally' && ball.active && ball.lastHit === 'O' && ball.vz > 0 && !armed) {
const c = ringCue();
if (c && Math.abs(c.eta - c.sweet) < 0.5 / 60) { armed = true; keyPressed('Space'); }
}
const before = ball.lastHit;
update(DT);
if (armed && before === 'O' && ball.lastHit === 'P') {
armed = false;
if (G.hitstop > 0) { perfect++; if (ball.hotT != null) { marked++; hot = true; } }
} else if (armed && (!ball.active || G.phase !== 'rally')) armed = false;
if (hot && before === 'P' && ball.lastHit === 'O') { hot = false; if (ball.hotT == null) cleared++; }
}
assert.ok(perfect >= 5, 'a real sample of perfect strikes: ' + perfect);
assert.equal(marked, perfect, 'every perfect strike burns');
assert.ok(cleared >= 3, 'the reply is a new, cold ball: ' + cleared);
} finally { TUNE.autoAssist = assist; }
});
test('a TAP is timed from touch-down: a normal 120 ms tap on the gold ring still returns cleanly', () => {
// Oliver, 2026-10-14: "manchmal scheine ich den Ball trotz gutem Timing nicht mehr zu bekommen".
// A tap only proves it is a tap when the finger LIFTS, so it swung ~100-150 ms late — inside the