Added @Pokemon.SetStatus(index,status) command...

@Pokemon.SetStatus(index,status)
index = Index of the Pokémon in the player's party
status = the desired status to give the Pokémon (possible values: "brn", "frz", "prz", "psn", "bpsn", "slp", "fnt")
This commit is contained in:
JappaWakka 2023-12-04 19:05:31 +01:00
parent 1c7ce33a73
commit 2a869e0b4b
2 changed files with 28 additions and 1 deletions

View File

@ -1025,6 +1025,31 @@
SetScreen(New TransitionScreen(CType(CurrentScreen, OverworldScreen), New HatchEggScreen(CType(CurrentScreen, OverworldScreen), {Pokemon}.ToList, CanRename, Message), Color.White, False))
CanContinue = False
End If
Case "setstatus"
Dim Index As Integer = int(argument.GetSplit(0, ","))
Dim Status As Pokemon.StatusProblems = Nothing
Select Case argument.GetSplit(1, ",")
Case "brn"
Status = Pokemon.StatusProblems.Burn
Case "frz"
Status = Pokemon.StatusProblems.Freeze
Case "prz"
Status = Pokemon.StatusProblems.Paralyzed
Case "psn"
Status = Pokemon.StatusProblems.Poison
Case "bpsn"
Status = Pokemon.StatusProblems.BadPoison
Case "slp"
Status = Pokemon.StatusProblems.Sleep
Case "fnt"
Status = Pokemon.StatusProblems.Fainted
End Select
If Status <> Nothing AndAlso Core.Player.Pokemons.Count - 1 >= Index Then
Core.Player.Pokemons(Index).Status = Status
If Status = Pokemon.StatusProblems.Fainted Then
Core.Player.Pokemons(Index).HP = 0
End If
End If
End Select
IsReady = True

View File

@ -786,7 +786,7 @@ Namespace ScriptVersion2
r(New ScriptCommand("pokemon", "setot", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int),
New ScriptArgument("newOT", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the Original Trainer of a Pokémon in the player's party."))
r(New ScriptCommand("pokemon", "setitem", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int),
New ScriptArgument("itemID", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Sets the item of a Pokémon in the player's party."))
New ScriptArgument("itemID", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the item of a Pokémon in the player's party."))
r(New ScriptCommand("pokemon", "setitemData", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int),
New ScriptArgument("itemData", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the data of the item of a Pokémon in the player's party."))
r(New ScriptCommand("pokemon", "setcatchtrainer", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int),
@ -799,6 +799,8 @@ Namespace ScriptVersion2
New ScriptArgument("location", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the Catch Location of a Pokémon in the player's party."))
r(New ScriptCommand("pokemon", "setcatchlocation", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int),
New ScriptArgument("location", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the Catch Location of a Pokémon in the player's party."))
r(New ScriptCommand("pokemon", "setstatus", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int),
New ScriptArgument("status", ScriptArgument.ArgumentTypes.Str, {"brn", "frz", "prz", "psn", "bpsn", "slp", "fnt"})}.ToList(), "Sets the status of a Pokémon in the player's party. Setting that to ""fnt"" (Fainted) will also set the Pokémon's HP to 0."))
r(New ScriptCommand("pokemon", "newroaming", {New ScriptArgument("pokemonID", ScriptArgument.ArgumentTypes.Int),
New ScriptArgument("level", ScriptArgument.ArgumentTypes.Int),
New ScriptArgument("regionID", ScriptArgument.ArgumentTypes.Int),