From 9ef1e10b52d0252f7e268f13fbf7e1d8a3ce8049 Mon Sep 17 00:00:00 2001 From: schmidtc1 <62030095+schmidtc1@users.noreply.github.com> Date: Tue, 15 Oct 2024 18:12:21 -0400 Subject: [PATCH] Update src/data/ability.ts per DayKev's suggestion Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/data/ability.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 5994622048c..3500b4924cb 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2452,7 +2452,7 @@ export class PostSummonTransformAbAttr extends PostSummonAbAttr { } 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. const ppUp = pp <= 5 ? 0 : (5 - pp) / Math.max(Math.floor(pp / 5), 1); return new PokemonMove(m?.moveId ?? Moves.NONE, 0, ppUp);