mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 22:32:32 +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
|
* @returns Either the first {@linkcode PlayerPokemon} satisfying, or undefined if no player pokemon on the field satisfy
|
||||||
*/
|
*/
|
||||||
getNonSwitchedPlayerPokemon(): PlayerPokemon | undefined {
|
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
|
* @returns Either the first {@linkcode EnemyPokemon} satisfying, or undefined if no player pokemon on the field satisfy
|
||||||
*/
|
*/
|
||||||
getNonSwitchedEnemyPokemon(): EnemyPokemon | undefined {
|
getNonSwitchedEnemyPokemon(): EnemyPokemon | undefined {
|
||||||
|
@ -887,7 +887,7 @@ export abstract class BattleAnim {
|
|||||||
const setSpritePriority = (priority: integer) => {
|
const setSpritePriority = (priority: integer) => {
|
||||||
switch (priority) {
|
switch (priority) {
|
||||||
case 0:
|
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;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
scene.field.moveTo(moveSprite, scene.field.getAll().length - 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)
|
* sets if the pokemon is switching out (if it's a enemy wild implies it's going to flee)
|
||||||
* @param status - boolean
|
* @param status - boolean
|
||||||
*/
|
*/
|
||||||
setSwitchOut(status: boolean): void {
|
setSwitchOutStatus(status: boolean): void {
|
||||||
this.switchOutStatus = status;
|
this.switchOutStatus = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3095,7 +3095,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
this.updateFusionPalette();
|
this.updateFusionPalette();
|
||||||
}
|
}
|
||||||
this.summonData = new PokemonSummonData();
|
this.summonData = new PokemonSummonData();
|
||||||
this.setSwitchOut(false);
|
this.setSwitchOutStatus(false);
|
||||||
if (!this.battleData) {
|
if (!this.battleData) {
|
||||||
this.resetBattleData();
|
this.resetBattleData();
|
||||||
}
|
}
|
||||||
@ -3477,7 +3477,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
this.setVisible(false);
|
this.setVisible(false);
|
||||||
this.scene.field.remove(this);
|
this.scene.field.remove(this);
|
||||||
this.setSwitchOut(true);
|
this.setSwitchOutStatus(true);
|
||||||
this.scene.triggerPokemonFormChange(this, SpeciesFormChangeActiveTrigger, true);
|
this.scene.triggerPokemonFormChange(this, SpeciesFormChangeActiveTrigger, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user