|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.starhope.appius.user.GeneralUser
org.starhope.appius.user.AbstractNonPlayerCharacter
com.tootsville.npc.Smudge
public class Smudge
| Nested Class Summary | |
|---|---|
(package private) class |
Smudge.DoSomethingRunner
WRITEME: Document this type. |
(package private) class |
Smudge.MoveRandomlyRunner
WRITEME: Document this type. |
(package private) class |
Smudge.RunBesmudgement
WRITEME: Document this type. |
(package private) static class |
Smudge.SmudgeGoHome
WRITEME: Document this type. |
(package private) class |
Smudge.StainDropRunner
WRITEME: Document this type. |
(package private) class |
Smudge.SurfaceOntoBeachRunner
WRITEME: Document this type. |
private class |
Smudge.TravelToRoomRunner
WRITEME: Document this type. |
(package private) class |
Smudge.WanderRunner
WRITEME: Document this type. |
| Field Summary | |
|---|---|
private boolean |
fleeing
WRITEME |
private static int |
GREETING_RATE
WRITEME |
private Pattern |
hiPattern
WRITEME |
protected static AtomicInteger |
instanceCounter
Counter for getting instance ID's |
private long |
lastObservedPlayers
WRITEME |
private static int |
MAX_SMUDGES_PER_ROOM
stop staining the room when we hit this point |
private static int |
OBSERVATION_RATE
WRITEME |
private boolean |
returningToOcean
WRITEME |
private long |
seenShade
WRITEME |
private long |
seenZap
WRITEME |
private static long |
serialVersionUID
Java serialisation unique ID |
(package private) List<Integer> |
smudgeItems
Room items, the things that get left behind when Smudge smudges up a place. |
String |
startRoom
WRITEME: Document this brpocock@star-hope.org |
(package private) long |
tLastActionCheck
frequency to check for future actions |
| Fields inherited from class org.starhope.appius.user.AbstractNonPlayerCharacter |
|---|
buddyList, casualSpeechQueue, casualSpeechRate, instanceID, kalendor, lastActive, lastSpoken |
| Fields inherited from class org.starhope.appius.user.GeneralUser |
|---|
baseStats, collisionBounds, currentRoom, facing, lastUserMovement, pathFinder, userRecord |
| Constructor Summary | |
|---|---|
Smudge(Zone z)
WRITEME brpocock@star-hope.org |
|
| Method Summary | |
|---|---|
void |
acceptPublicMessage(AbstractUser from,
String message)
Accept a public chat message. |
private boolean |
allRoomsAreSmudgedUp()
|
void |
ban(AbstractUser u,
String banReason)
|
(package private) void |
besmudge()
WRITEME: Document this method brpocock@star-hope.org |
boolean |
canSeeUser(String name)
|
private void |
checkForLazySmudge(long currentTime)
See if this Smudge has become lazy, and lost his way; if so, start him rocking again |
private void |
checkObservedPlayers(long currentTime)
|
private int |
countSmudges(Room r)
count the number of smudges present in a given room |
void |
doSomething()
WRITEME: Document this method brpocock@star-hope.org |
protected int |
getInstanceID()
|
private int |
getMaxSmudges()
WRITEME: Document this method brpocock@star-hope.org |
private void |
getSmudgeItems()
WRITEME: Document this method brpocock@star-hope.org |
int |
hashCode()
|
void |
moveRandomly()
WRITEME: Document this method brpocock@star-hope.org |
private void |
moveTowardsExit()
WRITEME: Document this method brpocock@star-hope.org |
private void |
moveTowardsExit(String roomToward)
WRITEME: Document this method brpocock@star-hope.org |
private void |
pickASpotAndSmudgeIt()
WRITEME: Document this method brpocock@star-hope.org |
private void |
returnToOcean()
WRITEME: Document this method brpocock@star-hope.org |
private boolean |
roomIsSmudgedUp()
WRITEME: Document this method brpocock@star-hope.org |
(package private) void |
scheduleNextPatrol()
WRITEME: Document this method brpocock@star-hope.org |
(package private) void |
surfaceOntoBeach()
WRITEME: Document this method brpocock@star-hope.org |
void |
tick(long currentTime,
long deltaTime)
This method is called periodically from the metronome thread. |
void |
wander()
WRITEME: Document this method brpocock@star-hope.org |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
final List<Integer> smudgeItems
protected static final AtomicInteger instanceCounter
private boolean returningToOcean
private boolean fleeing
private static final int MAX_SMUDGES_PER_ROOM
private long seenZap
private long seenShade
private static final int GREETING_RATE
private static final int OBSERVATION_RATE
private long lastObservedPlayers
private final Pattern hiPattern
long tLastActionCheck
public String startRoom
| Constructor Detail |
|---|
public Smudge(Zone z)
throws NotFoundException,
GameLogicException
z - zone in which to spawn
GameLogicException - WRITEME
NotFoundException - WRITEME| Method Detail |
|---|
public void acceptPublicMessage(AbstractUser from,
String message)
RoomListener
acceptPublicMessage in interface RoomListeneracceptPublicMessage in class AbstractNonPlayerCharacterfrom - The speakermessage - The spoken text or /emoteAbstractNonPlayerCharacter.acceptPublicMessage(org.starhope.appius.user.AbstractUser,
java.lang.String)private boolean allRoomsAreSmudgedUp()
public void ban(AbstractUser u,
String banReason)
throws PrivilegeRequiredException
u - WRITEMEbanReason - WRITEME
PrivilegeRequiredException - WRITEMEAbstractUser.ban(org.starhope.appius.user.AbstractUser,
java.lang.String)void besmudge()
public boolean canSeeUser(String name)
name - writeme
private void checkForLazySmudge(long currentTime)
currentTime - the current timeprivate void checkObservedPlayers(long currentTime)
currentTime - the time it's calledprivate int countSmudges(Room r)
r - the room
public void doSomething()
protected int getInstanceID()
getInstanceID in class AbstractNonPlayerCharacterAbstractNonPlayerCharacter.getInstanceID()private int getMaxSmudges()
private void getSmudgeItems()
public int hashCode()
hashCode in class AbstractNonPlayerCharacterAbstractNonPlayerCharacter.hashCode()public void moveRandomly()
private void moveTowardsExit()
private void moveTowardsExit(String roomToward)
roomToward - WRITEMEprivate void pickASpotAndSmudgeIt()
private void returnToOcean()
private boolean roomIsSmudgedUp()
void scheduleNextPatrol()
void surfaceOntoBeach()
public void tick(long currentTime,
long deltaTime)
throws UserDeadException
AcceptsMetronomeTicks
tick in interface AcceptsMetronomeTickstick in class AbstractNonPlayerCharactercurrentTime - Time since epoch at the start of the global
metronome propagation, as per
System.currentTimeMillis()deltaTime - Delta-time in milliseconds since the prior
global metronome tick
UserDeadException - if a user has died during this tickAcceptsMetronomeTicks.tick(long,
long)public void wander()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||