mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-21 06:49:35 +02:00
Wild mons can't flee with U-turn
This commit is contained in:
parent
70b9a43c8b
commit
3ef2684c9c
@ -5502,6 +5502,12 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
|||||||
if (user.scene.currentBattle.waveIndex % 10 === 0) {
|
if (user.scene.currentBattle.waveIndex % 10 === 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't allow wild mons to flee with U-turn et al
|
||||||
|
if (this.selfSwitch && !user.isPlayer() && move.category !== MoveCategory.STATUS) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Switch out logic for everything else (eg: WILD battles)
|
// Switch out logic for everything else (eg: WILD battles)
|
||||||
switchOutTarget.leaveField(false);
|
switchOutTarget.leaveField(false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user