Behavior
, java.lang.Cloneable
, CMObject
, java.lang.Comparable<CMObject>
, Contingent
, Modifiable
, MsgListener
, Tickable
Arrest
, Conquerable
public interface LegalBehavior extends Behavior
Behavior
,
LegalWarrant
,
Law
Modifier and Type | Field | Description |
---|---|---|
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
|
CAN_AREAS, CAN_EXITS, CAN_ITEMS, CAN_MOBS, CAN_ROOMS, FLAG_LEGALBEHAVIOR, FLAG_MOBILITY, FLAG_POTENTIALLYAGGRESSIVE, FLAG_POTENTIALLYAUTODEATHING, FLAG_TROUBLEMAKING
idConverter
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
Modifier and Type | Method | Description |
---|---|---|
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.
|
int |
addGetLoyaltyBonus(int delta) |
Changes and/or reads the current loyalty bonus that this
populace has to their rulers.
|
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.List<MOB> |
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.List<LegalWarrant> |
getWarrantsOf(Area myArea,
MOB accused) |
Returns a list 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 |
isEligibleOfficer(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.List<Room> 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.
|
void |
release(Area myArea,
LegalWarrant warrant) |
If the warrant reflects someone in prison, it releases them.
|
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.
|
void |
suppressLaws(java.lang.String crime,
java.lang.Object until) |
Suppresses warrants for the given crime until the given
Long timestamp, or Ability is uninvoked, or Quest is
ended.
|
boolean |
updateLaw(Area myArea) |
This method notifies the legal behavior that its laws have changed
and need to be updated.
|
accountForYourself, canImprove, canImprove, endBehavior, externalFiles, flags, getParms, grantsAggressivenessTo, parmsFormat, registerDefaultQuest, setParms, setSavable, startBehavior
copyOf, ID, initializeClass, newInstance
amDestroyed, destroy, isSavable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
executeMsg, okMessage
getTickStatus, name, tick
static final long ONE_REAL_DAY
static final long EXPIRATION_MILLIS
static final long CONTROLTIME
boolean isStillACrime(LegalWarrant W, boolean debugging)
W
- the legal warrant to inspectdebugging
- whether debug information should be sent to the logLegalWarrant
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 T-NAMEsentence
- string sentence action, e.g. warn, parole1, jail1, deathwarnMsg
- string the officer will say to explain the seriousness of the crimeaccuse(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 arrestLaw legalInfo(Area myArea)
myArea
- the geographic legal areaLaw
boolean isEligibleOfficer(Area myArea, MOB mob)
myArea
- the geographic legal areamob
- the pc/npc to testboolean hasWarrant(Area myArea, MOB accused)
myArea
- the geographic legal areaaccused
- the mob to testboolean isAnyOfficer(Area myArea, MOB mob)
myArea
- the geographic legal areamob
- the mob to test for officerhoodboolean isJudge(Area myArea, MOB mob)
myArea
- the geographic legal areamob
- the mob to test for judgehoodvoid 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 moneyboolean updateLaw(Area myArea)
myArea
- the geographic legal areajava.lang.String rulingOrganization()
Clan
java.lang.String conquestInfo(Area myArea)
myArea
- the geographic legal areaboolean 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 tocontrolPoints()
,
setControlPoints(String, int)
java.util.List<MOB> getCriminals(Area myArea, java.lang.String searchStr)
myArea
- the geographic legal areasearchStr
- the name/search string to useMOB
java.util.List<LegalWarrant> getWarrantsOf(Area myArea, MOB accused)
myArea
- the geographic legal areaaccused
- the mob to look for warrants forLegalWarrant
boolean addWarrant(Area myArea, LegalWarrant W)
myArea
- the geographic legal areaW
- the LegalWarrant to put on the docketfillOutWarrant(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 T-NAMEsentence
- string sentence action, e.g. warn, parole1, jail1, deathwarnMsg
- string the officer will say to explain the seriousness of the crimefillOutWarrant(MOB, Law, Area, Environmental, String, String, String, String, String)
boolean deleteWarrant(Area myArea, LegalWarrant W)
myArea
- the geographic legal areaW
- the legal warrant to removeLegalWarrant
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.List<Room> jails)
myArea
- the geographic legal areajails
- a list of Room objects to inspectRoom
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 TAXEVASIONfillOutWarrant(MOB, Law, Area, Environmental, String, String, String, String, String)
void release(Area myArea, LegalWarrant warrant)
myArea
- the legal areawarrant
- the warrant to excusevoid suppressLaws(java.lang.String crime, java.lang.Object until)
crime
- the crime to suppressuntil
- the Object expiration for the suppressionint addGetLoyaltyBonus(int delta)
delta
- 0, or an amount to change the loyalty bonus by