mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 21:32:18 +02:00
Remove beak blast tag after attack finishes to not burn late contact moves like dragon tail
This commit is contained in:
parent
af36c087fa
commit
78d7cd23b8
@ -553,6 +553,31 @@ export class MoveEffectAttr extends MoveAttr {
|
||||
}
|
||||
}
|
||||
|
||||
export class RemoveBeakBlastTagArr extends MoveEffectAttr {
|
||||
constructor() {
|
||||
super(true, MoveEffectTrigger.PRE_APPLY, false);
|
||||
}
|
||||
|
||||
canApply(user: Pokemon, target: Pokemon, move: Move, args: any[]) {
|
||||
// We want to remove the tag at the start of the second portion of beak blast
|
||||
// to not burn lower priority contact moves like dragon tail:
|
||||
// we want to return false if checking during the move effect phase of the first portion,
|
||||
// and return true if checking during the move effect phase of the second portion.
|
||||
// We can check the user's previous move to see if it was beak blast's (690) first portion or not
|
||||
|
||||
return (user.getLastXMoves(1)[0] && user.getLastXMoves(1)[0].move == Moves.BEAK_BLAST);
|
||||
}
|
||||
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]) {
|
||||
const canApply = this.canApply(user, target, move, args);
|
||||
|
||||
if (canApply)
|
||||
user.removeTag(BattlerTagType.BEAK_BLAST);
|
||||
|
||||
return canApply;
|
||||
}
|
||||
}
|
||||
|
||||
export class PreMoveMessageAttr extends MoveAttr {
|
||||
private message: string | ((user: Pokemon, target: Pokemon, move: Move) => string);
|
||||
|
||||
@ -6341,6 +6366,7 @@ export function initMoves() {
|
||||
.attr(ChargeAttr, ChargeAnim.BEAK_BLAST_CHARGING, "started\nheating up its beak!", BattlerTagType.BEAK_BLAST, true, true, -3)
|
||||
.ballBombMove()
|
||||
.makesContact(false)
|
||||
.attr(RemoveBeakBlastTagArr)
|
||||
.partial(),
|
||||
new AttackMove(Moves.CLANGING_SCALES, Type.DRAGON, MoveCategory.SPECIAL, 110, 100, 5, 100, 0, 7)
|
||||
.attr(StatChangeAttr, BattleStat.DEF, -1, true)
|
||||
|
Loading…
Reference in New Issue
Block a user