mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-27 18:52:19 +02:00
Disabling Moves
This commit is contained in:
parent
43e1b3db85
commit
daa24b1dbf
@ -2181,9 +2181,9 @@ export class ExposedTag extends BattlerTag {
|
||||
/**
|
||||
* Describes the behavior of a Heal Block Tag.
|
||||
*/
|
||||
export class HealBlockTag extends BattlerTag {
|
||||
export class HealBlockTag extends MoveRestrictionBattlerTag {
|
||||
constructor() {
|
||||
super(BattlerTagType.HEAL_BLOCK, BattlerTagLapseType.TURN_END, 5, Moves.HEAL_BLOCK);
|
||||
super(BattlerTagType.HEAL_BLOCK, 5, Moves.HEAL_BLOCK);
|
||||
}
|
||||
|
||||
override onAdd(pokemon: Pokemon): void {
|
||||
@ -2198,6 +2198,28 @@ export class HealBlockTag extends BattlerTag {
|
||||
return i18next.t("battle:battlerTagsHealBlock", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) });
|
||||
}
|
||||
|
||||
override isMoveRestricted(move: Moves): boolean {
|
||||
if (move.hasFlag(MoveFlags.TRIAGE_MOVE) && move.category() === MoveCategory.STATUS) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
override selectionDeniedText(pokemon: Pokemon, move: Moves): string {
|
||||
return i18next.t("battle:moveDisabled", { moveName: allMoves[move].name });
|
||||
}
|
||||
|
||||
override isMoveRestricted(move: Moves): boolean {
|
||||
if (move.hasFlag(MoveFlags.TRIAGE_MOVE) && move.category() === MoveCategory.STATUS) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
override selectionDeniedText(pokemon: Pokemon, move: Moves): string {
|
||||
return i18next.t("battle:moveDisabled", { moveName: allMoves[move].name });
|
||||
}
|
||||
|
||||
override onRemove(pokemon: Pokemon): void {
|
||||
super.onRemove(pokemon);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user