From 3b17136b0367585093ee192a55d96ba94f61becf Mon Sep 17 00:00:00 2001 From: hayuna Date: Tue, 14 May 2024 15:30:39 +0200 Subject: [PATCH] Add Pressure consequences --- src/data/move.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index e1f792a36..37a7c10e7 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1915,8 +1915,15 @@ export class LessPPMorePowerAttr extends VariablePowerAttr { */ apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const ppMax = move.pp; - const ppUsed = user.moveset.find((m) => m.moveId === move.id).ppUsed; - const ppRemains = ppMax - ppUsed; + let ppUsed = user.moveset.find((m) => m.moveId === move.id).ppUsed; + + if(target.hasAbility(Abilities.PRESSURE)) { + ppUsed += 1; + } + + let ppRemains = ppMax - ppUsed; + if(ppRemains < 0) ppRemains = 0; + const power = args[0] as Utils.NumberHolder; switch (ppRemains) {