Class TrainingDummy

All Implemented Interfaces:
Killer, Cloneable, Iterable<String>, Serializable

public class TrainingDummy extends NPC
An entity that can be used for training a player's ATK & RATK stats.
  • Field Details

  • Constructor Details

    • TrainingDummy

      public TrainingDummy()
    • TrainingDummy

      public TrainingDummy(String image)
    • TrainingDummy

      public TrainingDummy(String image, String descr)
  • Method Details

    • generateRPClass

      public static void generateRPClass()
    • isAttackable

      public boolean isAttackable()
      Allow training dummies to be attacked.
      Overrides:
      isAttackable in class NPC
      Returns:
      true if this RPEntity is attackable.
    • onDamaged

      public void onDamaged(Entity attacker, int damage)
      Override this so training dummies do not lose HP & do not die.
      Overrides:
      onDamaged in class RPEntity
    • setMeleeOnly

      public void setMeleeOnly(boolean set)
      Marks dummy to only be usable with melee weapons only.
    • isMeleeOnly

      public boolean isMeleeOnly()
      Checks if only melee weapons may be used against this dummy.
      Returns:
      true if only melee weapons may be used, false otherwise.
    • canBeAttacked

      public boolean canBeAttacked(RPEntity entity)
      Checks requirements for attacking this entity.
      Parameters:
      entity - The entity that wants to attack.
      Returns:
      true if can attack, false otherwise.