Fix beak blast first portion being affected by status conditions and second portion not being affected

This commit is contained in:
jatinkohli 2024-05-18 02:01:48 -07:00
parent 22fb506e1b
commit af36c087fa
2 changed files with 10 additions and 1 deletions

View File

@ -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);

View File

@ -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);