java.lang.Object
games.stendhal.server.core.rule.defaultruleset.DefaultSpell

public class DefaultSpell extends Object
Spell information are loaded from XML into a DefaultSpell. The EntityManager uses this information to instantiate objects of the right type.
Author:
madmetzger
  • Constructor Details

    • DefaultSpell

      public DefaultSpell(String name, String clazzName)
      Creates a new DefaultSpell
      Parameters:
      name - the name of that spell
      clazzName - class name
  • Method Details

    • getSpell

      public Spell getSpell()
      Creates a new instance using the configured implementation class of that spell
      Returns:
      an instance of the specified implementation class
    • getName

      public String getName()
      Returns:
      the name
    • getImplementationClass

      public Class<?> getImplementationClass()
      Returns:
      the class object specified in the xml configuration
    • getMana

      public int getMana()
      Returns:
      the mana
    • setMana

      public void setMana(String mana)
      Parameters:
      mana - the mana to set
    • getCooldown

      public int getCooldown()
      Returns:
      the cooldown
    • setCooldown

      public void setCooldown(String cooldown)
      Parameters:
      cooldown - the cooldown to set
    • getMinimumLevel

      public int getMinimumLevel()
      Returns:
      the minimumLevel
    • setMinimumLevel

      public void setMinimumLevel(String minimumLevel)
      Parameters:
      minimumLevel - the minimumLevel to set
    • getRange

      public int getRange()
      Returns:
      the range
    • setRange

      public void setRange(String range)
      Parameters:
      range - the range to set
    • getAtk

      public int getAtk()
      Returns:
      the atk
    • setAtk

      public void setAtk(String atk)
      Parameters:
      atk - the atk to set
    • getDef

      public int getDef()
      Returns:
      the def
    • setDef

      public void setDef(String def)
      Parameters:
      def - the def to set
    • getAmount

      public int getAmount()
      Returns:
      the amount
    • setAmount

      public void setAmount(String amount)
      Parameters:
      amount - the amount to set
    • getRegen

      public int getRegen()
      Returns:
      the regen
    • setRegen

      public void setRegen(String regen)
      Parameters:
      regen - the regen to set
    • getRate

      public int getRate()
      Returns:
      the rate
    • setRate

      public void setRate(String rate)
      Parameters:
      rate - the rate to set
    • getLifesteal

      public double getLifesteal()
      Returns:
      the lifesteal
    • setLifesteal

      public void setLifesteal(String lifesteal)
      Parameters:
      lifesteal - the lifesteal to set
    • setNature

      public void setNature(String nature)
      sets the nature for the spell
      Parameters:
      nature - the spell's nature
    • getNature

      public Nature getNature()
      Returns:
      the spell's nature
    • getModifier

      public double getModifier()
      Returns:
      the modifier value
    • setModifier

      public void setModifier(String modifier)
      Parameters:
      modifier - the modifier to set