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