mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 07:44:31 +02:00
Remove Pokémon if it faints due to poison damage..
with the DeathInsteadOfFaint GameRule set to 1
This commit is contained in:
parent
4a38a43e1f
commit
a371268441
@ -1903,6 +1903,18 @@
|
|||||||
If Core.Player.Pokemons(i).HP <= 0 Then
|
If Core.Player.Pokemons(i).HP <= 0 Then
|
||||||
Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Fainted
|
Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Fainted
|
||||||
Screen.TextBox.Show(Core.Player.Pokemons(i).GetDisplayName & " Fainted.")
|
Screen.TextBox.Show(Core.Player.Pokemons(i).GetDisplayName & " Fainted.")
|
||||||
|
|
||||||
|
'Remove fainted Pokémon from player's team if the DeathInsteadOfFaint GameRule is activated.
|
||||||
|
If CBool(GameModeManager.GetGameRuleValue("DeathInsteadOfFaint", "0")) = True Then
|
||||||
|
For i = 0 To Core.Player.Pokemons.Count - 1
|
||||||
|
If i <= Core.Player.Pokemons.Count - 1 Then
|
||||||
|
If Core.Player.Pokemons(i).HP <= 0 Or Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Fainted Then
|
||||||
|
Core.Player.Pokemons.RemoveAt(i)
|
||||||
|
i -= 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
If Core.Player.CountFightablePokemon = 0 Then
|
If Core.Player.CountFightablePokemon = 0 Then
|
||||||
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New BlackOutScreen(Core.CurrentScreen), Color.Black, False))
|
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New BlackOutScreen(Core.CurrentScreen), Color.Black, False))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user