[Bug] Fix tier weights and remove unnecessary `Math.min()` (#3359)
This commit is contained in:
parent
06ed89ef13
commit
9eadce80c6
|
@ -1809,7 +1809,7 @@ export function getModifierPoolForType(poolType: ModifierPoolType): ModifierPool
|
||||||
return pool;
|
return pool;
|
||||||
}
|
}
|
||||||
|
|
||||||
const tierWeights = [ 769 / 1024, 192 / 1024, 48 / 1024, 12 / 1024, 1 / 1024 ];
|
const tierWeights = [ 768 / 1024, 195 / 1024, 48 / 1024, 12 / 1024, 1 / 1024 ];
|
||||||
|
|
||||||
export function regenerateModifierPoolThresholds(party: Pokemon[], poolType: ModifierPoolType, rerollCount: integer = 0) {
|
export function regenerateModifierPoolThresholds(party: Pokemon[], poolType: ModifierPoolType, rerollCount: integer = 0) {
|
||||||
const pool = getModifierPoolForType(poolType);
|
const pool = getModifierPoolForType(poolType);
|
||||||
|
@ -2023,10 +2023,6 @@ function getNewModifierTypeOption(party: Pokemon[], poolType: ModifierPoolType,
|
||||||
} while (upgraded);
|
} while (upgraded);
|
||||||
}
|
}
|
||||||
tier = tierValue > 255 ? ModifierTier.COMMON : tierValue > 60 ? ModifierTier.GREAT : tierValue > 12 ? ModifierTier.ULTRA : tierValue ? ModifierTier.ROGUE : ModifierTier.MASTER;
|
tier = tierValue > 255 ? ModifierTier.COMMON : tierValue > 60 ? ModifierTier.GREAT : tierValue > 12 ? ModifierTier.ULTRA : tierValue ? ModifierTier.ROGUE : ModifierTier.MASTER;
|
||||||
// Does this actually do anything?
|
|
||||||
if (!upgradeCount) {
|
|
||||||
upgradeCount = Math.min(upgradeCount, ModifierTier.MASTER - tier);
|
|
||||||
}
|
|
||||||
tier += upgradeCount;
|
tier += upgradeCount;
|
||||||
while (tier && (!modifierPool.hasOwnProperty(tier) || !modifierPool[tier].length)) {
|
while (tier && (!modifierPool.hasOwnProperty(tier) || !modifierPool[tier].length)) {
|
||||||
tier--;
|
tier--;
|
||||||
|
|
Loading…
Reference in New Issue