Hopefully fix egg being able to switch by move

This commit is contained in:
JappaWakka 2023-05-13 20:03:23 +02:00
parent 333873fdae
commit 4363f3f4ed
2 changed files with 3 additions and 3 deletions

View File

@ -97,8 +97,8 @@
End If
Else
If Core.Player.CountFightablePokemon > 1 Then
Dim i As Integer = Core.Random.Next(0, Core.Player.Pokemons.Count)
While Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse BattleScreen.OwnPokemonIndex = i OrElse Core.Player.Pokemons(i).HP <= 0
Dim i As Integer = Core.Random.Next(0, Core.Player.Pokemons.Count)
While Core.Player.Pokemons(i).IsEgg = True OrElse Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse BattleScreen.OwnPokemonIndex = i OrElse Core.Player.Pokemons(i).HP <= 0
i = Core.Random.Next(0, Core.Player.Pokemons.Count - 1)
End While
BattleScreen.Battle.SwitchOutOwn(BattleScreen, i, -1)

View File

@ -82,7 +82,7 @@
Else
If Core.Player.CountFightablePokemon > 1 Then
Dim i As Integer = Core.Random.Next(0, Core.Player.Pokemons.Count)
While Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse BattleScreen.OwnPokemonIndex = i OrElse Core.Player.Pokemons(i).HP <= 0
While Core.Player.Pokemons(i).IsEgg = True OrElse Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse BattleScreen.OwnPokemonIndex = i OrElse Core.Player.Pokemons(i).HP <= 0
i = Core.Random.Next(0, Core.Player.Pokemons.Count - 1)
End While
BattleScreen.Battle.SwitchOutOwn(BattleScreen, i, -1)