diff --git a/2.5DHero/2.5DHero/Pokemon/Attacks/Normal/Whirlwind.vb b/2.5DHero/2.5DHero/Pokemon/Attacks/Normal/Whirlwind.vb index 35a2616c7..74a492e97 100644 --- a/2.5DHero/2.5DHero/Pokemon/Attacks/Normal/Whirlwind.vb +++ b/2.5DHero/2.5DHero/Pokemon/Attacks/Normal/Whirlwind.vb @@ -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 \ No newline at end of file +End Namespace