public class Spell
extends java.lang.Object
Constructor and Description |
---|
Spell(@NotNull java.lang.String name,
@NotNull SkillSet skillSet,
@NotNull Stats stats)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addSpellListener(@NotNull SpellListener listener)
Adds a
SpellListener to be notified of changes. |
int |
getCastingTime()
Returns the casting time.
|
int |
getDamage()
Returns the damage done by the spell.
|
int |
getFaceNum()
Returns the face number.
|
int |
getGrace()
Returns the grace needed to cast the spell.
|
int |
getLevel()
Returns the spell level.
|
int |
getMana()
Returns the mana needed to cast the spell.
|
@NotNull java.lang.String |
getMessage()
Returns the description.
|
@NotNull java.lang.String |
getName()
Returns the spell name.
|
int |
getPath()
Returns the spell path.
|
int |
getSkill()
Returns the spell's skill.
|
int |
getTag()
Returns the tag ID.
|
@NotNull java.lang.String |
getTooltipText()
Returns a description for this spell to be used in tooltips.
|
boolean |
isUnknown()
Returns whether this spell is unknown to the character.
|
void |
removeSpellListener(@NotNull SpellListener listener)
Removes a
SpellListener to be notified of changes. |
void |
setParameters(int faceNum,
int tag,
@NotNull java.lang.String message,
int level,
int castingTime,
int mana,
int grace,
int damage,
int skill,
int path)
Updates the spell's parameters.
|
void |
setUnknown(boolean unknown)
Marks this spell as known or unknown for the character.
|
@NotNull java.lang.String |
toString() |
void |
updateParameters(boolean updateMana,
int mana,
boolean updateGrace,
int grace,
boolean updateDamage,
int damage)
Updates the spell's parameters.
|
public int getTag()
public int getLevel()
public int getCastingTime()
public int getMana()
public int getGrace()
public int getDamage()
public int getSkill()
Stats.CS_STAT_SKILLINFO
.public int getPath()
@NotNull public @NotNull java.lang.String getName()
@NotNull public @NotNull java.lang.String getMessage()
public int getFaceNum()
public boolean isUnknown()
public void setUnknown(boolean unknown)
unknown
- whether this spell is unknownpublic void setParameters(int faceNum, int tag, @NotNull @NotNull java.lang.String message, int level, int castingTime, int mana, int grace, int damage, int skill, int path)
faceNum
- the face numbertag
- the tag IDmessage
- the descriptionlevel
- the spell levelcastingTime
- the casting timemana
- the mana needed to cast the spellgrace
- the grace needed to cast the spelldamage
- the damage done by the spellskill
- the spell's skillpath
- the spell pathpublic void updateParameters(boolean updateMana, int mana, boolean updateGrace, int grace, boolean updateDamage, int damage)
updateMana
- whether to update the manamana
- the mana needed to cast the spellupdateGrace
- whether to update the gracegrace
- the grace needed to cast the spellupdateDamage
- whether to update the damagedamage
- the damage done by the spell@NotNull public @NotNull java.lang.String toString()
toString
in class java.lang.Object
@NotNull public @NotNull java.lang.String getTooltipText()
public void addSpellListener(@NotNull @NotNull SpellListener listener)
SpellListener
to be notified of changes.listener
- the listener to addpublic void removeSpellListener(@NotNull @NotNull SpellListener listener)
SpellListener
to be notified of changes.listener
- the listener to remove