Class AttackingSpell

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

public class AttackingSpell extends Spell
A spell to attack an entity
Author:
madmetzger
  • Constructor Details

    • AttackingSpell

      public AttackingSpell(String name, Nature nature, int amount, int atk, int cooldown, int def, double lifesteal, int mana, int minimumlevel, int range, int rate, int regen, double modifier)
    • AttackingSpell

      public AttackingSpell(RPObject object)
  • Method Details

    • isTargetValid

      protected boolean isTargetValid(Entity caster, Entity target)
      Description copied from class: Spell
      Checks if the target Entity is applicable for this spell. Basically each Entity can target of a spell. Subclasses have to override this method if they want to be more strict in the choice of the target.
      Overrides:
      isTargetValid in class Spell
      Parameters:
      caster - the user of the spell
      target - the target Entity to check the applicability for
      Returns:
      true iff target is applicable to this spell
    • doEffects

      protected void doEffects(Player caster, Entity target)
      Description copied from class: Spell
      Provides the concrete behaviour of each concrete spell, i.e. a healing effect should done here
      Specified by:
      doEffects in class Spell