The level is you, in the league: quicker legs, a wider window, and a curve that pays on the way up
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7dc72009eb
commit
7e2649c888
5 files changed
+82
-16
No files matched your search
@@ -89,7 +89,7 @@ globalThis.getComputedStyle = () => ({ paddingTop: '0' });
|
||||
// ---- game modules (real code) ----------------------------------------------
|
||||
const state = await import('./src/state.js');
|
||||
const { G, P, O, score, ball, setupPoint } = state;
|
||||
const { update, forceZombies, startGore, splatPoint, restartRun, leaguePace, duelSkill, tinLadder, deliverTin, flickTarget, flatCount, swayOf, keyPressed, classicGame, serveApexY, assistK, rallyFeel, barrelGap, machCap, hitServe, cheer, inCourt } = await import('./src/gameplay.js');
|
||||
const { update, forceZombies, startGore, splatPoint, restartRun, leaguePace, duelSkill, tinLadder, deliverTin, legLevel: _legLevel, winLevel: _winLevel, assistK: _assistK, flickTarget, flatCount, swayOf, keyPressed, classicGame, serveApexY, assistK, rallyFeel, barrelGap, machCap, hitServe, cheer, inCourt } = await import('./src/gameplay.js');
|
||||
const { startDuel, resolveInterlude, startBossFight, endBossFight, startDrill: _startDrill, endDrill, startMatch: _startMatch, endMatch, FALL_LEN, startNetVs, endNetVs } = await import('./src/beats.js');
|
||||
const { mirror, netMsg, netTest, netTick } = await import('./src/net.js');
|
||||
// the drill's first-sight modal freezes the world (that is what modals do) — dismiss it the way a
|
||||
@@ -111,8 +111,10 @@ const DT = 1 / 60;
|
||||
function freshSplatter() {
|
||||
restartRun();
|
||||
// THE LEAGUES: a won cup PROMOTES the profile (by design), which would leak league 2 into every
|
||||
// test after the tournament walkthrough — each test opens in league 1 with no ceremony pending
|
||||
prof.prof.lg = 1; prof.prof.ch = 0; prof.takePromo();
|
||||
// test after the tournament walkthrough — each test opens in league 1 with no ceremony pending.
|
||||
// XP is zeroed too: the level feeds real dials now (legs, window), and accumulated awards from
|
||||
// earlier tests would silently buff every later one.
|
||||
prof.prof.lg = 1; prof.prof.ch = 0; prof.prof.xp = 0; prof.takePromo();
|
||||
G.mode = 'splatter';
|
||||
G.everTransitioned = true;
|
||||
setupPoint();
|
||||
@@ -2325,12 +2327,18 @@ test('THE LEVEL IS YOU: the defensive buffs scale with level and level one is th
|
||||
const xp0 = prof.prof.xp;
|
||||
prof.prof.xp = 0;
|
||||
const b1 = prof.bonus();
|
||||
assert.deepEqual(b1, { melee: 1, parry: 1, grace: 1 }, 'level one changes nothing');
|
||||
assert.deepEqual(b1, { melee: 1, parry: 1, grace: 1, run: 1, window: 1 }, 'level one changes nothing');
|
||||
prof.prof.xp = prof.xpFor(prof.LEVEL_CAP);
|
||||
const bMax = prof.bonus();
|
||||
assert.ok(bMax.melee < 1 && bMax.melee >= 0.7, 'the swish floor drops, boundedly');
|
||||
assert.ok(bMax.parry > 1 && bMax.parry <= 1.3, 'the parry reaches further, boundedly');
|
||||
assert.ok(bMax.grace > 1 && bMax.grace <= 1.4, 'the grace stretches, boundedly');
|
||||
assert.ok(bMax.run > 1 && bMax.run <= 1.15, 'the legs quicken, boundedly');
|
||||
assert.ok(bMax.window > 1 && bMax.window <= 1.2, 'the window widens, boundedly');
|
||||
// FRONT-LOADED: level 20 must already carry more than half the cap's gift (Oliver plays there)
|
||||
prof.prof.xp = prof.xpFor(20);
|
||||
assert.ok((prof.bonus().run - 1) / (bMax.run - 1) > 0.5, 'the curve pays on the way up');
|
||||
prof.prof.xp = prof.xpFor(prof.LEVEL_CAP); // back to the cap for the grace-landing check below
|
||||
// ...and the grace actually lands on the player: hurtPlayer writes the scaled window
|
||||
G.mode = 'splatter'; G.hurtT = 0; G.dodgeI = 0; G.hp = 4;
|
||||
hurtPlayer(1);
|
||||
@@ -2338,5 +2346,24 @@ test('THE LEVEL IS YOU: the defensive buffs scale with level and level one is th
|
||||
prof.prof.xp = xp0;
|
||||
});
|
||||
|
||||
test('THE LEVEL IS YOU, in the league: legs and window grow with xp — baseline, classic and netplay untouched', () => {
|
||||
const legLevel = _legLevel, winLevel = _winLevel, assistK = _assistK;
|
||||
prof.prof.xp = 0;
|
||||
G.match = { opp: 5 };
|
||||
const legs0 = assistK();
|
||||
assert.equal(legLevel(), 1, 'level one IS the shipped game');
|
||||
assert.equal(winLevel(), 1, '...window too');
|
||||
prof.prof.xp = prof.xpFor(20);
|
||||
assert.ok(legLevel() > 1.05 && assistK() > legs0, 'level 20 legs are visibly quicker in the league');
|
||||
assert.ok(winLevel() > 1.05, '...and the contact window visibly wider');
|
||||
G.net = { on: true };
|
||||
assert.equal(legLevel(), 1, 'netplay is a fair human match — no level legs');
|
||||
assert.equal(winLevel(), 1, '...and no level window');
|
||||
G.net = null; G.match = null; G.classic = true;
|
||||
assert.equal(legLevel(), 1, 'classic keeps its own difficulty picker');
|
||||
G.classic = false;
|
||||
prof.prof.xp = 0;
|
||||
});
|
||||
|
||||
console.log(`\n${passed} tests passed`);
|
||||
process.exit(0); // render.js schedules viewport timers at load; don't let them outlive the report
|
||||
Reference in new issue
Block a user