some checks

This commit is contained in:
frutescens 2024-10-23 19:12:01 -07:00 committed by NightKev
parent 2d9105656f
commit 8c5ee7d2d0

View File

@ -4733,6 +4733,10 @@ export class TerrainEventTypeChangeAbAttr extends PostSummonAbAttr {
return typeChange; return typeChange;
} }
/**
* Checks if the Pokemon should change types if summoned into an active terrain
* @returns `true` if there is an active terrain requiring a type change | `false` if not
*/
override applyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise<boolean> { override applyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean | Promise<boolean> {
if (pokemon.scene.arena.getTerrainType() !== TerrainType.NONE) { if (pokemon.scene.arena.getTerrainType() !== TerrainType.NONE) {
return this.apply(pokemon, passive, simulated, new Utils.BooleanHolder(false), []); return this.apply(pokemon, passive, simulated, new Utils.BooleanHolder(false), []);