mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-01 22:12:16 +02:00
ingrain fixes
This commit is contained in:
parent
971d7c7894
commit
1de78ee550
@ -964,6 +964,11 @@ export class IngrainTag extends TrappedTag {
|
|||||||
super(BattlerTagType.INGRAIN, BattlerTagLapseType.TURN_END, 1, Moves.INGRAIN, sourceId);
|
super(BattlerTagType.INGRAIN, BattlerTagLapseType.TURN_END, 1, Moves.INGRAIN, sourceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override onAdd(pokemon: Pokemon) {
|
||||||
|
super.onAdd(pokemon);
|
||||||
|
pokemon.addTag(BattlerTagType.IGNORE_FLYING, undefined, Moves.INGRAIN, this.sourceId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the Ingrain tag can be added to the pokemon
|
* Check if the Ingrain tag can be added to the pokemon
|
||||||
* @param pokemon {@linkcode Pokemon} The pokemon to check if the tag can be added to
|
* @param pokemon {@linkcode Pokemon} The pokemon to check if the tag can be added to
|
||||||
@ -993,6 +998,11 @@ export class IngrainTag extends TrappedTag {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override onRemove(pokemon: Pokemon) {
|
||||||
|
super.onRemove(pokemon);
|
||||||
|
pokemon.removeTag(BattlerTagType.IGNORE_FLYING);
|
||||||
|
}
|
||||||
|
|
||||||
getTrapMessage(pokemon: Pokemon): string {
|
getTrapMessage(pokemon: Pokemon): string {
|
||||||
return i18next.t("battlerTags:ingrainOnTrap", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) });
|
return i18next.t("battlerTags:ingrainOnTrap", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) });
|
||||||
}
|
}
|
||||||
@ -2686,16 +2696,10 @@ export class TelekinesisTag extends BattlerTag {
|
|||||||
pokemon.addTag(BattlerTagType.FLOATING, 3, this.sourceMove);
|
pokemon.addTag(BattlerTagType.FLOATING, 3, this.sourceMove);
|
||||||
}
|
}
|
||||||
|
|
||||||
override lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
|
|
||||||
return --this.turnCount > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
override onRemove(pokemon: Pokemon) {
|
override onRemove(pokemon: Pokemon) {
|
||||||
pokemon.removeTag(BattlerTagType.TELEKINESIS);
|
pokemon.removeTag(BattlerTagType.TELEKINESIS);
|
||||||
pokemon.removeTag(BattlerTagType.FLOATING);
|
pokemon.removeTag(BattlerTagType.FLOATING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user