mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 14:22:19 +02:00
review suggestions
This commit is contained in:
parent
4311cf648d
commit
90e1ac1134
@ -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 {
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user