<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
  SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
  <func>
    <title>DoEnergy</title>
    <category>Objects</category>
    <subcat>Status</subcat>
    <version>5.1 OC</version>
    <syntax>
      <rtype>void</rtype>
      <params>
        <param>
          <type>int</type>
          <name>change</name>
          <desc>Change of the energy value (positive or negative) in percent of the maximum value. 100% correspond to the maximum physical value of 100,000.</desc>
        </param>
        <param>
          <type>bool</type>
          <name>exact</name>
          <desc>If <code>true</code>, change is applied to the exact energy value.</desc>
          <optional />
        </param>
        <param>
          <type>int</type>
          <name>damage_type</name>
          <desc>Damage cause specification which is to be passed to Fx*Damage callbacks of effects (see <emlink href="script/Effects.html">effect documentation</emlink>). Default is FX_Call_EngScript.</desc>
          <optional />
        </param>
        <param>
          <type>int</type>
          <name>caused_by</name>
          <desc>Number of the player who has caused the damage.</desc>
          <optional />
        </param>
      </params>
    </syntax>
    <desc>Adjusts the energy value of an object. Energy signifies life energy in living beings.</desc>
    <examples>
      <example>
        <code><funclink>GetCursor</funclink>(0)-&gt;DoEnergy(1);</code>
        <text>Gives 1 more energy to the selected clonk.</text>
      </example>
    </examples>
    <related>
      <funclink>GetEnergy</funclink>
    </related>
  </func>
  <author>Sven2</author><date>2001-11</date>
  <author>Clonkonaut</author><date>2008-04</date>
</funcs>
