The match plays fair: deeper pool, no regicide, serves from the line
"the player is too weak in this mode. also the killing by smashing occurs too often. i cant really control it. maybe obsolete? also the serving after the first serve does not happen from behind the groundline". matchPlayerHp 8 — the match brings its own pool. The gore mode's 4 was an inheritance, not a decision, and a real game has rallies you deserve to lose without the run ending. Regicide is out of the match (kept in the duel, where any-weapon-counts is the point of sudden death). In a full game every hard serve that happened to meet the body was a free kill nobody aimed. A match ball never damages the opponent — it passes through like a soft ball and racketAI plays it — so the wound stages are exactly the scoreboard. That also made hp-per-opponent meaningless, so the ladder escalates in racketAI instead: +12% speed per body felled, whiff chance x0.82 per rung. And serving resets to behind the baseline with real deuce/ad mirroring: setupPoint's "serve from wherever you're standing" branch now excludes the match, which falls through to the tennis positioning. Verified live: second serve from z 24.3, x mirrored to the ad side, opponent unwounded by anything but the score. 38 tests, 15 seeds clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0620e97d6c
commit
ea6e50f8f8
8 files changed
+73
-17
No files matched your search
+7
-1
@@ -219,6 +219,9 @@ export function watchdog(dt) {
|
||||
export function startMatch() {
|
||||
if (G.interlude || G.horde || G.bossFight || G.drill || G.match) return false;
|
||||
G.match = { opp: 1, ending: false };
|
||||
G.hp = G.hpMax = TUNE.matchPlayerHp; // a real match is longer than four mistakes — the gore
|
||||
// mode's 4 was "too weak" here, felt not calculated
|
||||
score.server = 'P'; // you serve every point (the corpse never learned to toss)
|
||||
G.weapon = 0; G.mgT = 0; endBurst(); pellets.length = 0; extras.length = 0; shots.length = 0;
|
||||
zombies.length = 0;
|
||||
G.boy = null;
|
||||
@@ -239,7 +242,10 @@ function matchOpponent() {
|
||||
spawnRacketZombie();
|
||||
const zb = zombies.find(z => z.variant === 'r');
|
||||
zb.dueled = true; // wakes racketAI, same as a fresh duel
|
||||
zb.hp = zb.hpMax = TUNE.matchOppHp + (G.match.opp - 1) * TUNE.matchOppHpPer;
|
||||
zb.hp = zb.hpMax = TUNE.matchOppHp; // a FLAT pool: with regicide gone the body is pure
|
||||
// scoreboard (a quarter per point), so a deeper pool would
|
||||
// change nothing — the ladder escalates in racketAI instead
|
||||
// (matchSpeedPer / matchFlubKeep)
|
||||
G.interlude = { introT: 1.6 }; // the duel machinery IS the match machinery
|
||||
}
|
||||
|
||||
|
||||
+6
-3
@@ -383,9 +383,12 @@ export const TUNE = {
|
||||
matchOppHp: 4, // the first opponent's pool. FOUR, deliberately: a quarter comes off per point
|
||||
// won, so a love game walks it through every wound stage and the game point
|
||||
// fells it — the scoreboard and the body agree all the way down
|
||||
matchOppHpPer: 2, // extra pool per opponent felled — later corpses soak more regicide punishment
|
||||
matchHeal: 2, // hp back for a game won (the duel's healPerDuel rate) — a clean game is how
|
||||
// you last; their every point costs 1 of your playerHp 4
|
||||
matchPlayerHp: 8, // your pool for the MATCH — richer than the gore mode's 4, because a real game
|
||||
// has rallies you deserve to lose without the run ending ("the player is too
|
||||
// weak in this mode"). Their point still costs 1; matchHeal is how you last
|
||||
matchSpeedPer: 0.12, // racketAI speed grows this much per opponent felled...
|
||||
matchFlubKeep: 0.82, // ...and its whiff chance keeps only this much — the ladder now that hp is flat
|
||||
matchHeal: 2, // hp back for a game won (the duel's healPerDuel rate)
|
||||
// The timing windows, DRAWN (the match's whole ask: "what is the possible tap window, what is the
|
||||
// sweet spot"). Numbers shared with the mechanics they visualise, so the picture cannot lie:
|
||||
matchRingFar: 9, // m — the approach ring fades in once the incoming ball is this close
|
||||
|
||||
+6
-2
@@ -949,7 +949,10 @@ function racketAI(rz, dt) {
|
||||
const tz = Math.max(1.5, Math.min(COURT.svcFar, ball.z)); // chase laterally, hold deep on the far court
|
||||
const dx = ball.x - rz.x, dz = tz - rz.z, d = Math.hypot(dx, dz);
|
||||
if (d > 0.15) {
|
||||
const step = Math.min(TUNE.racketSpeed * dt, d);
|
||||
// THE MATCH LADDER ESCALATES HERE, not in hp: with regicide gone the pool is pure scoreboard,
|
||||
// so a harder opponent is a FASTER one that flubs less — the same knobs, scaled per body felled.
|
||||
const spd = TUNE.racketSpeed * (G.match ? 1 + (G.match.opp - 1) * TUNE.matchSpeedPer : 1);
|
||||
const step = Math.min(spd * dt, d);
|
||||
rz.dist = (rz.dist || 0) + step; // ground covered — his walk cycle steps off this, not the clock
|
||||
rz.x += dx / d * step; rz.z += dz / d * step; rz.runT += dt;
|
||||
if (rz.pose !== 'swing') rz.pose = 'run';
|
||||
@@ -958,7 +961,8 @@ function racketAI(rz, dt) {
|
||||
if (rz.swingCool <= 0 && rz.swingT < 0
|
||||
&& Math.hypot(ball.x - rz.x, (ball.z - rz.z) * 0.8) < TUNE.aiReach
|
||||
&& ball.y < CONTACT.maxY && ball.y > CONTACT.minY) {
|
||||
if (Math.random() < TUNE.racketFlub) rz.swingCool = 0.5; // whiff — it hesitates
|
||||
const flub = TUNE.racketFlub * (G.match ? Math.pow(TUNE.matchFlubKeep, G.match.opp - 1) : 1);
|
||||
if (Math.random() < flub) rz.swingCool = 0.5; // whiff — it hesitates (rarer per rung of the ladder)
|
||||
else { rz.swingT = TUNE.swingWindup + TUNE.swingWindow / 2; trySwing(rz, true, TUNE.racketQMax); rz.swingT = -1; rz.swingCool = 0.3; }
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -161,7 +161,11 @@ export const deuceSide = () => (score.pts[0] + score.pts[1]) % 2 === 0; // even
|
||||
export function setupPoint() {
|
||||
G.phase = 'pretoss'; ball.active = false; ball.bounces = 0;
|
||||
G.swingSnaps = null; G.rallyNear = null; G.swung = false;
|
||||
if (G.mode === 'splatter') { // always your serve, from wherever you're standing
|
||||
if (G.mode === 'splatter' && !G.match) { // always your serve, from wherever you're standing
|
||||
// (the MATCH falls through to the tennis branch below:
|
||||
// real tennis serves from behind the baseline, deuce side
|
||||
// mirroring and all — serving from mid-court where the
|
||||
// last rally left you read as a bug, because it was one)
|
||||
score.server = 'P';
|
||||
P.pose = 'idle'; P.swingT = -1; P.facing = 1;
|
||||
return;
|
||||
|
||||
+7
-1
@@ -1139,7 +1139,13 @@ export function updateZombies(dt) {
|
||||
continue;
|
||||
}
|
||||
if (isBoss(zb)) { // boss: splat-quality wounds it; soft balls the racket one rallies (racketAI)
|
||||
if ((ball.pow || 0) >= TUNE.zSplatQ) {
|
||||
// NOT IN THE MATCH. Regicide made sense in the duel (one sudden-death point, any weapon
|
||||
// counts) but in a full game every hard serve that happened to meet the body was a free
|
||||
// kill nobody aimed — Oliver: "the killing by smashing occurs too often. i cant really
|
||||
// control it". A match ball NEVER damages the opponent; it passes through like any soft
|
||||
// ball and racketAI plays it. The score is the only way through — which also makes the
|
||||
// wound stages exactly the scoreboard, with no side-channel smearing them.
|
||||
if ((ball.pow || 0) >= TUNE.zSplatQ && !G.match) {
|
||||
zb.hitT = TUNE.bossHitCool; // belt-and-braces: this ball is spent below, but the cooldown
|
||||
const dead = wound(zb, TUNE.dmgBall); // is what stops ANY lingering contact multi-wounding
|
||||
pock(0.6, 300);
|
||||
|
||||
Reference in new issue
Block a user