Fix crash when EXP charm stack is full

This commit is contained in:
Flashfyre 2023-12-04 20:35:33 -05:00
parent 88bee27694
commit ec2ff480ec
1 changed files with 1 additions and 1 deletions

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;