The receiver waits behind his line, and a missed serve buys a second one
Oliver, three notes; two of them are here. "when the opponent serves the player does not stand at the baseline - but that's how it should be." setupPoint's receiving marks sat over a metre INSIDE the court on both sides (22.5 near, 1.2 far) — where you stand to attack a second serve, not where you wait for a first one. They mirror the server's depth now, in the one line every serving mode shares. "when serving results in an out there should be a second service... the umpire should announce 2nd service and the player must get another chance." True in tennis mode since forever and absent everywhere else: the duel, the match and the death match had no service rule at all, so a serve long or into the net was judged as an ordinary ground stroke — a point, and in the match a point costs blood. The out branch of onBounce's interlude block routes a serve to fault() instead, so the second serve, the HUD line, the umpire and the double fault all come for free. Three things it dragged out with it: - fault()'s double-fault branch called pointTo — TENNIS scoring — which in an interlude banks a number and skips the mode that owns the court. It goes through resolveInterlude there now. Nothing had ever reached that line from a duel or a match, because those modes could not fault. - startDuel never reset G.serveNum: harmless while a duel could not fault, the next duel's death loop the moment it can. - the match puts the body back on its receiving mark for the second serve (placeReceiver, split out of matchReady, which resets the serve number). "Fault. Second service." is one voiceSeq — a second voice() call would be dropped, one man one microphone. New recording via the usual say/afconvert. The service BOX is still not enforced in the match, deliberately: this is strictly more forgiving than what shipped. The lob gesture is OPEN 14. 4 new tests, 110 pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3d7e66449a
commit
6e07dc74bb
7 files changed
+182
-19
No files matched your search
+29
-4
@@ -2,14 +2,14 @@
|
||||
|
||||
import { TUNE, UI, bossArt, APPLAUSE_T, EATEN_BURST, EATEN_SUMMARY, COURT, CONTACT, VOLLEY, ZONE_DEPTH, HOME, P_BOUNDS, TOSS, SHOT_DEPTH, POSE_TIME, BOUNCE_IDLE, zombieH, Z_CHEST , WEAPONS, RACK_MAX , BARREL_WEAPONS, racketStage, matchWound, CUP_ROUNDS } from './config.js';
|
||||
import { P, O, ball, score, crowd, G, court, tour, other, deuceSide, setupPoint, sendBoy, resetState } from './state.js';
|
||||
import { audio, pock, swish, whoosh, applause, voice, sfx, aww, zombieMusic, zombieDuck, menuDuck, splat, shriek, boom } from './audio.js';
|
||||
import { audio, pock, swish, whoosh, applause, voice, voiceSeq, sfx, aww, zombieMusic, zombieDuck, menuDuck, splat, shriek, boom } from './audio.js';
|
||||
import { haptic } from './haptics.js';
|
||||
import { axisX, axisZ, takeFlickAim, touchPX, resetInput } from './input.js';
|
||||
import { W } from './render.js'; // runtime-only cycle (render imports gameplay), same pattern as input/zombies
|
||||
import { updateDrill } from './drill.js';
|
||||
import { endRun, beginRun, MODE_CLASSIC } from './stats.js';
|
||||
import { updateZombies, updateParts, spawnZombie, spawnRacketZombie, spawnMachine, spawnChapterBoss, zombies, gore, explode, meleeSwipe, extras, parts, pellets, shots, playerGore, eatenBleed, resetZombies , firePellet , spawnBarrel , fireBeam , pops, popText } from './zombies.js';
|
||||
import { proceedAfterClear, startDuel, startHorde, warnHorde, resolveInterlude, watchdog, updateBench, benchKey, tickMatchFall } from './beats.js'; // runtime-only cycle: beats calls back into cheer/aside/endBurst/deliverTin/showModal/logSwing
|
||||
import { proceedAfterClear, startDuel, startHorde, warnHorde, resolveInterlude, watchdog, updateBench, benchKey, tickMatchFall, placeReceiver } from './beats.js'; // runtime-only cycle: beats calls back into cheer/aside/endBurst/deliverTin/showModal/logSwing
|
||||
import { netSendShot, netSendToss, netTick, netJudging, netSendPoint, netSendFault, netClose } from './net.js'; // runtime-only cycle: net calls back into pointTo/fault/tossBall/showModal
|
||||
|
||||
// ------------------------------------------------------------- ballistics ----
|
||||
@@ -1048,8 +1048,22 @@ export function fault() { // exported for net.js: the receiver's fault call re-a
|
||||
if (G.serveNum === 1) {
|
||||
if (netJudging()) netSendFault(); // netplay: only the first-serve branch wires — the double
|
||||
// fault below goes out through pointTo as the point it is
|
||||
G.serveNum = 2; voice('fault'); G.phase = 'over'; G.overT = 1.4; sendBoy();
|
||||
// "Fault. Second service." — the second half is the whole point of the call: a lone "fault"
|
||||
// never said that the player still had a serve coming (Oliver, 2026-08-22). voiceSeq, not two
|
||||
// voice() calls: the umpire is one man with one microphone and the second line would be DROPPED.
|
||||
G.serveNum = 2; voiceSeq(['fault', 'second_service']); G.phase = 'over'; G.overT = 1.4; sendBoy();
|
||||
// ...and in a MATCH the body goes back on its receiving mark for the second serve, exactly as
|
||||
// matchReady puts it there for a first one — it is standing wherever it chased the fault to.
|
||||
// Not in netplay: the called ball is left rolling there (net.js), and matchReady's ball.active
|
||||
// = false would freeze it mid-roll on the far phone.
|
||||
if (G.match && !G.net) placeReceiver();
|
||||
}
|
||||
// A DOUBLE FAULT IS A POINT, AND A POINT IS SCORED BY THE MODE THAT OWNS THE COURT. pointTo is
|
||||
// TENNIS scoring; the duel and the match settle points through resolveInterlude (blood, the fall,
|
||||
// the ladder) and a raw pointTo there would bank a number and skip all of it — the same seam the
|
||||
// interlude branch of onBounce is written around. Nothing reached this line from an interlude
|
||||
// before, because those modes had no fault in them at all.
|
||||
else if (G.interlude) { voice('double_fault'); resolveInterlude(other(score.server)); }
|
||||
else pointTo(other(score.server), 'double_fault');
|
||||
}
|
||||
|
||||
@@ -1147,7 +1161,18 @@ function onBounce() {
|
||||
if (G.net && ball.lastHit === 'P') return;
|
||||
if (ball.bounces === 1) {
|
||||
const okSide = ball.lastHit === 'P' ? ball.z < COURT.netZ : ball.z > COURT.netZ;
|
||||
if (!inCourt(ball.x, ball.z) || !okSide) { endFlight(); resolveInterlude(other(ball.lastHit)); voice('out'); }
|
||||
// A MISSED SERVE BUYS A SECOND ONE, IT DOES NOT LOSE THE POINT (Oliver, 2026-08-22: "when
|
||||
// serving results in an out there should be a second service"). These modes had no service
|
||||
// rule at all: the first serve was judged as an ordinary ground stroke, so a serve into the
|
||||
// net or over the baseline handed the point away on the spot — in the match, that is a point
|
||||
// and blood for a first serve. It goes through the same fault() the tennis modes use, so the
|
||||
// second serve, the umpire's call and the double fault all come for free.
|
||||
// The BOX is deliberately still not enforced here (see the note in hitServe): a deep-but-in
|
||||
// serve stays legal in the match, which is the concession that mode was tuned around.
|
||||
if (!inCourt(ball.x, ball.z) || !okSide) {
|
||||
endFlight();
|
||||
if (G.wasServe) fault(); else { resolveInterlude(other(ball.lastHit)); voice('out'); }
|
||||
}
|
||||
// THE FALL BEATS THE BALL (Oliver: "the zombie falls after the ball is lost although we know
|
||||
// this earlier — it could play out as ball lost BECAUSE of the falling"). A winner that just
|
||||
// bounced in and is provably beyond the body's reach has already decided the point, so it
|
||||
|
||||
Reference in new issue
Block a user