Law.TreasurySet
idConverter
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 | 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()
CMObject
public java.lang.String name()
CMObject
name
in interface CMObject
Environmental.Name()
public CMObject newInstance()
CMObject
newInstance
in interface CMObject
public void initializeClass()
CMObject
initializeClass
in interface CMObject
public int compareTo(CMObject o)
compareTo
in interface java.lang.Comparable<CMObject>
public CMObject copyOf()
CMObject
public void initialize(LegalBehavior details, java.util.Properties laws, boolean modifiableNames, boolean modifiableLaws)
Law
initialize
in interface Law
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
,
Law.resetLaw()
,
Law.hasModifiableNames()
,
Law.hasModifiableLaws()
public java.util.List<java.util.List<java.lang.String>> otherCrimes()
Law
otherCrimes
in interface Law
Law.otherBits()
public java.util.List<java.lang.String[]> otherBits()
Law
otherBits
in interface Law
Law.BIT_CRIMENAME
,
Law.otherBits()
public java.util.List<Pair<java.util.List<java.lang.String>,java.lang.String[]>> bannedItems()
Law
bannedItems
in interface Law
Law.BIT_CRIMENAME
,
RawMaterial
public java.util.Map<java.lang.String,java.lang.String[]> abilityCrimes()
Law
abilityCrimes
in interface Law
Ability
,
Law.BIT_CRIMENAME
public java.util.Map<java.lang.String,java.lang.String[]> basicCrimes()
Law
basicCrimes
in interface Law
Law.BIT_CRIMENAME
public java.util.Map<java.lang.String,java.lang.Object> taxLaws()
Law
taxLaws
in interface Law
Law.BIT_CRIMENAME
public boolean hasModifiableNames()
Law
hasModifiableNames
in interface Law
Law.initialize(LegalBehavior, Properties, boolean, boolean)
public boolean hasModifiableLaws()
Law
hasModifiableLaws
in interface Law
Law.initialize(LegalBehavior, Properties, boolean, boolean)
public java.util.List<java.lang.String> chitChat()
Law
public java.util.List<java.lang.String> chitChat2()
Law
public java.util.List<java.lang.String> chitChat3()
Law
public java.util.List<java.lang.String> chitChat4()
Law
public java.util.List<java.lang.String> jailRooms()
Law
public java.util.List<java.lang.String> releaseRooms()
Law
releaseRooms
in interface Law
public java.util.List<java.lang.String> officerNames()
Law
officerNames
in interface Law
public java.util.List<java.lang.String> judgeNames()
Law
judgeNames
in interface Law
public java.lang.String[] messages()
Law
messages
in interface Law
Law.getMessage(int)
,
Law.MSG_COPKILLER
,
Law.MSG_TOTAL
public java.util.List<LegalWarrant> oldWarrants()
Law
oldWarrants
in interface Law
LegalWarrant
,
Law.getOldWarrant(MOB, String, boolean)
public java.util.List<LegalWarrant> warrants()
Law
warrants
in interface Law
LegalWarrant
,
Law.getWarrant(MOB, int)
public boolean arrestMobs()
Law
arrestMobs
in interface Law
public java.lang.String[] paroleMessages()
Law
paroleMessages
in interface Law
Law.PUNISHMENT_PAROLE1
,
Law.PUNISHMENT_PAROLE2
,
Law.PUNISHMENT_PAROLE3
,
Law.PUNISHMENT_PAROLE4
,
Law.paroleMessages(int)
public java.lang.Integer[] paroleTimes()
Law
paroleTimes
in interface Law
Law.PUNISHMENT_PAROLE1
,
Law.PUNISHMENT_PAROLE2
,
Law.PUNISHMENT_PAROLE3
,
Law.PUNISHMENT_PAROLE4
,
Law.paroleTimes(int)
public java.lang.String[] jailMessages()
Law
jailMessages
in interface Law
Law.PUNISHMENT_JAIL1
,
Law.PUNISHMENT_JAIL2
,
Law.PUNISHMENT_JAIL3
,
Law.PUNISHMENT_JAIL4
,
Law.jailMessages(int)
public java.lang.Integer[] jailTimes()
Law
jailTimes
in interface Law
Law.PUNISHMENT_JAIL1
,
Law.PUNISHMENT_JAIL2
,
Law.PUNISHMENT_JAIL3
,
Law.PUNISHMENT_JAIL4
,
Law.jailTimes(int)
public void changeStates(LegalWarrant W, int state)
Law
changeStates
in interface Law
W
- the warrant to change the state ofstate
- the new action stateLegalWarrant
,
Law.PUNISHMENT_DESCS
public Law.TreasurySet getTreasuryNSafe(Area A)
Law
getTreasuryNSafe
in interface Law
A
- 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)
Law
propertyTaxTick
in interface Law
A
- the Legal Area governed by this law for property taxesdebugging
- whether internal debugging msgs should be generatedpublic java.lang.String getMessage(int which)
Law
getMessage
in interface Law
which
- a number, as indexed by the MSG_* constantsLaw.messages()
,
Law.MSG_COPKILLER
,
Law.MSG_TOTAL
public java.lang.String paroleMessages(int which)
Law
paroleMessages
in interface Law
which
- which of the 4 messages to return (0-3)Law.paroleMessages()
public int paroleTimes(int which)
Law
paroleTimes
in interface Law
which
- which of the four to return (0-3)Law.paroleTimes()
public java.lang.String jailMessages(int which)
Law
jailMessages
in interface Law
which
- which of the 4 messages to return (0-3)Law.jailMessages()
public int jailTimes(int which)
Law
jailTimes
in interface Law
which
- which of the four to return (0-3)Law.jailTimes()
public java.lang.String getInternalStr(java.lang.String msg)
Law
getInternalStr
in interface Law
msg
- the name of the raw property to returnLaw.initialize(LegalBehavior, Properties, boolean, boolean)
public boolean isInternalStr(java.lang.String msg)
Law
isInternalStr
in interface Law
msg
- 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)
Law
setInternalStr
in interface Law
tag
- the name of the raw property to setvalue
- the new value of the propertyLaw.initialize(LegalBehavior, Properties, boolean, boolean)
public boolean lawIsActivated()
Law
lawIsActivated
in interface Law
public void resetLaw()
Law
resetLaw
in interface Law
Law.initialize(LegalBehavior, Properties, boolean, boolean)
public java.lang.String rawLawString()
Law
rawLawString
in interface Law
public 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)
Law
getCopkiller
in interface Law
A
- the Legal Area governed by the Legal Behaviorbehav
- the legal behavior governing the lawmob
- the mob or player to inspectLegalBehavior
public LegalWarrant getLawResister(Area A, LegalBehavior behav, MOB mob)
Law
getLawResister
in interface Law
A
- the Legal Area governed by the Legal Behaviorbehav
- the legal behavior governing the lawmob
- the mob or player to inspectLegalBehavior
public LegalWarrant getWarrant(MOB mob, int which)
Law
getWarrant
in interface Law
mob
- 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)
Law
getOldWarrant
in interface Law
criminal
- 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()