Fixed Whirlwind

same changes as Roar
This commit is contained in:
Capt_Segis 2016-09-18 11:50:03 -05:00 committed by GitHub
parent f30b0c3cfd
commit dab05aef31
1 changed files with 6 additions and 2 deletions

View File

@ -79,7 +79,11 @@
End If
Else
If Core.Player.CountFightablePokemon > 1 Then
BattleScreen.Battle.SwitchOutOwn(BattleScreen, -1, -1)
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
i = Core.Random.Next(0, Core.Player.Pokemons.Count)
End While
BattleScreen.Battle.SwitchOutOwn(BattleScreen, i, -1)
Else
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
@ -104,4 +108,4 @@
End Class
End Namespace
End Namespace