Class StatusAttacker
java.lang.Object
games.stendhal.server.entity.status.StatusAttacker
- Direct Known Subclasses:
PoisonAttacker
a status attacker
- Author:
- hendrik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
gets the probabilityprotected Status
gets the statusvoid
onAttackAttempt(RPEntity target, RPEntity attacker)
an attempt to attack the target, it may succeed or notvoid
the target was hit, this may or may not have caused damage
-
Constructor Details
-
StatusAttacker
a Status attacker- Parameters:
status
- status to attack withprobability
- probability of an attack in this turn
-
-
Method Details
-
getProbability
public double getProbability()gets the probability- Returns:
- probability
-
getStatus
gets the status- Returns:
- status
-
onAttackAttempt
an attempt to attack the target, it may succeed or not- Parameters:
target
- target defenderattacker
- attacker attacker
-
onHit
the target was hit, this may or may not have caused damage- Parameters:
target
- target defenderattacker
- attacker attackerdamage
- amount of damage
-
getStatusName
- Returns:
- Name of the status that this attacker can inflict
-