<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cobblemon.com/index.php?action=history&amp;feed=atom&amp;title=Molang_Pok%C3%A9monStore_Functions</id>
	<title>Molang PokémonStore Functions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cobblemon.com/index.php?action=history&amp;feed=atom&amp;title=Molang_Pok%C3%A9monStore_Functions"/>
	<link rel="alternate" type="text/html" href="https://wiki.cobblemon.com/index.php?title=Molang_Pok%C3%A9monStore_Functions&amp;action=history"/>
	<updated>2026-05-10T06:56:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://wiki.cobblemon.com/index.php?title=Molang_Pok%C3%A9monStore_Functions&amp;diff=5771&amp;oldid=prev</id>
		<title>JPAKx4: Added Molang PokemonStore Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.cobblemon.com/index.php?title=Molang_Pok%C3%A9monStore_Functions&amp;diff=5771&amp;oldid=prev"/>
		<updated>2025-04-19T22:41:43Z</updated>

		<summary type="html">&lt;p&gt;Added Molang PokemonStore Functions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Type is &amp;lt;code&amp;gt;ObjectValue&amp;lt;PokemonStore&amp;lt;*&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
{| class=&amp;quot;wikitable fixed-header sortable&amp;quot;&lt;br /&gt;
!Name!!Description!!Usage&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;add(pokemon: ObjectValue&amp;lt;Pokemon&amp;gt;): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Adds Pokémon to the first available spot. Returns &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; if there was space, otherwise returns &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.add(v.pokemon)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;add_by_properties(properties: String): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|If the type of the store is &amp;lt;code&amp;gt;PlayerPartyStore&amp;lt;/code&amp;gt; then create a Pokémon with the listed &amp;lt;code&amp;gt;properties&amp;lt;/code&amp;gt; and add it to the store. Returns &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; if there was space, otherwise returns &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.add_by_properties(&amp;#039;species=cobblemon:pikachu gender=male&amp;#039;)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;find_by_properties(properties: String): MoValue&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Finds the first Pokémon with the listed &amp;lt;code&amp;gt;properties&amp;lt;/code&amp;gt; in the store and returns a &amp;lt;code&amp;gt;ObjectValue&amp;lt;Pokemon&amp;gt;&amp;lt;/code&amp;gt; Returns &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; if no pokemon found.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.find_by_properties(&amp;#039;species=cobblemon:pikachu gender=male&amp;#039;)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;find_all_by_properties(properties: String): MoValue&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns an &amp;lt;code&amp;gt;ArrayStruct&amp;lt;ObjectValue&amp;lt;Pokemon&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; of all Pokémon with the listed &amp;lt;code&amp;gt;properties&amp;lt;/code&amp;gt; in the store.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.find_all_by_properties(&amp;#039;species=cobblemon:pikachu gender=male&amp;#039;)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;find_by_id(id: String): MoValue&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns an &amp;lt;code&amp;gt;ObjectValue&amp;lt;Pokemon&amp;gt;&amp;lt;/code&amp;gt; that matches the UUID &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; of the Pokémon. Returns &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; if no Pokémon is found.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.find_by_id(v.pokemon.id())&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;remove_by_id(id: String): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Removes a Pokémon that matches the UUID &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt;. Returns &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; if removed, otherwise returns &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.remove_by_id(v.pokemon.id())&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;average_level(): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns the average level of all Pokémon in the store. Returns &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; if there is no Pokémon.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.average_level()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;count(): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns the number of Pokémon in a store.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.count()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;count_by_properties(properties: String): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns the count of Pokémon that match the listed &amp;lt;code&amp;gt;properties&amp;lt;/code&amp;gt;.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.count_by_properties(&amp;#039;gender=male&amp;#039;)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;highest_level(): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns the highest level of all Pokémon in a store as a Double.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.highest_level()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;lowest_level(): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns the lowest level of all Pokémon in a store as a Double.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.lowest_level()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;heal(): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Heals all Pokémon in a store. Returns &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.heal()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;healing_remainder_percent(): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns the cumulative percentage of health missing as a Double.&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.healing_remainder_percent()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;has_usable_pokemon(): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; if any Pokémon is not fainted, otherwise returns &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.store.has_usable_pokemon()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>JPAKx4</name></author>
	</entry>
</feed>