mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-23 07:49:36 +02:00
Update src/data/ability.ts
per DayKev's suggestion Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
09e6f43f0a
commit
9ef1e10b52
@ -2452,7 +2452,7 @@ export class PostSummonTransformAbAttr extends PostSummonAbAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pokemon.summonData.moveset = target.getMoveset().map(m => {
|
pokemon.summonData.moveset = target.getMoveset().map(m => {
|
||||||
const pp = m?.getMove().pp!;
|
const pp = m?.getMove().pp ?? 0;
|
||||||
// if PP value is less than 5, do nothing. If greater, we need to reduce the value to 5 using a negative ppUp value.
|
// if PP value is less than 5, do nothing. If greater, we need to reduce the value to 5 using a negative ppUp value.
|
||||||
const ppUp = pp <= 5 ? 0 : (5 - pp) / Math.max(Math.floor(pp / 5), 1);
|
const ppUp = pp <= 5 ? 0 : (5 - pp) / Math.max(Math.floor(pp / 5), 1);
|
||||||
return new PokemonMove(m?.moveId ?? Moves.NONE, 0, ppUp);
|
return new PokemonMove(m?.moveId ?? Moves.NONE, 0, ppUp);
|
||||||
|
Loading…
Reference in New Issue
Block a user