Molang PokémonStore Functions
Type is ObjectValue<PokemonStore<*>>
.
Name | Description | Usage |
---|---|---|
add(pokemon: ObjectValue<Pokemon>): Double
|
Adds Pokémon to the first available spot. Returns 1.0 if there was space, otherwise returns 0.0 .
|
v.store.add(v.pokemon)
|
add_by_properties(properties: String): Double
|
If the type of the store is PlayerPartyStore then create a Pokémon with the listed properties and add it to the store. Returns 1.0 if there was space, otherwise returns 0.0 .
|
v.store.add_by_properties('species=cobblemon:pikachu gender=male')
|
find_by_properties(properties: String): MoValue
|
Finds the first Pokémon with the listed properties in the store and returns a ObjectValue<Pokemon> Returns 0.0 if no pokemon found.
|
v.store.find_by_properties('species=cobblemon:pikachu gender=male')
|
find_all_by_properties(properties: String): MoValue
|
Returns an ArrayStruct<ObjectValue<Pokemon>> of all Pokémon with the listed properties in the store.
|
v.store.find_all_by_properties('species=cobblemon:pikachu gender=male')
|
find_by_id(id: String): MoValue
|
Returns an ObjectValue<Pokemon> that matches the UUID id of the Pokémon. Returns 0.0 if no Pokémon is found.
|
v.store.find_by_id(v.pokemon.id())
|
remove_by_id(id: String): Double
|
Removes a Pokémon that matches the UUID id . Returns 1.0 if removed, otherwise returns 0.0 .
|
v.store.remove_by_id(v.pokemon.id())
|
average_level(): Double
|
Returns the average level of all Pokémon in the store. Returns 0.0 if there is no Pokémon.
|
v.store.average_level()
|
count(): Double
|
Returns the number of Pokémon in a store. | v.store.count()
|
count_by_properties(properties: String): Double
|
Returns the count of Pokémon that match the listed properties .
|
v.store.count_by_properties('gender=male')
|
highest_level(): Double
|
Returns the highest level of all Pokémon in a store as a Double. | v.store.highest_level()
|
lowest_level(): Double
|
Returns the lowest level of all Pokémon in a store as a Double. | v.store.lowest_level()
|
heal(): Double
|
Heals all Pokémon in a store. Returns 1.0 .
|
v.store.heal()
|
healing_remainder_percent(): Double
|
Returns the cumulative percentage of health missing as a Double.</syntaxhighlight> | v.store.healing_remainder_percent()
|
has_usable_pokemon(): Double
|
Returns 1.0 if any Pokémon is not fainted, otherwise returns 0.0 .
|
v.store.has_usable_pokemon()
|