From af36c087fa2787c22d3ba42209f90be20adb260c Mon Sep 17 00:00:00 2001 From: jatinkohli Date: Sat, 18 May 2024 02:01:48 -0700 Subject: [PATCH] Fix beak blast first portion being affected by status conditions and second portion not being affected --- src/data/move.ts | 2 +- src/phases.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index 8211146a4c4..3cd90fe6ba5 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1629,7 +1629,7 @@ export class ChargeAttr extends OverrideMoveEffectAttr { applyMoveAttrs(MoveEffectAttr, user, target, move); user.pushMoveHistory({ move: move.id, targets: [ target.getBattlerIndex() ], result: MoveResult.OTHER }); user.getMoveQueue().push({ move: move.id, targets: [ target.getBattlerIndex() ], ignorePP: true }); - if (this.sameTurn) + if (this.sameTurn) // for beak blast atm user.scene.pushMovePhase(new MovePhase(user.scene, user, [ target.getBattlerIndex() ], user.moveset.find(m => m.moveId === move.id), true), this.followUpPriority); user.addTag(BattlerTagType.CHARGING, 1, move.id, user.id); resolve(true); diff --git a/src/phases.ts b/src/phases.ts index 55c92550dcd..77bd486139d 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2370,6 +2370,14 @@ export class MovePhase extends BattlePhase { this.end(); }; + // beak blast's first stage should not be affected by status conditions + // while the second stage should be affected by status conditions + // we can achieve this easily by flipping this.followUp, which is false + // during the first portion and true during the second portion + if (this.move.moveId == Moves.BEAK_BLAST) { + this.followUp = !this.followUp + } + if (!this.followUp && this.pokemon.status && !this.pokemon.status.isPostTurn()) { this.pokemon.status.incrementTurn(); let activated = false; @@ -2524,6 +2532,7 @@ export class MoveEffectPhase extends PokemonPhase { const hitResult = !isProtected ? target.apply(user, this.move) : HitResult.NO_EFFECT; + // handle beak blast burn on contact after hit target.findTags(t => t instanceof BeakBlastTag).find(t => target.lapseTag(t.tagType)) this.scene.triggerPokemonFormChange(user, SpeciesFormChangePostMoveTrigger);