Apply suggestions from code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
innerthunder 2024-10-22 09:14:35 -07:00 committed by GitHub
parent ca8a3019c9
commit acc33e88d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 6 deletions

View File

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

View File

@ -32,7 +32,6 @@ describe("Arena - Gravity", () => {
.enemyAbility(Abilities.BALL_FETCH)
.enemySpecies(Species.SHUCKLE)
.enemyMoveset(Moves.SPLASH)
.startingLevel(5)
.enemyLevel(5);
});