|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.spells.effects.Paralyzer
When placed on a monster, prevents the monster from moving for a while.
The Paralyzer attaches itself in the target's property list under the property name "@paralyzer".
Field Summary | |
static int |
DEFAULT_DURATION
|
Constructor Summary | |
Paralyzer()
Constructs a new Paralyzer, ready to place on the specified monster. |
|
Paralyzer(Monster target)
Constructs a new Paralyzer on the specified monster. |
|
Paralyzer(Monster target,
int duration)
Constructs a new Paralyzer with the specified target and duration. |
Method Summary | |
void |
dispel()
Stops paralyzing the target. |
int |
getDuration()
Retrieves the total duration for this paralysis. |
void |
hookEvent(java.lang.String hookName,
CommandEvent event)
Stops them from moving. |
void |
paralyze(Monster target)
Attaches to, and paralyzes, the specified target. |
void |
setDuration(int duration)
Sets the duration for the paralysis. |
void |
timerExpired()
Time to stop. |
java.lang.String |
toString()
Debugging string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int DEFAULT_DURATION
Constructor Detail |
public Paralyzer()
public Paralyzer(Monster target)
target
- the monster to paralyzepublic Paralyzer(Monster target, int duration)
target
- the monster to paralyzeduration
- the time (in millis) to paralyze the targetMethod Detail |
public void setDuration(int duration)
duration
- length of time to paralyze the target (in millis)public int getDuration()
public void paralyze(Monster target)
If it finds a previous @paralyzer on the target, it dispels the old one before adding the new one.
target
- the monster to paralyzepublic void hookEvent(java.lang.String hookName, CommandEvent event)
hookEvent
in interface HookCallback
event
- the move/push eventhookName
- the name of the hook, such as "movePreHook".public void timerExpired()
timerExpired
in interface Timed
public void dispel()
dispel
in interface Dispellable
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |