com.planet_ink.coffee_mud.Common.interfaces
Interface Law

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

public interface Law
extends CMCommon

The Law interface defines an object containing the various infractions that are recognized for a given LegalObject, the officials that enforce the infractions, some guidelines on their behavior, and information their processes of enforcement.

See Also:
LegalBehavior, LegalWarrant

Nested Class Summary
static class Law.TreasurySet
          For the getTreasuryNSafe, this class stores the location of the treasury, for taxing purposes.
 
Field Summary
static int BIT_CRIMEFLAGS
          an index to crime-definition flags denoting circumstances the law applies to
static int BIT_CRIMELOCS
          an index to crime-definition flags denoting types of places the law applies to
static int BIT_CRIMENAME
          an index to crime-definition flags denoting name of the crime
static int BIT_NUMBITS
          an index to crime-definition flags denoting the number of parts of a crime definition
static int BIT_SENTENCE
          an index to crime-definition flags denoting the punishment type and flags
static int BIT_WARNMSG
          an index to crime-definition flags denoting the warning message for breaking the law
static java.lang.String defaultLaw
          a default law definition, suitable for reading into a Properties object
static int MSG_COPKILLER
          an index to messages said to criminals by officers, denotes a previous cop killer
static int MSG_EXECUTE
          an index to messages said to criminals by officers, denotes an execution is forthcoming
static int MSG_LAWFREE
          an index to messages said to criminals by officers, denotes a jail sentence is done
static int MSG_NORESIST
          an index to messages said to criminals by officers, denotes an order not to resist
static int MSG_PAROLEDISMISS
          an index to messages said to criminals by officers, denotes a parole sentence is ready
static int MSG_PREVOFF
          an index to messages said to criminals by officers, denotes a previous offence
static int MSG_PROTECTEDMASK
          an index to messages said to criminals by officers, denotes the criminal is a protected citizen
static int MSG_RESIST
          an index to messages said to criminals by officers, denotes a previous law resister
static int MSG_RESISTFIGHT
          an index to messages said to criminals by officers, denotes resisting arrest
static int MSG_RESISTWARN
          an index to messages said to criminals by officers, denotes a warning not to resist
static int MSG_THREAT
          an index to messages said to criminals by officers, denotes a threat is forthcoming
static int MSG_TOTAL
          the number of messages said to criminals by officers
static int MSG_TRESPASSERMASK
          an index to messages said to criminals by officers, denotes the criminal is a trespassor
static int MSG_WARNING
          an index to messages said to criminals by officers, denotes a warning is forthcoming
static java.lang.String[] PUNISHMENT_DESCS
          An array of code words for each of the base punishment types
static int PUNISHMENT_EXECUTE
          A base punishment code meaning the judge executes the criminal
static int PUNISHMENT_HIGHEST
          A helper punishment code denoting the highest code
static int PUNISHMENT_JAIL1
          A base punishment code meaning the judge jails the criminal
static int PUNISHMENT_JAIL2
          A base punishment code meaning the judge jails the criminal
static int PUNISHMENT_JAIL3
          A base punishment code meaning the judge jails the criminal
static int PUNISHMENT_JAIL4
          A base punishment code meaning the judge jails the criminal
static int PUNISHMENT_MASK
          A mask denoting which bits in an are reserved for the base punishment
static int PUNISHMENT_PAROLE1
          A base punishment code meaning the judge paroles the criminal
static int PUNISHMENT_PAROLE2
          A base punishment code meaning the judge paroles the criminal
static int PUNISHMENT_PAROLE3
          A base punishment code meaning the judge paroles the criminal
static int PUNISHMENT_PAROLE4
          A base punishment code meaning the judge paroles the criminal
static int PUNISHMENT_THREATEN
          A base punishment code meaning the officer threatens the criminal
static int PUNISHMENT_WARN
          A base punishment code meaning the officer warns the criminal
static int PUNISHMENTMASK_BANISH
          a bitmask, added to a base punishment type, denoting a public shaming
static int[] PUNISHMENTMASK_CODES
          an array of the various bitmask values added to punishment codes
static java.lang.String[] PUNISHMENTMASK_DESCS
          a string array for each of the punishment bitmasks
static int PUNISHMENTMASK_DETAIN
          a bitmask, added to a base punishment type, denoting automatic detension
static int PUNISHMENTMASK_FINE
          a bitmask, added to a base punishment type, denoting a fine
static int PUNISHMENTMASK_NORELEASE
          a bitmask, added to a base punishment type, denoting criminal not walked to releaseroom
static int PUNISHMENTMASK_PUNISHCAP
          a bitmask, added to a base punishment type, denoting maximum adjusted punishment
static int PUNISHMENTMASK_SEPARATE
          a bitmask, added to a base punishment, denoting this crime be separated from others
static int PUNISHMENTMASK_SHAME
          a bitmask, added to a base punishment type, denoting a public shaming
static int PUNISHMENTMASK_SKIPTRIAL
          a bitmask, added to a base punishment type, denoting that the officer enforces
static int STATE_ARRESTING
          a state of adjudication meaning officer is arresting the criminal
static int STATE_BANISHING
          a state of adjudication meaning judge is banishing the criminal
static int STATE_DETAINING
          a state of adjudication meaning officer is taking the criminal to detension
static int STATE_EXECUTING
          a state of adjudication meaning judge is executing the criminal
static int STATE_JAILING
          a state of adjudication meaning judge is sentencing the criminal to jail
static int STATE_MOVING
          a state of adjudication meaning officer is taking the criminal to trial
static int STATE_MOVING2
          a state of adjudication meaning officer is taking the criminal to jail
static int STATE_MOVING3
          a state of adjudication meaning officer is releasing the criminal from jail
static int STATE_MOVING4
          a state of adjudication meaning officer is taking the criminal to banishment
static int STATE_PAROLING
          a state of adjudication meaning judge is parolling the criminal
static int STATE_RELEASE
          a state of adjudication meaning officer is to release the criminal from jail
static int STATE_REPORTING
          a state of adjudication meaning officer is reporting charges to the judge
static int STATE_SEEKING
          a state of adjudication meaning officer has not yet found the criminal
static int STATE_SUBDUEING
          a state of adjudication meaning officer is subdueing the criminal
static int STATE_WAITING
          a state of adjudication meaning officer is waiting for a judgement from judge
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String[]> abilityCrimes()
          Method for accessing the crimes, flags, and consequences involving the use of spells, chants, skills, etc.
 boolean arrestMobs()
          Returns whether this legal system allows mobs to be arrested (as opposed to just players)
 java.util.List<java.lang.String[]> bannedBits()
          Combined with bannedSubstances, this method returns the definition of "substance" crimes involving manipulating an illegal substance in public.
 java.util.List<java.util.List<java.lang.String>> bannedSubstances()
          Combined with bannedBits, this method returns the definition of "illegal substance carrying" crimes.
 java.util.Map<java.lang.String,java.lang.String[]> basicCrimes()
          Method for accessing the crimes, flags, and consequences defined as the most basic law.
 void changeStates(LegalWarrant W, int state)
          Changes the action state of the given warrant (and all dependent warrants)
 java.util.List<java.lang.String> chitChat()
          A list of strings denoting random things an officer will say while taking an arrested criminal to the judge.
 java.util.List<java.lang.String> chitChat2()
          A list of strings denoting random things an officer will say while taking an arrested criminal to the jail.
 java.util.List<java.lang.String> chitChat3()
          A list of strings denoting random things an officer will say while taking an arrested criminal to the detention center.
 java.util.List<java.lang.String> chitChat4()
          A list of strings denoting random things an officer will say while taking an arrested criminal to banishment.
 LegalWarrant getCopkiller(Area A, LegalBehavior behav, MOB mob)
          Returns a warrant if the given mob or player mob object represents someone accused of killing an officer.
 java.lang.String getInternalStr(java.lang.String msg)
          Returns one of the raw property entries used to construct the legal definitions.
 LegalWarrant getLawResister(Area A, LegalBehavior behav, MOB mob)
          Returns a warrant if the given mob or player mob object represents someone accused of resisting arrest.
 java.lang.String getMessage(int which)
          Returns a string of one of the messages given by officers and or judges during various stages of the legal adjudication process.
 LegalWarrant getOldWarrant(MOB criminal, java.lang.String crime, boolean pull)
          Returns an old warrant object matching the given criteria.
 Law.TreasurySet getTreasuryNSafe(Area A)
          If defined and found, this method returns an Environmental array with two elements.
 LegalWarrant getWarrant(MOB mob, int which)
          Returns a iterated LegalWarrant object for the given mob.
 boolean hasModifiableLaws()
          Whether the legal definitions can be changed
 boolean hasModifiableNames()
          Whether the officials can be changed (officers judges)
 void initialize(LegalBehavior details, java.util.Properties laws, boolean modifiableNames, boolean modifiableLaws)
          Initializes a new Law object with information from a given Properties file, along with the LegalBehavior which will enforce the laws, and flags denoting how maleable these laws are.
 boolean isInternalStr(java.lang.String msg)
          Returns whether or not the given property name is one of the raw property entries used to construct the legal definitions.
 java.lang.String[] jailMessages()
          Returns a 4-dimensional String[] array for each of the 4 levels of jail.
 java.lang.String jailMessages(int which)
          Returns one of the 4 messages given by the judge for each of the four jail punishments.
 java.util.List<java.lang.String> jailRooms()
          A list of strings denoting which rooms are considered jails.
 java.lang.Integer[] jailTimes()
          A parole time is a number of ticks for each of the four levels of jail punishments.
 int jailTimes(int which)
          A parole time is a number of ticks for each of the four levels of jail punishments.
 java.util.List<java.lang.String> judgeNames()
          A list a strings denoting which mobs are considered judges of the law in the legal area.
 boolean lawIsActivated()
          Whether the legal system on the legal behavior is active.
 java.lang.String[] messages()
          A String array of various messages given by officers and or judges during various stages of the legal adjudication process.
 java.util.List<java.lang.String> officerNames()
          A list a strings denoting which mobs are considered officers of the law in the legal area.
 java.util.List<LegalWarrant> oldWarrants()
          Returns a list of all old LegalWarrant objects for all criminals and crimes since the last MUD reboot.
 java.util.List<java.lang.String[]> otherBits()
          Combined with otherCrimes, this method returns the definition of "miscellaneous" crimes involving emotes and similar random phenomenon.
 java.util.List<java.util.List<java.lang.String>> otherCrimes()
          Combined with otherBits, this method returns the definition of "miscellaneous" crimes involving emotes and similar random phenomenon.
 java.lang.String[] paroleMessages()
          Returns a 4-dimensional String[] array for each of the 4 levels of Parole.
 java.lang.String paroleMessages(int which)
          Returns one of the 4 messages given by the judge for each of the four parole punishments.
 java.lang.Integer[] paroleTimes()
          A parole time is a number of ticks for each of the four levels of parole punishments.
 int paroleTimes(int which)
          A parole time is a number of ticks for each of the four levels of parole punishments.
 void propertyTaxTick(Area A, boolean debugging)
          Called by an Area periodically to update its records on property taxes owed, to withdraw money from accounts to pay said taxes if applicable, and issue a warrant if necessary.
 java.lang.String rawLawString()
          Returns the entire raw legal definition as a ~ delimited string.
 java.util.List<java.lang.String> releaseRooms()
          A list of strings denoting which rooms are considered release rooms for after a prisoner has served jail time.
 void resetLaw()
          Forces the legal definitions to be re-read from their primary storage, usually an INI file, or the database, depending on how the legalbehavior is defined.
 void setInternalStr(java.lang.String tag, java.lang.String value)
          Sets one of the raw property entries used to construct the legal definitions.
 java.util.Map<java.lang.String,java.lang.Object> taxLaws()
          Returns a map of various catch-all properties and variables associated with the tax laws.
 java.util.List<LegalWarrant> warrants()
          Returns a list of all current LegalWarrant objects still considered to be active and relevant.
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, name, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

PUNISHMENT_WARN

static final int PUNISHMENT_WARN
A base punishment code meaning the officer warns the criminal

See Also:
Constant Field Values

PUNISHMENT_THREATEN

static final int PUNISHMENT_THREATEN
A base punishment code meaning the officer threatens the criminal

See Also:
Constant Field Values

PUNISHMENT_PAROLE1

static final int PUNISHMENT_PAROLE1
A base punishment code meaning the judge paroles the criminal

See Also:
Constant Field Values

PUNISHMENT_PAROLE2

static final int PUNISHMENT_PAROLE2
A base punishment code meaning the judge paroles the criminal

See Also:
Constant Field Values

PUNISHMENT_PAROLE3

static final int PUNISHMENT_PAROLE3
A base punishment code meaning the judge paroles the criminal

See Also:
Constant Field Values

PUNISHMENT_PAROLE4

static final int PUNISHMENT_PAROLE4
A base punishment code meaning the judge paroles the criminal

See Also:
Constant Field Values

PUNISHMENT_JAIL1

static final int PUNISHMENT_JAIL1
A base punishment code meaning the judge jails the criminal

See Also:
Constant Field Values

PUNISHMENT_JAIL2

static final int PUNISHMENT_JAIL2
A base punishment code meaning the judge jails the criminal

See Also:
Constant Field Values

PUNISHMENT_JAIL3

static final int PUNISHMENT_JAIL3
A base punishment code meaning the judge jails the criminal

See Also:
Constant Field Values

PUNISHMENT_JAIL4

static final int PUNISHMENT_JAIL4
A base punishment code meaning the judge jails the criminal

See Also:
Constant Field Values

PUNISHMENT_EXECUTE

static final int PUNISHMENT_EXECUTE
A base punishment code meaning the judge executes the criminal

See Also:
Constant Field Values

PUNISHMENT_HIGHEST

static final int PUNISHMENT_HIGHEST
A helper punishment code denoting the highest code

See Also:
Constant Field Values

PUNISHMENT_MASK

static final int PUNISHMENT_MASK
A mask denoting which bits in an are reserved for the base punishment

See Also:
Constant Field Values

PUNISHMENT_DESCS

static final java.lang.String[] PUNISHMENT_DESCS
An array of code words for each of the base punishment types


PUNISHMENTMASK_SEPARATE

static final int PUNISHMENTMASK_SEPARATE
a bitmask, added to a base punishment, denoting this crime be separated from others

See Also:
Constant Field Values

PUNISHMENTMASK_SKIPTRIAL

static final int PUNISHMENTMASK_SKIPTRIAL
a bitmask, added to a base punishment type, denoting that the officer enforces

See Also:
Constant Field Values

PUNISHMENTMASK_DETAIN

static final int PUNISHMENTMASK_DETAIN
a bitmask, added to a base punishment type, denoting automatic detension

See Also:
Constant Field Values

PUNISHMENTMASK_FINE

static final int PUNISHMENTMASK_FINE
a bitmask, added to a base punishment type, denoting a fine

See Also:
Constant Field Values

PUNISHMENTMASK_NORELEASE

static final int PUNISHMENTMASK_NORELEASE
a bitmask, added to a base punishment type, denoting criminal not walked to releaseroom

See Also:
Constant Field Values

PUNISHMENTMASK_PUNISHCAP

static final int PUNISHMENTMASK_PUNISHCAP
a bitmask, added to a base punishment type, denoting maximum adjusted punishment

See Also:
Constant Field Values

PUNISHMENTMASK_SHAME

static final int PUNISHMENTMASK_SHAME
a bitmask, added to a base punishment type, denoting a public shaming

See Also:
Constant Field Values

PUNISHMENTMASK_BANISH

static final int PUNISHMENTMASK_BANISH
a bitmask, added to a base punishment type, denoting a public shaming

See Also:
Constant Field Values

PUNISHMENTMASK_DESCS

static final java.lang.String[] PUNISHMENTMASK_DESCS
a string array for each of the punishment bitmasks


PUNISHMENTMASK_CODES

static final int[] PUNISHMENTMASK_CODES
an array of the various bitmask values added to punishment codes


STATE_SEEKING

static final int STATE_SEEKING
a state of adjudication meaning officer has not yet found the criminal

See Also:
Constant Field Values

STATE_ARRESTING

static final int STATE_ARRESTING
a state of adjudication meaning officer is arresting the criminal

See Also:
Constant Field Values

STATE_SUBDUEING

static final int STATE_SUBDUEING
a state of adjudication meaning officer is subdueing the criminal

See Also:
Constant Field Values

STATE_MOVING

static final int STATE_MOVING
a state of adjudication meaning officer is taking the criminal to trial

See Also:
Constant Field Values

STATE_REPORTING

static final int STATE_REPORTING
a state of adjudication meaning officer is reporting charges to the judge

See Also:
Constant Field Values

STATE_WAITING

static final int STATE_WAITING
a state of adjudication meaning officer is waiting for a judgement from judge

See Also:
Constant Field Values

STATE_PAROLING

static final int STATE_PAROLING
a state of adjudication meaning judge is parolling the criminal

See Also:
Constant Field Values

STATE_JAILING

static final int STATE_JAILING
a state of adjudication meaning judge is sentencing the criminal to jail

See Also:
Constant Field Values

STATE_EXECUTING

static final int STATE_EXECUTING
a state of adjudication meaning judge is executing the criminal

See Also:
Constant Field Values

STATE_MOVING2

static final int STATE_MOVING2
a state of adjudication meaning officer is taking the criminal to jail

See Also:
Constant Field Values

STATE_RELEASE

static final int STATE_RELEASE
a state of adjudication meaning officer is to release the criminal from jail

See Also:
Constant Field Values

STATE_MOVING3

static final int STATE_MOVING3
a state of adjudication meaning officer is releasing the criminal from jail

See Also:
Constant Field Values

STATE_DETAINING

static final int STATE_DETAINING
a state of adjudication meaning officer is taking the criminal to detension

See Also:
Constant Field Values

STATE_BANISHING

static final int STATE_BANISHING
a state of adjudication meaning judge is banishing the criminal

See Also:
Constant Field Values

STATE_MOVING4

static final int STATE_MOVING4
a state of adjudication meaning officer is taking the criminal to banishment

See Also:
Constant Field Values

BIT_CRIMELOCS

static final int BIT_CRIMELOCS
an index to crime-definition flags denoting types of places the law applies to

See Also:
Constant Field Values

BIT_CRIMEFLAGS

static final int BIT_CRIMEFLAGS
an index to crime-definition flags denoting circumstances the law applies to

See Also:
Constant Field Values

BIT_CRIMENAME

static final int BIT_CRIMENAME
an index to crime-definition flags denoting name of the crime

See Also:
Constant Field Values

BIT_SENTENCE

static final int BIT_SENTENCE
an index to crime-definition flags denoting the punishment type and flags

See Also:
Constant Field Values

BIT_WARNMSG

static final int BIT_WARNMSG
an index to crime-definition flags denoting the warning message for breaking the law

See Also:
Constant Field Values

BIT_NUMBITS

static final int BIT_NUMBITS
an index to crime-definition flags denoting the number of parts of a crime definition

See Also:
Constant Field Values

MSG_PREVOFF

static final int MSG_PREVOFF
an index to messages said to criminals by officers, denotes a previous offence

See Also:
Constant Field Values

MSG_WARNING

static final int MSG_WARNING
an index to messages said to criminals by officers, denotes a warning is forthcoming

See Also:
Constant Field Values

MSG_THREAT

static final int MSG_THREAT
an index to messages said to criminals by officers, denotes a threat is forthcoming

See Also:
Constant Field Values

MSG_EXECUTE

static final int MSG_EXECUTE
an index to messages said to criminals by officers, denotes an execution is forthcoming

See Also:
Constant Field Values

MSG_PROTECTEDMASK

static final int MSG_PROTECTEDMASK
an index to messages said to criminals by officers, denotes the criminal is a protected citizen

See Also:
Constant Field Values

MSG_TRESPASSERMASK

static final int MSG_TRESPASSERMASK
an index to messages said to criminals by officers, denotes the criminal is a trespassor

See Also:
Constant Field Values

MSG_RESISTFIGHT

static final int MSG_RESISTFIGHT
an index to messages said to criminals by officers, denotes resisting arrest

See Also:
Constant Field Values

MSG_NORESIST

static final int MSG_NORESIST
an index to messages said to criminals by officers, denotes an order not to resist

See Also:
Constant Field Values

MSG_RESISTWARN

static final int MSG_RESISTWARN
an index to messages said to criminals by officers, denotes a warning not to resist

See Also:
Constant Field Values

MSG_PAROLEDISMISS

static final int MSG_PAROLEDISMISS
an index to messages said to criminals by officers, denotes a parole sentence is ready

See Also:
Constant Field Values

MSG_LAWFREE

static final int MSG_LAWFREE
an index to messages said to criminals by officers, denotes a jail sentence is done

See Also:
Constant Field Values

MSG_RESIST

static final int MSG_RESIST
an index to messages said to criminals by officers, denotes a previous law resister

See Also:
Constant Field Values

MSG_COPKILLER

static final int MSG_COPKILLER
an index to messages said to criminals by officers, denotes a previous cop killer

See Also:
Constant Field Values

MSG_TOTAL

static final int MSG_TOTAL
the number of messages said to criminals by officers

See Also:
Constant Field Values

defaultLaw

static final java.lang.String defaultLaw
a default law definition, suitable for reading into a Properties object

Method Detail

initialize

void initialize(LegalBehavior details,
                java.util.Properties laws,
                boolean modifiableNames,
                boolean modifiableLaws)
Initializes a new Law object with information from a given Properties file, along with the LegalBehavior which will enforce the laws, and flags denoting how maleable these laws are. Principally calls resetLaw.

Parameters:
details - the behavior governing this law
laws - the properties file containing all the legal definitions
modifiableNames - whether officials (judges/officers) are modifiable
modifiableLaws - whether the laws themselves are modifiable
See Also:
LegalBehavior, resetLaw(), hasModifiableNames(), hasModifiableLaws()

changeStates

void changeStates(LegalWarrant W,
                  int state)
Changes the action state of the given warrant (and all dependent warrants)

Parameters:
W - the warrant to change the state of
state - the new action state
See Also:
LegalWarrant, PUNISHMENT_DESCS

resetLaw

void resetLaw()
Forces the legal definitions to be re-read from their primary storage, usually an INI file, or the database, depending on how the legalbehavior is defined.

See Also:
initialize(LegalBehavior, Properties, boolean, boolean)

arrestMobs

boolean arrestMobs()
Returns whether this legal system allows mobs to be arrested (as opposed to just players)

Returns:
true if mobs can be arrested, false otherwise

hasModifiableNames

boolean hasModifiableNames()
Whether the officials can be changed (officers judges)

Returns:
true if the officials can be changed, false otherwise
See Also:
initialize(LegalBehavior, Properties, boolean, boolean)

hasModifiableLaws

boolean hasModifiableLaws()
Whether the legal definitions can be changed

Returns:
true if the legal definitions can be changed, false otherwise
See Also:
initialize(LegalBehavior, Properties, boolean, boolean)

getInternalStr

java.lang.String getInternalStr(java.lang.String msg)
Returns one of the raw property entries used to construct the legal definitions.

Parameters:
msg - the name of the raw property to return
Returns:
the value of the raw legal property
See Also:
initialize(LegalBehavior, Properties, boolean, boolean)

isInternalStr

boolean isInternalStr(java.lang.String msg)
Returns whether or not the given property name is one of the raw property entries used to construct the legal definitions.

Parameters:
msg - the name of the raw property to look for
Returns:
true if the property is found, false otherwise
See Also:
initialize(LegalBehavior, Properties, boolean, boolean)

setInternalStr

void setInternalStr(java.lang.String tag,
                    java.lang.String value)
Sets one of the raw property entries used to construct the legal definitions.

Parameters:
tag - the name of the raw property to set
value - the new value of the property
See Also:
initialize(LegalBehavior, Properties, boolean, boolean)

rawLawString

java.lang.String rawLawString()
Returns the entire raw legal definition as a ~ delimited string.

Returns:
the entire raw legal definition as a ~ delimited string.

lawIsActivated

boolean lawIsActivated()
Whether the legal system on the legal behavior is active.

Returns:
true if the law is active, false otherwise

getCopkiller

LegalWarrant getCopkiller(Area A,
                          LegalBehavior behav,
                          MOB mob)
Returns a warrant if the given mob or player mob object represents someone accused of killing an officer.

Parameters:
A - the Legal Area governed by the Legal Behavior
behav - the legal behavior governing the law
mob - the mob or player to inspect
Returns:
a legal warrant if the mob is a copkiller, null otherwise
See Also:
LegalBehavior

getLawResister

LegalWarrant getLawResister(Area A,
                            LegalBehavior behav,
                            MOB mob)
Returns a warrant if the given mob or player mob object represents someone accused of resisting arrest.

Parameters:
A - the Legal Area governed by the Legal Behavior
behav - the legal behavior governing the law
mob - the mob or player to inspect
Returns:
a legal warrant if the mob is a law resister, null otherwise
See Also:
LegalBehavior

propertyTaxTick

void propertyTaxTick(Area A,
                     boolean debugging)
Called by an Area periodically to update its records on property taxes owed, to withdraw money from accounts to pay said taxes if applicable, and issue a warrant if necessary.

Parameters:
A - the Legal Area governed by this law for property taxes
debugging - whether internal debugging msgs should be generated

getTreasuryNSafe

Law.TreasurySet getTreasuryNSafe(Area A)
If defined and found, this method returns an Environmental array with two elements. The first element (0) is a Room object denoting the place where taxes are stored, and the second element (1) is a container in that room for the taxes. If the second element is not found or defined, the taxes are dropped on the floor.

Parameters:
A - the legal Area to look for a treasury in.
Returns:
the two dimensional array of objects (or nulls)

otherCrimes

java.util.List<java.util.List<java.lang.String>> otherCrimes()
Combined with otherBits, this method returns the definition of "miscellaneous" crimes involving emotes and similar random phenomenon. This method in particular returns a list of String words and phrases which, when encountered in a player or mobs activity, denote the commission of an "other" crime. This Vectors entries match one for one with the list returned by otherBits()

Returns:
a list of words and phrases
See Also:
otherBits()

otherBits

java.util.List<java.lang.String[]> otherBits()
Combined with otherCrimes, this method returns the definition of "miscellaneous" crimes involving emotes and similar random phenomenon. This method in particular returns a list of String[] array objects definitioning the various limitations, flags, and consequences of committing each "other" crime. This Vectors entries match one for one with the list returned by otherBits() The entries in each String[] array are indexed by the constants BIT_*

Returns:
a list of String[] array bits of other crime info
See Also:
BIT_CRIMENAME, otherBits()

bannedSubstances

java.util.List<java.util.List<java.lang.String>> bannedSubstances()
Combined with bannedBits, this method returns the definition of "illegal substance carrying" crimes. This method in particular returns a list of raw resource names or item names which, when encountered in a player or mobs activity, denote the commission of an "substance" crime. This Vectors entries match one for one with the list returned by bannedBits()

Returns:
a list of item or resource names
See Also:
RawMaterial, bannedBits()

bannedBits

java.util.List<java.lang.String[]> bannedBits()
Combined with bannedSubstances, this method returns the definition of "substance" crimes involving manipulating an illegal substance in public. This method in particular returns a list of String[] array objects definitioning the various limitations, flags, and consequences of committing each "substance" crime. This Vectors entries match one for one with the list returned by bannedSubstances() The entries in each String[] array are indexed by the constants BIT_*

Returns:
a list of String[] array bits of substance crime info
See Also:
BIT_CRIMENAME, bannedSubstances()

abilityCrimes

java.util.Map<java.lang.String,java.lang.String[]> abilityCrimes()
Method for accessing the crimes, flags, and consequences involving the use of spells, chants, skills, etc. The returned map is indexed by the Ability ID of the potentially banned skill. The associated hashed element is a String[] array of various flags and information about the consequences of the act. The entries in each String[] array are indexed by the constants BIT_*

Returns:
a map of String[] array bits of ability crime info
See Also:
Ability, BIT_CRIMENAME

basicCrimes

java.util.Map<java.lang.String,java.lang.String[]> basicCrimes()
Method for accessing the crimes, flags, and consequences defined as the most basic law. The returned map is indexed by the basic crimes ID, and includes NUDITY, ARMED, TRESPASSING, MURDER, ASSAULT, RESISTINGARREST, and PROPERTYROB. The associated hashed element is a String[] array of various flags and information about the consequences of the act. The entries in each String[] array are indexed by the constants BIT_*

Returns:
a map of String[] array bits of basic crime info
See Also:
BIT_CRIMENAME

taxLaws

java.util.Map<java.lang.String,java.lang.Object> taxLaws()
Returns a map of various catch-all properties and variables associated with the tax laws. The map keys are all string IDs denoting the property, while the associated element is an object whose type differs by key. TAXEVASION - a String[] array index by the constant BIT_* PROPERTYTAX - a String representing the property tax rate CITTAX - a String representing the citizen tax rate SALESTAX - a String representing the sales tax rate TREASURY - a String of semicolon delimited info about treasury room/ - safe room.

Returns:
a map of tax law related property information
See Also:
BIT_CRIMENAME

chitChat

java.util.List<java.lang.String> chitChat()
A list of strings denoting random things an officer will say while taking an arrested criminal to the judge.

Returns:
a list of cute sayings.

chitChat2

java.util.List<java.lang.String> chitChat2()
A list of strings denoting random things an officer will say while taking an arrested criminal to the jail.

Returns:
a list of cute sayings.

chitChat3

java.util.List<java.lang.String> chitChat3()
A list of strings denoting random things an officer will say while taking an arrested criminal to the detention center.

Returns:
a list of cute sayings.

chitChat4

java.util.List<java.lang.String> chitChat4()
A list of strings denoting random things an officer will say while taking an arrested criminal to banishment.

Returns:
a list of cute sayings.

jailRooms

java.util.List<java.lang.String> jailRooms()
A list of strings denoting which rooms are considered jails. They better have a locked door somewhere!

Returns:
a list of strings denoting jail rooms

releaseRooms

java.util.List<java.lang.String> releaseRooms()
A list of strings denoting which rooms are considered release rooms for after a prisoner has served jail time.

Returns:
a list of strings denoting release rooms

officerNames

java.util.List<java.lang.String> officerNames()
A list a strings denoting which mobs are considered officers of the law in the legal area.

Returns:
a list of strings denoting the names of officers

judgeNames

java.util.List<java.lang.String> judgeNames()
A list a strings denoting which mobs are considered judges of the law in the legal area.

Returns:
a list of strings denoting the names of judges

oldWarrants

java.util.List<LegalWarrant> oldWarrants()
Returns a list of all old LegalWarrant objects for all criminals and crimes since the last MUD reboot. These are kept track of so the punishments can be escalated properly.

Returns:
a list of old warrant objects
See Also:
LegalWarrant, getOldWarrant(MOB, String, boolean)

getOldWarrant

LegalWarrant getOldWarrant(MOB criminal,
                           java.lang.String crime,
                           boolean pull)
Returns an old warrant object matching the given criteria. Old warrants are kept track of so the punishments can be escalated.

Parameters:
criminal - the old criminal
crime - the old crime ID (from taxlaw, basiclaw, or other)
pull - true to remove the old warrant from the list, false no
Returns:
the old legal warrant, or null
See Also:
LegalWarrant, oldWarrants()

warrants

java.util.List<LegalWarrant> warrants()
Returns a list of all current LegalWarrant objects still considered to be active and relevant. Officers can act on these.

Returns:
a list of legal warrants
See Also:
LegalWarrant, getWarrant(MOB, int)

getWarrant

LegalWarrant getWarrant(MOB mob,
                        int which)
Returns a iterated LegalWarrant object for the given mob.

Parameters:
mob - the mob to get a warrant for
which - the iteration number (from 0)
Returns:
the LegalWarrant object to use, or NULL if last was returned
See Also:
LegalWarrant, warrants()

messages

java.lang.String[] messages()
A String array of various messages given by officers and or judges during various stages of the legal adjudication process. These are indexed by the MSG_* constants.

Returns:
a string array of important things said by the officers
See Also:
getMessage(int), MSG_COPKILLER, MSG_TOTAL

getMessage

java.lang.String getMessage(int which)
Returns a string of one of the messages given by officers and or judges during various stages of the legal adjudication process. These are indexed by the MSG_* constants.

Parameters:
which - a number, as indexed by the MSG_* constants
Returns:
a string of an important thing said by the officers
See Also:
messages(), MSG_COPKILLER, MSG_TOTAL

paroleMessages

java.lang.String[] paroleMessages()
Returns a 4-dimensional String[] array for each of the 4 levels of Parole. Each string is a message given by the judge detailing the punishment.

Returns:
a 4-dimensional String[] array for each of the 4 levels of Parole
See Also:
PUNISHMENT_PAROLE1, PUNISHMENT_PAROLE2, PUNISHMENT_PAROLE3, PUNISHMENT_PAROLE4, paroleMessages(int)

paroleMessages

java.lang.String paroleMessages(int which)
Returns one of the 4 messages given by the judge for each of the four parole punishments.

Parameters:
which - which of the 4 messages to return (0-3)
Returns:
the message given by the judge
See Also:
paroleMessages()

paroleTimes

java.lang.Integer[] paroleTimes()
A parole time is a number of ticks for each of the four levels of parole punishments. This method returns an Integer array of all four times.

Returns:
the Integer array of the four parole punishment times.
See Also:
PUNISHMENT_PAROLE1, PUNISHMENT_PAROLE2, PUNISHMENT_PAROLE3, PUNISHMENT_PAROLE4, paroleTimes(int)

paroleTimes

int paroleTimes(int which)
A parole time is a number of ticks for each of the four levels of parole punishments. This method returns the appropriate parol time for the given number.

Parameters:
which - which of the four to return (0-3)
Returns:
the number of ticks the punishment perscribes
See Also:
paroleTimes()

jailMessages

java.lang.String[] jailMessages()
Returns a 4-dimensional String[] array for each of the 4 levels of jail. Each string is a message given by the judge detailing the punishment.

Returns:
a 4-dimensional String[] array for each of the 4 levels of jail
See Also:
PUNISHMENT_JAIL1, PUNISHMENT_JAIL2, PUNISHMENT_JAIL3, PUNISHMENT_JAIL4, jailMessages(int)

jailMessages

java.lang.String jailMessages(int which)
Returns one of the 4 messages given by the judge for each of the four jail punishments.

Parameters:
which - which of the 4 messages to return (0-3)
Returns:
the message given by the judge
See Also:
jailMessages()

jailTimes

java.lang.Integer[] jailTimes()
A parole time is a number of ticks for each of the four levels of jail punishments. This method returns an Integer array of all four times.

Returns:
the Integer array of the four parole punishment times.
See Also:
PUNISHMENT_JAIL1, PUNISHMENT_JAIL2, PUNISHMENT_JAIL3, PUNISHMENT_JAIL4, jailTimes(int)

jailTimes

int jailTimes(int which)
A parole time is a number of ticks for each of the four levels of jail punishments. This method returns the appropriate jail time for the given number.

Parameters:
which - which of the four to return (0-3)
Returns:
the number of ticks the punishment perscribes
See Also:
jailTimes()