Fixed bracketing and added parameter types

This commit is contained in:
frutescens 2024-09-02 16:45:45 -07:00
parent 12dda98fe3
commit 2fd4786346

View File

@ -52,7 +52,7 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
* > However, [Pokemon] alreadyknows four moves.
* > Should a move be forgotten and replaced with [MoveName]? --> Mode.CONFIRM -> Yes: Go to this.forgetMoveProcess(), No: Go to this.rejectMoveAndEnd()
*/
replaceMoveCheck(move, pokemon) {
replaceMoveCheck(move: Move, pokemon: Pokemon) {
const learnMovePrompt = i18next.t("battle:learnMovePrompt", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name });
const moveLimitReached = i18next.t("battle:learnMoveLimitReached", { pokemonName: getPokemonNameWithAffix(pokemon) });
const shouldReplaceQ = i18next.t("battle:learnMoveReplaceQuestion", { moveName: move.name });
@ -101,7 +101,9 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
this.end();
});
});
});
}
/**
* This teaches the Pokemon the new move and ends the phase.
* When a Pokemon forgets a move and learns a new one, its 'Learn Move' message is significantly longer.
@ -115,7 +117,7 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
* > And...
* > [Pokemon] learned [MoveName]!
*/
learnMove(index: number, move, pokemon, textMessage?: string) {
learnMove(index: number, move: Move, pokemon: Pokemon, textMessage?: string) {
if (this.fromTM) {
pokemon.usedTMs.push(this.moveId);
}