mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
Added new move attribute for ignoring weather debuffs
This commit is contained in:
parent
c3e0774a7d
commit
a1c4c531a3
@ -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),
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user