mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 15:54:25 +02:00
Add construct <Pokemon.FullyHealed([partyID])>
Checks if a specific Pokémon or all Pokémon in the party are fully healed.
This commit is contained in:
parent
9f7b722bcf
commit
86428f8055
@ -524,6 +524,41 @@
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Return ReturnBoolean(False)
|
Return ReturnBoolean(False)
|
||||||
|
Case "fullyhealed"
|
||||||
|
Dim IsFullyHealed As Boolean = True
|
||||||
|
If argument = "" Then
|
||||||
|
For Each pokemon As Pokemon In Core.Player.Pokemons
|
||||||
|
If pokemon.Attacks.Count > 0 Then
|
||||||
|
For d = 0 To pokemon.Attacks.Count - 1
|
||||||
|
If pokemon.Attacks(d).CurrentPP < pokemon.Attacks(d).MaxPP Then
|
||||||
|
IsFullyHealed = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If pokemon.HP < pokemon.MaxHP Then
|
||||||
|
IsFullyHealed = False
|
||||||
|
End If
|
||||||
|
If pokemon.Status <> Pokemon.StatusProblems.None Then
|
||||||
|
IsFullyHealed = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
Dim pokemon As Pokemon = Core.Player.Pokemons(CInt(argument))
|
||||||
|
If pokemon.Attacks.Count > 0 Then
|
||||||
|
For d = 0 To pokemon.Attacks.Count - 1
|
||||||
|
If pokemon.Attacks(d).CurrentPP < pokemon.Attacks(d).MaxPP Then
|
||||||
|
IsFullyHealed = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If pokemon.HP < pokemon.MaxHP Then
|
||||||
|
IsFullyHealed = False
|
||||||
|
End If
|
||||||
|
If pokemon.Status <> Pokemon.StatusProblems.None Then
|
||||||
|
IsFullyHealed = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return ReturnBoolean(IsFullyHealed)
|
||||||
End Select
|
End Select
|
||||||
Return DEFAULTNULL
|
Return DEFAULTNULL
|
||||||
End Function
|
End Function
|
||||||
|
@ -920,6 +920,7 @@ Namespace ScriptVersion2
|
|||||||
r(New ScriptCommand("pokemon", "istype", "bool", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int),
|
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))
|
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))
|
r(New ScriptCommand("pokemon", "IsRoaming", "bool", {New ScriptArgument("roamerID", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Checks if the given roaming Pokémon is still active.", ",", True))
|
||||||
|
r(New ScriptCommand("pokemon", "FullyHealed", "bool", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Str, True, "")}.ToList(), "Checks if a specific Pokémon or all Pokémon in the party are fully healed.", ",", True))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user