mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-01 05:52:17 +02:00
Update battler-tags.ts
This commit is contained in:
parent
5a75169493
commit
e6ccd78e00
@ -308,13 +308,14 @@ export class DisabledTag extends MoveRestrictionBattlerTag {
|
|||||||
* and showing a message.
|
* and showing a message.
|
||||||
*/
|
*/
|
||||||
override onAdd(pokemon: Pokemon): void {
|
override onAdd(pokemon: Pokemon): void {
|
||||||
// Disable fails against struggle or an empty move history, but we still need to check for
|
// Disable fails against struggle or an empty move history
|
||||||
// Cursed Body
|
// TODO: Confirm if this is redundant given Disable/Cursed Body's disable conditions
|
||||||
const move = pokemon.getLastNonVirtualMove();
|
const move = pokemon.getLastNonVirtualMove();
|
||||||
if (isNullOrUndefined(move) || move.move === Moves.STRUGGLE) {
|
if (isNullOrUndefined(move) || move.move === Moves.STRUGGLE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super.onAdd(pokemon);
|
||||||
this.moveId = move.move;
|
this.moveId = move.move;
|
||||||
|
|
||||||
globalScene.queueMessage(
|
globalScene.queueMessage(
|
||||||
|
Loading…
Reference in New Issue
Block a user