Fix overworldpoison

This commit is contained in:
JappaWakka 2023-04-28 09:13:04 +02:00
parent cec5c0c172
commit 09da089212

View File

@ -1892,17 +1892,20 @@
Next
If CInt(GameModeManager.GetGameRuleValue("OverworldPoison", "0")) = 1 Then
For i = 0 To Core.Player.Pokemons.Count - 1
If Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Poison OrElse Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.BadPoison Then
If Core.Player.Pokemons(i).HP <= 1 Then
Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.None
Core.Player.Pokemons(i).HP = 1
Screen.TextBox.Show(Core.Player.Pokemons(i).GetDisplayName & " was cured of Poison.")
Screen.TextBox.Show(Core.Player.Pokemons(i).GetDisplayName & " was cured~of Poison.")
End If
End If
Next
ElseIf CInt(GameModeManager.GetGameRuleValue("OverworldPoison", "0")) = 2 Then
For i = 0 To Core.Player.Pokemons.Count - 1
If Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Poison OrElse Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.BadPoison Then
If Core.Player.Pokemons(i).HP <= 0 Then
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
@ -1914,6 +1917,7 @@
End If
End If
End If
End If
If Core.Player.CountFightablePokemon = 0 Then
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New BlackOutScreen(Core.CurrentScreen), Color.Black, False))
End If