Fixed conditional (#3983)

Co-authored-by: frutescens <info@laptop>
This commit is contained in:
Mumble 2024-09-02 12:27:29 -07:00 committed by GitHub
parent 86316bd6f8
commit 256dfbde6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -2225,7 +2225,7 @@ export class ModifierTypeOption {
}
export function getPartyLuckValue(party: Pokemon[]): integer {
const luck = Phaser.Math.Clamp(party.map(p => p.isFainted() ? 0 : p.getLuck())
const luck = Phaser.Math.Clamp(party.map(p => p.isAllowedInBattle() ? p.getLuck() : 0)
.reduce((total: integer, value: integer) => total += value, 0), 0, 14);
return luck || 0;
}