Make the opponent level matter in the cup
This commit is contained in:
1 parent
058636fae3
commit
bfc70d7388
8 files changed
+80
-19
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, 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 { update, forceZombies, startGore, splatPoint, restartRun, leaguePace, duelSkill, tinLadder, deliverTin, peerK: _peerK, 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
|
||||
@@ -2439,5 +2439,26 @@ test('THE LEVEL IS YOU, in the league: legs and window grow with xp — baseline
|
||||
prof.prof.xp = 0;
|
||||
});
|
||||
|
||||
test('THE PEER GIFT: cup and its training rep ease from fifteen levels down to parity', () => {
|
||||
const peerK = _peerK, legLevel = _legLevel, winLevel = _winLevel;
|
||||
G.match = { opp: 15, cup: {} }; // displayed level 41
|
||||
prof.prof.xp = prof.xpFor(25);
|
||||
assert.equal(peerK(), 0, 'sixteen levels down gets no gift and no penalty');
|
||||
const legs25 = legLevel(), win25 = winLevel();
|
||||
prof.prof.xp = prof.xpFor(36);
|
||||
assert.ok(peerK() > 0.6 && peerK() < 1, 'closing most of the gap earns most of the gift');
|
||||
prof.prof.xp = prof.xpFor(41);
|
||||
assert.equal(peerK(), 1, 'parity earns the full gift');
|
||||
assert.ok(legLevel() / legs25 > 1.1, 'level 41 has materially more reachability than level 25');
|
||||
assert.ok(TUNE.swingWindow * (winLevel() - win25) > 0.025, 'the normal contact window gains over 25ms');
|
||||
G.match = { opp: 15 }; // arcade: fixed comparison
|
||||
assert.equal(peerK(), 0, 'arcade does not soften with opponent parity');
|
||||
G.match = { opp: 15, train: true };
|
||||
assert.equal(peerK(), 1, 'the exact training rep feels like the cup match');
|
||||
G.net = { on: true };
|
||||
assert.equal(peerK(), 0, 'netplay never reads profile advantage');
|
||||
G.net = null; G.match = null; 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