added more switchoutstatus checks

This commit is contained in:
muscode13 2024-11-23 14:26:00 -06:00
parent d94ae9f63c
commit cea82e6e5e
2 changed files with 15 additions and 13 deletions

View File

@ -23,6 +23,7 @@ export class TurnEndPhase extends FieldPhase {
this.scene.eventTarget.dispatchEvent(new TurnEndEvent(this.scene.currentBattle.turn));
const handlePokemon = (pokemon: Pokemon) => {
if (!pokemon.switchOutStatus) {
pokemon.lapseTags(BattlerTagLapseType.TURN_END);
this.scene.applyModifiers(TurnHealModifier, pokemon.isPlayer(), pokemon);
@ -38,6 +39,7 @@ export class TurnEndPhase extends FieldPhase {
}
applyPostTurnAbAttrs(PostTurnAbAttr, pokemon);
}
this.scene.applyModifiers(TurnStatusEffectModifier, pokemon.isPlayer(), pokemon);

View File

@ -51,7 +51,7 @@ export class WeatherEffectPhase extends CommonAnimPhase {
};
this.executeForAll((pokemon: Pokemon) => {
const immune = !pokemon || !!pokemon.getTypes(true, true).filter(t => this.weather?.isTypeDamageImmune(t)).length;
const immune = !pokemon || !!pokemon.getTypes(true, true).filter(t => this.weather?.isTypeDamageImmune(t)).length || pokemon.switchOutStatus;
if (!immune) {
inflictDamage(pokemon);
}