Implement Flying Press

pull/268/head
arColm 2024-04-23 17:42:45 -04:00 committed by Samuel H
parent 9024eeb990
commit 6066d2e47e
1 changed files with 10 additions and 1 deletions

View File

@ -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 { export class OneHitKOAccuracyAttr extends VariableAccuracyAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
const accuracy = args[0] as Utils.NumberHolder; const accuracy = args[0] as Utils.NumberHolder;
@ -5204,7 +5212,8 @@ export function initMoves() {
.makesContact(false) .makesContact(false)
.partial(), .partial(),
new AttackMove(Moves.FLYING_PRESS, Type.FIGHTING, MoveCategory.PHYSICAL, 100, 95, 10, -1, 0, 6) 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) new StatusMove(Moves.MAT_BLOCK, Type.FIGHTING, -1, 10, -1, 0, 6)
.unimplemented(), .unimplemented(),
new AttackMove(Moves.BELCH, Type.POISON, MoveCategory.SPECIAL, 120, 90, 10, -1, 0, 6) new AttackMove(Moves.BELCH, Type.POISON, MoveCategory.SPECIAL, 120, 90, 10, -1, 0, 6)