|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.spells.effects.Scarer
When invoked on a monster, enqueues a number of random moves for the monster.
Field Summary | |
static int |
BUNGLE_CHANCE
Additional chance to bungle spells while scared. |
static int |
DEFAULT_INTERVAL
This number is tricky to get right, since enqueueing moves is a major source of lag for international players, or players on very slow (or high-latency) connections, like handhelds. |
static int |
DEFAULT_LEVEL
Default level for the spell. |
static java.lang.String[] |
MESSAGES
Random messages a player can emit when scared. |
Constructor Summary | |
Scarer()
Constructs a new Scarer, ready to invoke on the specified monster. |
|
Scarer(Monster target)
Constructs a new Scarer on the specified monster. |
|
Scarer(Monster target,
int level)
Constructs a new Scarer |
Method Summary | |
void |
checkLegs(Monster target)
Checks if the target has legs. |
void |
dispel()
Dispels the effect. |
void |
dispelPrevious()
Dispels any previous Scarer, silently, so we can replace it. |
void |
emitMessage()
Target broadcasts a panicked message, chosen from random list. |
void |
scare(Monster target,
int level)
Scares the specified target. |
void |
setSilent()
Sets silent-mode, so the agent won't hear messages when it's dispelled. |
void |
spookMonster()
Enqueues a random, small number of random moves into the monster's queue, and issues a message to the monster. |
void |
timerExpired()
Dispels the effect. |
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_LEVEL
public static final int BUNGLE_CHANCE
public static final int DEFAULT_INTERVAL
public static final java.lang.String[] MESSAGES
Constructor Detail |
public Scarer()
public Scarer(Monster target)
target
- the target to confusepublic Scarer(Monster target, int level)
target
- the monster to confuselevel
- level of the spellMethod Detail |
public void scare(Monster target, int level)
target
- the monster to scarelevel
- level of the spellpublic void dispelPrevious()
public void checkLegs(Monster target)
public void spookMonster()
public void emitMessage()
public void timerExpired()
timerExpired
in interface Timed
public void dispel()
dispel
in interface Dispellable
public void setSilent()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |