From 6066d2e47ec87505066fcc54e8fa7e4f95ea197b Mon Sep 17 00:00:00 2001 From: arColm Date: Tue, 23 Apr 2024 17:42:45 -0400 Subject: [PATCH] Implement Flying Press --- src/data/move.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index 48714d00c07..53244082bd3 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2301,6 +2301,14 @@ export class WaterSuperEffectTypeMultiplierAttr extends VariableMoveTypeMultipli } } +export class FlyingTypeMultiplierAttr extends VariableMoveTypeMultiplierAttr { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + const multiplier = args[0] as Utils.NumberHolder; + multiplier.value *= target.getAttackTypeEffectiveness(Type.FLYING); + return true; + } +} + export class OneHitKOAccuracyAttr extends VariableAccuracyAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const accuracy = args[0] as Utils.NumberHolder; @@ -5204,7 +5212,8 @@ export function initMoves() { .makesContact(false) .partial(), new AttackMove(Moves.FLYING_PRESS, Type.FIGHTING, MoveCategory.PHYSICAL, 100, 95, 10, -1, 0, 6) - .partial(), + .attr(FlyingTypeMultiplierAttr) + .condition(failOnGravityCondition), new StatusMove(Moves.MAT_BLOCK, Type.FIGHTING, -1, 10, -1, 0, 6) .unimplemented(), new AttackMove(Moves.BELCH, Type.POISON, MoveCategory.SPECIAL, 120, 90, 10, -1, 0, 6)