Fix Misty Terrain softlock

pull/16/head
Flashfyre 2024-03-13 20:36:25 -04:00
parent 1905ecc828
commit 54eed194fd
1 changed files with 6 additions and 4 deletions

View File

@ -1546,10 +1546,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
}
canSetStatus(effect: StatusEffect, quiet: boolean = false): boolean {
if (effect !== StatusEffect.FAINT && this.status)
return false;
if (this.isGrounded() && this.scene.arena.terrain?.terrainType === TerrainType.MISTY)
return false;
if (effect !== StatusEffect.FAINT) {
if (this.status)
return false;
if (this.isGrounded() && this.scene.arena.terrain?.terrainType === TerrainType.MISTY)
return false;
}
switch (effect) {
case StatusEffect.POISON: