<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE section SYSTEM "../dtd/daidoc.dtd">
<section autotoc="yes">
  <title>Moves</title>
  <p>Moves are the basic movement behaviours. Basically a move can
  decide to take a step in a direction, stand still or not decide anything.
  If a move decides something no other move will execute, otherwise the
  decision is handed over to the next move behaviour in the list.
  * Moves that never passes the decision on are called "terminal moves", and
  should be the last ones in a mobs moves list.</p>
  <section>
    <title>Stand_still</title>
    <p>Usage: 
      <code>stand_still</code>
    </p>
    <p>Always stands still. Terminal</p>
    <section>
      <title>Parameters</title>
      <p>(No parameters)</p>
    </section>
  </section>
  <section>
    <title>Sleep</title>
    <p>Usage: 
      <code>sleep</code>
    </p>
    <p>Stand still if the mob's sleep flag is set. Should normally be
    high up in the moves list (except maybe for sleepwalkers and mobs
    that never sleep and never can be forced to sleep).</p>
    <section>
      <title>Parameters</title>
      <p>(No parameters)</p>
    </section>
  </section>
  <section>
    <title>Move_randomly</title>
    <p>Usage: 
      <code>move_randomly [xlimit=integer] [ylimit=integer]</code>
    </p>
    <p>Move around erratically by taking steps in random directions. Terminal.</p>
    <section>
      <title>Parameters</title>
      <dl>
        <dt>
          <code>xlimit</code> (integer, optional)
        </dt>
        <dd>Limits the x-distance from the starting point</dd>
        <dt>
          <code>ylimit</code> (integer, optional)
        </dt>
        <dd>Limits the y-distance from the starting point</dd>
      </dl>
    </section>
  </section>
  <section>
    <title>Dont_stand_still</title>
    <p>Usage: 
      <code>dont_stand_still [max_idle_time=integer]</code>
    </p>
    <p>Makes sure the mob never stands 100% still</p>
    <section>
      <title>Parameters</title>
      <dl>
        <dt>
          <code>max_idle_time</code> (integer, optional)
        </dt>
        <dd>Max allowed still time (number of moves)</dd>
      </dl>
    </section>
  </section>
  <section>
    <title>Move_towards_home</title>
    <p>Usage: 
      <code>move_towards_home</code>
    </p>
    <p>Move towards the mob's starting point. Terminal.</p>
    <section>
      <title>Parameters</title>
      <p>(No parameters)</p>
    </section>
  </section>
  <section>
    <title>Move_towards_enemy</title>
    <p>Usage: 
      <code>move_towards_enemy</code>
    </p>
    <p>Move towards the current enemy if any</p>
    <section>
      <title>Parameters</title>
      <p>(No parameters)</p>
    </section>
  </section>
  <section>
    <title>Move_towards_enemy_last_known_pos</title>
    <p>Usage: 
      <code>move_towards_enemy_last_known_pos</code>
    </p>
    <p>Move towards the current enemy's last known position if the current position is unknown.</p>
    <section>
      <title>Parameters</title>
      <p>(No parameters)</p>
    </section>
  </section>
  <section>
    <title>Search_for_lost_enemy</title>
    <p>Usage: 
      <code>search_for_lost_enemy</code>
    </p>
    <p>Search around for an enemy that can't be seen (until the memory of the enemy times out).</p>
    <section>
      <title>Parameters</title>
      <p>(No parameters)</p>
    </section>
  </section>
  <section>
    <title>Move_towards_waypoint</title>
    <p>Usage: 
      <code>move_towards_waypoint</code>
    </p>
    <p>Move towards the current active waypoint if any</p>
    <section>
      <title>Parameters</title>
      <p>(No parameters)</p>
    </section>
  </section>
  <section>
    <title>Run_away_from_enemy</title>
    <p>Usage: 
      <code>run_away_from_enemy [hp_threshold=integer]</code>
    </p>
    <p>Runs away from the current enemy if scared.</p>
    <section>
      <title>Parameters</title>
      <dl>
        <dt>
          <code>hp_threshold</code> (integer, optional)
        </dt>
        <dd>Become scared if current_hp &lt; HP_THRESHOLD % of max_hp</dd>
      </dl>
    </section>
  </section>
  <section>
    <title>Keep_distance_to_enemy</title>
    <p>Usage: 
      <code>keep_distance_to_enemy [min_dist=integer] [max_dist=integer]</code>
    </p>
    <p>Try to stay at a certain distance from the enemy,
    good for mobs with distance attacks</p>
    <section>
      <title>Parameters</title>
      <dl>
        <dt>
          <code>min_dist</code> (integer, optional)
        </dt>
        <dd />
        <dt>
          <code>max_dist</code> (integer, optional)
        </dt>
        <dd />
      </dl>
    </section>
  </section>
  <section>
    <title>Step_back_after_swing</title>
    <p>Usage: 
      <code>step_back_after_swing [dist=integer]</code>
    </p>
    <p>To be removed, or renamed to "hit and run"</p>
    <section>
      <title>Parameters</title>
      <dl>
        <dt>
          <code>dist</code> (integer, optional)
        </dt>
        <dd />
      </dl>
    </section>
  </section>
  <section>
    <title>Avoid_line_of_fire</title>
    <p>Usage: 
      <code>avoid_line_of_fire</code>
    </p>
    <p>Try to stay out of the line of fire as much as possible
    if we belive our enemy uses distance attacks</p>
    <section>
      <title>Parameters</title>
      <p>(No parameters)</p>
    </section>
  </section>
  <section>
    <title>Optimize_line_of_fire</title>
    <p>Usage: 
      <code>optimize_line_of_fire</code>
    </p>
    <p>Try to move to a position with free line of fire towards
    enemy. A good archer's answer to AVOID_LINE_OF_FIRE</p>
    <section>
      <title>Parameters</title>
      <p>(No parameters)</p>
    </section>
  </section>
  <section>
    <title>Plugin_move</title>
    <p>Usage: 
      <code>plugin_move plugin=string behaviour=string [options=string]</code>
    </p>
    <p>Plugin interface for moves</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>
