Class Coward
java.lang.Object
games.stendhal.server.entity.creature.impl.attack.Coward
- All Implemented Interfaces:
AttackStrategy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
attacks the target.boolean
canAttackNow(Creature creature)
Can the specified creature do an attack now?boolean
canAttackNow(Creature attacker, RPEntity target)
Can the specified creature do an attack against a specified target?void
findNewTarget(Creature creature)
void
getBetterAttackPosition(Creature creature)
int
getRange()
Get the maximum range of the attacking creature.boolean
hasValidTarget(Creature creature)
-
Constructor Details
-
Coward
public Coward()
-
-
Method Details
-
getBetterAttackPosition
-
attack
Description copied from interface:AttackStrategy
attacks the target.- Specified by:
attack
in interfaceAttackStrategy
- Parameters:
creature
- creature doing the attack
-
canAttackNow
Description copied from interface:AttackStrategy
Can the specified creature do an attack now?- Specified by:
canAttackNow
in interfaceAttackStrategy
- Parameters:
creature
- creature doing the attack- Returns:
- true, if it can attack, false otherwise
-
canAttackNow
Description copied from interface:AttackStrategy
Can the specified creature do an attack against a specified target?- Specified by:
canAttackNow
in interfaceAttackStrategy
- Parameters:
attacker
- creature doing the attacktarget
- potential target- Returns:
- true, if it can attack, false otherwise
-
findNewTarget
-
hasValidTarget
-
getRange
public int getRange()Description copied from interface:AttackStrategy
Get the maximum range of the attacking creature.- Specified by:
getRange
in interfaceAttackStrategy
- Returns:
- maximum range
-