|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface LegalBehavior
A LegalBehavior is a Behavior that provides functionality related to law and order within a given geographic sphere, which is usually an Area with a LegalBehavior behavior. A LegalBehavior keeps track of Warrants against players and mobs which persist only in memory. It also controls the behavior of arresting officers and judges, and dispenses justice by taking mobs and players to jail, putting them on parole, or issuing warnings or other punishments.
Behavior,
LegalWarrant,
Law| Field Summary | |
|---|---|
static long |
CONTROLTIME
constant for the number of miliseconds before an area is under legal control |
static long |
EXPIRATION_MILLIS
constant for the number of miliseconds before a warrant expires |
static long |
ONE_REAL_DAY
constant for the number of miliseconds in a real-life day |
| Fields inherited from interface com.planet_ink.coffee_mud.Behaviors.interfaces.Behavior |
|---|
CAN_AREAS, CAN_EXITS, CAN_ITEMS, CAN_MOBS, CAN_ROOMS, FLAG_LEGALBEHAVIOR, FLAG_MOBILITY, FLAG_POTENTIALLYAGGRESSIVE, FLAG_TROUBLEMAKING |
| Method Summary | |
|---|---|
boolean |
accuse(Area myArea,
MOB accused,
MOB victim,
java.lang.String[] accusableLaws)
Issues a LegalWarrant against the accused on behalf of the given victim, for a crime listed in the list of crime keys. |
boolean |
addWarrant(Area myArea,
LegalWarrant W)
Puts a warrant on the official docket so that officers can act on them. |
boolean |
addWarrant(Area myArea,
MOB accused,
MOB victim,
java.lang.String crimeLocs,
java.lang.String crimeFlags,
java.lang.String crime,
java.lang.String sentence,
java.lang.String warnMsg)
Fills out and, if possible, issues a warrant for arrest using the given crime data. |
boolean |
aquit(Area myArea,
MOB accused,
java.lang.String[] acquittableLaws)
Removes the first warrant for the given accused criminal, for any one of the given list of official crime KEYS. |
boolean |
arrest(Area myArea,
MOB officer,
MOB mob)
Assigns an officer and begins the automated arresting procedure. |
java.lang.String |
conquestInfo(Area myArea)
If the legal behavior and area are conquerable by clans or foreign organizations, this method will return the name of the current controlling clan, and some information about the state of the conquest, such as control points achieved. |
int |
controlPoints()
Returns the number of control points necessary to conquer the area governed by this legal behavior. |
boolean |
deleteWarrant(Area myArea,
LegalWarrant W)
Removes the given warrants from the list of issued warrants. |
boolean |
fillOutWarrant(MOB mob,
Law laws,
Area myArea,
Environmental target,
java.lang.String crimeLocs,
java.lang.String crimeFlags,
java.lang.String crime,
java.lang.String sentence,
java.lang.String warnMsg)
Inspects the circumstances of, and if necessary, assigns a warrant to be handled by local law enforcement and judges. |
double |
finesOwed(MOB mob)
Returns the amount of base currency owed by the given mob, if any. |
boolean |
frame(Area myArea,
MOB accused,
MOB framed)
A method that transfers a warrant out on the accused to a different framed individual |
int |
getControlPoints(java.lang.String clanID)
Returns the number of control points earned by the given clanID. |
java.util.Vector |
getCriminals(Area myArea,
java.lang.String searchStr)
Searches the list of warrants, returning those criminal mobs whose names match the search string, and still have legal warrants available for them. |
java.util.Vector |
getWarrantsOf(Area myArea,
MOB accused)
Returns a Vector of all active legal warrants available on the given mob. |
boolean |
hasWarrant(Area myArea,
MOB accused)
Returns whether the given mob has a valid warrant out for his/her arrest. |
boolean |
isAnyOfficer(Area myArea,
MOB mob)
Returns whether the given mob qualifies as an arresting officer of any sort in the given legal area. |
boolean |
isElligibleOfficer(Area myArea,
MOB mob)
Returns whether the given mob is both an officer of the law, and not otherwise engaged in an arrest, and so is available to make one |
boolean |
isFullyControlled()
Returns whether this legalbehavior governs an area that is presently legally stable. |
boolean |
isJailRoom(Area myArea,
java.util.Vector jails)
Returns whether any of the given Room objects in the jails Vector is indeed an official Jail room as defined by this legal behavior. |
boolean |
isJudge(Area myArea,
MOB mob)
Returns whether the given mob qualifies as the judge in the given legal area. |
boolean |
isStillACrime(LegalWarrant W,
boolean debugging)
Returns whether or not the given legal warrant is still a valid, timely warrant that can be acted upon by law enforcement. |
Law |
legalInfo(Area myArea)
Returns the set of laws governing the given geographic legal area, assuming that this LegalBehavior is the behavior governing the same. |
void |
modifyAssessedFines(double d,
MOB mob)
A method to change the amount of base currency currently listed as fines owed by the given mob. |
int |
revoltChance()
The present chance (percent) that the area may collapse into revolt and remove itself from control. |
java.lang.String |
rulingOrganization()
Get the name of the clan that currently rules this area, if applicable. |
void |
setControlPoints(java.lang.String clanID,
int newControlPoints)
Modify the number of control points earned by the given clanID. |
boolean |
updateLaw(Area myArea)
This method notifies the legal behavior that its laws have changed and need to be updated. |
java.util.Vector |
warrantInfo(Area myArea)
Generates a Vector of Vectors containing information about all warrants currently at issue in the geographic legal area given. |
| Methods inherited from interface com.planet_ink.coffee_mud.Behaviors.interfaces.Behavior |
|---|
canImprove, canImprove, externalFiles, flags, getParms, grantsAggressivenessTo, isSavable, parmsFormat, registerDefaultQuest, setParms, setSavable, startBehavior |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable |
|---|
getTickStatus, name, tick |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
|---|
copyOf, ID, initializeClass, newInstance |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.MsgListener |
|---|
executeMsg, okMessage |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMModifiable |
|---|
getSaveStatIndex, getStat, getStatCodes, isStat, setStat |
| Field Detail |
|---|
static final long ONE_REAL_DAY
static final long EXPIRATION_MILLIS
static final long CONTROLTIME
| Method Detail |
|---|
boolean isStillACrime(LegalWarrant W,
boolean debugging)
W - the legal warrant to inspectdebugging - whether debug information should be sent to the log
LegalWarrant
boolean fillOutWarrant(MOB mob,
Law laws,
Area myArea,
Environmental target,
java.lang.String crimeLocs,
java.lang.String crimeFlags,
java.lang.String crime,
java.lang.String sentence,
java.lang.String warnMsg)
mob - the accused characterlaws - the system of laws to use as a basismyArea - the geographical domain that the laws apply totarget - the victim of a crime, if anycrimeLocs - string of location flags, e.g. !indoors !home keyword !keywordcrimeFlags - string of crime situation flags, e.g. !recently !combatcrime - string description of the crime, e.g. robbing sentence - string sentence action, e.g. warn, parole1, jail1, deathwarnMsg - string the officer will say to explain the seriousness of the crime
accuse(Area, MOB, MOB, String[]),
Law,
Law.PUNISHMENTMASK_DESCS
boolean frame(Area myArea,
MOB accused,
MOB framed)
myArea - the geographical legal areaaccused - the mob with actual warrants out on him/herframed - the person to transfer the first warrant to.
boolean arrest(Area myArea,
MOB officer,
MOB mob)
myArea - the geographic legal areaofficer - the mob to assign as the arresting officermob - the mob to arrest
java.util.Vector warrantInfo(Area myArea)
myArea - the geographic legal area
Law legalInfo(Area myArea)
myArea - the geographic legal area
Law
boolean isElligibleOfficer(Area myArea,
MOB mob)
myArea - the geographic legal areamob - the pc/npc to test
boolean hasWarrant(Area myArea,
MOB accused)
myArea - the geographic legal areaaccused - the mob to test
boolean isAnyOfficer(Area myArea,
MOB mob)
myArea - the geographic legal areamob - the mob to test for officerhood
boolean isJudge(Area myArea,
MOB mob)
myArea - the geographic legal areamob - the mob to test for judgehood
void modifyAssessedFines(double d,
MOB mob)
d - the amount of base currency the mob owesmob - the mob who owes money to the statedouble finesOwed(MOB mob)
mob - the mob who might owe money
boolean updateLaw(Area myArea)
myArea - the geographic legal area
java.lang.String rulingOrganization()
Clanjava.lang.String conquestInfo(Area myArea)
myArea - the geographic legal area
boolean isFullyControlled()
int controlPoints()
setControlPoints(String, int),
getControlPoints(String)int revoltChance()
void setControlPoints(java.lang.String clanID,
int newControlPoints)
clanID - the clan to assign the control points tonewControlPoints - the number of points to assigncontrolPoints(),
getControlPoints(String)int getControlPoints(java.lang.String clanID)
clanID - the clan to assign the control points to
controlPoints(),
setControlPoints(String, int)
java.util.Vector getCriminals(Area myArea,
java.lang.String searchStr)
myArea - the geographic legal areasearchStr - the name/search string to use
MOB
java.util.Vector getWarrantsOf(Area myArea,
MOB accused)
myArea - the geographic legal areaaccused - the mob to look for warrants for
LegalWarrant
boolean addWarrant(Area myArea,
LegalWarrant W)
myArea - the geographic legal areaW - the LegalWarrant to put on the docket
fillOutWarrant(MOB, Law, Area, Environmental, String, String, String, String, String),
addWarrant(Area, MOB, MOB, String, String, String, String, String),
LegalWarrant
boolean addWarrant(Area myArea,
MOB accused,
MOB victim,
java.lang.String crimeLocs,
java.lang.String crimeFlags,
java.lang.String crime,
java.lang.String sentence,
java.lang.String warnMsg)
myArea - the geographic legal areaaccused - the accused charactervictim - the victim of a crime, if anycrimeLocs - string of location flags, e.g. !indoors !home keyword !keywordcrimeFlags - string of crime situation flags, e.g. !recently !combatcrime - string description of the crime, e.g. robbing sentence - string sentence action, e.g. warn, parole1, jail1, deathwarnMsg - string the officer will say to explain the seriousness of the crime
fillOutWarrant(MOB, Law, Area, Environmental, String, String, String, String, String)
boolean deleteWarrant(Area myArea,
LegalWarrant W)
myArea - the geographic legal areaW - the legal warrant to remove
LegalWarrant
boolean aquit(Area myArea,
MOB accused,
java.lang.String[] acquittableLaws)
myArea - the geographic legal areaaccused - the mob possible accused of one of the crimesacquittableLaws - the list of crime keys.
boolean isJailRoom(Area myArea,
java.util.Vector jails)
myArea - the geographic legal areajails - a Vector of Room objects to inspect
Room
boolean accuse(Area myArea,
MOB accused,
MOB victim,
java.lang.String[] accusableLaws)
myArea - the geographic legal areaaccused - the accused mobvictim - the victim of the crimeaccusableLaws - a crime key, such as TAXEVASION
fillOutWarrant(MOB, Law, Area, Environmental, String, String, String, String, String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||