mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 07:44:31 +02:00
Added <Pokémon.LevelAttacks(id,maxLv)> construct
<Pokémon.LevelAttacks(Index,[MaxLevel])> Returns a string of every move the Pokémon can learn at or below a certain level * Index (int) = Index of a Pokémon in the player's party * MaxLevel (int) [optional] = Every move the Pokémon can learn at or below the level specified by this argument is added to the string. When this argument is left out or set to "-1", it will default to the Pokémon's current level.
This commit is contained in:
parent
b40dde8904
commit
a1c3c6f9da
@ -149,6 +149,28 @@
|
|||||||
Dim moveIndex As Integer = int(argument.GetSplit(1))
|
Dim moveIndex As Integer = int(argument.GetSplit(1))
|
||||||
|
|
||||||
Return Core.Player.Pokemons(pokeIndex).Attacks(moveIndex).Name
|
Return Core.Player.Pokemons(pokeIndex).Attacks(moveIndex).Name
|
||||||
|
Case "levelattacks"
|
||||||
|
Dim pokeIndex As Integer = int(argument.GetSplit(0))
|
||||||
|
Dim MaxLevel As Integer = Core.Player.Pokemons(pokeIndex).Level
|
||||||
|
Dim levelMoves As String = ""
|
||||||
|
If argument.Split(",").Count > 1 Then
|
||||||
|
If argument.GetSplit(1).ToLower = "-1" Then
|
||||||
|
MaxLevel = Core.Player.Pokemons(pokeIndex).Level
|
||||||
|
Else
|
||||||
|
MaxLevel = CInt(argument.GetSplit(1))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
For Each level As Integer In Core.Player.Pokemons(pokeIndex).AttackLearns.Keys
|
||||||
|
If level <= MaxLevel Then
|
||||||
|
If levelMoves = "" Then
|
||||||
|
levelMoves = Core.Player.Pokemons(pokeIndex).AttackLearns(level).ID.ToString
|
||||||
|
Else
|
||||||
|
levelMoves &= "," & Core.Player.Pokemons(pokeIndex).AttackLearns(level).ID.ToString
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return levelMoves
|
||||||
Case "isshiny"
|
Case "isshiny"
|
||||||
Dim index As Integer = int(argument.GetSplit(0))
|
Dim index As Integer = int(argument.GetSplit(0))
|
||||||
|
|
||||||
|
@ -862,6 +862,8 @@ Namespace ScriptVersion2
|
|||||||
r(New ScriptCommand("pokemon", "countattacks", "int", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Counts the moves the Pokémon knows.", ",", True))
|
r(New ScriptCommand("pokemon", "countattacks", "int", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Counts the moves the Pokémon knows.", ",", True))
|
||||||
r(New ScriptCommand("pokemon", "attackname", "str", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int),
|
r(New ScriptCommand("pokemon", "attackname", "str", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int),
|
||||||
New ScriptArgument("moveIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns the name of the move of a Pokémon in the player's party.", ",", True))
|
New ScriptArgument("moveIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns the name of the move of a Pokémon in the player's party.", ",", True))
|
||||||
|
r(New ScriptCommand("pokemon", "levelattacks", "str", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int),
|
||||||
|
New ScriptArgument("maxLevel", ScriptArgument.ArgumentTypes.Int, True, "-1")}.ToList(), "Returns a list of move IDs separated by commas that a Pokémon in the player's party can learn at or below its current level/the level specified by the maxLevel argument.", ",", True))
|
||||||
r(New ScriptCommand("pokemon", "isShiny", "bool", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns if the Pokémon is Shiny.", ",", True))
|
r(New ScriptCommand("pokemon", "isShiny", "bool", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns if the Pokémon is Shiny.", ",", True))
|
||||||
r(New ScriptCommand("pokemon", "nature", "str", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns the nature of a Pokémon in the player's party.", ",", True))
|
r(New ScriptCommand("pokemon", "nature", "str", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns the nature of a Pokémon in the player's party.", ",", True))
|
||||||
r(New ScriptCommand("pokemon", "ownpokemon", "bool", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns if a Pokémon in the player's party was caught by the player.", ",", True))
|
r(New ScriptCommand("pokemon", "ownpokemon", "bool", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns if a Pokémon in the player's party was caught by the player.", ",", True))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user