mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-18 22:58:32 +02:00
fix(chain): WOW block time is 5 min, not 2 (measured); drop cheating-monster tuning
WOW meanBlockTimeMs 120000 -> 300000. Measured 5.01 min/block over 1000 blocks on
the live daemon; the code comment claiming it was "corrected to 2 min" was backwards.
WOW is a SLOW chain, closer to BTC than XMR for calibration.
Per user feedback ("fast monster feels like cheating") + what the sim then proved:
a supernaturally fast monster doesnt even WORK on slow chains — WOW (5-min) caps
~64% house-win even at a 2.2x monster on a 111x55 map, because a single dungeon
clears in ~1 min << the block so the timer (the fair, on-theme edge) barely bites.
So NETWORK_TUNING drops the monster-speed lever entirely and keeps size∝√blockTime
only (monster stays at its fair preset speed). WOW sizeScale 1.0->1.6 for 5-min blocks.
Consequence: slow chains (WOW/BTC) run honest-but-under-target on the timer until
MULTI-LEVEL DEPTH lands — the real edge lever (cumulative run length across levels
without any single map being an unplayable slog). Deb (WOW/normal) now gets a bigger,
more block-appropriate dungeon (45x22 -> 72x35) with a fair monster.
meanBlockTimeMs has no runtime consumer yet (metadata) so the WOW fix is behavior-safe
today; it corrects the sim + future block-bounded features. Suite 60/428 green.
This commit is contained in:
@@ -14,27 +14,31 @@ beforeEach(() => { KEYS.forEach(k => { SAVE[k] = process.env[k]; delete process.
|
||||
afterEach(() => { KEYS.forEach(k => { if (SAVE[k] === undefined) delete process.env[k]; else process.env[k] = SAVE[k]; }); });
|
||||
|
||||
describe('per-network difficulty tuning', () => {
|
||||
test('WOW is the reference (sizeScale 1.0) — casino dims unchanged', () => {
|
||||
const t = applyNetworkTuning(casino(), 'WOW');
|
||||
expect(t.dungeon.width).toBe(DIFFICULTY_PRESETS.casino.dungeon.width);
|
||||
expect(t.dungeon.height).toBe(DIFFICULTY_PRESETS.casino.dungeon.height);
|
||||
test('XMR is the reference (sizeScale 1.0) — casino dims unchanged; WOW (5-min) scales up', () => {
|
||||
const xmr = applyNetworkTuning(casino(), 'XMR');
|
||||
expect(xmr.dungeon.width).toBe(DIFFICULTY_PRESETS.casino.dungeon.width);
|
||||
expect(xmr.dungeon.height).toBe(DIFFICULTY_PRESETS.casino.dungeon.height);
|
||||
// WOW is a slow chain now (5 min) → bigger map than XMR.
|
||||
expect(applyNetworkTuning(casino(), 'WOW').dungeon.width).toBeGreaterThan(xmr.dungeon.width);
|
||||
});
|
||||
|
||||
test('dungeon size scales with block time: GRIN < WOW < BTC', () => {
|
||||
test('dungeon size scales with block time: GRIN < XMR < WOW', () => {
|
||||
const g = applyNetworkTuning(casino(), 'GRIN').dungeon.width;
|
||||
const x = applyNetworkTuning(casino(), 'XMR').dungeon.width;
|
||||
const w = applyNetworkTuning(casino(), 'WOW').dungeon.width;
|
||||
const b = applyNetworkTuning(casino(), 'BTC').dungeon.width;
|
||||
expect(g).toBeLessThan(w);
|
||||
expect(w).toBeLessThan(b);
|
||||
expect(g).toBeLessThan(x);
|
||||
expect(x).toBeLessThan(w);
|
||||
});
|
||||
|
||||
test('monster speed is tuned for casino but NOT for other presets', () => {
|
||||
expect(applyNetworkTuning(casino(), 'BTC').monster.movesPerPlayerMove).toBe(NETWORK_TUNING.BTC.monsterSpeed);
|
||||
// normal keeps its own monster speed (tuning was calibrated for casino only)
|
||||
test('tuning scales SIZE only — the monster stays at its fair preset speed', () => {
|
||||
// No cheating-fast monster: every preset keeps its own movesPerPlayerMove.
|
||||
expect(applyNetworkTuning(casino(), 'BTC').monster.movesPerPlayerMove)
|
||||
.toBe(DIFFICULTY_PRESETS.casino.monster.movesPerPlayerMove);
|
||||
expect(applyNetworkTuning(normal(), 'BTC').monster.movesPerPlayerMove)
|
||||
.toBe(DIFFICULTY_PRESETS.normal.monster.movesPerPlayerMove);
|
||||
// ...but normal STILL gets the pacing size scale
|
||||
// ...but both get the pacing size scale.
|
||||
expect(applyNetworkTuning(normal(), 'BTC').dungeon.width).toBeGreaterThan(DIFFICULTY_PRESETS.normal.dungeon.width);
|
||||
expect(NETWORK_TUNING.BTC.monsterSpeed).toBeUndefined();
|
||||
});
|
||||
|
||||
test('unknown network is left untouched', () => {
|
||||
|
||||
Reference in New Issue
Block a user