be.saltwater.jaqel.scheduler
Class AttackAction

java.lang.Object
  extended bybe.saltwater.jaqel.scheduler.CreatureAction
      extended bybe.saltwater.jaqel.scheduler.AttackAction

public class AttackAction
extends CreatureAction


Constructor Summary
AttackAction(CreatureActionScheduler scheduler, Creature actor, Creature attacked, Weapon w, int times)
           
 
Method Summary
 void actionFinished()
          Called by CreatureActionScheduler when the action is finished.
 void actionStarted()
          Called by CreatureActionScheduler when the action is started.
 int getCost()
          Subclasses should calculate the cost in actionpoints to complete this action in this method
 int isValid()
          Subclasses should return a Creature.ORDER_* status code that indicates if this action is valid. return Creature.ORDER_OK if all is ok.
 
Methods inherited from class be.saltwater.jaqel.scheduler.CreatureAction
addAnimation, animationFinished, getActorCreature, getAnimations, getCreatureActionScheduler, getEndLocation, isAllowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttackAction

public AttackAction(CreatureActionScheduler scheduler,
                    Creature actor,
                    Creature attacked,
                    Weapon w,
                    int times)
Method Detail

getCost

public int getCost()
Description copied from class: CreatureAction
Subclasses should calculate the cost in actionpoints to complete this action in this method

Specified by:
getCost in class CreatureAction
See Also:
Creature.getActionPoints()

isValid

public int isValid()
Description copied from class: CreatureAction
Subclasses should return a Creature.ORDER_* status code that indicates if this action is valid. return Creature.ORDER_OK if all is ok.

Specified by:
isValid in class CreatureAction

actionStarted

public void actionStarted()
Description copied from class: CreatureAction
Called by CreatureActionScheduler when the action is started. Not abstract because you may not need to know this.

Overrides:
actionStarted in class CreatureAction

actionFinished

public void actionFinished()
Description copied from class: CreatureAction
Called by CreatureActionScheduler when the action is finished. Not abstract because you may not need to know this.

Overrides:
actionFinished in class CreatureAction