Phase 2: multi-kill applause + umpire appreciation
A single shot that splatters ≥2 zombies now escalates: DOUBLE KILL / TRIPLE KILL / MASSACRE ×N flash, louder crowd, and a new umpire line (double_kill / triple_kill / unbelievable m4a, recorded say -v Daniel). ball.kills tracks the streak, reset on every fresh shot (doHit + hitServe). zombies.js imports cheer (now exported from gameplay). The splatter pace cut is now TUNE.zPierce (0.75, was hardcoded 0.5) so a hot ball plows through a lined-up lane instead of stalling on the first kill. Verified via window.T: a low ball down a one-side lane kills 3→TRIPLE and 5→MASSACRE ×5 with escalating flash, streak resets on the next serve, the three new lines serve 200 and match the existing m4a format, no crash when the ball dies mid-streak, no console errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
795ddeb425
commit
b6119c937b
7 files changed
+12
-4
No files matched your search
+7
-2
@@ -6,7 +6,7 @@
|
||||
import { TUNE, COURT } from './config.js';
|
||||
import { G, P, ball, sendBoy } from './state.js';
|
||||
import { splat, moan, pock, voice } from './audio.js';
|
||||
import { splatPoint } from './gameplay.js';
|
||||
import { splatPoint, cheer } from './gameplay.js';
|
||||
|
||||
export const zombies = []; // {x, z, v, walkT, variant: 'a'|'b'|'c'}
|
||||
export const gore = []; // lawn decals {x, z, r, a}
|
||||
@@ -22,6 +22,7 @@ export function spawnZombie(x, z, variant) {
|
||||
function splatter(i) {
|
||||
const zb = zombies[i];
|
||||
zombies.splice(i, 1);
|
||||
ball.kills++; // this shot's running streak
|
||||
gore.push({ x: zb.x, z: zb.z, r: 0.45 + Math.random() * 0.35, a: 0.85 });
|
||||
if (gore.length > 40) gore.shift();
|
||||
for (let k = 0; k < 14; k++) parts.push({
|
||||
@@ -30,9 +31,13 @@ function splatter(i) {
|
||||
t: 0.4 + Math.random() * 0.4,
|
||||
});
|
||||
splat();
|
||||
ball.vx *= 0.5; ball.vz *= 0.5; // the kill takes pace off the ball
|
||||
ball.vx *= TUNE.zPierce; ball.vz *= TUNE.zPierce; // keep enough pace to plow through the next
|
||||
sendBoy(zb.x, zb.z); // a boy sprints out to mop
|
||||
splatPoint('P');
|
||||
// escalating multi-kill fanfare — one shot, ≥2 zombies
|
||||
if (ball.kills === 2) { G.flash = { text: 'DOUBLE KILL', t: 0.9 }; cheer(1.6, 0.45); voice('double_kill', 0.4); }
|
||||
else if (ball.kills === 3) { G.flash = { text: 'TRIPLE KILL', t: 0.9 }; cheer(2.2, 0.6); voice('triple_kill', 0.4); }
|
||||
else if (ball.kills >= 4) { G.flash = { text: `MASSACRE ×${ball.kills}`, t: 0.9 }; cheer(2.8, 0.7); voice('unbelievable', 0.4); }
|
||||
}
|
||||
|
||||
export function updateZombies(dt) {
|
||||
|
||||
Reference in new issue
Block a user