mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-01 05:52:17 +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);
|
||||
}
|
||||
|
||||
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
|
||||
* @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;
|
||||
}
|
||||
|
||||
override onRemove(pokemon: Pokemon) {
|
||||
super.onRemove(pokemon);
|
||||
pokemon.removeTag(BattlerTagType.IGNORE_FLYING);
|
||||
}
|
||||
|
||||
getTrapMessage(pokemon: Pokemon): string {
|
||||
return i18next.t("battlerTags:ingrainOnTrap", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) });
|
||||
}
|
||||
@ -2686,16 +2696,10 @@ export class TelekinesisTag extends BattlerTag {
|
||||
pokemon.addTag(BattlerTagType.FLOATING, 3, this.sourceMove);
|
||||
}
|
||||
|
||||
override lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
|
||||
return --this.turnCount > 0;
|
||||
}
|
||||
|
||||
override onRemove(pokemon: Pokemon) {
|
||||
pokemon.removeTag(BattlerTagType.TELEKINESIS);
|
||||
pokemon.removeTag(BattlerTagType.FLOATING);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user