| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectspellcast.enchantment.EnchantmentImpl
public class EnchantmentImpl
The default implementation of Enchantment.
Enchantment, 
Serialized Form| Constructor Summary | |
|---|---|
protected  | 
EnchantmentImpl()
Provided for serialization, do not use as a constructor.  | 
  | 
EnchantmentImpl(java.lang.String theName,
                IBeing theCaster,
                IBeing theTarget)
Create the Enchantment cast by theCaster at theTarget. | 
| Method Summary | |
|---|---|
 boolean | 
equals(java.lang.Object o)
Determine is this object equals the specified object.  | 
 IBeing | 
getCaster()
The caster of the Enchantment. | 
 java.lang.String | 
getDescription()
Return the description of this Enchantment. | 
 int | 
getDuration()
Return the duration left on this Enchantment before it
 expires. | 
 Id | 
getId()
The Id of this Enchantment. | 
 java.lang.String | 
getName()
Return the name of this Enchantment. | 
 DamageType | 
getResistance()
Gets the resistance of this Enchantment. | 
 IBeing | 
getTarget()
The target of the Enchantment. | 
 int | 
hashCode()
The hashCode of this object as per Object.hashCode. | 
 boolean | 
isPermanent()
isPermanent indicates whether the Enchantment is permanently enabled.  | 
 boolean | 
isResistant(DamageType damageType)
isResistant checks to see if the Enchantment will resist the specified DamageType. | 
 void | 
setCaster(IBeing theCaster)
Sets the casting Wizard of this Enchantment. | 
 void | 
setDescription(java.lang.String theDescription)
Set the description of this Enchantment. | 
 void | 
setDuration(int theDuration)
Sets the duration of this Enchantment. | 
 void | 
setId(Id theId)
Set the Id of this Enchantment. | 
 void | 
setName(java.lang.String theName)
Set the name of this Enchantment. | 
 void | 
setPermanent(boolean isPermanent)
Sets whether this Enchantment is permanent. | 
 void | 
setResistance(DamageType damageType)
Sets the resistance of this Enchantment to the specified
 DamageType. | 
 void | 
setTarget(IBeing theTarget)
Sets the target IBeing of this Enchantment. | 
 boolean | 
turnComplete()
Notify the Enchantment that a turn has been completed and to update itself accordingly.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
protected EnchantmentImpl()
public EnchantmentImpl(java.lang.String theName,
                       IBeing theCaster,
                       IBeing theTarget)
Enchantment cast by theCaster at theTarget.
theName - the name of this Enchantment.theCaster - the IBeing casting the
        Enchantment.theTarget - the IBeing that is the target of the
        Enchantment.| Method Detail | 
|---|
public final Id getId()
Id of this Enchantment.
getId in interface EnchantmentId of this Enchantment.public final void setId(Id theId)
Id of this Enchantment.
theId - the Id of this Enchantment.public final boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the object to test equality against.
Enchantment equals the specified
         object.public final int hashCode()
Object.hashCode.
hashCode in class java.lang.Objectpublic final java.lang.String getName()
Enchantment.
getName in interface EnchantmentEnchantment.public final void setName(java.lang.String theName)
Enchantment.
theName - the name of this Enchantment.public final java.lang.String getDescription()
Enchantment.
getDescription in interface EnchantmentEnchantment.public final void setDescription(java.lang.String theDescription)
Enchantment.
theDescription - the description of this Enchantment.public final boolean isPermanent()
isPermanent in interface Enchantmentpublic final void setPermanent(boolean isPermanent)
Enchantment is permanent.
setPermanent in interface EnchantmentisPermanent - whether this Enchantment is permanent.public final boolean isResistant(DamageType damageType)
DamageType.
isResistant in interface EnchantmentdamageType - the DamageType to check against for
        resistance.
DamageType, false otherwise.public final DamageType getResistance()
Enchantment. If no resistances
 then NullDamageType is returned.
DamageType that this Enchantment
         is resistant to.  If no resistances then
         NullDamageType is returned.public final void setResistance(DamageType damageType)
Enchantment to the specified
 DamageType.
damageType - the DamageType this
        Enchantment will be resistant to.public final int getDuration()
Enchantment before it
 expires.  If the Enchantment is permanent then this value
 has no meaning.
getDuration in interface EnchantmentEnchantment.public final void setDuration(int theDuration)
Enchantment.
theDuration - the duration of the Enchantment.public final boolean turnComplete()
turnComplete in interface Enchantmentpublic final IBeing getCaster()
Enchantment.
getCaster in interface EnchantmentEnchantment.public final void setCaster(IBeing theCaster)
Wizard of this Enchantment.
theCaster - the casting IBeing.public final IBeing getTarget()
Enchantment.
getTarget in interface EnchantmentEnchantment.public final void setTarget(IBeing theTarget)
IBeing of this Enchantment.
theTarget - the target IBeing of this
        Enchantment.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||