diff --git a/P3D/World/ActionScript/V2/ScriptConstructs/DoPokemon.vb b/P3D/World/ActionScript/V2/ScriptConstructs/DoPokemon.vb index 88a9da23a..2b4255e1f 100644 --- a/P3D/World/ActionScript/V2/ScriptConstructs/DoPokemon.vb +++ b/P3D/World/ActionScript/V2/ScriptConstructs/DoPokemon.vb @@ -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 diff --git a/P3D/World/ActionScript/V2/ScriptLibrary.vb b/P3D/World/ActionScript/V2/ScriptLibrary.vb index 77be2dddc..d4a7ed9a8 100644 --- a/P3D/World/ActionScript/V2/ScriptLibrary.vb +++ b/P3D/World/ActionScript/V2/ScriptLibrary.vb @@ -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)