Apply suggestions from code review

This commit is contained in:
NightKev 2024-10-11 14:26:45 -07:00 committed by GitHub
parent 5c933441f9
commit 6114bb216f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 8 deletions

View File

@ -77,16 +77,16 @@ export abstract class ArenaTag {
* @param scene medium to retrieve the source Pokemon
* @returns The source {@linkcode Pokemon} or `null` if none is found
*/
retrieveSource(scene: BattleScene): Pokemon | null {
public retrieveSource(scene: BattleScene): Pokemon | null {
return this.sourceId ? scene.getPokemonById(this.sourceId) : null;
}
/**
* Helper function that retrieves the Pokemon affected
* @param {BattleScene} scene medium to retrieve the involved Pokemon
* @param scene - medium to retrieve the involved Pokemon
* @returns list of PlayerPokemon or EnemyPokemon on the field
*/
retrieveField(scene: BattleScene): Pokemon[] {
public retrieveField(scene: BattleScene): Pokemon[] {
switch (this.side) {
case ArenaTagSide.PLAYER:
return scene.getPlayerField() ?? [];

View File

@ -97,7 +97,7 @@ export class BattlerTag {
* @param scene medium to retrieve the source Pokemon
* @returns The source {@linkcode Pokemon} or `null` if none is found
*/
retrieveSource(scene: BattleScene): Pokemon | null {
public retrieveSource(scene: BattleScene): Pokemon | null {
return this.sourceId ? scene.getPokemonById(this.sourceId) : null;
}
}
@ -146,9 +146,9 @@ export abstract class MoveRestrictionBattlerTag extends BattlerTag {
/**
* Gets whether this tag is restricting a move.
*
* @param {Moves} move {@linkcode Moves} ID to check restriction for.
* @param {Pokemon} user {@linkcode Pokemon} the Pokemon involved
* @returns {boolean} `true` if the move is restricted by this tag, otherwise `false`.
* @param move - {@linkcode Moves} ID to check restriction for.
* @param user - The {@linkcode Pokemon} involved
* @returns `true` if the move is restricted by this tag, otherwise `false`.
*/
public abstract isMoveRestricted(move: Moves, user?: Pokemon): boolean;