wyvern.lib.ai.behaviors
Class RangedAttackBE

java.lang.Object
  extended bywyvern.lib.ai.behaviors.BehaviorElement
      extended bywyvern.lib.ai.behaviors.RangedAttackBE

public class RangedAttackBE
extends BehaviorElement


Method Summary
 boolean getAction(Commandable monster, Behavior behavior)
           
static BehaviorElement getImpl()
           
 boolean tryRangeWeapon(Commandable monster, Commandable target)
          Attempts to fire a range weapon, throw something, use a wand or scroll, etc. instead of chasing a player.
 boolean tryStepBack(Commandable monster, Commandable target)
          In the specific case of a range-weapon-user or spellcaster that's adjacent to their target, we try to step away from the target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getImpl

public static BehaviorElement getImpl()

getAction

public boolean getAction(Commandable monster,
                         Behavior behavior)
Overrides:
getAction in class BehaviorElement

tryRangeWeapon

public boolean tryRangeWeapon(Commandable monster,
                              Commandable target)
Attempts to fire a range weapon, throw something, use a wand or scroll, etc. instead of chasing a player.

Parameters:
monster - the monster that's looking
Returns:
true if we used a range weapon

tryStepBack

public boolean tryStepBack(Commandable monster,
                           Commandable target)
In the specific case of a range-weapon-user or spellcaster that's adjacent to their target, we try to step away from the target.

Parameters:
monster - the monster
target - the target
Returns:
true if we stepped away