Adds a boolean check for the Pollen Puff edge case in canBeMultiStrikeEnhanced

This commit is contained in:
Christopher Schmidt 2025-03-29 10:02:49 -04:00
parent b56c317bf2
commit dcff60b54c

View File

@ -905,7 +905,7 @@ export default class Move implements Localizable {
SacrificialAttrOnHit SacrificialAttrOnHit
]; ];
// ...and cannot enhance these specific moves. // ...and cannot enhance these specific moves
const exceptMoves: Moves[] = [ const exceptMoves: Moves[] = [
Moves.FLING, Moves.FLING,
Moves.UPROAR, Moves.UPROAR,
@ -914,10 +914,14 @@ export default class Move implements Localizable {
Moves.ENDEAVOR Moves.ENDEAVOR
]; ];
// ...and cannot enhance Pollen Puff when targeting an ally.
const exceptPollenPuffAlly: boolean = this.id === Moves.POLLEN_PUFF && targets.includes(user.getAlly().getBattlerIndex())
return (!restrictSpread || !isMultiTarget) return (!restrictSpread || !isMultiTarget)
&& !this.isChargingMove() && !this.isChargingMove()
&& !exceptAttrs.some(attr => this.hasAttr(attr)) && !exceptAttrs.some(attr => this.hasAttr(attr))
&& !exceptMoves.some(id => this.id === id) && !exceptMoves.some(id => this.id === id)
&& !exceptPollenPuffAlly
&& this.category !== MoveCategory.STATUS; && this.category !== MoveCategory.STATUS;
} }
} }