Fix overworldpoison
This commit is contained in:
parent
cec5c0c172
commit
09da089212
|
@ -1892,24 +1892,28 @@
|
||||||
Next
|
Next
|
||||||
If CInt(GameModeManager.GetGameRuleValue("OverworldPoison", "0")) = 1 Then
|
If CInt(GameModeManager.GetGameRuleValue("OverworldPoison", "0")) = 1 Then
|
||||||
For i = 0 To Core.Player.Pokemons.Count - 1
|
For i = 0 To Core.Player.Pokemons.Count - 1
|
||||||
If Core.Player.Pokemons(i).HP <= 1 Then
|
If Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Poison OrElse Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.BadPoison Then
|
||||||
Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.None
|
If Core.Player.Pokemons(i).HP <= 1 Then
|
||||||
Core.Player.Pokemons(i).HP = 1
|
Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.None
|
||||||
Screen.TextBox.Show(Core.Player.Pokemons(i).GetDisplayName & " was cured of Poison.")
|
Core.Player.Pokemons(i).HP = 1
|
||||||
|
Screen.TextBox.Show(Core.Player.Pokemons(i).GetDisplayName & " was cured~of Poison.")
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
ElseIf CInt(GameModeManager.GetGameRuleValue("OverworldPoison", "0")) = 2 Then
|
ElseIf CInt(GameModeManager.GetGameRuleValue("OverworldPoison", "0")) = 2 Then
|
||||||
For i = 0 To Core.Player.Pokemons.Count - 1
|
For i = 0 To Core.Player.Pokemons.Count - 1
|
||||||
If Core.Player.Pokemons(i).HP <= 0 Then
|
If Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Poison OrElse Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.BadPoison Then
|
||||||
Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Fainted
|
If Core.Player.Pokemons(i).HP <= 0 Then
|
||||||
Screen.TextBox.Show(Core.Player.Pokemons(i).GetDisplayName & " Fainted.")
|
Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Fainted
|
||||||
|
Screen.TextBox.Show(Core.Player.Pokemons(i).GetDisplayName & "Fainted.")
|
||||||
|
|
||||||
'Remove fainted Pokémon from player's team if the DeathInsteadOfFaint GameRule is activated.
|
'Remove fainted Pokémon from player's team if the DeathInsteadOfFaint GameRule is activated.
|
||||||
If CBool(GameModeManager.GetGameRuleValue("DeathInsteadOfFaint", "0")) = True Then
|
If CBool(GameModeManager.GetGameRuleValue("DeathInsteadOfFaint", "0")) = True Then
|
||||||
If i <= Core.Player.Pokemons.Count - 1 Then
|
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
|
If Core.Player.Pokemons(i).HP <= 0 Or Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Fainted Then
|
||||||
Core.Player.Pokemons.RemoveAt(i)
|
Core.Player.Pokemons.RemoveAt(i)
|
||||||
i -= 1
|
i -= 1
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
Loading…
Reference in New Issue