mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-09 09:52:17 +02:00
Simplify DisablingBattlerTag lapse
This commit is contained in:
parent
daf063be19
commit
3fe58ac5db
@ -110,22 +110,17 @@ export abstract class DisablingBattlerTag extends BattlerTag {
|
|||||||
const phase = pokemon.scene.getCurrentPhase() as MovePhase;
|
const phase = pokemon.scene.getCurrentPhase() as MovePhase;
|
||||||
const move = phase.move;
|
const move = phase.move;
|
||||||
|
|
||||||
if (!this.moveIsDisabled(move.moveId)) {
|
if (this.moveIsDisabled(move.moveId)) {
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
pokemon.scene.queueMessage(this.interruptedText(pokemon, move.moveId));
|
pokemon.scene.queueMessage(this.interruptedText(pokemon, move.moveId));
|
||||||
phase.fail();
|
phase.fail();
|
||||||
} else if (lapseType === BattlerTagLapseType.TURN_END) {
|
|
||||||
// On turn end, subtract from lifetime and remove this tag if 0
|
|
||||||
if (!super.lapse(pokemon, lapseType)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return super.lapse(pokemon, lapseType);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The text to display when a move's execution is prevented as a result of the disable.
|
* The text to display when a move's execution is prevented as a result of the disable.
|
||||||
* Because disabling effects also prevent selection of the move, this situation can only arise if a
|
* Because disabling effects also prevent selection of the move, this situation can only arise if a
|
||||||
|
Loading…
Reference in New Issue
Block a user