Law.TreasurySetidConverterBIT_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 | Description |
|---|---|
DefaultLawSet() |
| Modifier and Type | Method | Description |
|---|---|---|
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<Pair<java.util.List<java.lang.String>,java.lang.String[]>> |
bannedItems() |
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 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.
|
LegalWarrant |
removeWarrant(MOB criminal,
java.lang.String crime,
boolean debugging) |
|
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.
|
public java.lang.String ID()
CMObjectpublic java.lang.String name()
CMObjectname in interface CMObjectEnvironmental.Name()public CMObject newInstance()
CMObjectnewInstance in interface CMObjectpublic void initializeClass()
CMObjectinitializeClass in interface CMObjectpublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>public CMObject copyOf()
CMObjectpublic void initialize(LegalBehavior details, java.util.Properties laws, boolean modifiableNames, boolean modifiableLaws)
Lawinitialize in interface Lawdetails - 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,
Law.resetLaw(),
Law.hasModifiableNames(),
Law.hasModifiableLaws()public java.util.List<java.util.List<java.lang.String>> otherCrimes()
LawotherCrimes in interface LawLaw.otherBits()public java.util.List<java.lang.String[]> otherBits()
LawotherBits in interface LawLaw.BIT_CRIMENAME,
Law.otherBits()public java.util.List<Pair<java.util.List<java.lang.String>,java.lang.String[]>> bannedItems()
LawbannedItems in interface LawLaw.BIT_CRIMENAME,
RawMaterialpublic java.util.Map<java.lang.String,java.lang.String[]> abilityCrimes()
LawabilityCrimes in interface LawAbility,
Law.BIT_CRIMENAMEpublic java.util.Map<java.lang.String,java.lang.String[]> basicCrimes()
LawbasicCrimes in interface LawLaw.BIT_CRIMENAMEpublic java.util.Map<java.lang.String,java.lang.Object> taxLaws()
LawtaxLaws in interface LawLaw.BIT_CRIMENAMEpublic boolean hasModifiableNames()
LawhasModifiableNames in interface LawLaw.initialize(LegalBehavior, Properties, boolean, boolean)public boolean hasModifiableLaws()
LawhasModifiableLaws in interface LawLaw.initialize(LegalBehavior, Properties, boolean, boolean)public java.util.List<java.lang.String> chitChat()
Lawpublic java.util.List<java.lang.String> chitChat2()
Lawpublic java.util.List<java.lang.String> chitChat3()
Lawpublic java.util.List<java.lang.String> chitChat4()
Lawpublic java.util.List<java.lang.String> jailRooms()
Lawpublic java.util.List<java.lang.String> releaseRooms()
LawreleaseRooms in interface Lawpublic java.util.List<java.lang.String> officerNames()
LawofficerNames in interface Lawpublic java.util.List<java.lang.String> judgeNames()
LawjudgeNames in interface Lawpublic java.lang.String[] messages()
Lawmessages in interface LawLaw.getMessage(int),
Law.MSG_COPKILLER,
Law.MSG_TOTALpublic java.util.List<LegalWarrant> oldWarrants()
LawoldWarrants in interface LawLegalWarrant,
Law.getOldWarrant(MOB, String, boolean)public java.util.List<LegalWarrant> warrants()
Lawwarrants in interface LawLegalWarrant,
Law.getWarrant(MOB, int)public boolean arrestMobs()
LawarrestMobs in interface Lawpublic java.lang.String[] paroleMessages()
LawparoleMessages in interface LawLaw.PUNISHMENT_PAROLE1,
Law.PUNISHMENT_PAROLE2,
Law.PUNISHMENT_PAROLE3,
Law.PUNISHMENT_PAROLE4,
Law.paroleMessages(int)public java.lang.Integer[] paroleTimes()
LawparoleTimes in interface LawLaw.PUNISHMENT_PAROLE1,
Law.PUNISHMENT_PAROLE2,
Law.PUNISHMENT_PAROLE3,
Law.PUNISHMENT_PAROLE4,
Law.paroleTimes(int)public java.lang.String[] jailMessages()
LawjailMessages in interface LawLaw.PUNISHMENT_JAIL1,
Law.PUNISHMENT_JAIL2,
Law.PUNISHMENT_JAIL3,
Law.PUNISHMENT_JAIL4,
Law.jailMessages(int)public java.lang.Integer[] jailTimes()
LawjailTimes in interface LawLaw.PUNISHMENT_JAIL1,
Law.PUNISHMENT_JAIL2,
Law.PUNISHMENT_JAIL3,
Law.PUNISHMENT_JAIL4,
Law.jailTimes(int)public void changeStates(LegalWarrant W, int state)
LawchangeStates in interface LawW - the warrant to change the state ofstate - the new action stateLegalWarrant,
Law.PUNISHMENT_DESCSpublic Law.TreasurySet getTreasuryNSafe(Area A)
LawgetTreasuryNSafe in interface LawA - the legal Area to look for a treasury in.protected boolean sendGameMail(java.lang.String mailBox,
java.lang.String subject,
java.lang.String message)
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)
public void propertyTaxTick(Area A, boolean debugging)
LawpropertyTaxTick in interface LawA - the Legal Area governed by this law for property taxesdebugging - whether internal debugging msgs should be generatedpublic java.lang.String getMessage(int which)
LawgetMessage in interface Lawwhich - a number, as indexed by the MSG_* constantsLaw.messages(),
Law.MSG_COPKILLER,
Law.MSG_TOTALpublic java.lang.String paroleMessages(int which)
LawparoleMessages in interface Lawwhich - which of the 4 messages to return (0-3)Law.paroleMessages()public int paroleTimes(int which)
LawparoleTimes in interface Lawwhich - which of the four to return (0-3)Law.paroleTimes()public java.lang.String jailMessages(int which)
LawjailMessages in interface Lawwhich - which of the 4 messages to return (0-3)Law.jailMessages()public int jailTimes(int which)
LawjailTimes in interface Lawwhich - which of the four to return (0-3)Law.jailTimes()public java.lang.String getInternalStr(java.lang.String msg)
LawgetInternalStr in interface Lawmsg - the name of the raw property to returnLaw.initialize(LegalBehavior, Properties, boolean, boolean)public boolean isInternalStr(java.lang.String msg)
LawisInternalStr in interface Lawmsg - the name of the raw property to look forLaw.initialize(LegalBehavior, Properties, boolean, boolean)public void setInternalStr(java.lang.String tag,
java.lang.String value)
LawsetInternalStr in interface Lawtag - the name of the raw property to setvalue - the new value of the propertyLaw.initialize(LegalBehavior, Properties, boolean, boolean)public boolean lawIsActivated()
LawlawIsActivated in interface Lawpublic void resetLaw()
LawresetLaw in interface LawLaw.initialize(LegalBehavior, Properties, boolean, boolean)public java.lang.String rawLawString()
LawrawLawString in interface Lawpublic LegalWarrant getWarrant(MOB criminal, java.lang.String crime, boolean debugging)
public LegalWarrant removeWarrant(MOB criminal, java.lang.String crime, boolean debugging)
public LegalWarrant getCopkiller(Area A, LegalBehavior behav, MOB mob)
LawgetCopkiller in interface LawA - the Legal Area governed by the Legal Behaviorbehav - the legal behavior governing the lawmob - the mob or player to inspectLegalBehaviorpublic LegalWarrant getLawResister(Area A, LegalBehavior behav, MOB mob)
LawgetLawResister in interface LawA - the Legal Area governed by the Legal Behaviorbehav - the legal behavior governing the lawmob - the mob or player to inspectLegalBehaviorpublic LegalWarrant getWarrant(MOB mob, int which)
LawgetWarrant in interface Lawmob - the mob to get a warrant forwhich - the iteration number (from 0)LegalWarrant,
Law.warrants()public LegalWarrant getOldWarrant(MOB criminal, java.lang.String crime, boolean pull)
LawgetOldWarrant in interface Lawcriminal - the old criminalcrime - the old crime ID (from taxlaw, basiclaw, or other)pull - true to remove the old warrant from the list, false noLegalWarrant,
Law.oldWarrants()