mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-29 04:59:56 +00:00
parent
86316bd6f8
commit
256dfbde6e
@ -2225,7 +2225,7 @@ export class ModifierTypeOption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getPartyLuckValue(party: Pokemon[]): integer {
|
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);
|
.reduce((total: integer, value: integer) => total += value, 0), 0, 14);
|
||||||
return luck || 0;
|
return luck || 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user