mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-09 18:02:18 +02:00
Remove DisabledTag lapse
This commit is contained in:
parent
777511cb4c
commit
daf063be19
@ -98,7 +98,7 @@ export interface TerrainBattlerTag {
|
||||
* to select disabled moves.
|
||||
*/
|
||||
export abstract class DisablingBattlerTag extends BattlerTag {
|
||||
public abstract moveIsDisabled(move: Moves): boolean;
|
||||
abstract moveIsDisabled(move: Moves): boolean;
|
||||
|
||||
constructor(tagType: BattlerTagType, turnCount: integer, sourceMove?: Moves, sourceId?: integer) {
|
||||
super(tagType, [ BattlerTagLapseType.PRE_MOVE, BattlerTagLapseType.TURN_END ], turnCount, sourceMove, sourceId);
|
||||
@ -150,19 +150,6 @@ export class DisabledTag extends DisablingBattlerTag {
|
||||
super(BattlerTagType.DISABLED, 4, Moves.DISABLE, sourceId);
|
||||
}
|
||||
|
||||
override lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
|
||||
if (!super.lapse(pokemon, lapseType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.moveId === 0) {
|
||||
console.warn(`attempt to disable move ID 0 on ${pokemon}`);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that move history exists and has a valid move. If so, sets the {@link moveId} and shows a message.
|
||||
* Otherwise, something has gone wrong, so the move ID will not get assigned and this tag will get removed next turn.
|
||||
|
Loading…
Reference in New Issue
Block a user