From 74c173c2ec8ac25bdd22635b81b2636bb93b106e Mon Sep 17 00:00:00 2001 From: ReneGV Date: Tue, 30 Apr 2024 00:36:27 -0600 Subject: [PATCH] Implement Terrain Pulse Similar to https://github.com/pagefaultgames/pokerogue/pull/73 implement type changing of the move depending on the current field terrain and increase base power from 50 to 100 if the is a terrain. --- src/data/move.ts | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index 30c97a1ac..0c32ade17 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2275,6 +2275,29 @@ export class WeatherBallTypeAttr extends VariableMoveTypeAttr { } } +export class TerrainPulseTypeAttr extends VariableMoveTypeAttr { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + const type = (args[0] as Utils.IntegerHolder); + switch (user.scene.arena.terrain.terrainType) { + case TerrainType.MISTY: + type.value = Type.FAIRY + break; + case TerrainType.ELECTRIC: + type.value = Type.ELECTRIC; + break; + case TerrainType.GRASSY: + type.value = Type.GRASS + break; + case TerrainType.PSYCHIC: + type.value = Type.PSYCHIC + break; + default: + return false; + } + return true; + } +} + export class HiddenPowerTypeAttr extends VariableMoveTypeAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const type = (args[0] as Utils.IntegerHolder); @@ -5905,8 +5928,9 @@ export function initMoves() { new AttackMove(Moves.RISING_VOLTAGE, Type.ELECTRIC, MoveCategory.SPECIAL, 70, 100, 20, -1, 0, 8) .attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.ELECTRIC && target.isGrounded() ? 2 : 1), new AttackMove(Moves.TERRAIN_PULSE, Type.NORMAL, MoveCategory.SPECIAL, 50, 100, 10, -1, 0, 8) - .pulseMove() - .partial(), + .attr(TerrainPulseTypeAttr) + .attr(MovePowerMultiplierAttr, (user, target, move) => (user.scene.arena.terrain.terrainType != TerrainType.NONE) ? 2 : 1) + .pulseMove(), new AttackMove(Moves.SKITTER_SMACK, Type.BUG, MoveCategory.PHYSICAL, 70, 90, 10, 100, 0, 8) .attr(StatChangeAttr, BattleStat.SPATK, -1), new AttackMove(Moves.BURNING_JEALOUSY, Type.FIRE, MoveCategory.SPECIAL, 70, 100, 5, 100, 0, 8)