review suggestions

This commit is contained in:
DustinLin 2024-09-10 16:43:55 -07:00
parent 4311cf648d
commit 90e1ac1134
3 changed files with 6 additions and 6 deletions

View File

@ -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 {

View File

@ -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);

View File

@ -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);
}