mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-23 15:59:26 +02:00
battler tags
This commit is contained in:
parent
47ebc2c1e0
commit
5c933441f9
@ -91,6 +91,15 @@ export class BattlerTag {
|
|||||||
this.sourceMove = source.sourceMove;
|
this.sourceMove = source.sourceMove;
|
||||||
this.sourceId = source.sourceId;
|
this.sourceId = source.sourceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function that retrieves the source Pokemon object
|
||||||
|
* @param scene medium to retrieve the source Pokemon
|
||||||
|
* @returns The source {@linkcode Pokemon} or `null` if none is found
|
||||||
|
*/
|
||||||
|
retrieveSource(scene: BattleScene): Pokemon | null {
|
||||||
|
return this.sourceId ? scene.getPokemonById(this.sourceId) : null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WeatherBattlerTag {
|
export interface WeatherBattlerTag {
|
||||||
@ -2649,15 +2658,6 @@ export class ImprisonTag extends MoveRestrictionBattlerTag {
|
|||||||
override interruptedText(pokemon: Pokemon, move: Moves): string {
|
override interruptedText(pokemon: Pokemon, move: Moves): string {
|
||||||
return i18next.t("battle:moveDisabledImprison", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name });
|
return i18next.t("battle:moveDisabledImprison", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper function that retrieves the source Pokemon object
|
|
||||||
* @param scene medium to retrieve the source Pokemon
|
|
||||||
* @returns The source {@linkcode Pokemon} or `null` if none is found
|
|
||||||
*/
|
|
||||||
private retrieveSource(scene: BattleScene): Pokemon | null {
|
|
||||||
return this.sourceId ? scene.getPokemonById(this.sourceId) : null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user