<?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_Battle_Functions</id>
	<title>Molang Battle 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_Battle_Functions"/>
	<link rel="alternate" type="text/html" href="https://wiki.cobblemon.com/index.php?title=Molang_Battle_Functions&amp;action=history"/>
	<updated>2026-05-10T06:56:12Z</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_Battle_Functions&amp;diff=5767&amp;oldid=prev</id>
		<title>JPAKx4: Add Molang Battle Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.cobblemon.com/index.php?title=Molang_Battle_Functions&amp;diff=5767&amp;oldid=prev"/>
		<updated>2025-04-19T22:18:04Z</updated>

		<summary type="html">&lt;p&gt;Add Molang Battle 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;PokemonBattle&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
{| class=&amp;quot;wikitable fixed-header sortable&amp;quot;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;battle_id(): String&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns the ID of the battle as a String.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;q.battle.battle_id()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;is_pvn(): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; if battle is Player vs. NPC, 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;q.battle.is_pvn()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;is_pvp(): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; if battle is Player vs. Player, 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;q.battle.is_pvp()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;is_pvw(): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; if battle is Player vs. a wild Pokémon, 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;q.battle.is_pve()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;battle_type(): String&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns the battle format as a String.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;q.battle.battle_type()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;environment(): CHECK TYPE&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns the environment.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;q.battle.environment()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;get_actor(uuid: String): MoValue&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns the struct of the &amp;lt;code&amp;gt;ObjectValue&amp;lt;BattleActor&amp;gt;&amp;lt;code&amp;gt; if present, 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;q.battle.get_actor(q.npc.get_id())&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;stop()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Stops the battle.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;q.battle.stop()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;actors(): ArrayValue&amp;lt;ObjectValue&amp;lt;BattleActor&amp;gt;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns an &amp;lt;code&amp;gt;ArrayValue&amp;lt;ObjectValue&amp;lt;BattleActor&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; of all actors in a battle&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;q.battle.actors()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>JPAKx4</name></author>
	</entry>
</feed>