From eae1b88f9fc27f132c4bfa5cf222f9b6050b992a Mon Sep 17 00:00:00 2001 From: EmoUsedHM01 <131687820+EmoUsedHM01@users.noreply.github.com> Date: Sun, 14 Apr 2024 20:56:31 +0100 Subject: [PATCH] Updated the with a function that accounts for Normalize --- src/data/move.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index 25ef4fdfd30..8a63e9bc5ba 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1946,6 +1946,23 @@ export class TeraBlastCategoryAttr extends VariableMoveCategoryAttr { } } +export class HydroSteamPowerAttr extends MovePowerMultiplierAttr { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + const currentWeather = user.scene.arena.weather?.weatherType; + const isSunny = currentWeather === WeatherType.SUNNY; + const power = args[0] as Utils.NumberHolder; + + if (isSunny) { + if (user.getAbility().id === Abilities.NORMALIZE) + power.value *= 1.5; // If user changes the move type, and it's sunny then function as 1.5 + else + power.value *= 3; // If it's sunny but the move type is still water, multiply it by 3 because Sunny halves Water move damage + } + + return true; + } +} + export class ShellSideArmCategoryAttr extends VariableMoveCategoryAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const category = (args[0] as Utils.IntegerHolder); @@ -5360,7 +5377,7 @@ export function initMoves() { .attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.ELECTRIC && user.isGrounded() ? 1.5 : 1) .slicingMove(), new AttackMove(Moves.HYDRO_STEAM, "Hydro Steam", Type.WATER, MoveCategory.SPECIAL, 80, 100, 15, "The user blasts the target with boiling-hot water. This move's power is not lowered in harsh sunlight but rather boosted by 50 percent.", -1, 0, 9) - .attr(MovePowerMultiplierAttr, (user, target, move) => [WeatherType.SUNNY].includes(user.scene.arena.weather?.weatherType) && !user.scene.arena.weather?.isEffectSuppressed(user.scene) ? 3 : 1), + .attr(HydroSteamPowerAttr), new AttackMove(Moves.RUINATION, "Ruination", Type.DARK, MoveCategory.SPECIAL, 1, 90, 10, "The user summons a ruinous disaster. This cuts the target's HP in half.", -1, 0, 9) .attr(TargetHalfHpDamageAttr), new AttackMove(Moves.COLLISION_COURSE, "Collision Course", Type.FIGHTING, MoveCategory.PHYSICAL, 100, 100, 5, "The user transforms and crashes to the ground, causing a massive prehistoric explosion. This move's power is boosted more than usual if it's a supereffective hit.", -1, 0, 9)