mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 22:39:31 +02:00
Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
ca8a3019c9
commit
acc33e88d0
@ -11,7 +11,7 @@ import { MoveEndPhase } from "#app/phases/move-end-phase";
|
||||
|
||||
/**
|
||||
* Phase for the "charging turn" of two-turn moves (e.g. Dig).
|
||||
* @extends PokemonPhase
|
||||
* @extends {@linkcode PokemonPhase}
|
||||
*/
|
||||
export class MoveChargePhase extends PokemonPhase {
|
||||
/** The move instance that this phase applies */
|
||||
@ -25,7 +25,7 @@ export class MoveChargePhase extends PokemonPhase {
|
||||
this.targetIndex = targetIndex;
|
||||
}
|
||||
|
||||
start() {
|
||||
public override start() {
|
||||
super.start();
|
||||
|
||||
const user = this.getUserPokemon();
|
||||
@ -50,7 +50,7 @@ export class MoveChargePhase extends PokemonPhase {
|
||||
}
|
||||
|
||||
/** Checks the move's instant charge conditions, then ends this phase. */
|
||||
end() {
|
||||
public override end() {
|
||||
const user = this.getUserPokemon();
|
||||
const move = this.move.getMove();
|
||||
|
||||
@ -74,11 +74,11 @@ export class MoveChargePhase extends PokemonPhase {
|
||||
super.end();
|
||||
}
|
||||
|
||||
protected getUserPokemon(): Pokemon {
|
||||
public getUserPokemon(): Pokemon {
|
||||
return (this.player ? this.scene.getPlayerField() : this.scene.getEnemyField())[this.fieldIndex];
|
||||
}
|
||||
|
||||
protected getTargetPokemon(): Pokemon | undefined {
|
||||
public getTargetPokemon(): Pokemon | undefined {
|
||||
return this.scene.getField(true).find((p) => this.targetIndex === p.getBattlerIndex());
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ describe("Arena - Gravity", () => {
|
||||
.enemyAbility(Abilities.BALL_FETCH)
|
||||
.enemySpecies(Species.SHUCKLE)
|
||||
.enemyMoveset(Moves.SPLASH)
|
||||
.startingLevel(5)
|
||||
.enemyLevel(5);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user