Update modifier-type.ts

This commit is contained in:
damocleas 2025-02-27 01:02:22 -05:00 committed by GitHub
parent d12aa635af
commit bdd84a4f9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2554,7 +2554,7 @@ export function getPartyLuckValue(party: Pokemon[]): number {
return DailyLuck.value; return DailyLuck.value;
} }
const eventSpecies = globalScene.eventManager.getEventLuckBoostedSpecies(); const eventSpecies = globalScene.eventManager.getEventLuckBoostedSpecies();
const luck = Phaser.Math.Clamp(party.map(p => p.isAllowedInBattle() ? p.getLuck() + (eventSpecies.includes(p.species.speciesId) ? 3 : 0) : 0) const luck = Phaser.Math.Clamp(party.map(p => p.isAllowedInBattle() ? p.getLuck() + (eventSpecies.includes(p.species.speciesId) ? 1 : 0) : 0)
.reduce((total: number, value: number) => total += value, 0), 0, 14); .reduce((total: number, value: number) => total += value, 0), 0, 14);
return Math.min(globalScene.eventManager.getEventLuckBoost() + (luck ?? 0), 14); return Math.min(globalScene.eventManager.getEventLuckBoost() + (luck ?? 0), 14);
} }