From d0303273368b09702fbac4bc302c24022b9c5835 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sun, 16 Apr 2023 09:42:35 -0400 Subject: [PATCH] Increase modifier upgrade odds based on shiny count --- src/modifier-type.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modifier-type.ts b/src/modifier-type.ts index f33d67607..8fcca0016 100644 --- a/src/modifier-type.ts +++ b/src/modifier-type.ts @@ -498,7 +498,9 @@ export function getModifierTypeOptionsForWave(waveIndex: integer, count: integer function getNewModifierTypeOption(party: PlayerPokemon[], tier?: ModifierTier, upgrade?: boolean): ModifierTypeOption { const tierValue = Utils.randInt(256); if (tier === undefined) { - upgrade = Utils.randInt(32) === 0; + const partyShinyCount = party.filter(p => p.shiny).length; + const upgradeOdds = Math.floor(32 / Math.max((partyShinyCount * 2), 1)); + upgrade = !Utils.randInt(upgradeOdds); tier = (tierValue >= 52 ? ModifierTier.COMMON : tierValue >= 8 ? ModifierTier.GREAT : tierValue >= 1 ? ModifierTier.ULTRA : ModifierTier.MASTER) + (upgrade ? 1 : 0); } const thresholds = Object.keys(modifierPoolThresholds[tier]);