Class StupidCoward
java.lang.Object
games.stendhal.server.entity.creature.impl.attack.StupidCoward
- All Implemented Interfaces:
AttackStrategy
Implements the ai-profile stupid coward.
<ai>
<profile name="stupid coward"/>
</ai>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidattacks the target.booleancanAttackNow(Creature creature)Can the specified creature do an attack now?booleancanAttackNow(Creature attacker, RPEntity target)Can the specified creature do an attack against a specified target?voidfindNewTarget(Creature creature)voidgetBetterAttackPosition(Creature creature)intgetRange()Get the maximum range of the attacking creature.booleanhasValidTarget(Creature creature)
-
Constructor Details
-
StupidCoward
public StupidCoward()
-
-
Method Details
-
getBetterAttackPosition
-
attack
Description copied from interface:AttackStrategyattacks the target.- Specified by:
attackin interfaceAttackStrategy- Parameters:
creature- creature doing the attack
-
canAttackNow
Description copied from interface:AttackStrategyCan the specified creature do an attack now?- Specified by:
canAttackNowin interfaceAttackStrategy- Parameters:
creature- creature doing the attack- Returns:
- true, if it can attack, false otherwise
-
canAttackNow
Description copied from interface:AttackStrategyCan the specified creature do an attack against a specified target?- Specified by:
canAttackNowin 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:AttackStrategyGet the maximum range of the attacking creature.- Specified by:
getRangein interfaceAttackStrategy- Returns:
- maximum range
-