CMObject, Tickable, CMLibrary, LegalLibrary, java.lang.Cloneable, java.lang.Comparable<CMObject>public class MUDLaw extends StdLibrary implements LegalLibrary
idConverterINDOORSTR, OUTDOORSTR, RENTSTR, SALESTRisDebugging, name, serviceClient, tickStatusSTATUS_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| Constructor | Description |
|---|---|
MUDLaw() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
canAttackThisProperty(MOB mob,
PrivateProperty record) |
Property can be attacked if it is unowned, owned by the attacker,
is owned by a clan whose leader the attacker may fight, or owned
by a person whom the attacker may fight.
|
void |
colorRoomForSale(Room R,
LandTitle title,
boolean reset) |
If the given room with the given land title was recently
created, or recently lost its owner and has gone back into
a for-sale state, then this method will update or create
its ID and fix its title and description.
|
boolean |
doesAnyoneHavePrivilegesHere(MOB mob,
java.lang.String overrideID,
Room R) |
Returns whether the given mob, or an optional given property owner,
or literally anyone else in the room, has normal privileges in the
room.
|
protected boolean |
doesHaveClanFriendlyPrivilegesHere(MOB mob,
java.lang.String clanID) |
|
boolean |
doesHavePriviledgesHere(MOB mob,
Room room) |
A mob has normal privileges with record to property if they are the owner, married
to the owner, has HOME_PRIVS clan privileges with clan owned property, or with the
property of a clan that your clan is friendly with.
|
boolean |
doesHavePriviledgesInThisDirection(MOB mob,
Room room,
Exit exit) |
Given a mob, a room the mob is currently in, and an exit in that room that
the mob would enter, this will return whether the given mob has normal
privileges in the room in the direction of the exit.
|
boolean |
doesHavePrivilegesWith(MOB mob,
PrivateProperty record) |
A mob has normal privileges with record to property if they are the owner, married
to the owner, has HOME_PRIVS clan privileges with clan owned property, or with the
property of a clan that your clan is friendly with.
|
boolean |
doesHaveWeakPriviledgesHere(MOB mob,
Room room) |
Weak privileges are had when one owns a room, is married to the
owner, is following someone who is an owner, or is a member of
the clan that owns the property (privileges notwithstanding).
|
boolean |
doesHaveWeakPrivilegesWith(MOB mob,
PrivateProperty record) |
Weak privileges are had when one owns property, is married to the
owner, or is a member of the clan that owns the property
(privileges notwithstanding).
|
boolean |
doesOwnThisLand(MOB mob,
Room room) |
Someone is considered the owner if they are the named owner, married
to the named owner, with property ownership privileges to clan owned
property, or are Following someone who is otherwise an owner of some
sort.
|
boolean |
doesOwnThisProperty(MOB mob,
PrivateProperty record) |
Someone is considered the owner if they are the named owner, married
to the named owner, with property ownership privileges to clan owned
property, or are Following someone who is otherwise an owner of some
sort.
|
boolean |
doesOwnThisProperty(MOB mob,
Room room) |
Someone is considered the owner if they are the named owner, married
to the named owner, with property ownership privileges to clan owned
property, or are Following someone who is otherwise an owner of some
sort.
|
protected java.util.List<Room> |
getAllMetroTitledRooms(Area A) |
|
java.util.List<LandTitle> |
getAllUniqueLandTitles(Area A,
java.lang.String owner,
boolean includeRentals) |
Scans the given area metro for property titles, returning only the
unique ones (so rooms groups under one title return only the 1 title).
|
java.lang.String |
getClericInfused(Physical P) |
Cleric Infusion is actually more a part of Divine Law
than the normal kind.
|
Deity.DeityWorshipper |
getClericInfusion(Physical P) |
Cleric Infusion is actually more a part of Divine Law
than the normal kind.
|
java.util.Set<Room> |
getHomePeersOnThisFloor(Room room,
java.util.Set<Room> doneRooms) |
Returns all interconnected rooms that are private
property and ownable, even if owned by no one.
|
java.lang.String |
getLandOwnerName(Room room) |
Returns the name of the owner of the given room.
|
LandTitle |
getLandTitle(Area area) |
Returns the private property record of the given area,
if one exists.
|
LandTitle |
getLandTitle(Room room) |
Returns the private property record of the given room,
if one exists, or its area.
|
LegalBehavior |
getLegalBehavior(Area A) |
If an area is subject to law and order,
this method will return the legal system that
applies to it.
|
LegalBehavior |
getLegalBehavior(Room R) |
If a room is in an area subject to law and order,
this method will return the legal system that
applies to it.
|
Area |
getLegalObject(Area A) |
If an area is subject to law and order,
this method will return the exact area object
that the legal system directly applies to.
|
Area |
getLegalObject(Room R) |
If a room is in an area subject to law and order,
this method will return the exact area object
that the legal system directly applies to.
|
MOB |
getPropertyOwner(PrivateProperty record) |
If the owner of the given property record is a clan, this will return
the property owner mob.
|
java.lang.String |
getPropertyOwnerName(Room room) |
Returns the name of the owner of the given room.
|
PrivateProperty |
getPropertyRecord(Area area) |
Returns the private property record of the given area,
if one existsa.
|
PrivateProperty |
getPropertyRecord(Item item) |
Returns the private property record of the given item,
if one exists.
|
PrivateProperty |
getPropertyRecord(Room room) |
Returns the private property record of the given room,
if one exists, or its area.
|
PrivateProperty |
getPropertyRecord(MOB mob) |
Returns the private property record of the given mob,
if one exists.
|
Law |
getTheLaw(Room R) |
If a room is in an area subject to law and order,
this method will return the legal policy object that
applies to it.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
LandTitle |
ifHomePeerLandTitle(Room R) |
|
LandTitle |
ifLandTitle(Room R) |
|
boolean |
isACity(Area A) |
Returns whether the stats for the given area reflect
that it is legally considered a City.
|
boolean |
isHomePeerRoom(Room R) |
|
boolean |
isHomeRoomDownstairs(Room room) |
Given a room that is presumably a piece of property, this will return
whether the given room is downstairs (not necc directly) of property
rooms, even if owned by someone else.
|
boolean |
isHomeRoomUpstairs(Room room) |
Given a room that is presumably a piece of property, this will return
whether the given room is upstairs (not necc directly) of property
rooms, even if owned by someone else.
|
boolean |
isLandOwnable(Room room) |
Returns whether the given room has a land
title that makes it possible to own, which
might include the area.
|
boolean |
isLandOwnersName(java.lang.String name,
Room room) |
Someone is considered the direct owner if they are the named owner.
|
boolean |
isLegalJudgeHere(MOB mob) |
Returns whether the given mob is legally considered
a Judge in the place where the mob is presently
located when this method is called.
|
boolean |
isLegalOfficerHere(MOB mob) |
Returns whether the given mob is legally considered
a Police Officer in the place where the mob is presently
located when this method is called.
|
boolean |
isLegalOfficialHere(MOB mob) |
Returns whether the given mob is either a police
officer or a judge in the place where the mob is
presently located when this is called.
|
boolean |
isPropertyOwnersName(java.lang.String name,
Room room) |
Someone is considered the direct owner if they are the named owner.
|
boolean |
isRoomSimilarlyTitled(LandTitle title,
Room R) |
Given a title with an owner, this will return whether
the given room, or any room adjacent to the given room,
is owned by the same owner.
|
boolean |
mayOwnThisItem(MOB mob,
Item item) |
Given a mob and an item, this will return whether the mob
has weak privileges with a property record on the item.
|
boolean |
robberyCheck(PrivateProperty record,
CMMsg msg,
boolean quiet) |
This method is called whenever an action occurs on private property to
determine whether the action might start a "robbery" state.
|
protected boolean |
shopkeeperMobPresent(Room R) |
activate, getServiceClient, L, propertiesLoaded, shutdowncopyOf, initializeClass, name, newInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactivate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, shutdown, tickpublic java.lang.String ID()
CMObjectID in interface CMObjectID in class StdLibrarypublic Law getTheLaw(Room R)
LegalLibrarygetTheLaw in interface LegalLibraryR - the room to checkLegalLibrary.getLegalObject(Area),
LegalLibrary.getLegalBehavior(Area),
LegalLibrary.getLegalObject(Room),
LegalLibrary.getLegalBehavior(Room)public LegalBehavior getLegalBehavior(Area A)
LegalLibrarygetLegalBehavior in interface LegalLibraryA - the area to checkLegalLibrary.getTheLaw(Room),
LegalLibrary.getLegalObject(Area),
LegalLibrary.getLegalObject(Room),
LegalLibrary.getLegalBehavior(Room)public LegalBehavior getLegalBehavior(Room R)
LegalLibrarygetLegalBehavior in interface LegalLibraryR - the room to checkLegalLibrary.getTheLaw(Room),
LegalLibrary.getLegalObject(Area),
LegalLibrary.getLegalBehavior(Area),
LegalLibrary.getLegalObject(Room)public Area getLegalObject(Area A)
LegalLibrarygetLegalObject in interface LegalLibraryA - the area to checkLegalLibrary.getTheLaw(Room),
LegalLibrary.getLegalBehavior(Area),
LegalLibrary.getLegalObject(Room),
LegalLibrary.getLegalBehavior(Room)public Area getLegalObject(Room R)
LegalLibrarygetLegalObject in interface LegalLibraryR - the room to checkLegalLibrary.getTheLaw(Room),
LegalLibrary.getLegalObject(Area),
LegalLibrary.getLegalBehavior(Area),
LegalLibrary.getLegalBehavior(Room)public boolean isACity(Area A)
LegalLibraryisACity in interface LegalLibraryA - the area to checkpublic java.util.List<LandTitle> getAllUniqueLandTitles(Area A, java.lang.String owner, boolean includeRentals)
LegalLibrarygetAllUniqueLandTitles in interface LegalLibraryA - the area whose rooms and children to scan for titlesowner - null for all titles, * for all owned titles, or owner nameincludeRentals - true to include rental property, false otherwisepublic LandTitle getLandTitle(Area area)
LegalLibrarygetLandTitle in interface LegalLibraryarea - the area to checkLegalLibrary.getPropertyRecord(Room),
LegalLibrary.getPropertyRecord(Area),
LegalLibrary.getPropertyRecord(Item),
LegalLibrary.getPropertyRecord(MOB),
LegalLibrary.getLandTitle(Room)public PrivateProperty getPropertyRecord(Area area)
LegalLibrarygetPropertyRecord in interface LegalLibraryarea - the area to checkLegalLibrary.getPropertyRecord(Room),
LegalLibrary.getPropertyRecord(Item),
LegalLibrary.getPropertyRecord(MOB),
LegalLibrary.getLandTitle(Area),
LegalLibrary.getLandTitle(Room)public PrivateProperty getPropertyRecord(MOB mob)
LegalLibrarygetPropertyRecord in interface LegalLibrarymob - the mob to checkLegalLibrary.getPropertyRecord(Room),
LegalLibrary.getPropertyRecord(Item),
LegalLibrary.getPropertyRecord(Area),
LegalLibrary.getLandTitle(Area),
LegalLibrary.getLandTitle(Room)public LandTitle getLandTitle(Room room)
LegalLibrarygetLandTitle in interface LegalLibraryroom - the room to checkLegalLibrary.getPropertyRecord(Room),
LegalLibrary.getPropertyRecord(Area),
LegalLibrary.getPropertyRecord(Item),
LegalLibrary.getPropertyRecord(MOB),
LegalLibrary.getLandTitle(Area)public PrivateProperty getPropertyRecord(Room room)
LegalLibrarygetPropertyRecord in interface LegalLibraryroom - the room to checkLegalLibrary.getPropertyRecord(Area),
LegalLibrary.getPropertyRecord(Item),
LegalLibrary.getPropertyRecord(MOB),
LegalLibrary.getLandTitle(Area),
LegalLibrary.getLandTitle(Room)public boolean isHomeRoomUpstairs(Room room)
LegalLibraryisHomeRoomUpstairs in interface LegalLibraryroom - the room to check whether it is upstairsLegalLibrary.isHomeRoomDownstairs(Room),
LegalLibrary.getHomePeersOnThisFloor(Room, Set)public boolean isHomePeerRoom(Room R)
public boolean isRoomSimilarlyTitled(LandTitle title, Room R)
LegalLibraryisRoomSimilarlyTitled in interface LegalLibrarytitle - the title to serve as basisR - the room to start checking frompublic java.util.Set<Room> getHomePeersOnThisFloor(Room room, java.util.Set<Room> doneRooms)
LegalLibrarygetHomePeersOnThisFloor in interface LegalLibraryroom - the room to checkdoneRooms - a required set to put all peer rooms inLegalLibrary.isHomeRoomUpstairs(Room),
LegalLibrary.isHomeRoomDownstairs(Room)public boolean isHomeRoomDownstairs(Room room)
LegalLibraryisHomeRoomDownstairs in interface LegalLibraryroom - the room to check whether it is downstairsLegalLibrary.isHomeRoomUpstairs(Room),
LegalLibrary.getHomePeersOnThisFloor(Room, Set)public boolean doesHavePriviledgesInThisDirection(MOB mob, Room room, Exit exit)
LegalLibrarydoesHavePriviledgesInThisDirection in interface LegalLibrarymob - the mobroom - the mobs current roomexit - the exit in the room denoting the directionLegalLibrary.doesHavePrivilegesWith(MOB, PrivateProperty),
LegalLibrary.doesAnyoneHavePrivilegesHere(MOB, String, Room),
LegalLibrary.doesHavePriviledgesHere(MOB, Room)public boolean doesHavePrivilegesWith(MOB mob, PrivateProperty record)
LegalLibrarydoesHavePrivilegesWith in interface LegalLibrarymob - the mob to checkrecord - the property to checkLegalLibrary.doesHaveWeakPrivilegesWith(MOB, PrivateProperty),
LegalLibrary.doesHavePriviledgesInThisDirection(MOB, Room, Exit),
LegalLibrary.doesHavePriviledgesHere(MOB, Room),
LegalLibrary.doesAnyoneHavePrivilegesHere(MOB, String, Room)public boolean doesHaveWeakPrivilegesWith(MOB mob, PrivateProperty record)
LegalLibrarydoesHaveWeakPrivilegesWith in interface LegalLibrarymob - the mob to checkrecord - the record to checkLegalLibrary.doesHaveWeakPriviledgesHere(MOB, Room)public boolean doesHavePriviledgesHere(MOB mob, Room room)
LegalLibrarydoesHavePriviledgesHere in interface LegalLibrarymob - the mobroom - the roomLegalLibrary.doesHavePrivilegesWith(MOB, PrivateProperty),
LegalLibrary.doesAnyoneHavePrivilegesHere(MOB, String, Room),
LegalLibrary.doesHavePriviledgesInThisDirection(MOB, Room, Exit)public boolean doesHaveWeakPriviledgesHere(MOB mob, Room room)
LegalLibrarydoesHaveWeakPriviledgesHere in interface LegalLibrarymob - the mob to checkroom - the room to checkLegalLibrary.doesHaveWeakPrivilegesWith(MOB, PrivateProperty)protected boolean doesHaveClanFriendlyPrivilegesHere(MOB mob, java.lang.String clanID)
public boolean doesAnyoneHavePrivilegesHere(MOB mob, java.lang.String overrideID, Room R)
LegalLibrarydoesAnyoneHavePrivilegesHere in interface LegalLibrarymob - the mob to check firstoverrideID - "", or another property ownerR - the room with possible privilegedLegalLibrary.doesHavePrivilegesWith(MOB, PrivateProperty),
LegalLibrary.doesHavePriviledgesHere(MOB, Room),
LegalLibrary.doesHavePriviledgesInThisDirection(MOB, Room, Exit)public java.lang.String getPropertyOwnerName(Room room)
LegalLibrarygetPropertyOwnerName in interface LegalLibraryroom - the room to checkLegalLibrary.isLandOwnable(Room),
LegalLibrary.getLandOwnerName(Room)public java.lang.String getLandOwnerName(Room room)
LegalLibrarygetLandOwnerName in interface LegalLibraryroom - the room to checkLegalLibrary.getPropertyOwnerName(Room),
LegalLibrary.isLandOwnable(Room)public boolean isLandOwnable(Room room)
LegalLibraryisLandOwnable in interface LegalLibraryroom - the room to checkLegalLibrary.getPropertyOwnerName(Room),
LegalLibrary.getLandOwnerName(Room)public boolean isLandOwnersName(java.lang.String name,
Room room)
LegalLibraryisLandOwnersName in interface LegalLibraryname - the name (mob or clan) to check for ownership statusroom - the property to checkLegalLibrary.doesOwnThisLand(MOB, Room)public boolean isPropertyOwnersName(java.lang.String name,
Room room)
LegalLibraryisPropertyOwnersName in interface LegalLibraryname - the name (mob or clan) to check for ownership statusroom - the property to checkLegalLibrary.doesOwnThisProperty(MOB, PrivateProperty),
LegalLibrary.doesOwnThisProperty(MOB, Room)public boolean doesOwnThisProperty(MOB mob, Room room)
LegalLibrarydoesOwnThisProperty in interface LegalLibrarymob - the mob to check for ownership statusroom - the property to checkLegalLibrary.doesOwnThisProperty(MOB, PrivateProperty),
LegalLibrary.isPropertyOwnersName(String, Room)public boolean doesOwnThisProperty(MOB mob, PrivateProperty record)
LegalLibrarydoesOwnThisProperty in interface LegalLibrarymob - the mob to check for ownership statusrecord - the property record to checkLegalLibrary.doesOwnThisProperty(MOB, Room),
LegalLibrary.isPropertyOwnersName(String, Room)public MOB getPropertyOwner(PrivateProperty record)
LegalLibrarygetPropertyOwner in interface LegalLibraryrecord - the property recordpublic boolean canAttackThisProperty(MOB mob, PrivateProperty record)
LegalLibrarycanAttackThisProperty in interface LegalLibrarymob - the attackerrecord - the property record for the given propertypublic Deity.DeityWorshipper getClericInfusion(Physical P)
LegalLibrarygetClericInfusion in interface LegalLibraryP - the thing to check for infusionDeity.DeityWorshipperpublic java.lang.String getClericInfused(Physical P)
LegalLibrarygetClericInfused in interface LegalLibraryP - the thing to check for infusionpublic boolean doesOwnThisLand(MOB mob, Room room)
LegalLibrarydoesOwnThisLand in interface LegalLibrarymob - the mob to check for ownership statusroom - the property to checkLegalLibrary.isLandOwnersName(String, Room)public boolean isLegalOfficerHere(MOB mob)
LegalLibraryisLegalOfficerHere in interface LegalLibrarymob - the mob to checkLegalLibrary.isLegalJudgeHere(MOB),
LegalLibrary.isLegalOfficialHere(MOB)public boolean isLegalJudgeHere(MOB mob)
LegalLibraryisLegalJudgeHere in interface LegalLibrarymob - the mob to checkLegalLibrary.isLegalOfficerHere(MOB),
LegalLibrary.isLegalOfficialHere(MOB)public boolean isLegalOfficialHere(MOB mob)
LegalLibraryisLegalOfficialHere in interface LegalLibrarymob - the mob to checkLegalLibrary.isLegalJudgeHere(MOB),
LegalLibrary.isLegalOfficerHere(MOB)public void colorRoomForSale(Room R, LandTitle title, boolean reset)
LegalLibrarycolorRoomForSale in interface LegalLibraryR - the room that's for saletitle - the rooms land titlereset - reset the room descriptionprotected boolean shopkeeperMobPresent(Room R)
public boolean robberyCheck(PrivateProperty record, CMMsg msg, boolean quiet)
LegalLibraryrobberyCheck in interface LegalLibraryrecord - the property record for the roommsg - the event to checkquiet - true to not report anything to the source of the eventLegalLibrary.doesHavePriviledgesHere(MOB, Room)public PrivateProperty getPropertyRecord(Item item)
LegalLibrarygetPropertyRecord in interface LegalLibraryitem - the item to checkLegalLibrary.getPropertyRecord(Area),
LegalLibrary.getPropertyRecord(Room),
LegalLibrary.getPropertyRecord(MOB),
LegalLibrary.getLandTitle(Area),
LegalLibrary.getLandTitle(Room)public boolean mayOwnThisItem(MOB mob, Item item)
LegalLibrarymayOwnThisItem in interface LegalLibrarymob - the mob to check possible item ownership ofitem - the item to checkLegalLibrary.doesHavePrivilegesWith(MOB, PrivateProperty),
LegalLibrary.doesHaveWeakPrivilegesWith(MOB, PrivateProperty)