mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-23 22:05:36 +02:00
Fixed PvP Random Switch in after fainting
It's now supposed to switch into the first available pokemon. PvE battles remain unchanged.
This commit is contained in:
parent
35007f893f
commit
70742e3637
@ -1077,11 +1077,19 @@ nextIndex:
|
||||
Dim i As Integer = index
|
||||
|
||||
If i = -1 Then
|
||||
i = Core.Random.Next(0, Trainer.Pokemons.Count)
|
||||
While Trainer.Pokemons(i).Status = Pokemon.StatusProblems.Fainted Or OppPokemonIndex = i Or Trainer.Pokemons(i).HP <= 0
|
||||
i = Core.Random.Next(0, Trainer.Pokemons.Count)
|
||||
If IsPvPBattle Then
|
||||
While Trainer.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse OppPokemonIndex = i OrElse Trainer.Pokemons(i).HP <= 0
|
||||
i += 1
|
||||
End While
|
||||
|
||||
Else
|
||||
i = Core.Random.Next(0, Trainer.Pokemons.count)
|
||||
While Trainer.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse OppPokemonIndex = i OrElse Trainer.Pokemons(i).HP <= 0
|
||||
i = Core.Random.Next(0, Trainer.Pokemons.count)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
OppPokemonIndex = i
|
||||
OppPokemon = Trainer.Pokemons(i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user