Update abAttr callsites in misc phases

This commit is contained in:
Sirz Benjie 2025-06-17 11:33:25 -05:00
parent 55e441b56b
commit 9e45323402
No known key found for this signature in database
GPG Key ID: 38AC42D68CF5E138
5 changed files with 10 additions and 10 deletions

View File

@ -4690,7 +4690,7 @@ export class CudChewConsumeBerryAbAttr extends PostTurnAbAttr {
} }
// uncomment to make cheek pouch work with cud chew // uncomment to make cheek pouch work with cud chew
// applyAbAttrs("HealFromBerryUseAbAttr", pokemon, new BooleanHolder(false)); // applyAbAttrs("HealFromBerryUseAbAttr", {pokemon});
} }
} }

View File

@ -1,5 +1,5 @@
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { applyPostBattleAbAttrs } from "#app/data/abilities/apply-ab-attrs"; import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs";
import { LapsingPersistentModifier, LapsingPokemonHeldItemModifier } from "#app/modifier/modifier"; import { LapsingPersistentModifier, LapsingPokemonHeldItemModifier } from "#app/modifier/modifier";
import { BattlePhase } from "./battle-phase"; import { BattlePhase } from "./battle-phase";
@ -65,7 +65,7 @@ export class BattleEndPhase extends BattlePhase {
} }
for (const pokemon of globalScene.getPokemonAllowedInBattle()) { for (const pokemon of globalScene.getPokemonAllowedInBattle()) {
applyPostBattleAbAttrs("PostBattleAbAttr", pokemon, false, this.isVictory); applyAbAttrs("PostBattleAbAttr", { pokemon, victory: this.isVictory });
} }
if (globalScene.currentBattle.moneyScattered) { if (globalScene.currentBattle.moneyScattered) {

View File

@ -10,7 +10,7 @@ import { getPokemonNameWithAffix } from "#app/messages";
import i18next from "i18next"; import i18next from "i18next";
import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase"; import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase";
import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; import { MysteryEncounterMode } from "#enums/mystery-encounter-mode";
import { applyPreSummonAbAttrs } from "#app/data/abilities/apply-ab-attrs"; import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
export class SummonPhase extends PartyMemberPokemonPhase { export class SummonPhase extends PartyMemberPokemonPhase {
@ -27,7 +27,7 @@ export class SummonPhase extends PartyMemberPokemonPhase {
start() { start() {
super.start(); super.start();
applyPreSummonAbAttrs("PreSummonAbAttr", this.getPokemon()); applyAbAttrs("PreSummonAbAttr", { pokemon: this.getPokemon() });
this.preSummon(); this.preSummon();
} }

View File

@ -1,5 +1,5 @@
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { applyPreSummonAbAttrs, applyPreSwitchOutAbAttrs } from "#app/data/abilities/apply-ab-attrs"; import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs";
import { allMoves } from "#app/data/data-lists"; import { allMoves } from "#app/data/data-lists";
import { getPokeballTintColor } from "#app/data/pokeball"; import { getPokeballTintColor } from "#app/data/pokeball";
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms/form-change-triggers"; import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms/form-change-triggers";
@ -124,8 +124,8 @@ export class SwitchSummonPhase extends SummonPhase {
switchedInPokemon.resetSummonData(); switchedInPokemon.resetSummonData();
switchedInPokemon.loadAssets(true); switchedInPokemon.loadAssets(true);
applyPreSummonAbAttrs("PreSummonAbAttr", switchedInPokemon); applyAbAttrs("PreSummonAbAttr", { pokemon: switchedInPokemon });
applyPreSwitchOutAbAttrs("PreSwitchOutAbAttr", this.lastPokemon); applyAbAttrs("PreSwitchOutAbAttr", { pokemon: this.lastPokemon });
if (!switchedInPokemon) { if (!switchedInPokemon) {
this.end(); this.end();
return; return;

View File

@ -1,4 +1,4 @@
import { applyPostTurnAbAttrs } from "#app/data/abilities/apply-ab-attrs"; import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import { TerrainType } from "#app/data/terrain"; import { TerrainType } from "#app/data/terrain";
import { WeatherType } from "#app/enums/weather-type"; import { WeatherType } from "#app/enums/weather-type";
@ -49,7 +49,7 @@ export class TurnEndPhase extends FieldPhase {
globalScene.applyModifier(EnemyStatusEffectHealChanceModifier, false, pokemon); globalScene.applyModifier(EnemyStatusEffectHealChanceModifier, false, pokemon);
} }
applyPostTurnAbAttrs("PostTurnAbAttr", pokemon); applyAbAttrs("PostTurnAbAttr", { pokemon });
} }
globalScene.applyModifiers(TurnStatusEffectModifier, pokemon.isPlayer(), pokemon); globalScene.applyModifiers(TurnStatusEffectModifier, pokemon.isPlayer(), pokemon);