implemented pollen puff

This commit is contained in:
Luc 2024-04-24 15:39:48 -04:00
parent 0ecc46ab97
commit eb1f237223

View File

@ -1947,6 +1947,20 @@ export class PresentPowerAttr extends VariablePowerAttr {
}
}
export class ConditionalHealAttr extends VariablePowerAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if((user.isPlayer() && target.isPlayer()) || (!user.isPlayer() && !target.isPlayer())){
(args[0] as Utils.NumberHolder).value = 0;
target.scene.unshiftPhase(new PokemonHealPhase(target.scene, target.getBattlerIndex(),
Math.max(Math.floor(target.getMaxHp() / 2), 1), getPokemonMessage(target, ' regained\nhealth!'), true));
return true;
}
return false;
}
}
export class VariableAtkAttr extends MoveAttr {
constructor() {
super();
@ -5437,8 +5451,8 @@ export function initMoves() {
new AttackMove(Moves.THROAT_CHOP, Type.DARK, MoveCategory.PHYSICAL, 80, 100, 15, 100, 0, 7)
.partial(),
new AttackMove(Moves.POLLEN_PUFF, Type.BUG, MoveCategory.SPECIAL, 90, 100, 15, -1, 0, 7)
.ballBombMove()
.partial(),
.attr(ConditionalHealAttr)
.ballBombMove(),
new AttackMove(Moves.ANCHOR_SHOT, Type.STEEL, MoveCategory.PHYSICAL, 80, 100, 20, -1, 0, 7)
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, false, 1),
new StatusMove(Moves.PSYCHIC_TERRAIN, Type.PSYCHIC, -1, 10, -1, 0, 7)