com.planet_ink.coffee_mud.Common.interfaces
Interface Climate

All Superinterfaces:
java.lang.Cloneable, CMCommon, CMObject, java.lang.Comparable<CMObject>, Tickable
All Known Implementing Classes:
DefaultClimate

public interface Climate
extends Tickable, CMCommon

A climate represents the entire weather pattern of an area It does most of the mundane things related to weather changes based on season, area, and other factors.


Field Summary
static int NUM_WEATHER
          constant describing the number of weather types.
static int WEATHER_BLIZZARD
          constant describing blizzardous weather.
static int WEATHER_CLEAR
          constant describing clear or no weather.
static int WEATHER_CLOUDY
          constant describing cloudy weather.
static java.lang.String[] WEATHER_DESCS
          descriptive strings for the Climate.WEATHER_* constants, ordered by their value.
static int WEATHER_DROUGHT
          constant describing drought condition weather.
static int WEATHER_DUSTSTORM
          constant describing duststorming weather.
static int WEATHER_HAIL
          constant describing haily weather.
static int WEATHER_HEAT_WAVE
          constant describing heat wave weather.
static int WEATHER_RAIN
          constant describing rainy weather.
static int WEATHER_SLEET
          constant describing sleety weather.
static int WEATHER_SNOW
          constant describing snowy weather.
static int WEATHER_THUNDERSTORM
          constant describing thunderstorm weather.
static int WEATHER_TICK_DOWN
          constant defining how often weather changes in the climates
static int WEATHER_WINDY
          constant describing windy weather.
static int WEATHER_WINTER_COLD
          constant describing harsh cold weather.
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
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_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, 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_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Method Summary
 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.
 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.
 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.
 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.
 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.
 java.lang.String weatherDescription(Room room)
          Returns a readable description of the weather for the given room.
 int weatherType(Room room)
          Returns the specific weather situation for the given room.
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, name, tick
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

WEATHER_CLEAR

static final int WEATHER_CLEAR
constant describing clear or no weather. @see Climate#weatherType(Room)

See Also:
Constant Field Values

WEATHER_CLOUDY

static final int WEATHER_CLOUDY
constant describing cloudy weather. @see Climate#weatherType(Room)

See Also:
Constant Field Values

WEATHER_WINDY

static final int WEATHER_WINDY
constant describing windy weather. @see Climate#weatherType(Room)

See Also:
Constant Field Values

WEATHER_RAIN

static final int WEATHER_RAIN
constant describing rainy weather. @see Climate#weatherType(Room)

See Also:
Constant Field Values

WEATHER_THUNDERSTORM

static final int WEATHER_THUNDERSTORM
constant describing thunderstorm weather. @see Climate#weatherType(Room)

See Also:
Constant Field Values

WEATHER_SNOW

static final int WEATHER_SNOW
constant describing snowy weather. @see Climate#weatherType(Room)

See Also:
Constant Field Values

WEATHER_HAIL

static final int WEATHER_HAIL
constant describing haily weather. @see Climate#weatherType(Room)

See Also:
Constant Field Values

WEATHER_HEAT_WAVE

static final int WEATHER_HEAT_WAVE
constant describing heat wave weather. @see Climate#weatherType(Room)

See Also:
Constant Field Values

WEATHER_SLEET

static final int WEATHER_SLEET
constant describing sleety weather. @see Climate#weatherType(Room)

See Also:
Constant Field Values

WEATHER_BLIZZARD

static final int WEATHER_BLIZZARD
constant describing blizzardous weather. @see Climate#weatherType(Room)

See Also:
Constant Field Values

WEATHER_DUSTSTORM

static final int WEATHER_DUSTSTORM
constant describing duststorming weather. @see Climate#weatherType(Room)

See Also:
Constant Field Values

WEATHER_DROUGHT

static final int WEATHER_DROUGHT
constant describing drought condition weather. @see Climate#weatherType(Room)

See Also:
Constant Field Values

WEATHER_WINTER_COLD

static final int WEATHER_WINTER_COLD
constant describing harsh cold weather. @see Climate#weatherType(Room)

See Also:
Constant Field Values

NUM_WEATHER

static final int NUM_WEATHER
constant describing the number of weather types. @see Climate#weatherType(Room)

See Also:
Constant Field Values

WEATHER_TICK_DOWN

static final int WEATHER_TICK_DOWN
constant defining how often weather changes in the climates

See Also:
Constant Field Values

WEATHER_DESCS

static final java.lang.String[] WEATHER_DESCS
descriptive strings for the Climate.WEATHER_* constants, ordered by their value. @see Climate

Method Detail

weatherType

int weatherType(Room room)
Returns the specific weather situation for the given room. Returns one of the Climate.WEATHER_* constants. It always returns WEATHER_CLEAR for indoor locales.

Parameters:
room - the room to evaluate.
Returns:
the Climate.WEATHER_* constant
See Also:
Climate, setCurrentWeatherType(int)

nextWeatherType

int nextWeatherType(Room room)
Returns the upcoming specific weather situation for the given room. Returns one of the Climate.WEATHER_* constants. It always returns WEATHER_CLEAR for indoor locales. Climate objects always calculate weather 1 step ahead for predictive purposes.

Parameters:
room - the room to evaluate.
Returns:
the Climate.WEATHER_* constant
See Also:
Climate, setNextWeatherType(int)

setNextWeatherType

void setNextWeatherType(int weatherCode)
Sets the upcoming specific weather situation for this area. Takes one of the Climate.WEATHER_* constants. Climate objects always calculate weather 1 step ahead for predictive purposes.

Parameters:
weatherCode - the Climate.WEATHER_* constant
See Also:
Climate, nextWeatherType(Room)

setCurrentWeatherType

void setCurrentWeatherType(int weatherCode)
Sets the current specific weather situation for this area. Takes one of the Climate.WEATHER_* constants. Climate objects always calculate weather 1 step ahead for predictive purposes.

Parameters:
weatherCode - the Climate.WEATHER_* constant
See Also:
Climate, weatherType(Room)

weatherDescription

java.lang.String weatherDescription(Room room)
Returns a readable description of the weather for the given room.

Parameters:
room - the room to evaluate
Returns:
a readable string.

nextWeatherDescription

java.lang.String nextWeatherDescription(Room room)
Returns a readable description of the weather that will be upcoming for the given room.

Parameters:
room - the room to evaluate
Returns:
a readable string.

canSeeTheStars

boolean canSeeTheStars(Room room)
Returns whether a player can see the stars from the current room.

Parameters:
room - the room vantage point
Returns:
whether the stars can be seen.

canSeeTheMoon

boolean canSeeTheMoon(Room room,
                      Ability butNotA)
Returns whether a player can see the moon from the current room.

Parameters:
room - the room vantage point
butNotA - an ability to exempt from moon flags
Returns:
whether the moon can be seen.

canSeeTheSun

boolean canSeeTheSun(Room room)
Returns whether a player can see the sun from the current room.

Parameters:
room - the room vantage point
Returns:
whether the sun can be seen.

getWeatherDescription

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.

Parameters:
A - the area to evaluate
Returns:
a description of the weather.

getNextWeatherDescription

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.

Parameters:
A - the area to evaluate
Returns:
a description of the weather coming up.

forceWeatherTick

void forceWeatherTick(Area A)
This method forces the weather to change to what is designated by the nextWeatherType(). The Area is required to calculate a new nextWeatherType.

Parameters:
A - the area to calculate next weather for.

adjustWaterConsumption

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.

Parameters:
base - the water thirst gain to start with
room - the room the mob is in
Returns:
the modified base thirst, after gain or loss

adjustMovement

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.

Parameters:
base - the movement loss to start with
room - the room the mob is moving through
Returns:
the modified movement, after gain or loss