From 0b88ec0b7a30a1b1de1bf3955dceb581fae1099c Mon Sep 17 00:00:00 2001 From: evanpelle Date: Thu, 19 Mar 2026 21:16:38 -0700 Subject: [PATCH] max of 3 modifiers for special (4 was confusing to me) --- src/server/MapPlaylist.ts | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/server/MapPlaylist.ts b/src/server/MapPlaylist.ts index 2db6e6332..273c9cddf 100644 --- a/src/server/MapPlaylist.ts +++ b/src/server/MapPlaylist.ts @@ -453,19 +453,11 @@ export class MapPlaylist { count?: number, countReduction: number = 0, ): PublicGameModifiers { - // Roll how many modifiers to pick: 30% → 1, 40% → 2, 20% → 3, 10% → 4 - const modifierCountRoll = Math.floor(Math.random() * 10) + 1; - const k = Math.max( - 0, - (count ?? - (modifierCountRoll <= 3 - ? 1 - : modifierCountRoll <= 7 - ? 2 - : modifierCountRoll <= 9 - ? 3 - : 4)) - countReduction, - ); + // Roll how many modifiers to pick: 30% → 1, 50% → 2, 20% → 3 + const modifierCounts = [1, 1, 1, 2, 2, 2, 2, 2, 3, 3]; + const rolled = + modifierCounts[Math.floor(Math.random() * modifierCounts.length)]; + const k = Math.max(0, (count ?? rolled) - countReduction); // Shuffle the pool, then pick the first k unique modifier keys. const pool = SPECIAL_MODIFIER_POOL.filter(