com.planet_ink.coffee_mud.Common
Class DefaultLawSet

java.lang.Object
  extended by com.planet_ink.coffee_mud.Common.DefaultLawSet
All Implemented Interfaces:
CMCommon, Law, CMObject, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class DefaultLawSet
extends java.lang.Object
implements Law


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Common.interfaces.Law
Law.TreasurySet
 
Field Summary
 
Fields inherited from interface com.planet_ink.coffee_mud.Common.interfaces.Law
BIT_CRIMEFLAGS, BIT_CRIMELOCS, BIT_CRIMENAME, BIT_NUMBITS, BIT_SENTENCE, BIT_WARNMSG, defaultLaw, MSG_COPKILLER, MSG_EXECUTE, MSG_LAWFREE, MSG_NORESIST, MSG_PAROLEDISMISS, MSG_PREVOFF, MSG_PROTECTEDMASK, MSG_RESIST, MSG_RESISTFIGHT, MSG_RESISTWARN, MSG_THREAT, MSG_TOTAL, MSG_TRESPASSERMASK, MSG_WARNING, PUNISHMENT_DESCS, PUNISHMENT_EXECUTE, PUNISHMENT_HIGHEST, PUNISHMENT_JAIL1, PUNISHMENT_JAIL2, PUNISHMENT_JAIL3, PUNISHMENT_JAIL4, PUNISHMENT_MASK, PUNISHMENT_PAROLE1, PUNISHMENT_PAROLE2, PUNISHMENT_PAROLE3, PUNISHMENT_PAROLE4, PUNISHMENT_THREATEN, PUNISHMENT_WARN, PUNISHMENTMASK_BANISH, PUNISHMENTMASK_CODES, PUNISHMENTMASK_DESCS, PUNISHMENTMASK_DETAIN, PUNISHMENTMASK_FINE, PUNISHMENTMASK_NORELEASE, PUNISHMENTMASK_PUNISHCAP, PUNISHMENTMASK_SEPARATE, PUNISHMENTMASK_SHAME, PUNISHMENTMASK_SKIPTRIAL, STATE_ARRESTING, STATE_BANISHING, STATE_DETAINING, STATE_EXECUTING, STATE_JAILING, STATE_MOVING, STATE_MOVING2, STATE_MOVING3, STATE_MOVING4, STATE_PAROLING, STATE_RELEASE, STATE_REPORTING, STATE_SEEKING, STATE_SUBDUEING, STATE_WAITING
 
Constructor Summary
DefaultLawSet()
           
 
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.
 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.
 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.
 LegalWarrant getWarrant(MOB criminal, java.lang.String crime, boolean pull, boolean debugging)
           
 boolean hasModifiableLaws()
          Whether the legal definitions can be changed
 boolean hasModifiableNames()
          Whether the officials can be changed (officers judges)
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 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.
 void initializeClass()
          Called ONCE after all objects are loaded, but before the map is read in during initialization.
 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.lang.String name()
          The displayable name of this object.
 CMObject newInstance()
          Returns a new instance of this class.
protected  boolean notifyPlayer(java.lang.String ownerName, java.lang.String owerName, double owed, java.lang.String fourWord, java.lang.String subject, java.lang.String message)
           
 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.
protected  boolean sendGameMail(java.lang.String mailBox, java.lang.String subject, java.lang.String message)
           
 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLawSet

public DefaultLawSet()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Returns:
the name of this class

name

public java.lang.String name()
Description copied from interface: CMObject
The displayable name of this object. May be modified by phyStats() object. Is derived from the Name().

Specified by:
name in interface CMObject
Returns:
the modified final name of this object on the map.
See Also:
Environmental.Name()

newInstance

public CMObject newInstance()
Description copied from interface: CMObject
Returns a new instance of this class.

Specified by:
newInstance in interface CMObject
Returns:
a new instance of this class

initializeClass

public void initializeClass()
Description copied from interface: CMObject
Called ONCE after all objects are loaded, but before the map is read in during initialization.

Specified by:
initializeClass in interface CMObject

compareTo

public int compareTo(CMObject o)
Specified by:
compareTo in interface java.lang.Comparable<CMObject>

copyOf

public CMObject copyOf()
Description copied from interface: CMObject
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.

Specified by:
copyOf in interface CMObject
Returns:
a clone of this object

initialize

public void initialize(LegalBehavior details,
                       java.util.Properties laws,
                       boolean modifiableNames,
                       boolean modifiableLaws)
Description copied from interface: Law
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.

Specified by:
initialize in interface Law
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, Law.resetLaw(), Law.hasModifiableNames(), Law.hasModifiableLaws()

otherCrimes

public java.util.List<java.util.List<java.lang.String>> otherCrimes()
Description copied from interface: Law
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()

Specified by:
otherCrimes in interface Law
Returns:
a list of words and phrases
See Also:
Law.otherBits()

otherBits

public java.util.List<java.lang.String[]> otherBits()
Description copied from interface: Law
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_*

Specified by:
otherBits in interface Law
Returns:
a list of String[] array bits of other crime info
See Also:
Law.BIT_CRIMENAME, Law.otherBits()

bannedSubstances

public java.util.List<java.util.List<java.lang.String>> bannedSubstances()
Description copied from interface: Law
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()

Specified by:
bannedSubstances in interface Law
Returns:
a list of item or resource names
See Also:
RawMaterial, Law.bannedBits()

bannedBits

public java.util.List<java.lang.String[]> bannedBits()
Description copied from interface: Law
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_*

Specified by:
bannedBits in interface Law
Returns:
a list of String[] array bits of substance crime info
See Also:
Law.BIT_CRIMENAME, Law.bannedSubstances()

abilityCrimes

public java.util.Map<java.lang.String,java.lang.String[]> abilityCrimes()
Description copied from interface: Law
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_*

Specified by:
abilityCrimes in interface Law
Returns:
a map of String[] array bits of ability crime info
See Also:
Ability, Law.BIT_CRIMENAME

basicCrimes

public java.util.Map<java.lang.String,java.lang.String[]> basicCrimes()
Description copied from interface: Law
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_*

Specified by:
basicCrimes in interface Law
Returns:
a map of String[] array bits of basic crime info
See Also:
Law.BIT_CRIMENAME

taxLaws

public java.util.Map<java.lang.String,java.lang.Object> taxLaws()
Description copied from interface: Law
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.

Specified by:
taxLaws in interface Law
Returns:
a map of tax law related property information
See Also:
Law.BIT_CRIMENAME

hasModifiableNames

public boolean hasModifiableNames()
Description copied from interface: Law
Whether the officials can be changed (officers judges)

Specified by:
hasModifiableNames in interface Law
Returns:
true if the officials can be changed, false otherwise
See Also:
Law.initialize(LegalBehavior, Properties, boolean, boolean)

hasModifiableLaws

public boolean hasModifiableLaws()
Description copied from interface: Law
Whether the legal definitions can be changed

Specified by:
hasModifiableLaws in interface Law
Returns:
true if the legal definitions can be changed, false otherwise
See Also:
Law.initialize(LegalBehavior, Properties, boolean, boolean)

chitChat

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

Specified by:
chitChat in interface Law
Returns:
a list of cute sayings.

chitChat2

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

Specified by:
chitChat2 in interface Law
Returns:
a list of cute sayings.

chitChat3

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

Specified by:
chitChat3 in interface Law
Returns:
a list of cute sayings.

chitChat4

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

Specified by:
chitChat4 in interface Law
Returns:
a list of cute sayings.

jailRooms

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

Specified by:
jailRooms in interface Law
Returns:
a list of strings denoting jail rooms

releaseRooms

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

Specified by:
releaseRooms in interface Law
Returns:
a list of strings denoting release rooms

officerNames

public java.util.List<java.lang.String> officerNames()
Description copied from interface: Law
A list a strings denoting which mobs are considered officers of the law in the legal area.

Specified by:
officerNames in interface Law
Returns:
a list of strings denoting the names of officers

judgeNames

public java.util.List<java.lang.String> judgeNames()
Description copied from interface: Law
A list a strings denoting which mobs are considered judges of the law in the legal area.

Specified by:
judgeNames in interface Law
Returns:
a list of strings denoting the names of judges

messages

public java.lang.String[] messages()
Description copied from interface: Law
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.

Specified by:
messages in interface Law
Returns:
a string array of important things said by the officers
See Also:
Law.getMessage(int), Law.MSG_COPKILLER, Law.MSG_TOTAL

oldWarrants

public java.util.List<LegalWarrant> oldWarrants()
Description copied from interface: Law
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.

Specified by:
oldWarrants in interface Law
Returns:
a list of old warrant objects
See Also:
LegalWarrant, Law.getOldWarrant(MOB, String, boolean)

warrants

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

Specified by:
warrants in interface Law
Returns:
a list of legal warrants
See Also:
LegalWarrant, Law.getWarrant(MOB, int)

arrestMobs

public boolean arrestMobs()
Description copied from interface: Law
Returns whether this legal system allows mobs to be arrested (as opposed to just players)

Specified by:
arrestMobs in interface Law
Returns:
true if mobs can be arrested, false otherwise

paroleMessages

public java.lang.String[] paroleMessages()
Description copied from interface: Law
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.

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

paroleTimes

public java.lang.Integer[] paroleTimes()
Description copied from interface: Law
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.

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

jailMessages

public java.lang.String[] jailMessages()
Description copied from interface: Law
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.

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

jailTimes

public java.lang.Integer[] jailTimes()
Description copied from interface: Law
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.

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

changeStates

public void changeStates(LegalWarrant W,
                         int state)
Description copied from interface: Law
Changes the action state of the given warrant (and all dependent warrants)

Specified by:
changeStates in interface Law
Parameters:
W - the warrant to change the state of
state - the new action state
See Also:
LegalWarrant, Law.PUNISHMENT_DESCS

getTreasuryNSafe

public Law.TreasurySet getTreasuryNSafe(Area A)
Description copied from interface: Law
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.

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

sendGameMail

protected boolean sendGameMail(java.lang.String mailBox,
                               java.lang.String subject,
                               java.lang.String message)

notifyPlayer

protected boolean notifyPlayer(java.lang.String ownerName,
                               java.lang.String owerName,
                               double owed,
                               java.lang.String fourWord,
                               java.lang.String subject,
                               java.lang.String message)

propertyTaxTick

public void propertyTaxTick(Area A,
                            boolean debugging)
Description copied from interface: Law
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.

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

getMessage

public java.lang.String getMessage(int which)
Description copied from interface: Law
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.

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

paroleMessages

public java.lang.String paroleMessages(int which)
Description copied from interface: Law
Returns one of the 4 messages given by the judge for each of the four parole punishments.

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

paroleTimes

public int paroleTimes(int which)
Description copied from interface: Law
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.

Specified by:
paroleTimes in interface Law
Parameters:
which - which of the four to return (0-3)
Returns:
the number of ticks the punishment perscribes
See Also:
Law.paroleTimes()

jailMessages

public java.lang.String jailMessages(int which)
Description copied from interface: Law
Returns one of the 4 messages given by the judge for each of the four jail punishments.

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

jailTimes

public int jailTimes(int which)
Description copied from interface: Law
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.

Specified by:
jailTimes in interface Law
Parameters:
which - which of the four to return (0-3)
Returns:
the number of ticks the punishment perscribes
See Also:
Law.jailTimes()

getInternalStr

public java.lang.String getInternalStr(java.lang.String msg)
Description copied from interface: Law
Returns one of the raw property entries used to construct the legal definitions.

Specified by:
getInternalStr in interface Law
Parameters:
msg - the name of the raw property to return
Returns:
the value of the raw legal property
See Also:
Law.initialize(LegalBehavior, Properties, boolean, boolean)

isInternalStr

public boolean isInternalStr(java.lang.String msg)
Description copied from interface: Law
Returns whether or not the given property name is one of the raw property entries used to construct the legal definitions.

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

setInternalStr

public void setInternalStr(java.lang.String tag,
                           java.lang.String value)
Description copied from interface: Law
Sets one of the raw property entries used to construct the legal definitions.

Specified by:
setInternalStr in interface Law
Parameters:
tag - the name of the raw property to set
value - the new value of the property
See Also:
Law.initialize(LegalBehavior, Properties, boolean, boolean)

lawIsActivated

public boolean lawIsActivated()
Description copied from interface: Law
Whether the legal system on the legal behavior is active.

Specified by:
lawIsActivated in interface Law
Returns:
true if the law is active, false otherwise

resetLaw

public void resetLaw()
Description copied from interface: Law
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.

Specified by:
resetLaw in interface Law
See Also:
Law.initialize(LegalBehavior, Properties, boolean, boolean)

rawLawString

public java.lang.String rawLawString()
Description copied from interface: Law
Returns the entire raw legal definition as a ~ delimited string.

Specified by:
rawLawString in interface Law
Returns:
the entire raw legal definition as a ~ delimited string.

getWarrant

public LegalWarrant getWarrant(MOB criminal,
                               java.lang.String crime,
                               boolean pull,
                               boolean debugging)

getCopkiller

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

Specified by:
getCopkiller in interface Law
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

public LegalWarrant getLawResister(Area A,
                                   LegalBehavior behav,
                                   MOB mob)
Description copied from interface: Law
Returns a warrant if the given mob or player mob object represents someone accused of resisting arrest.

Specified by:
getLawResister in interface Law
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

getWarrant

public LegalWarrant getWarrant(MOB mob,
                               int which)
Description copied from interface: Law
Returns a iterated LegalWarrant object for the given mob.

Specified by:
getWarrant in interface Law
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, Law.warrants()

getOldWarrant

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

Specified by:
getOldWarrant in interface Law
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, Law.oldWarrants()