Make attribute names more generic

This commit is contained in:
Madmadness65 2025-02-17 03:36:40 -06:00
parent 3cb3149ee4
commit d6119093de
2 changed files with 9 additions and 9 deletions

View File

@ -266,9 +266,9 @@ export class PostTeraFormChangeStatChangeAbAttr extends AbAttr {
}
/**
* Removes a specified weather when a Pokemon is form changed via terastallization.
* Clears a specified weather whenever this attribute is called.
*/
export class PostTeraFormChangeRemoveWeatherAbAttr extends AbAttr {
export class ClearWeatherAbAttr extends AbAttr {
private weather: WeatherType[];
/**
@ -289,9 +289,9 @@ export class PostTeraFormChangeRemoveWeatherAbAttr extends AbAttr {
}
/**
* Removes a specified terrain when a Pokemon is form changed via terastallization.
* Clears a specified terrain whenever this attribute is called.
*/
export class PostTeraFormChangeRemoveTerrainAbAttr extends AbAttr {
export class ClearTerrainAbAttr extends AbAttr {
private terrain: TerrainType[];
/**
@ -6419,8 +6419,8 @@ export function initAbilities() {
.attr(UnswappableAbilityAbAttr)
.ignorable(),
new Ability(Abilities.TERAFORM_ZERO, 9)
.attr(PostTeraFormChangeRemoveWeatherAbAttr, [ WeatherType.SUNNY, WeatherType.RAIN, WeatherType.SANDSTORM, WeatherType.HAIL, WeatherType.SNOW, WeatherType.FOG, WeatherType.HEAVY_RAIN, WeatherType.HARSH_SUN, WeatherType.STRONG_WINDS ])
.attr(PostTeraFormChangeRemoveTerrainAbAttr, [ TerrainType.MISTY, TerrainType.ELECTRIC, TerrainType.GRASSY, TerrainType.PSYCHIC ])
.attr(ClearWeatherAbAttr, [ WeatherType.SUNNY, WeatherType.RAIN, WeatherType.SANDSTORM, WeatherType.HAIL, WeatherType.SNOW, WeatherType.FOG, WeatherType.HEAVY_RAIN, WeatherType.HARSH_SUN, WeatherType.STRONG_WINDS ])
.attr(ClearTerrainAbAttr, [ TerrainType.MISTY, TerrainType.ELECTRIC, TerrainType.GRASSY, TerrainType.PSYCHIC ])
.attr(UncopiableAbilityAbAttr)
.attr(UnswappableAbilityAbAttr)
.condition(getOncePerBattleCondition(Abilities.TERAFORM_ZERO)),

View File

@ -11,7 +11,7 @@ import { getPokemonNameWithAffix } from "#app/messages";
import { BattlePhase } from "./battle-phase";
import { MovePhase } from "./move-phase";
import { PokemonHealPhase } from "./pokemon-heal-phase";
import { applyAbAttrs, PostTeraFormChangeRemoveTerrainAbAttr, PostTeraFormChangeRemoveWeatherAbAttr, PostTeraFormChangeStatChangeAbAttr } from "#app/data/ability";
import { applyAbAttrs, ClearTerrainAbAttr, ClearWeatherAbAttr, PostTeraFormChangeStatChangeAbAttr } from "#app/data/ability";
export class QuietFormChangePhase extends BattlePhase {
protected pokemon: Pokemon;
@ -148,8 +148,8 @@ export class QuietFormChangePhase extends BattlePhase {
}
if (this.formChange.trigger instanceof SpeciesFormChangeTeraTrigger) {
applyAbAttrs(PostTeraFormChangeStatChangeAbAttr, this.pokemon, null);
applyAbAttrs(PostTeraFormChangeRemoveWeatherAbAttr, this.pokemon, null);
applyAbAttrs(PostTeraFormChangeRemoveTerrainAbAttr, this.pokemon, null);
applyAbAttrs(ClearWeatherAbAttr, this.pokemon, null);
applyAbAttrs(ClearTerrainAbAttr, this.pokemon, null);
}
super.end();