Molang PokémonEntity Functions: Difference between revisions
(Added Molang PokemonEntity Functions) |
m (Switch to common molang syntax.) |
||
| Line 5: | Line 5: | ||
|<syntaxhighlight lang="kotlin">in_battle(): Double</syntaxhighlight> | |<syntaxhighlight lang="kotlin">in_battle(): Double</syntaxhighlight> | ||
|Returns <code>1.0</code> if the Pokémon is in battle, otherwise returns <code>0.0</code>. | |Returns <code>1.0</code> if the Pokémon is in battle, otherwise returns <code>0.0</code>. | ||
|<syntaxhighlight lang="kotlin">v. | |<syntaxhighlight lang="kotlin">v.pokemon_entity.in_battle()</syntaxhighlight> | ||
|- | |- | ||
|<syntaxhighlight lang="kotlin">is_moving(): Double</syntaxhighlight> | |<syntaxhighlight lang="kotlin">is_moving(): Double</syntaxhighlight> | ||
|Returns <code>1.0</code> if the Pokémon is moving otherwise returns <code>0.0</code>. | |Returns <code>1.0</code> if the Pokémon is moving otherwise returns <code>0.0</code>. | ||
|<syntaxhighlight lang="kotlin">v. | |<syntaxhighlight lang="kotlin">v.pokemon_entity.is_moving()</syntaxhighlight> | ||
|- | |- | ||
|<syntaxhighlight lang="kotlin">is_flying(): Double</syntaxhighlight> | |<syntaxhighlight lang="kotlin">is_flying(): Double</syntaxhighlight> | ||
|Returns <code>1.0</code> if the Pokémon is in flying, otherwise returns <code>0.0</code>. | |Returns <code>1.0</code> if the Pokémon is in flying, otherwise returns <code>0.0</code>. | ||
|<syntaxhighlight lang="kotlin">v. | |<syntaxhighlight lang="kotlin">v.pokemon_entity.is_flying()</syntaxhighlight> | ||
|- | |- | ||
|<syntaxhighlight lang="kotlin">has_aspect(aspect: String): Double</syntaxhighlight> | |<syntaxhighlight lang="kotlin">has_aspect(aspect: String): Double</syntaxhighlight> | ||
|Returns <code>1.0</code> if the Pokémon has the <code>aspect</code>, otherwise returns <code>0.0</code>. | |Returns <code>1.0</code> if the Pokémon has the <code>aspect</code>, otherwise returns <code>0.0</code>. | ||
|<syntaxhighlight lang="kotlin">v. | |<syntaxhighlight lang="kotlin">v.pokemon_entity.has_aspect('alolan')</syntaxhighlight> | ||
|- | |- | ||
|<syntaxhighlight lang="kotlin">is_pokemon(): Double</syntaxhighlight> | |<syntaxhighlight lang="kotlin">is_pokemon(): Double</syntaxhighlight> | ||
|Returns <code>1.0</code>. | |Returns <code>1.0</code>. | ||
|<syntaxhighlight lang="kotlin">v. | |<syntaxhighlight lang="kotlin">v.pokemon_entity.is_pokemon()</syntaxhighlight> | ||
|} | |} | ||
Latest revision as of 22:44, 19 April 2025
Can also use entity and pokémon functions. Type is ObjectValue<PokemonEntity>.
| Name | Description | Usage |
|---|---|---|
in_battle(): Double
|
Returns 1.0 if the Pokémon is in battle, otherwise returns 0.0.
|
v.pokemon_entity.in_battle()
|
is_moving(): Double
|
Returns 1.0 if the Pokémon is moving otherwise returns 0.0.
|
v.pokemon_entity.is_moving()
|
is_flying(): Double
|
Returns 1.0 if the Pokémon is in flying, otherwise returns 0.0.
|
v.pokemon_entity.is_flying()
|
has_aspect(aspect: String): Double
|
Returns 1.0 if the Pokémon has the aspect, otherwise returns 0.0.
|
v.pokemon_entity.has_aspect('alolan')
|
is_pokemon(): Double
|
Returns 1.0.
|
v.pokemon_entity.is_pokemon()
|