mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 09:19:31 +02:00
Update src/data/arena-tag.ts
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
This commit is contained in:
parent
8b8f20bf37
commit
c74b1ad190
@ -935,14 +935,14 @@ class ImprisonTag extends ArenaTrapTag {
|
|||||||
* This function applies the effects of Imprison to the opposing Pokemon already present on the field.
|
* This function applies the effects of Imprison to the opposing Pokemon already present on the field.
|
||||||
* @param arena
|
* @param arena
|
||||||
*/
|
*/
|
||||||
override onAdd(arena: Arena) {
|
override onAdd({ scene }: Arena) {
|
||||||
this.source = arena.scene.getPokemonById(this.sourceId!)!;
|
this.source = scene.getPokemonById(this.sourceId!)!;
|
||||||
if (this.source) {
|
if (this.source) {
|
||||||
const party = !this.source.isPlayer() ? arena.scene.getPlayerField() : arena.scene.getEnemyField();
|
const party = !this.source.isPlayer() ? scene.getPlayerField() : scene.getEnemyField();
|
||||||
party?.forEach((p: PlayerPokemon | EnemyPokemon ) => {
|
party?.forEach((p: PlayerPokemon | EnemyPokemon ) => {
|
||||||
p.addTag(BattlerTagType.IMPRISON, 1, Moves.IMPRISON, this.sourceId);
|
p.addTag(BattlerTagType.IMPRISON, 1, Moves.IMPRISON, this.sourceId);
|
||||||
});
|
});
|
||||||
arena.scene.queueMessage(i18next.t("battlerTags:imprisonOnAdd", {pokemonNameWithAffix: getPokemonNameWithAffix(this.source)}));
|
scene.queueMessage(i18next.t("battlerTags:imprisonOnAdd", {pokemonNameWithAffix: getPokemonNameWithAffix(this.source)}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user