<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE section SYSTEM "../dtd/daidoc.dtd">
<section autotoc="yes">
  <title>Actions</title>
  <p>Actions are misc actions that takes time, but aren't movement.
  The handling of this class isn't 100% decided on yet, so be prepared
  for changes in the future.
  Currently we go though the list of actions and execute the first that
  wants to be executed, ignoring the rest.</p>
  <section>
    <title>Melee_attack_enemy</title>
    <p>Usage: 
      <code>melee_attack_enemy</code>
    </p>
    <p>Attack the current enemy with melee weapons if within range</p>
    <section>
      <title>Parameters</title>
      <p>(No parameters)</p>
    </section>
  </section>
  <section>
    <title>Bow_attack_enemy</title>
    <p>Usage: 
      <code>bow_attack_enemy</code>
    </p>
    <p>Attack the current enemy with bow or throw weapons if within range
    and line of fire</p>
    <section>
      <title>Parameters</title>
      <p>(No parameters)</p>
    </section>
  </section>
  <section>
    <title>Spell_attack_enemy</title>
    <p>Usage: 
      <code>spell_attack_enemy</code>
    </p>
    <p>Attack the current enemy with distance spells if within range
    and line of fire</p>
    <section>
      <title>Parameters</title>
      <p>(No parameters)</p>
    </section>
  </section>
  <section>
    <title>Heal_friend</title>
    <p>Usage: 
      <code>heal_friend [healing_min_friendship=integer] [cure_poison_min_friendship=integer] [cure_disease_min_friendship=integer]</code>
    </p>
    <p>Cast healing/restoring spells on friends. Casting on self is
    always implicit, but casting on others will only be done if
    their friendship is above the specified values AND a value is
    specified.</p>
    <section>
      <title>Parameters</title>
      <dl>
        <dt>
          <code>healing_min_friendship</code> (integer, optional)
        </dt>
        <dd>Friendship threshold for healing</dd>
        <dt>
          <code>cure_poison_min_friendship</code> (integer, optional)
        </dt>
        <dd>Friendship threshold for cure poison</dd>
        <dt>
          <code>cure_disease_min_friendship</code> (integer, optional)
        </dt>
        <dd>Friendship threshold for cure disease</dd>
      </dl>
    </section>
  </section>
  <section>
    <title>Plugin_action</title>
    <p>Usage: 
      <code>plugin_action plugin=string behaviour=string [options=string]</code>
    </p>
    <p>Plugin interface for actions</p>
    <section>
      <title>Parameters</title>
      <dl>
        <dt>
          <code>plugin</code> (string, mandatory)
        </dt>
        <dd>Plugin name, e.g. "lua"</dd>
        <dt>
          <code>behaviour</code> (string, mandatory)
        </dt>
        <dd>Behaviour name visible to plugin</dd>
        <dt>
          <code>options</code> (string, optional)
        </dt>
        <dd>Behaviour parameters visible to plugin</dd>
      </dl>
    </section>
  </section>
</section>
