diff --git a/src/battle-scene.ts b/src/battle-scene.ts index d64d2e7e0d3..53592f00ab9 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -750,7 +750,7 @@ export default class BattleScene extends SceneBase { } /** - * Finds the first {@linkcode Pokemon.isActive()} pokemon from the player that isn't also currently switching out + * Finds the first {@linkcode Pokemon.isActive() | active PlayerPokemon} that isn't also currently switching out * @returns Either the first {@linkcode PlayerPokemon} satisfying, or undefined if no player pokemon on the field satisfy */ getNonSwitchedPlayerPokemon(): PlayerPokemon | undefined { @@ -775,7 +775,7 @@ export default class BattleScene extends SceneBase { } /** - * Finds the first {@linkcode Pokemon.isActive()} pokemon from the enemy that isn't also currently switching out + * Finds the first {@linkcode Pokemon.isActive() | active EnemyPokemon} pokemon from the enemy that isn't also currently switching out * @returns Either the first {@linkcode EnemyPokemon} satisfying, or undefined if no player pokemon on the field satisfy */ getNonSwitchedEnemyPokemon(): EnemyPokemon | undefined { diff --git a/src/data/battle-anims.ts b/src/data/battle-anims.ts index 2a51907853c..06e1a2bd326 100644 --- a/src/data/battle-anims.ts +++ b/src/data/battle-anims.ts @@ -887,7 +887,7 @@ export abstract class BattleAnim { const setSpritePriority = (priority: integer) => { switch (priority) { case 0: - scene.field.moveBelow(moveSprite as Phaser.GameObjects.GameObject, scene.getNonSwitchedEnemyPokemon() || scene.getNonSwitchedPlayerPokemon()!); // this bang is correct to ensure a GameObject is passed in as a second arg (as opposed to undefined) + scene.field.moveBelow(moveSprite as Phaser.GameObjects.GameObject, scene.getNonSwitchedEnemyPokemon() || scene.getNonSwitchedPlayerPokemon()!); // This bang assumes that if (the EnemyPokemon is undefined, then the PlayerPokemon function must return an object), correct assumption? break; case 1: scene.field.moveTo(moveSprite, scene.field.getAll().length - 1); diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 55acf47b413..511447b18af 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1977,7 +1977,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { * sets if the pokemon is switching out (if it's a enemy wild implies it's going to flee) * @param status - boolean */ - setSwitchOut(status: boolean): void { + setSwitchOutStatus(status: boolean): void { this.switchOutStatus = status; } @@ -3095,7 +3095,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.updateFusionPalette(); } this.summonData = new PokemonSummonData(); - this.setSwitchOut(false); + this.setSwitchOutStatus(false); if (!this.battleData) { this.resetBattleData(); } @@ -3477,7 +3477,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } this.setVisible(false); this.scene.field.remove(this); - this.setSwitchOut(true); + this.setSwitchOutStatus(true); this.scene.triggerPokemonFormChange(this, SpeciesFormChangeActiveTrigger, true); }