From 82706626662c1560367d62a66f310bfef2649834 Mon Sep 17 00:00:00 2001 From: Ethan O'Brien Date: Wed, 23 Sep 2026 20:36:51 -0500 Subject: [PATCH] Keep one-point skill values valid under card nerf --- src/router/custom_card.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/router/custom_card.rs b/src/router/custom_card.rs index 19e4735..33e480b 100644 --- a/src/router/custom_card.rs +++ b/src/router/custom_card.rs @@ -416,7 +416,7 @@ pub fn nerf_active() -> bool { // Skill magnitudes nerf to 4/5 of the official range fn nerf_scale(value: i64) -> i64 { - value * 4 / 5 + if value > 0 { (value * 4 / 5).max(1) } else { value * 4 / 5 } } // A stored skill array element above the cap moves down to the cap; below it @@ -2311,6 +2311,8 @@ pub mod tests { assert!(ms_min >= 500 && ms_max < 40_000, "40s buffs must be out of range"); let (_, value_max, _) = SKILL_VALUE_RANGES[&4]; assert!(value_max < 100_000_000, "1e8 score-ups must be out of range"); + let (repeat_min, repeat_max, _) = SKILL_VALUE_RANGES[&11]; + assert_eq!((repeat_min, nerf_scale(repeat_max)), (1, 1)); } // A full create: derived ids, pinned columns, art md5s and the catalog