mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-08 17:32:18 +02:00
Simplify DisablingBattlerTag lapse
This commit is contained in:
parent
daf063be19
commit
3fe58ac5db
@ -110,20 +110,15 @@ export abstract class DisablingBattlerTag extends BattlerTag {
|
||||
const phase = pokemon.scene.getCurrentPhase() as MovePhase;
|
||||
const move = phase.move;
|
||||
|
||||
if (!this.moveIsDisabled(move.moveId)) {
|
||||
return true;
|
||||
if (this.moveIsDisabled(move.moveId)) {
|
||||
pokemon.scene.queueMessage(this.interruptedText(pokemon, move.moveId));
|
||||
phase.fail();
|
||||
}
|
||||
|
||||
pokemon.scene.queueMessage(this.interruptedText(pokemon, move.moveId));
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user