mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-23 07:49:36 +02:00
Apply suggestions from code review
This commit is contained in:
parent
5c933441f9
commit
6114bb216f
@ -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() ?? [];
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user