max of 3 modifiers for special (4 was confusing to me)

This commit is contained in:
evanpelle
2026-03-19 21:16:38 -07:00
parent c5706613e4
commit e14f1e8cea
+5 -13
View File
@@ -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(