Two testing switches: one-shot bodies, and the eaters off
"please make the zombie killable with a single hit for testing" and "remove the fake zombies for now". drillOneShot drops every body on a drill court to 1 hp, applied at spawn to the batch and the eaters alike. Worth knowing what it removes: the roster's HP is what makes the called ORDER matter — a roller is normally seven serves, so being told to take it third means starting on it first. At one hit that planning layer is gone and the sequence is pure recall. Flagged in PROJECT.md so it gets decided on feel rather than left on by drift. drillEaterMax 3 -> 0 switches the plain shamblers off. The mechanism is untouched — spawnEater, the wide entry away from the gang, the never-a-fault rule — so one number brings them back. The eater test now asserts whichever contract the knob describes (at 0: nothing but the puzzle ever appears; above 0: they arrive, capped, always plain shamblers) instead of being deleted and rotting. And the never-a-fault rule gets its own test with a hand-placed body, so the rule the eaters depend on stays covered while they are switched off. 31 tests, 15 seeds clean. Verified live: brute/steward/roller all at 1 hp where the roster says 5/5/7, zero strays over 40s, one aimed serve puts down the roller. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d34683bc68
commit
0f524a08c9
5 files changed
+73
-23
No files matched your search
+6
-2
@@ -66,6 +66,10 @@ export const drillSpeed = d => lerp(TUNE.drillSpeed, TUNE.drillSpeedMax, ramp(d)
|
||||
const batchSize = d => Math.round(lerp(TUNE.drillBatch, TUNE.drillBatchMax, ramp(d)));
|
||||
const eaterGap = d => lerp(TUNE.drillEaterEvery, TUNE.drillEaterMin, ramp(d));
|
||||
|
||||
// TUNE.drillOneShot: strip a body down to a single hit. Applied at spawn to the batch AND the
|
||||
// eaters, so nothing on a drill court ever needs a second serve.
|
||||
const oneShot = zb => { if (TUNE.drillOneShot >= 0.5) zb.hp = zb.hpMax = 1; return zb; };
|
||||
|
||||
const shuffle = a => { for (let i = a.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [a[i], a[j]] = [a[j], a[i]]; } return a; };
|
||||
const gang = () => zombies.filter(z => z.drill); // the batch: a member's identity IS its variant
|
||||
|
||||
@@ -93,7 +97,7 @@ function spawnBatch(d) {
|
||||
// rank walking in abreast — but every one still starts on the far side, which is the promise.
|
||||
spawnZombie(lanes[i] + (Math.random() - 0.5) * 0.4,
|
||||
TUNE.drillSpawnZ + Math.random() * TUNE.drillBatchDepth, t.v);
|
||||
const zb = zombies[zombies.length - 1];
|
||||
const zb = oneShot(zombies[zombies.length - 1]);
|
||||
zb.drill = true; // marks it as the puzzle AND holds its lane (see updateZombies)
|
||||
zb.v = drillSpeed(d) * t.vMul * (0.92 + Math.random() * 0.16);
|
||||
});
|
||||
@@ -125,7 +129,7 @@ function spawnEater(d) {
|
||||
// ALWAYS A PLAIN SHAMBLER — rule 1 above doing its work: the alphabet never contains 'a'/'b', so
|
||||
// an eater can never be mistaken for a body the sequence is asking for, with no marking on either.
|
||||
spawnZombie(bx, TUNE.drillSpawnZ + Math.random() * 0.8, Math.random() < 0.3 ? 'b' : 'a');
|
||||
const zb = zombies[zombies.length - 1];
|
||||
const zb = oneShot(zombies[zombies.length - 1]);
|
||||
zb.v = drillSpeed(d) * TUNE.drillEaterSpeed * (0.9 + Math.random() * 0.2);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user