Fix crash when EXP charm stack is full

This commit is contained in:
Flashfyre committed 2023-12-04 20:35:33 -05:00
1 parent 88bee27694
commit ec2ff480ec
1 file changed
+1 -1
+1 -1
View File
@@ -1058,7 +1058,7 @@ function getNewModifierTypeOption(party: Pokemon[], poolType: ModifierPoolType,
}
export function getDefaultModifierTypeForTier(tier: ModifierTier): ModifierType {
let modifierType: ModifierType | WeightedModifierType = modifierPool[tier][tier !== ModifierTier.LUXURY ? 0 : 2];
let modifierType: ModifierType | WeightedModifierType = modifierPool[tier || ModifierTier.COMMON][tier !== ModifierTier.LUXURY ? 0 : 2];
if (modifierType instanceof WeightedModifierType)
modifierType = (modifierType as WeightedModifierType).modifierType;
return modifierType;