Class ModifyDefSpell

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

public class ModifyDefSpell extends Spell
Spell to modify a target's def value
Author:
madmetzger
  • Constructor Details

    • ModifyDefSpell

      public ModifyDefSpell(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)
      Create a new ModifyDefSpell
      Parameters:
      name -
      nature -
      amount -
      atk -
      cooldown -
      def -
      lifesteal -
      mana -
      minimumlevel -
      range -
      rate -
      regen -
      modifier -
    • ModifyDefSpell

      public ModifyDefSpell(RPObject object)
      Create a ModifyDefSpell from a RPObject
      Parameters:
      object -
  • Method Details

    • 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
    • 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