From 51894d46c265116ee391146a10bedb16eccbc056 Mon Sep 17 00:00:00 2001 From: Mumble <171087428+frutescens@users.noreply.github.com> Date: Thu, 10 Oct 2024 08:38:17 -0700 Subject: [PATCH] [P2] Pollen Puff ally behavior fixed (#4615) * pollen puff fix * bcvbvcbfd * integerholder to numberholder * moved it back --------- Co-authored-by: frutescens --- src/data/move.ts | 4 ++-- src/field/pokemon.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index 08c00829b48..4924341870d 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -4107,11 +4107,11 @@ export class StatusCategoryOnAllyAttr extends VariableMoveCategoryAttr { * @param user {@linkcode Pokemon} using the move * @param target {@linkcode Pokemon} target of the move * @param move {@linkcode Move} with this attribute - * @param args [0] {@linkcode Utils.IntegerHolder} The category of the move + * @param args [0] {@linkcode Utils.NumberHolder} The category of the move * @returns true if the function succeeds */ apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - const category = (args[0] as Utils.IntegerHolder); + const category = (args[0] as Utils.NumberHolder); if (user.getAlly() === target) { category.value = MoveCategory.STATUS; diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 35f389b58a4..4d85d5b8e1e 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2684,7 +2684,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { */ apply(source: Pokemon, move: Move): HitResult { const defendingSide = this.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY; - if (move.category === MoveCategory.STATUS) { + const moveCategory = new Utils.NumberHolder(move.category); + applyMoveAttrs(VariableMoveCategoryAttr, source, this, move, moveCategory); + if (moveCategory.value === MoveCategory.STATUS) { const cancelled = new Utils.BooleanHolder(false); const typeMultiplier = this.getMoveEffectiveness(source, move, false, false, cancelled);