diff --git a/src/data/move.ts b/src/data/move.ts index 1a66f30e7f8..b684eee2305 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -842,14 +842,27 @@ export class SacrificialFullRestoreAttr extends SacrificialAttr { } } +/** + * Attribute used for moves which ignore type-based debuffs from weather, namely Hydro Steam. + * Called during damage calculation after getting said debuff from getAttackTypeMultiplier in the Pokemon class. + */ export class IgnoreWeatherTypeDebuffAttr extends MoveAttr { public weather: WeatherType; constructor(weather: WeatherType){ super(); this.weather = weather; } + /** + * Changes the type-based weather modifier if this move's power would be reduced by it + * @param user Pokemon that used the move + * @param target N/A + * @param move Move with this attribute + * @param args Utils.NumberHolder for arenaAttackTypeMultiplier + * @returns true if the function succeeds + */ apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const weatherModifier=args[0] as Utils.NumberHolder; + //If the type-based attack power modifier due to weather (e.g. Water moves in Sun) is below 1, set it to 1 if (user.scene.arena.weather?.weatherType === this.weather) weatherModifier.value = Math.max(weatherModifier.value, 1); return true;