|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Law
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.
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 |
---|
static final int PUNISHMENT_WARN
static final int PUNISHMENT_THREATEN
static final int PUNISHMENT_PAROLE1
static final int PUNISHMENT_PAROLE2
static final int PUNISHMENT_PAROLE3
static final int PUNISHMENT_PAROLE4
static final int PUNISHMENT_JAIL1
static final int PUNISHMENT_JAIL2
static final int PUNISHMENT_JAIL3
static final int PUNISHMENT_JAIL4
static final int PUNISHMENT_EXECUTE
static final int PUNISHMENT_HIGHEST
static final int PUNISHMENT_MASK
static final java.lang.String[] PUNISHMENT_DESCS
static final int PUNISHMENTMASK_SEPARATE
static final int PUNISHMENTMASK_SKIPTRIAL
static final int PUNISHMENTMASK_DETAIN
static final int PUNISHMENTMASK_FINE
static final int PUNISHMENTMASK_NORELEASE
static final int PUNISHMENTMASK_PUNISHCAP
static final int PUNISHMENTMASK_SHAME
static final int PUNISHMENTMASK_BANISH
static final java.lang.String[] PUNISHMENTMASK_DESCS
static final int[] PUNISHMENTMASK_CODES
static final int STATE_SEEKING
static final int STATE_ARRESTING
static final int STATE_SUBDUEING
static final int STATE_MOVING
static final int STATE_REPORTING
static final int STATE_WAITING
static final int STATE_PAROLING
static final int STATE_JAILING
static final int STATE_EXECUTING
static final int STATE_MOVING2
static final int STATE_RELEASE
static final int STATE_MOVING3
static final int STATE_DETAINING
static final int STATE_BANISHING
static final int STATE_MOVING4
static final int BIT_CRIMELOCS
static final int BIT_CRIMEFLAGS
static final int BIT_CRIMENAME
static final int BIT_SENTENCE
static final int BIT_WARNMSG
static final int BIT_NUMBITS
static final int MSG_PREVOFF
static final int MSG_WARNING
static final int MSG_THREAT
static final int MSG_EXECUTE
static final int MSG_PROTECTEDMASK
static final int MSG_TRESPASSERMASK
static final int MSG_RESISTFIGHT
static final int MSG_NORESIST
static final int MSG_RESISTWARN
static final int MSG_PAROLEDISMISS
static final int MSG_LAWFREE
static final int MSG_RESIST
static final int MSG_COPKILLER
static final int MSG_TOTAL
static final java.lang.String defaultLaw
Method Detail |
---|
void initialize(LegalBehavior details, java.util.Properties laws, boolean modifiableNames, boolean modifiableLaws)
details
- the behavior governing this lawlaws
- the properties file containing all the legal definitionsmodifiableNames
- whether officials (judges/officers) are modifiablemodifiableLaws
- whether the laws themselves are modifiableLegalBehavior
,
resetLaw()
,
hasModifiableNames()
,
hasModifiableLaws()
void changeStates(LegalWarrant W, int state)
W
- the warrant to change the state ofstate
- the new action stateLegalWarrant
,
PUNISHMENT_DESCS
void resetLaw()
initialize(LegalBehavior, Properties, boolean, boolean)
boolean arrestMobs()
boolean hasModifiableNames()
initialize(LegalBehavior, Properties, boolean, boolean)
boolean hasModifiableLaws()
initialize(LegalBehavior, Properties, boolean, boolean)
java.lang.String getInternalStr(java.lang.String msg)
msg
- the name of the raw property to return
initialize(LegalBehavior, Properties, boolean, boolean)
boolean isInternalStr(java.lang.String msg)
msg
- the name of the raw property to look for
initialize(LegalBehavior, Properties, boolean, boolean)
void setInternalStr(java.lang.String tag, java.lang.String value)
tag
- the name of the raw property to setvalue
- the new value of the propertyinitialize(LegalBehavior, Properties, boolean, boolean)
java.lang.String rawLawString()
boolean lawIsActivated()
LegalWarrant getCopkiller(Area A, LegalBehavior behav, MOB mob)
A
- the Legal Area governed by the Legal Behaviorbehav
- the legal behavior governing the lawmob
- the mob or player to inspect
LegalBehavior
LegalWarrant getLawResister(Area A, LegalBehavior behav, MOB mob)
A
- the Legal Area governed by the Legal Behaviorbehav
- the legal behavior governing the lawmob
- the mob or player to inspect
LegalBehavior
void propertyTaxTick(Area A, boolean debugging)
A
- the Legal Area governed by this law for property taxesdebugging
- whether internal debugging msgs should be generatedLaw.TreasurySet getTreasuryNSafe(Area A)
A
- the legal Area to look for a treasury in.
java.util.List<java.util.List<java.lang.String>> otherCrimes()
otherBits()
java.util.List<java.lang.String[]> otherBits()
BIT_CRIMENAME
,
otherBits()
java.util.List<java.util.List<java.lang.String>> bannedSubstances()
RawMaterial
,
bannedBits()
java.util.List<java.lang.String[]> bannedBits()
BIT_CRIMENAME
,
bannedSubstances()
java.util.Map<java.lang.String,java.lang.String[]> abilityCrimes()
Ability
,
BIT_CRIMENAME
java.util.Map<java.lang.String,java.lang.String[]> basicCrimes()
BIT_CRIMENAME
java.util.Map<java.lang.String,java.lang.Object> taxLaws()
BIT_CRIMENAME
java.util.List<java.lang.String> chitChat()
java.util.List<java.lang.String> chitChat2()
java.util.List<java.lang.String> chitChat3()
java.util.List<java.lang.String> chitChat4()
java.util.List<java.lang.String> jailRooms()
java.util.List<java.lang.String> releaseRooms()
java.util.List<java.lang.String> officerNames()
java.util.List<java.lang.String> judgeNames()
java.util.List<LegalWarrant> oldWarrants()
LegalWarrant
,
getOldWarrant(MOB, String, boolean)
LegalWarrant getOldWarrant(MOB criminal, java.lang.String crime, boolean pull)
criminal
- the old criminalcrime
- the old crime ID (from taxlaw, basiclaw, or other)pull
- true to remove the old warrant from the list, false no
LegalWarrant
,
oldWarrants()
java.util.List<LegalWarrant> warrants()
LegalWarrant
,
getWarrant(MOB, int)
LegalWarrant getWarrant(MOB mob, int which)
mob
- the mob to get a warrant forwhich
- the iteration number (from 0)
LegalWarrant
,
warrants()
java.lang.String[] messages()
getMessage(int)
,
MSG_COPKILLER
,
MSG_TOTAL
java.lang.String getMessage(int which)
which
- a number, as indexed by the MSG_* constants
messages()
,
MSG_COPKILLER
,
MSG_TOTAL
java.lang.String[] paroleMessages()
PUNISHMENT_PAROLE1
,
PUNISHMENT_PAROLE2
,
PUNISHMENT_PAROLE3
,
PUNISHMENT_PAROLE4
,
paroleMessages(int)
java.lang.String paroleMessages(int which)
which
- which of the 4 messages to return (0-3)
paroleMessages()
java.lang.Integer[] paroleTimes()
PUNISHMENT_PAROLE1
,
PUNISHMENT_PAROLE2
,
PUNISHMENT_PAROLE3
,
PUNISHMENT_PAROLE4
,
paroleTimes(int)
int paroleTimes(int which)
which
- which of the four to return (0-3)
paroleTimes()
java.lang.String[] jailMessages()
PUNISHMENT_JAIL1
,
PUNISHMENT_JAIL2
,
PUNISHMENT_JAIL3
,
PUNISHMENT_JAIL4
,
jailMessages(int)
java.lang.String jailMessages(int which)
which
- which of the 4 messages to return (0-3)
jailMessages()
java.lang.Integer[] jailTimes()
PUNISHMENT_JAIL1
,
PUNISHMENT_JAIL2
,
PUNISHMENT_JAIL3
,
PUNISHMENT_JAIL4
,
jailTimes(int)
int jailTimes(int which)
which
- which of the four to return (0-3)
jailTimes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |