mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 21:32:18 +02:00
Fix beak blast first portion being affected by status conditions and second portion not being affected
This commit is contained in:
parent
22fb506e1b
commit
af36c087fa
@ -1629,7 +1629,7 @@ export class ChargeAttr extends OverrideMoveEffectAttr {
|
|||||||
applyMoveAttrs(MoveEffectAttr, user, target, move);
|
applyMoveAttrs(MoveEffectAttr, user, target, move);
|
||||||
user.pushMoveHistory({ move: move.id, targets: [ target.getBattlerIndex() ], result: MoveResult.OTHER });
|
user.pushMoveHistory({ move: move.id, targets: [ target.getBattlerIndex() ], result: MoveResult.OTHER });
|
||||||
user.getMoveQueue().push({ move: move.id, targets: [ target.getBattlerIndex() ], ignorePP: true });
|
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.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);
|
user.addTag(BattlerTagType.CHARGING, 1, move.id, user.id);
|
||||||
resolve(true);
|
resolve(true);
|
||||||
|
@ -2370,6 +2370,14 @@ export class MovePhase extends BattlePhase {
|
|||||||
this.end();
|
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()) {
|
if (!this.followUp && this.pokemon.status && !this.pokemon.status.isPostTurn()) {
|
||||||
this.pokemon.status.incrementTurn();
|
this.pokemon.status.incrementTurn();
|
||||||
let activated = false;
|
let activated = false;
|
||||||
@ -2524,6 +2532,7 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
|
|
||||||
const hitResult = !isProtected ? target.apply(user, this.move) : HitResult.NO_EFFECT;
|
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))
|
target.findTags(t => t instanceof BeakBlastTag).find(t => target.lapseTag(t.tagType))
|
||||||
|
|
||||||
this.scene.triggerPokemonFormChange(user, SpeciesFormChangePostMoveTrigger);
|
this.scene.triggerPokemonFormChange(user, SpeciesFormChangePostMoveTrigger);
|
||||||
|
Loading…
Reference in New Issue
Block a user