Class StatusAttacker

java.lang.Object
games.stendhal.server.entity.status.StatusAttacker
Direct Known Subclasses:
PoisonAttacker

public class StatusAttacker extends Object
a status attacker
Author:
hendrik
  • Constructor Details

    • StatusAttacker

      public StatusAttacker(Status status, double probability)
      a Status attacker
      Parameters:
      status - status to attack with
      probability - probability of an attack in this turn
  • Method Details

    • getProbability

      public double getProbability()
      gets the probability
      Returns:
      probability
    • getStatus

      protected Status getStatus()
      gets the status
      Returns:
      status
    • onAttackAttempt

      public void onAttackAttempt(RPEntity target, RPEntity attacker)
      an attempt to attack the target, it may succeed or not
      Parameters:
      target - target defender
      attacker - attacker attacker
    • onHit

      public void onHit(RPEntity target, RPEntity attacker, int damage)
      the target was hit, this may or may not have caused damage
      Parameters:
      target - target defender
      attacker - attacker attacker
      damage - amount of damage
    • getStatusName

      public String getStatusName()
      Returns:
      Name of the status that this attacker can inflict