mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 15:54:25 +02:00
Fix @pokemon.setstatus to none
This commit is contained in:
parent
730e3ad766
commit
a0fd0f061a
@ -1051,7 +1051,7 @@
|
|||||||
End If
|
End If
|
||||||
Case "setstatus"
|
Case "setstatus"
|
||||||
Dim Index As Integer = int(argument.GetSplit(0, ","))
|
Dim Index As Integer = int(argument.GetSplit(0, ","))
|
||||||
Dim Status As Pokemon.StatusProblems = Nothing
|
Dim Status As Integer = -1
|
||||||
Select Case argument.GetSplit(1, ",")
|
Select Case argument.GetSplit(1, ",")
|
||||||
Case "brn"
|
Case "brn"
|
||||||
Status = Pokemon.StatusProblems.Burn
|
Status = Pokemon.StatusProblems.Burn
|
||||||
@ -1072,8 +1072,8 @@
|
|||||||
Case Else
|
Case Else
|
||||||
Status = Pokemon.StatusProblems.None
|
Status = Pokemon.StatusProblems.None
|
||||||
End Select
|
End Select
|
||||||
If Status <> Nothing AndAlso Core.Player.Pokemons.Count - 1 >= Index Then
|
If Status <> -1 AndAlso Core.Player.Pokemons.Count - 1 >= Index Then
|
||||||
Core.Player.Pokemons(Index).Status = Status
|
Core.Player.Pokemons(Index).Status = CType(Status, Pokemon.StatusProblems)
|
||||||
If Status = Pokemon.StatusProblems.Fainted Then
|
If Status = Pokemon.StatusProblems.Fainted Then
|
||||||
Core.Player.Pokemons(Index).HP = 0
|
Core.Player.Pokemons(Index).HP = 0
|
||||||
End If
|
End If
|
||||||
|
Loading…
x
Reference in New Issue
Block a user