mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 00:36:25 +00:00
Increase modifier upgrade odds based on shiny count
This commit is contained in:
parent
683a8f4d04
commit
d030327336
@ -498,7 +498,9 @@ export function getModifierTypeOptionsForWave(waveIndex: integer, count: integer
|
|||||||
function getNewModifierTypeOption(party: PlayerPokemon[], tier?: ModifierTier, upgrade?: boolean): ModifierTypeOption {
|
function getNewModifierTypeOption(party: PlayerPokemon[], tier?: ModifierTier, upgrade?: boolean): ModifierTypeOption {
|
||||||
const tierValue = Utils.randInt(256);
|
const tierValue = Utils.randInt(256);
|
||||||
if (tier === undefined) {
|
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);
|
tier = (tierValue >= 52 ? ModifierTier.COMMON : tierValue >= 8 ? ModifierTier.GREAT : tierValue >= 1 ? ModifierTier.ULTRA : ModifierTier.MASTER) + (upgrade ? 1 : 0);
|
||||||
}
|
}
|
||||||
const thresholds = Object.keys(modifierPoolThresholds[tier]);
|
const thresholds = Object.keys(modifierPoolThresholds[tier]);
|
||||||
|
Loading…
Reference in New Issue
Block a user