java.lang.Object
games.stendhal.server.entity.creature.impl.attack.Coward
All Implemented Interfaces:
AttackStrategy

public class Coward extends Object
  • Constructor Details

    • Coward

      public Coward()
  • Method Details

    • getBetterAttackPosition

      public void getBetterAttackPosition(Creature creature)
    • attack

      public void attack(Creature creature)
      Description copied from interface: AttackStrategy
      attacks the target.
      Specified by:
      attack in interface AttackStrategy
      Parameters:
      creature - creature doing the attack
    • canAttackNow

      public boolean canAttackNow(Creature creature)
      Description copied from interface: AttackStrategy
      Can the specified creature do an attack now?
      Specified by:
      canAttackNow in interface AttackStrategy
      Parameters:
      creature - creature doing the attack
      Returns:
      true, if it can attack, false otherwise
    • canAttackNow

      public boolean canAttackNow(Creature attacker, RPEntity target)
      Description copied from interface: AttackStrategy
      Can the specified creature do an attack against a specified target?
      Specified by:
      canAttackNow in interface AttackStrategy
      Parameters:
      attacker - creature doing the attack
      target - potential target
      Returns:
      true, if it can attack, false otherwise
    • findNewTarget

      public void findNewTarget(Creature creature)
    • hasValidTarget

      public boolean hasValidTarget(Creature creature)
    • getRange

      public int getRange()
      Description copied from interface: AttackStrategy
      Get the maximum range of the attacking creature.
      Specified by:
      getRange in interface AttackStrategy
      Returns:
      maximum range