Behavior
, LegalBehavior
, CMObject
, Contingent
, Modifiable
, MsgListener
, Tickable
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
public class Conquerable extends Arrest
Modifier and Type | Field | Description |
---|---|---|
protected boolean |
allowLaw |
|
protected PairList<MOB,MOB> |
assaults |
|
protected int |
checkDown |
|
protected static int |
CHECKFREQ |
|
protected java.util.Map<java.lang.String,int[]> |
clanControlPoints |
|
protected PairList<ClanItem,ItemPossessor> |
clanItems |
|
protected int |
conqPtLvlDiff |
|
protected long |
conquestDate |
|
protected static java.lang.String[] |
DEFAULT_WAR_CRYS |
|
protected int |
fightDown |
|
protected static int |
FIGHTFREQ |
|
protected java.lang.String |
holdingClan |
|
protected java.lang.String |
journalName |
|
protected int |
loyaltyBonus |
|
protected Area |
myArea |
|
protected long |
nextFlagScan |
|
protected ExpireTreeSet<MOB> |
noMultiFollows |
|
protected int |
pointDown |
|
protected static int |
POINTFREQ |
|
protected java.lang.String |
prevHoldingClan |
|
protected int |
revoltDown |
|
protected int |
revoltFails |
|
protected static int |
REVOLTFREQ |
|
protected java.lang.String |
savedHoldingClan |
|
protected boolean |
switchOwnership |
|
protected int |
totalControlPoints |
|
protected long |
waitToReload |
bannedItemCache, bannedMOBCheck, finesAssessed, lastAreaName, lastBanishR, loadAttempt, suppressedCrimes
CAN_AREAS, CAN_EXITS, CAN_ITEMS, CAN_MOBS, CAN_ROOMS, FLAG_LEGALBEHAVIOR, FLAG_MOBILITY, FLAG_POTENTIALLYAGGRESSIVE, FLAG_POTENTIALLYAUTODEATHING, FLAG_TROUBLEMAKING
idConverter
CONTROLTIME, EXPIRATION_MILLIS, ONE_REAL_DAY
CODES, isSavableBehavior, parms
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
Constructor | Description |
---|---|
Conquerable() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
accountForYourself() |
Returns a string describing what this behavior does.
|
int |
addGetLoyaltyBonus(int delta) |
Changes and/or reads the current loyalty bonus that this
populace has to their rulers.
|
protected void |
announceToArea(Area area,
java.lang.String clanID,
int amount) |
|
int |
calcItemControlPoints(Area A) |
|
int |
calcRevoltChance(Area A) |
|
protected boolean |
changeControlPoints(java.lang.String clanID,
int amount,
Room notifyRoom) |
|
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.
|
CMObject |
copyOf() |
Similar to Cloneable.clone(), but does its best to make sure that
any internal objects to this class are also copyOfed.
|
protected void |
declareWinner(java.lang.String clanID) |
|
protected boolean |
defaultModifiableNames() |
|
protected void |
deRegisterClanItem(ClanItem I) |
|
protected void |
endClanRule(java.lang.String reason) |
|
void |
executeMsg(Environmental myHost,
CMMsg msg) |
The general message event handler for the object.
|
protected boolean |
flagFound(Area A,
Clan C) |
|
protected boolean |
flagFound(Area A,
java.lang.String clanID) |
|
int |
getControlPoints(java.lang.String clanID) |
Returns the number of control points earned by the given clanID.
|
protected java.lang.String |
getLawParms() |
|
protected java.lang.String |
getManadatoryWorshipID() |
|
protected boolean |
hasItemSameAs(MOB M,
Item I) |
|
protected boolean |
hasItemSameName(MOB M,
java.lang.String name) |
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
protected boolean |
isAnUltimateAuthorityHere(MOB M,
Law laws) |
|
boolean |
isAnyKindOfOfficer(Law laws,
MOB M) |
|
boolean |
isFullyControlled() |
Returns whether this legalbehavior governs an area that is presently
legally stable.
|
boolean |
isTheJudge(Law laws,
MOB M) |
|
boolean |
okMessage(Environmental myHost,
CMMsg msg) |
The general message event previewer for the object.
|
void |
recalculateControlPoints(Area A) |
|
protected void |
registerClanItem(ClanItem I) |
|
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 |
setParms(java.lang.String newParms) |
Sets the raw parameter string for this behavior.
|
void |
startBehavior(PhysicalAgent E) |
Called after a behavior is added to a Behavable object.
|
protected boolean |
theLawIsEnabled() |
|
boolean |
tick(Tickable ticking,
int tickID) |
this is the method which is called periodically by the threading engine.
|
protected static java.lang.String[] |
warCrys() |
accuse, addWarrant, addWarrant, addWarrant, aquit, arrest, canFocusOn, canImproveCode, debugLogLostConvicts, deleteWarrant, dismissOfficer, externalFiles, fileAllWarrants, fileArrestResister, fillOutWarrant, findTheBanishingPoint, findTheDetentionCenter, findTheJail, findTheJudge, finesOwed, fixCharge, flags, frame, getAnyEligibleOfficer, getAWitnessHere, getBanishmentTicks, getBanishRoom, getCriminals, getDetainParm, getDetainRoom, getDetainTime, getEligibleOfficer, getEligibleOfficerHere, getExtraLawParms, getExtraLawString, getFine, getLaws, getReleaseRoom, getRelevantWarrants, getResourceKey, getRoom, getRoom, getRooms, getShameTicks, getTheJudgeHere, getWarrantsOf, getWitness, hasWarrant, haveMobReactToLaw, highestCrimeAction, isAnyOfficer, isBusyWithJustice, isCrimeSuppressed, isEligibleOfficer, isEligibleOfficer, isJailRoom, isJudge, isStillACrime, isTroubleMaker, judgeMe, legalInfo, makePeace, modifyAssessedFines, processWarrant, release, restOfCharges, startTracking, suppressLaws, testBannedItem, testEntryLaw, trackingModifiers, unCuff, updateLaw
canImprove, canImprove, endBehavior, getParms, grantsAggressivenessTo, parmsFormat, registerDefaultQuest, setSavable
initializeClass, newInstance
amDestroyed, destroy, isSavable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
amDestroyed, canActAtAll, canFreelyBehaveNormal, canImprove, canImprove, compareTo, destroy, endBehavior, getBehaversMOB, getBehaversRoom, getCodeNum, getInternalCodeNum, getParms, getSaveStatIndex, getStat, getStatCodes, getTickStatus, grantsAggressivenessTo, I, initializeClass, isSavable, isStat, L, name, newInstance, parmsFormat, registerDefaultQuest, sameAs, setSavable, setStat
getTickStatus, name
protected java.lang.String savedHoldingClan
protected java.lang.String prevHoldingClan
protected java.lang.String holdingClan
protected java.util.Map<java.lang.String,int[]> clanControlPoints
protected ExpireTreeSet<MOB> noMultiFollows
protected int totalControlPoints
protected Area myArea
protected java.lang.String journalName
protected boolean allowLaw
protected boolean switchOwnership
protected int revoltFails
protected long waitToReload
protected long conquestDate
protected volatile int loyaltyBonus
protected int revoltDown
protected static final int REVOLTFREQ
protected int checkDown
protected static final int CHECKFREQ
protected int pointDown
protected static final int POINTFREQ
protected int fightDown
protected static final int FIGHTFREQ
protected int conqPtLvlDiff
protected PairList<ClanItem,ItemPossessor> clanItems
protected volatile long nextFlagScan
protected static final java.lang.String[] DEFAULT_WAR_CRYS
public java.lang.String ID()
CMObject
protected boolean defaultModifiableNames()
defaultModifiableNames
in class Arrest
protected java.lang.String getLawParms()
getLawParms
in class Arrest
public boolean isFullyControlled()
LegalBehavior
isFullyControlled
in interface LegalBehavior
isFullyControlled
in class Arrest
public java.lang.String accountForYourself()
Behavior
accountForYourself
in interface Behavior
accountForYourself
in class Arrest
public java.lang.String rulingOrganization()
LegalBehavior
rulingOrganization
in interface LegalBehavior
rulingOrganization
in class Arrest
Clan
public int addGetLoyaltyBonus(int delta)
LegalBehavior
addGetLoyaltyBonus
in interface LegalBehavior
addGetLoyaltyBonus
in class Arrest
delta
- 0, or an amount to change the loyalty bonus bypublic CMObject copyOf()
CMObject
copyOf
in interface CMObject
copyOf
in class StdBehavior
public java.lang.String conquestInfo(Area myArea)
LegalBehavior
conquestInfo
in interface LegalBehavior
conquestInfo
in class Arrest
myArea
- the geographic legal areapublic int controlPoints()
LegalBehavior
controlPoints
in interface LegalBehavior
controlPoints
in class Arrest
LegalBehavior.setControlPoints(String, int)
,
LegalBehavior.getControlPoints(String)
public int getControlPoints(java.lang.String clanID)
LegalBehavior
getControlPoints
in interface LegalBehavior
getControlPoints
in class Arrest
clanID
- the clan to assign the control points toLegalBehavior.controlPoints()
,
LegalBehavior.setControlPoints(String, int)
public int revoltChance()
LegalBehavior
revoltChance
in interface LegalBehavior
revoltChance
in class Arrest
public void setParms(java.lang.String newParms)
Behavior
setParms
in interface Behavior
setParms
in class Arrest
newParms
- the parameter string for this behaviorBehavior.getParms()
public void startBehavior(PhysicalAgent E)
Behavior
startBehavior
in interface Behavior
startBehavior
in class StdBehavior
E
- the object to which this behavior has been addedBehavable.addBehavior(Behavior)
,
Behavior.setParms(String)
public boolean isAnyKindOfOfficer(Law laws, MOB M)
isAnyKindOfOfficer
in class Arrest
public boolean isTheJudge(Law laws, MOB M)
isTheJudge
in class Arrest
protected void endClanRule(java.lang.String reason)
public int calcItemControlPoints(Area A)
public int calcRevoltChance(Area A)
protected void announceToArea(Area area, java.lang.String clanID, int amount)
protected boolean hasItemSameName(MOB M, java.lang.String name)
public boolean tick(Tickable ticking, int tickID)
Tickable
tick
in interface Tickable
tick
in class Arrest
ticking
- a reference to this Tickable objecttickID
- the TICKID_ constant describing this periodic call, as defined in TickableTickable
,
ServiceEngine
,
TickableGroup
protected java.lang.String getManadatoryWorshipID()
public void recalculateControlPoints(Area A)
public boolean okMessage(Environmental myHost, CMMsg msg)
MsgListener
okMessage
in interface MsgListener
okMessage
in class StdBehavior
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that wants to be executedCMMsg
,
CMMsg.source()
protected void declareWinner(java.lang.String clanID)
protected void registerClanItem(ClanItem I)
protected void deRegisterClanItem(ClanItem I)
protected boolean flagFound(Area A, java.lang.String clanID)
public void setControlPoints(java.lang.String clanID, int newControlPoints)
LegalBehavior
setControlPoints
in interface LegalBehavior
setControlPoints
in class Arrest
clanID
- the clan to assign the control points tonewControlPoints
- the number of points to assignLegalBehavior.controlPoints()
,
LegalBehavior.getControlPoints(String)
protected boolean changeControlPoints(java.lang.String clanID, int amount, Room notifyRoom)
protected static java.lang.String[] warCrys()
public void executeMsg(Environmental myHost, CMMsg msg)
MsgListener
executeMsg
in interface MsgListener
executeMsg
in class Arrest
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that needs to be executedCMMsg
protected boolean isAnUltimateAuthorityHere(MOB M, Law laws)
isAnUltimateAuthorityHere
in class Arrest
protected boolean theLawIsEnabled()
theLawIsEnabled
in class Arrest