[P2] Pollen Puff ally behavior fixed (#4615)

* pollen puff fix

* bcvbvcbfd

* integerholder to numberholder

* moved it back

---------

Co-authored-by: frutescens <info@laptop>
This commit is contained in:
Mumble 2024-10-10 08:38:17 -07:00 committed by GitHub
parent e9906ea229
commit 51894d46c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -4107,11 +4107,11 @@ export class StatusCategoryOnAllyAttr extends VariableMoveCategoryAttr {
* @param user {@linkcode Pokemon} using the move * @param user {@linkcode Pokemon} using the move
* @param target {@linkcode Pokemon} target of the move * @param target {@linkcode Pokemon} target of the move
* @param move {@linkcode Move} with this attribute * @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 * @returns true if the function succeeds
*/ */
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { 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) { if (user.getAlly() === target) {
category.value = MoveCategory.STATUS; category.value = MoveCategory.STATUS;

View File

@ -2684,7 +2684,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
*/ */
apply(source: Pokemon, move: Move): HitResult { apply(source: Pokemon, move: Move): HitResult {
const defendingSide = this.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY; 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 cancelled = new Utils.BooleanHolder(false);
const typeMultiplier = this.getMoveEffectiveness(source, move, false, false, cancelled); const typeMultiplier = this.getMoveEffectiveness(source, move, false, false, cancelled);