mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +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 = {};
|
let enemyBuffModifierPoolThresholds = {};
|
||||||
// biome-ignore lint/correctness/noUnusedVariables: TODO explain why this is marked as OK
|
// biome-ignore lint/correctness/noUnusedVariables: TODO explain why this is marked as OK
|
||||||
let enemyBuffIgnoredPoolIndexes = {};
|
let enemyBuffIgnoredPoolIndexes = {};
|
||||||
|
let lockModifierTiers: boolean | undefined = undefined;
|
||||||
|
|
||||||
export function getModifierPoolForType(poolType: ModifierPoolType): ModifierPool {
|
export function getModifierPoolForType(poolType: ModifierPoolType): ModifierPool {
|
||||||
let pool: ModifierPool;
|
let pool: ModifierPool;
|
||||||
@ -3311,7 +3312,10 @@ export function getPlayerModifierTypeOptions(
|
|||||||
): ModifierTypeOption[] {
|
): ModifierTypeOption[] {
|
||||||
const options: ModifierTypeOption[] = [];
|
const options: ModifierTypeOption[] = [];
|
||||||
const retryCount = Math.min(count * 5, 50);
|
const retryCount = Math.min(count * 5, 50);
|
||||||
|
// init lockModifierTiers
|
||||||
|
lockModifierTiers = undefined;
|
||||||
if (!customModifierSettings) {
|
if (!customModifierSettings) {
|
||||||
|
lockModifierTiers = !!modifierTiers && modifierTiers.length > 0;
|
||||||
new Array(count).fill(0).map((_, i) => {
|
new Array(count).fill(0).map((_, i) => {
|
||||||
options.push(
|
options.push(
|
||||||
getModifierTypeOptionWithRetry(
|
getModifierTypeOptionWithRetry(
|
||||||
@ -3640,7 +3644,7 @@ function getNewModifierTypeOption(
|
|||||||
}
|
}
|
||||||
tier += upgradeCount;
|
tier += upgradeCount;
|
||||||
}
|
}
|
||||||
} else if (retryCount === 10 && tier) {
|
} else if (retryCount === 10 && tier && lockModifierTiers !== true) {
|
||||||
retryCount = 0;
|
retryCount = 0;
|
||||||
tier--;
|
tier--;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user