Class DefaultSpell
java.lang.Object
games.stendhal.server.core.rule.defaultruleset.DefaultSpell
Spell information are loaded from XML into a
DefaultSpell
.
The EntityManager
uses this information to instantiate objects of
the right type.- Author:
- madmetzger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
getAtk()
int
int
getDef()
Class<?>
double
int
getMana()
int
double
getName()
int
getRange()
int
getRate()
int
getRegen()
getSpell()
Creates a new instance using the configured implementation class of that spellvoid
void
void
setCooldown(String cooldown)
void
void
setLifesteal(String lifesteal)
void
void
setMinimumLevel(String minimumLevel)
void
setModifier(String modifier)
void
sets the nature for the spellvoid
void
void
-
Constructor Details
-
DefaultSpell
Creates a newDefaultSpell
- Parameters:
name
- the name of that spellclazzName
- class name
-
-
Method Details
-
getSpell
Creates a new instance using the configured implementation class of that spell- Returns:
- an instance of the specified implementation class
-
getName
- Returns:
- the name
-
getImplementationClass
- Returns:
- the class object specified in the xml configuration
-
getMana
public int getMana()- Returns:
- the mana
-
setMana
- Parameters:
mana
- the mana to set
-
getCooldown
public int getCooldown()- Returns:
- the cooldown
-
setCooldown
- Parameters:
cooldown
- the cooldown to set
-
getMinimumLevel
public int getMinimumLevel()- Returns:
- the minimumLevel
-
setMinimumLevel
- Parameters:
minimumLevel
- the minimumLevel to set
-
getRange
public int getRange()- Returns:
- the range
-
setRange
- Parameters:
range
- the range to set
-
getAtk
public int getAtk()- Returns:
- the atk
-
setAtk
- Parameters:
atk
- the atk to set
-
getDef
public int getDef()- Returns:
- the def
-
setDef
- Parameters:
def
- the def to set
-
getAmount
public int getAmount()- Returns:
- the amount
-
setAmount
- Parameters:
amount
- the amount to set
-
getRegen
public int getRegen()- Returns:
- the regen
-
setRegen
- Parameters:
regen
- the regen to set
-
getRate
public int getRate()- Returns:
- the rate
-
setRate
- Parameters:
rate
- the rate to set
-
getLifesteal
public double getLifesteal()- Returns:
- the lifesteal
-
setLifesteal
- Parameters:
lifesteal
- the lifesteal to set
-
setNature
sets the nature for the spell- Parameters:
nature
- the spell's nature
-
getNature
- Returns:
- the spell's nature
-
getModifier
public double getModifier()- Returns:
- the modifier value
-
setModifier
- Parameters:
modifier
- the modifier to set
-