Phase 6: racket zombies (rally mini-boss)
Survive a horde and a racket zombie takes up residence on the far court (variant 'r', one per horde survived) — the tennis rally skill lives on inside zombie mode. It reuses the turned-CPU z_c sprite (already holds a racket) and a slimmed copy of the tennis AI: holds station deep, chases a ball laterally at TUNE.racketSpeed (2.8), and returns your SOFT shots (pow < zSplatQ) as live lastHit:'O' balls with quality capped at racketQMax (0.55) and racketFlub (0.2) whiffs. trySwing gained an optional quality-cap arg (defaulted, so tennis is untouched). It's a mini-boss with TUNE.racketHp (3): only splat-quality balls hurt it (-1 hp, staggers the ball; the killing blow runs the full splatter). Soft balls pass through for it to rally; melee and pellets don't touch it. Its return that gets past your baseline is a point for THEM; you can rally it back with the existing player hit. A red HP bar floats over its head. Verified via window.T: endHorde spawns exactly one (hp 3, z 3.5); three splat hits kill it (2→1→dead); a pow-0.3 ball is returned toward you; an 'O' ball past your baseline scores for THEM; melee spares the boss but cleaves the shambler beside it; tennis still 12/11/12 and a normal shambler is still one-shot; renders with its HP bar; no console errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
bfaafe6727
commit
41a6d2a034
4 files changed
+62
-6
No files matched your search
@@ -123,8 +123,15 @@ function drawBoy(b) {
|
||||
ctx.restore();
|
||||
}
|
||||
function drawZombie(zb) {
|
||||
const frame = Math.floor(zb.walkT * 2.6) % 2 + 1;
|
||||
drawStatic('z_' + zb.variant + frame, zb.x, zb.z, 1.8, Math.floor(zb.walkT * 5.2) % 2);
|
||||
const rk = zb.variant === 'r';
|
||||
const v = rk ? 'c' : zb.variant; // the racket boss reuses the turned-CPU sprite (already holds a racket)
|
||||
const frame = rk && zb.pose === 'swing' ? 2 : Math.floor(zb.walkT * 2.6) % 2 + 1;
|
||||
drawStatic('z_' + v + frame, zb.x, zb.z, rk ? 1.85 : 1.8, Math.floor(zb.walkT * 5.2) % 2);
|
||||
if (rk) { // HP bar floating above the mini-boss
|
||||
const p = proj(zb.x, 2.05, zb.z), w = Math.max(10, p.s * 0.5), x = p.x - w / 2;
|
||||
ctx.fillStyle = '#300'; ctx.fillRect(x, p.y, w, 3);
|
||||
ctx.fillStyle = '#e03030'; ctx.fillRect(x, p.y, w * Math.max(0, zb.hp) / TUNE.racketHp, 3);
|
||||
}
|
||||
}
|
||||
function drawRing(x, z, color) {
|
||||
const p = proj(x, 0, z);
|
||||
|
||||
Reference in new issue
Block a user