mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-24 08:19:33 +02:00
Fixed imprison not interrupting PRE_MOVE
This commit is contained in:
parent
af20ca8402
commit
536227c628
@ -121,7 +121,7 @@ export abstract class MoveRestrictionBattlerTag 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.isMoveRestricted(move.moveId)) {
|
if (this.isMoveRestricted(move.moveId, pokemon)) {
|
||||||
if (this.interruptedText(pokemon, move.moveId)) {
|
if (this.interruptedText(pokemon, move.moveId)) {
|
||||||
pokemon.scene.queueMessage(this.interruptedText(pokemon, move.moveId));
|
pokemon.scene.queueMessage(this.interruptedText(pokemon, move.moveId));
|
||||||
}
|
}
|
||||||
@ -2596,11 +2596,15 @@ export class ImprisonTag extends MoveRestrictionBattlerTag {
|
|||||||
* @param _lapseType
|
* @param _lapseType
|
||||||
* @returns `true` if the source is still active
|
* @returns `true` if the source is still active
|
||||||
*/
|
*/
|
||||||
override lapse(pokemon: Pokemon, _lapseType: BattlerTagLapseType): boolean {
|
override lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
|
||||||
const source = this.retrieveSource(pokemon.scene);
|
const source = this.retrieveSource(pokemon.scene);
|
||||||
if (source) {
|
if (source) {
|
||||||
|
if (lapseType === BattlerTagLapseType.PRE_MOVE) {
|
||||||
|
return super.lapse(pokemon, lapseType) && source.isActive(true);
|
||||||
|
} else {
|
||||||
return source.isActive(true) ?? false;
|
return source.isActive(true) ?? false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user