From 023964dbd8d6eba98b7711b00f34b28e6848c1a1 Mon Sep 17 00:00:00 2001 From: Bertie690 Date: Wed, 4 Jun 2025 08:33:55 -0400 Subject: [PATCH] Comment fix --- src/field/pokemon.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index c5a1ff4394f..9bf9b663ad6 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -4616,11 +4616,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { /** * Display an immunity message for a failed status application. * @param quiet - Whether to suppress message and return early - * @param reason - The reason for the terrain blockage - + * @param reason - The reason for the status application failure - * can be "overlap" (already has same status), "other" (generic fail message) * or a {@linkcode TerrainType} for terrain-based blockages. + * Defaults to "other". */ - private queueImmuneMessage(quiet: boolean, reason: "overlap" | "other" | TerrainType = "other"): void { + private queueStatusImmuneMessage(quiet: boolean, reason: "overlap" | "other" | TerrainType = "other"): void { if (quiet) { return; } @@ -4661,11 +4662,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { ): boolean { if (effect !== StatusEffect.FAINT) { if (overrideStatus ? this.status?.effect === effect : this.status) { - this.queueImmuneMessage(quiet, overrideStatus ? "overlap" : "other"); // having different status displays generic fail message + this.queueStatusImmuneMessage(quiet, overrideStatus ? "overlap" : "other"); // having different status displays generic fail message return false; } if (this.isGrounded() && !ignoreField && globalScene.arena.terrain?.terrainType === TerrainType.MISTY) { - this.queueImmuneMessage(quiet, TerrainType.MISTY); + this.queueStatusImmuneMessage(quiet, TerrainType.MISTY); return false; } } @@ -4696,7 +4697,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (this.isOfType(PokemonType.POISON) || this.isOfType(PokemonType.STEEL)) { if (poisonImmunity.includes(true)) { - this.queueImmuneMessage(quiet); + this.queueStatusImmuneMessage(quiet); return false; } } @@ -4704,13 +4705,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } case StatusEffect.PARALYSIS: if (this.isOfType(PokemonType.ELECTRIC)) { - this.queueImmuneMessage(quiet); + this.queueStatusImmuneMessage(quiet); return false; } break; case StatusEffect.SLEEP: if (this.isGrounded() && globalScene.arena.terrain?.terrainType === TerrainType.ELECTRIC) { - this.queueImmuneMessage(quiet, TerrainType.ELECTRIC); + this.queueStatusImmuneMessage(quiet, TerrainType.ELECTRIC); return false; } break; @@ -4721,13 +4722,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { globalScene?.arena?.weather?.weatherType && [WeatherType.SUNNY, WeatherType.HARSH_SUN].includes(globalScene.arena.weather.weatherType)) ) { - this.queueImmuneMessage(quiet); + this.queueStatusImmuneMessage(quiet); return false; } break; case StatusEffect.BURN: if (this.isOfType(PokemonType.FIRE)) { - this.queueImmuneMessage(quiet); + this.queueStatusImmuneMessage(quiet); return false; } break;