diff --git a/src/data/move.ts b/src/data/move.ts index d32ff9422ad..59d90001ce1 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1441,6 +1441,16 @@ export class GrowthStatChangeAttr extends StatChangeAttr { } } + +export class IgnoreWeatherDebuffAttr extends MoveEffectAttr { + public weather: WeatherType; + constructor(weather: WeatherType) { + super(); + this.weather=weather; + } + +} + export class HalfHpStatMaxAttr extends StatChangeAttr { constructor(stat: BattleStat) { super(stat, 12, true, null, false); @@ -5996,6 +6006,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, Type.WATER, MoveCategory.SPECIAL, 80, 100, 15, -1, 0, 9) + .attr(IgnoreWeatherDebuffAttr, WeatherType.SUNNY) .partial(), new AttackMove(Moves.RUINATION, Type.DARK, MoveCategory.SPECIAL, 1, 90, 10, -1, 0, 9) .attr(TargetHalfHpDamageAttr), diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 79dc24f624f..0885f28f079 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2,7 +2,7 @@ import Phaser from 'phaser'; import BattleScene, { ABILITY_OVERRIDE, AnySound, MOVE_OVERRIDE, OPP_ABILITY_OVERRIDE, OPP_MOVE_OVERRIDE } from '../battle-scene'; import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from '../ui/battle-info'; import { Moves } from "../data/enums/moves"; -import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusMoveTypeImmunityAttr, MoveTarget, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatChangesAttr, SacrificialAttr, VariableMoveTypeAttr, VariableMoveCategoryAttr } from "../data/move"; +import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusMoveTypeImmunityAttr, MoveTarget, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatChangesAttr, SacrificialAttr, VariableMoveTypeAttr, VariableMoveCategoryAttr, IgnoreWeatherDebuffAttr } from "../data/move"; import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm, starterPassiveAbilities } from '../data/pokemon-species'; import * as Utils from '../utils'; import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from '../data/type'; @@ -1185,7 +1185,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { else { if (source.findTag(t => t instanceof TypeBoostTag && (t as TypeBoostTag).boostedType === type)) power.value *= 1.5; - const arenaAttackTypeMultiplier = (move.id == Moves.HYDRO_STEAM && this.scene.arena.weather.weatherType==WeatherType.SUNNY)? + const arenaAttackTypeMultiplier = (this.scene.arena.weather && move.getAttrs(IgnoreWeatherDebuffAttr)?.find(attr => (attr as IgnoreWeatherDebuffAttr).weather === this.scene.arena.weather.weatherType))? 1 : this.scene.arena.getAttackTypeMultiplier(type, source.isGrounded()); if (this.scene.arena.getTerrainType() === TerrainType.GRASSY && this.isGrounded() && type === Type.GROUND && move.moveTarget === MoveTarget.ALL_NEAR_OTHERS) power.value /= 2;