diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 18dc580ef..ef3b4e8c6 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -25,7 +25,7 @@ import { Gender } from "./data/gender"; import { Weather, WeatherType, getRandomWeatherType, getWeatherDamageMessage, getWeatherLapseMessage } from "./data/weather"; import { TempBattleStat } from "./data/temp-battle-stat"; import { ArenaTrapTag, TrickRoomTag } from "./data/arena-tag"; -import { ArenaTrapAbAttr, PostTurnAbAttr, PostWeatherLapseAbAttr, PreWeatherDamageAbAttr, ProtectStatAttr, SuppressWeatherEffectAbAttr, applyPostTurnAbAttrs, applyPostWeatherLapseAbAttrs, applyPreStatChangeAbAttrs, applyPreWeatherEffectAbAttrs } from "./data/ability"; +import { ArenaTrapAbAttr, PostSummonAbAttr, PostTurnAbAttr, PostWeatherLapseAbAttr, PreWeatherDamageAbAttr, ProtectStatAttr, SuppressWeatherEffectAbAttr, applyPostSummonAbAttrs, applyPostTurnAbAttrs, applyPostWeatherLapseAbAttrs, applyPreStatChangeAbAttrs, applyPreWeatherEffectAbAttrs } from "./data/ability"; import { Unlockables, getUnlockableName } from "./system/unlockables"; export class CheckLoadPhase extends BattlePhase { @@ -183,6 +183,8 @@ export class EncounterPhase extends BattlePhase { this.scene.unshiftPhase(new ShinySparklePhase(this.scene, false)); this.scene.arena.applyTags(ArenaTrapTag, this.scene.getEnemyPokemon()); + + applyPostSummonAbAttrs(PostSummonAbAttr, this.scene.getEnemyPokemon()); // TODO: Remove //this.scene.unshiftPhase(new SelectModifierPhase(this.scene)); @@ -402,7 +404,6 @@ export class SummonPhase extends BattlePhase { playerPokemon.getSprite().clearTint(); playerPokemon.resetSummonData(); this.scene.time.delayedCall(1000, () => this.end()); - this.scene.arena.applyTags(ArenaTrapTag, playerPokemon); } }); } @@ -415,6 +416,10 @@ export class SummonPhase extends BattlePhase { if (this.scene.getPlayerPokemon().shiny) this.scene.unshiftPhase(new ShinySparklePhase(this.scene, true)); + this.scene.arena.applyTags(ArenaTrapTag, this.scene.getPlayerPokemon()); + + applyPostSummonAbAttrs(PostSummonAbAttr, this.scene.getPlayerPokemon()); + super.end(); } } diff --git a/src/pokemon.ts b/src/pokemon.ts index a8b82e2bc..595c6e30d 100644 --- a/src/pokemon.ts +++ b/src/pokemon.ts @@ -23,7 +23,7 @@ import { WeatherType } from './data/weather'; import { TempBattleStat } from './data/temp-battle-stat'; import { WeakenMoveTypeTag } from './data/arena-tag'; import { Biome } from './data/biome'; -import { Ability, BattleStatMultiplierAbAttr, BlockCritAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, abilities, applyBattleStatMultiplierAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs } from './data/ability'; +import { Abilities, Ability, BattleStatMultiplierAbAttr, BlockCritAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, abilities, applyBattleStatMultiplierAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs } from './data/ability'; import PokemonData from './system/pokemon-data'; export default abstract class Pokemon extends Phaser.GameObjects.Container {