mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-26 15:24:52 +02:00
Fix Whirlwind move logic
This commit is contained in:
parent
6440ff0466
commit
7699621036
@ -74,7 +74,7 @@
|
|||||||
If BattleScreen.Trainer.CountUseablePokemon > 1 Then
|
If BattleScreen.Trainer.CountUseablePokemon > 1 Then
|
||||||
Dim i As Integer = Core.Random.Next(0, BattleScreen.Trainer.Pokemons.count)
|
Dim i As Integer = Core.Random.Next(0, BattleScreen.Trainer.Pokemons.count)
|
||||||
While BattleScreen.Trainer.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse BattleScreen.OppPokemonIndex = i OrElse BattleScreen.Trainer.Pokemons(i).HP <= 0
|
While BattleScreen.Trainer.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse BattleScreen.OppPokemonIndex = i OrElse BattleScreen.Trainer.Pokemons(i).HP <= 0
|
||||||
i = Core.Random.Next(0, BattleScreen.Trainer.Pokemons.Count - 1)
|
i = Core.Random.Next(0, BattleScreen.Trainer.Pokemons.Count)
|
||||||
End While
|
End While
|
||||||
BattleScreen.Battle.SwitchOutOpp(BattleScreen, i, "")
|
BattleScreen.Battle.SwitchOutOpp(BattleScreen, i, "")
|
||||||
Else
|
Else
|
||||||
@ -84,7 +84,7 @@
|
|||||||
If Core.Player.CountFightablePokemon > 1 Then
|
If Core.Player.CountFightablePokemon > 1 Then
|
||||||
Dim i As Integer = Core.Random.Next(0, Core.Player.Pokemons.Count)
|
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).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)
|
i = Core.Random.Next(0, Core.Player.Pokemons.Count)
|
||||||
End While
|
End While
|
||||||
BattleScreen.Battle.SwitchOutOwn(BattleScreen, i, -1)
|
BattleScreen.Battle.SwitchOutOwn(BattleScreen, i, -1)
|
||||||
Else
|
Else
|
||||||
@ -98,7 +98,11 @@
|
|||||||
BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False))
|
BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False))
|
||||||
Else
|
Else
|
||||||
If Core.Player.CountFightablePokemon > 1 Then
|
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
|
Else
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||||
End If
|
End If
|
||||||
|
Loading…
x
Reference in New Issue
Block a user