mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
fix error: Lock Capsule not locking rarities consistently
This commit is contained in:
parent
1042b528ec
commit
af67f37a36
@ -3148,6 +3148,7 @@ let enemyIgnoredPoolIndexes = {};
|
||||
let enemyBuffModifierPoolThresholds = {};
|
||||
// biome-ignore lint/correctness/noUnusedVariables: TODO explain why this is marked as OK
|
||||
let enemyBuffIgnoredPoolIndexes = {};
|
||||
let lockModifierTiers: boolean | undefined = undefined;
|
||||
|
||||
export function getModifierPoolForType(poolType: ModifierPoolType): ModifierPool {
|
||||
let pool: ModifierPool;
|
||||
@ -3311,7 +3312,10 @@ export function getPlayerModifierTypeOptions(
|
||||
): ModifierTypeOption[] {
|
||||
const options: ModifierTypeOption[] = [];
|
||||
const retryCount = Math.min(count * 5, 50);
|
||||
// init lockModifierTiers
|
||||
lockModifierTiers = undefined;
|
||||
if (!customModifierSettings) {
|
||||
lockModifierTiers = !!modifierTiers && modifierTiers.length > 0;
|
||||
new Array(count).fill(0).map((_, i) => {
|
||||
options.push(
|
||||
getModifierTypeOptionWithRetry(
|
||||
@ -3640,7 +3644,7 @@ function getNewModifierTypeOption(
|
||||
}
|
||||
tier += upgradeCount;
|
||||
}
|
||||
} else if (retryCount === 10 && tier) {
|
||||
} else if (retryCount === 10 && tier && lockModifierTiers !== true) {
|
||||
retryCount = 0;
|
||||
tier--;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user