mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 08:46:55 +00:00
parent
3855b92237
commit
4b36d38acb
@ -1875,8 +1875,9 @@ export class ModifierTypeOption {
|
||||
}
|
||||
|
||||
export function getPartyLuckValue(party: Pokemon[]): integer {
|
||||
return Phaser.Math.Clamp(party.map(p => p.isFainted() ? 0 : p.getLuck())
|
||||
const luck = Phaser.Math.Clamp(party.map(p => p.isFainted() ? 0 : p.getLuck())
|
||||
.reduce((total: integer, value: integer) => total += value, 0), 0, 14);
|
||||
return luck || 0;
|
||||
}
|
||||
|
||||
export function getLuckString(luckValue: integer): string {
|
||||
|
Loading…
Reference in New Issue
Block a user