|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread wyvern.kernel.commands.AbstractAI wyvern.lib.ai.BeelineAI
Makes hostile monsters attack the nearest player, without checking for walls or obstructions. A fairly useless AI unless the monster is in a map where there are no obstructions, in which case it's much more efficient than the StandardAI.
Field Summary |
Fields inherited from class wyvern.kernel.commands.AbstractAI |
commandables_, commandList_, queues_ |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Fields inherited from interface wyvern.lib.AI |
DEFAULT_MONSTER_INERTIA, DEFAULT_WANDER_RANGE |
Constructor Summary | |
protected |
BeelineAI(java.lang.String name)
|
Method Summary | |
static AI |
add(Commandable m)
Puts a monster under this AI's control. |
Player |
findClosestPlayer(Point loc1,
java.util.Set players)
Finds the most desirable player to attack, using the simple logic "closer is better". |
static AI |
getImpl()
|
void |
moveRandomly(Commandable agent,
EventQueue q)
Moves the commandable in a random direction. |
static void |
remove(Commandable m)
Removes a monster from our control. |
void |
think(Commandable agent,
EventQueue q)
Decide what to do next. |
Methods inherited from class wyvern.kernel.commands.AbstractAI |
addCommandable, addToHateList, chooseRandomDir, getAverageTime, getCommand, getNumThinks, getProfilingInfo, getTotalTime, isControlling, moveRandomly, notifyAttacked, registerCommand, removeCommandable, requestEvent, run, serviceQueues, thinkForQueue, unregisterCommand |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected BeelineAI(java.lang.String name)
Method Detail |
public static AI getImpl()
public static AI add(Commandable m)
m
- a monster to add
public static void remove(Commandable m)
m
- the monster to addpublic void think(Commandable agent, EventQueue q)
think
in interface AI
think
in class AbstractAI
agent
- the commandable to think forq
- the commandable's event queuepublic Player findClosestPlayer(Point loc1, java.util.Set players)
loc1
- the location of the monster that's lookingplayers
- the set of players in the current map
public void moveRandomly(Commandable agent, EventQueue q)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |