|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.globalse.arena.frag.objects.FRAGObject | +--org.globalse.arena.sword.engine.Item | +--org.globalse.arena.sword.engine.Spell
A Spell is an Item that can modify the properties of other adventurers when used on them. For example, a spell could decrease the mana of another adventurer by a certain amount
FRAGObject
,
Sword
, Serialized Form
Fields inherited from class org.globalse.arena.sword.engine.Item |
weight |
Fields inherited from class org.globalse.arena.frag.objects.FRAGObject |
controller,
gameName,
influenceRange,
objectName,
owner,
position,
visibilityRange |
Constructor Summary | |
Spell()
|
Method Summary | |
double |
getHealthBonus()
Returns the amount of health an Adventurer gains (loses if the return value is negative) when the Spell is used on him. |
double |
getHealthMaxBonus()
Returns the amount of healthMax (upper limit for health) an Adventurer gains (loses if the return value is negative) when the Spell is used on him. |
double |
getInventoryMaxBonus()
Returns the amount of inventoryMaxBonus (upper limit for the inventory) an Adventurer gains (loses if the return value is negative) when the Spell is used on him. |
double |
getMagicPowerBonus()
Returns the amount of magic power an Adventurer gains (loses if the return value is negative) when the Spell is used on him. |
double |
getMagicPowerNeeded()
Returns the amount of magic power needed that the adventurer should have in order to cast a certain spell. |
double |
getManaBonus()
Returns the amount of mana an Adventurer gains (loses if the return value is negative) when the Spell is used on him. |
double |
getManaMaxBonus()
Returns the amount of manaMax (upper limit for mana) an Adventurer gains (loses if the return value is negative) when the Spell is used on him. |
double |
getManaNeeded()
Returns the amount of mana needed that the adventurer should have in order to cast a certain spell. |
double |
getStrengthBonus()
Returns the amount of strength an Adventurer gains (loses if the return value is negative) when the Spell is used on him. |
void |
init(java.lang.String gameName,
java.lang.String objectName,
double weight,
java.lang.String type,
double healthBonus,
double healthMaxBonus,
double manaBonus,
double manaMaxBonus,
double magicPowerBonus,
double inventoryMaxBonus,
double strengthBonus,
double manaNeeded,
double magicPowerNeeded)
Initializes a Spell with the given properties (see below). |
boolean |
isItemUsableBy(java.lang.String owner)
Checks whether this spell belongs currently to someone |
boolean |
useWith(java.lang.String target)
Is used when an Adventurer casts this spell on other Adventurers, modifying their properties (like health, mana, etc) depending on the type of spell that is used |
Methods inherited from class org.globalse.arena.sword.engine.Item |
actionEvent,
checkCollision,
draw,
getCollisionSphere,
getDescription,
getDimensions,
getImage,
getObjectName,
getType,
getVisible,
init,
setVisible |
Methods inherited from class org.globalse.arena.frag.objects.FRAGObject |
checkAndResetMark,
checkMark,
clone,
controlAcquired,
controlLost,
getGameManager,
getInfluenceRange,
getObjectManager,
getPosition,
killed,
mark,
newerVersion,
setInfluenceRange,
setPosition |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Spell()
Method Detail |
public void init(java.lang.String gameName, java.lang.String objectName, double weight, java.lang.String type, double healthBonus, double healthMaxBonus, double manaBonus, double manaMaxBonus, double magicPowerBonus, double inventoryMaxBonus, double strengthBonus, double manaNeeded, double magicPowerNeeded)
weight
- the weight (in kg) of the itemtype
- a String that denotes the kind of item (sword, apple, ring, ...)healthBonus
- the health bonus of the itemhealthMaxBonus
- the healthMax bonus of the itemmanaBonus
- the mana bonus of the itemmanaMaxBonus
- the manaMax bonus of the itemmagicPowerBonus
- the magicPower bonus of the iteminventoryMaxBonus
- the inventoryMax bonus of the itemstrengthBonus
- the inventoryMax bonus of the itemmagicPowerNeeded
- the magic power needed to cast certain spellmanaNeeded
- the mana needed to cast certain spellpublic double getHealthBonus()
public double getHealthMaxBonus()
public double getManaBonus()
public double getManaMaxBonus()
public double getMagicPowerBonus()
public double getInventoryMaxBonus()
public double getMagicPowerNeeded()
public double getManaNeeded()
public double getStrengthBonus()
public boolean isItemUsableBy(java.lang.String owner)
public boolean useWith(java.lang.String target)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |