Add <Pokemon.IsRoaming(RoamerID)>

Checks if the given roaming Pokémon is still active.
This commit is contained in:
JappaWakka 2024-04-07 08:56:49 +02:00
parent 2c2271f733
commit 1bef17409e
2 changed files with 11 additions and 0 deletions

View File

@ -515,6 +515,15 @@
adjusted = CBool(argument)
End If
Return Pokemon.MasterShinyRate(adjusted)
Case "isroaming"
Dim RoamerID As String = argument
For Each line As String In Core.Player.RoamingPokemonData.SplitAtNewline()
If line.StartsWith(RoamerID) = True Then
Return ReturnBoolean(True)
End If
Next
Return ReturnBoolean(False)
End Select
Return DEFAULTNULL
End Function

View File

@ -919,6 +919,8 @@ Namespace ScriptVersion2
r(New ScriptCommand("pokemon", "type2", "str", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns the second type of a Pokémon in the player's party.", ",", True))
r(New ScriptCommand("pokemon", "istype", "bool", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int),
New ScriptArgument("type", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Checks if a Pokémon in the player's party has a specific type.", ",", True))
r(New ScriptCommand("pokemon", "IsRoaming", "bool", {New ScriptArgument("roamerID", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Checks if the given roaming Pokémon is still active.", ",", True))
End Sub
Private Shared Sub r(ByVal s As ScriptCommand)