From 683e7a47ec621441b77a1c76155020514361fd27 Mon Sep 17 00:00:00 2001 From: Quintine Date: Thu, 13 Aug 2026 16:21:25 +1000 Subject: [PATCH] revert: restore original dash length and post-dash slow --- docs/gameplay.md | 2 +- js/player.js | 6 +++--- test/smoke.js | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/gameplay.md b/docs/gameplay.md index c7203ad..d1934a2 100644 --- a/docs/gameplay.md +++ b/docs/gameplay.md @@ -54,7 +54,7 @@ Your best score is saved in `localStorage` as `meatslicer_best` and shown on the | **T** | Toggle Auto-Draft (auto-pick random perk on level-up) | | **M** | Mute / unmute | | **N** | Next music track | -| **Shift** | Dash in the movement direction; 2× length, 0.6s of 30% slow | +| **Shift** | Dash in the movement direction; 0.6s of 50% slow after (net 95% of walking distance) | ### Perk draft screen (level-up) diff --git a/js/player.js b/js/player.js index 082f9e7..98e6b49 100644 --- a/js/player.js +++ b/js/player.js @@ -1,6 +1,6 @@ // ---- the butcher (player) ---- -const DASH_SLOW_T = 0.6; // seconds of 30% move speed after a dash; doubles as the dash cooldown +const DASH_SLOW_T = 0.6; // seconds of 50% move speed after a dash; doubles as the dash cooldown function defaultPlayerStats() { return { @@ -86,7 +86,7 @@ function updatePlayer(dt) { const len = Math.hypot(mx, my); const firing = held ? (w.id === 'bonepopper' ? 0.95 : 0.85) : 1; if (keyPressed('shift') && p.dashSlowT <= 0) { - const dashD = 0.9 * (178 * st.speedMul * firing) * DASH_SLOW_T; + const dashD = 0.45 * (178 * st.speedMul * firing) * DASH_SLOW_T; p.x += (mx / len) * dashD; p.y += (my / len) * dashD; p.dashSlowT = DASH_SLOW_T; @@ -94,7 +94,7 @@ function updatePlayer(dt) { spawnShockwave(p.x, p.y, 26, '#d8c9a8', 0.35); Sfx.duck(); } - const spd = 178 * st.speedMul * firing * (p.dashSlowT > 0 ? 0.3 : 1); + const spd = 178 * st.speedMul * firing * (p.dashSlowT > 0 ? 0.5 : 1); p.x += (mx / len) * spd * dt; p.y += (my / len) * spd * dt; p.step += dt * 9 * Math.min(st.speedMul, 1.8); diff --git a/test/smoke.js b/test/smoke.js index 0ac852a..3d190b8 100644 --- a/test/smoke.js +++ b/test/smoke.js @@ -1200,7 +1200,7 @@ console.log('== dash: burst, slow, cooldown =='); release('shift'); const dashDx = p.x - xBeforeDash; check('dashSlowT > 0 after dash', p.dashSlowT > 0); - check('dash burst within 5% of 0.9*178*0.6', Math.abs(dashDx - 0.9*178*0.6) <= 0.05 * 0.9*178*0.6); + check('dash burst within 5% of 0.45*178*0.6', Math.abs(dashDx - 0.45*178*0.6) <= 0.05 * 0.45*178*0.6); let slowDist = 0; let slowFrames = 0; let sampledSlowDx = 0; @@ -1225,8 +1225,8 @@ console.log('== dash: burst, slow, cooldown =='); slowFrames++; } } - check('slow per-frame dx is roughly 30% of baseline', sampledSlowDx > 0 && sampledSlowDx >= 0.25 * baselineDx && sampledSlowDx <= 0.35 * baselineDx); - check('total dash (burst + slow) within 8% of 1.2*178*0.6', Math.abs((dashDx + slowDist) - 1.2*178*0.6) <= 0.08 * 1.2*178*0.6); + check('slow per-frame dx is roughly half baseline', sampledSlowDx > 0 && sampledSlowDx >= 0.4 * baselineDx && sampledSlowDx <= 0.6 * baselineDx); + check('total dash (burst + slow) within 8% of 0.95*178*0.6', Math.abs((dashDx + slowDist) - 0.95*178*0.6) <= 0.08 * 0.95*178*0.6); ctx.Input.keys.d = false; step(3, 16); const xBeforeIdle = p.x;