Modifier and Type | Field | Description |
---|---|---|
protected static int[] |
changeMap |
|
protected static int[] |
cold |
|
protected int |
currentWeather |
|
protected static int[] |
dry |
|
protected static int[] |
hot |
|
protected int |
nextWeather |
|
protected static int[] |
seasonalWeather |
|
protected int |
tickStatus |
|
protected int |
weatherTicker |
|
protected static int[] |
wet |
|
protected static int[] |
windy |
NUM_WEATHER, WEATHER_BLIZZARD, WEATHER_CLEAR, WEATHER_CLOUDY, WEATHER_DESCS, WEATHER_DROUGHT, WEATHER_DUSTSTORM, WEATHER_FOG, WEATHER_HAIL, WEATHER_HEAT_WAVE, WEATHER_RAIN, WEATHER_SLEET, WEATHER_SNOW, WEATHER_THUNDERSTORM, WEATHER_TICK_DOWN, WEATHER_WINDY, WEATHER_WINTER_COLD
idConverter
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
Constructor | Description |
---|---|
DefaultClimate() |
Modifier and Type | Method | Description |
---|---|---|
int[] |
addMaskAndReturn(int[] one,
int[] two) |
|
int |
adjustMovement(int base,
Room room) |
If applicable, thies method will return the base movement
cost of the given mob, modified up or down based
on the room given.
|
int |
adjustWaterConsumption(int base,
Room room) |
If applicable, thies method will return the base water
thirstiness of the given mob, modified up or down based
on the room given.
|
boolean |
canSeeTheMoon(Room room,
Ability butNotA) |
Returns whether a player can see the moon from
the current room.
|
boolean |
canSeeTheStars(Room room) |
Returns whether a player can see the stars from
the current room.
|
boolean |
canSeeTheSun(Room room) |
Returns whether a player can see the sun from
the current room.
|
int |
compareTo(CMObject o) |
|
CMObject |
copyOf() |
Similar to Cloneable.clone(), but does its best to make sure that
any internal objects to this class are also copyOfed.
|
void |
forceWeatherTick(Area A) |
This method forces the weather to change to what
is designated by the nextWeatherType().
|
java.lang.String |
getNextWeatherDescription(Area A) |
Returns a readable string describing the upcoming
weather conditions in the given area, assuming
this climate is the correct one.
|
int |
getTickStatus() |
A coded status for this object during the period where
its tick method is being called.
|
java.lang.String |
getWeatherDescription(Area A) |
Returns a readable string describing the
weather conditions in the given area, assuming
this climate is the correct one.
|
protected java.lang.String |
getWeatherStop(int weatherCode) |
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
void |
initializeClass() |
Called ONCE after all objects are loaded, but before the map is read in
during initialization.
|
java.lang.String |
name() |
The nice displayable name of this instance of this object
|
CMObject |
newInstance() |
Returns a new instance of this class.
|
java.lang.String |
nextWeatherDescription(Room room) |
Returns a readable description of the weather
that will be upcoming for the given room.
|
int |
nextWeatherType(Room room) |
Returns the upcoming specific weather situation for
the given room.
|
protected void |
sayToEveryoneInArea(Area A,
int oldWeather,
java.lang.String say) |
|
void |
setCurrentWeatherType(int weatherCode) |
Sets the current specific weather situation for
this area.
|
void |
setNextWeatherType(int weatherCode) |
Sets the upcoming specific weather situation for
this area.
|
protected java.lang.String |
theWeatherDescription(Area A,
int weather) |
|
boolean |
tick(Tickable ticking,
int tickID) |
this is the method which is called periodically by the threading engine.
|
java.lang.String |
weatherDescription(Room room) |
Returns a readable description of the weather
for the given room.
|
void |
weatherTick(Area A) |
|
int |
weatherType(Room room) |
Returns the specific weather situation for
the given room.
|
protected int tickStatus
protected int currentWeather
protected int nextWeather
protected int weatherTicker
protected static final int[] seasonalWeather
protected static final int[] cold
protected static final int[] hot
protected static final int[] dry
protected static final int[] wet
protected static final int[] windy
protected static final int[] changeMap
public java.lang.String ID()
CMObject
public java.lang.String name()
Tickable
name
in interface CMObject
name
in interface Tickable
Environmental.Name()
public int getTickStatus()
Tickable
getTickStatus
in interface Tickable
Tickable.tick(Tickable, int)
public CMObject newInstance()
CMObject
newInstance
in interface CMObject
public void initializeClass()
CMObject
initializeClass
in interface CMObject
public CMObject copyOf()
CMObject
public int nextWeatherType(Room room)
Climate
nextWeatherType
in interface Climate
room
- the room to evaluate.Climate
,
Climate.setNextWeatherType(int)
public java.lang.String nextWeatherDescription(Room room)
Climate
nextWeatherDescription
in interface Climate
room
- the room to evaluatepublic java.lang.String getNextWeatherDescription(Area A)
Climate
getNextWeatherDescription
in interface Climate
A
- the area to evaluatepublic void setNextWeatherType(int weatherCode)
Climate
setNextWeatherType
in interface Climate
weatherCode
- the Climate.WEATHER_* constantClimate
,
Climate.nextWeatherType(Room)
public void setCurrentWeatherType(int weatherCode)
Climate
setCurrentWeatherType
in interface Climate
weatherCode
- the Climate.WEATHER_* constantClimate
,
Climate.weatherType(Room)
public int weatherType(Room room)
Climate
weatherType
in interface Climate
room
- the room to evaluate.Climate
,
Climate.setCurrentWeatherType(int)
public java.lang.String weatherDescription(Room room)
Climate
weatherDescription
in interface Climate
room
- the room to evaluatepublic boolean canSeeTheMoon(Room room, Ability butNotA)
Climate
canSeeTheMoon
in interface Climate
room
- the room vantage pointbutNotA
- an ability to exempt from moon flagspublic boolean canSeeTheStars(Room room)
Climate
canSeeTheStars
in interface Climate
room
- the room vantage pointpublic boolean canSeeTheSun(Room room)
Climate
canSeeTheSun
in interface Climate
room
- the room vantage pointprotected java.lang.String getWeatherStop(int weatherCode)
public void forceWeatherTick(Area A)
Climate
forceWeatherTick
in interface Climate
A
- the area to calculate next weather for.public int[] addMaskAndReturn(int[] one, int[] two)
protected void sayToEveryoneInArea(Area A, int oldWeather, java.lang.String say)
public void weatherTick(Area A)
public boolean tick(Tickable ticking, int tickID)
Tickable
tick
in interface Tickable
ticking
- a reference to this Tickable objecttickID
- the TICKID_ constant describing this periodic call, as defined in TickableTickable
,
ServiceEngine
,
TickableGroup
protected java.lang.String theWeatherDescription(Area A, int weather)
public java.lang.String getWeatherDescription(Area A)
Climate
getWeatherDescription
in interface Climate
A
- the area to evaluatepublic int adjustWaterConsumption(int base, Room room)
Climate
adjustWaterConsumption
in interface Climate
base
- the water thirst gain to start withroom
- the room the mob is inpublic int adjustMovement(int base, Room room)
Climate
adjustMovement
in interface Climate
base
- the movement loss to start withroom
- the room the mob is moving through