|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Behaviors.StdBehavior
com.planet_ink.coffee_mud.Behaviors.Arrest
com.planet_ink.coffee_mud.Behaviors.Conquerable
public class Conquerable
| Field Summary | |
|---|---|
protected boolean |
allowLaw
|
protected DVector |
assaults
|
protected int |
checkDown
|
protected static int |
CHECKFREQ
|
protected DVector |
clanControlPoints
|
protected java.util.Vector<ClanItem> |
clanItems
|
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 Area |
myArea
|
protected java.util.Vector<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
|
| Fields inherited from class com.planet_ink.coffee_mud.Behaviors.Arrest |
|---|
finesAssessed, lastAreaName, lastBanishR, loadAttempt |
| Fields inherited from class com.planet_ink.coffee_mud.Behaviors.StdBehavior |
|---|
CODES, isSavableBehavior, parms |
| Fields inherited from interface com.planet_ink.coffee_mud.Behaviors.interfaces.LegalBehavior |
|---|
CONTROLTIME, EXPIRATION_MILLIS, ONE_REAL_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_POTENTIALLYAUTODEATHING, FLAG_TROUBLEMAKING |
| Constructor Summary | |
|---|---|
Conquerable()
|
|
| Method Summary | |
|---|---|
java.lang.String |
accountForYourself()
Returns a string describing what this behavior does. |
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(Item 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()
|
| Methods inherited from class com.planet_ink.coffee_mud.Behaviors.StdBehavior |
|---|
amDestroyed, canActAtAll, canFreelyBehaveNormal, canImprove, canImprove, compareTo, destroy, getBehaversMOB, getBehaversRoom, getCodeNum, getParms, getSaveStatIndex, getStat, getStatCodes, getTickStatus, grantsAggressivenessTo, initializeClass, isSavable, isStat, L, name, newInstance, parmsFormat, registerDefaultQuest, sameAs, setSavable, setStat |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.planet_ink.coffee_mud.Behaviors.interfaces.Behavior |
|---|
canImprove, canImprove, getParms, grantsAggressivenessTo, parmsFormat, registerDefaultQuest, setSavable |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable |
|---|
getTickStatus, name |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Contingent |
|---|
amDestroyed, destroy, isSavable |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
|---|
initializeClass, newInstance |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable |
|---|
getSaveStatIndex, getStat, getStatCodes, isStat, setStat |
| Field Detail |
|---|
protected java.lang.String savedHoldingClan
protected java.lang.String prevHoldingClan
protected java.lang.String holdingClan
protected java.util.Vector<ClanItem> clanItems
protected DVector clanControlPoints
protected DVector assaults
protected java.util.Vector<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 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 static final java.lang.String[] DEFAULT_WAR_CRYS
| Constructor Detail |
|---|
public Conquerable()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectID in class Arrestprotected boolean defaultModifiableNames()
defaultModifiableNames in class Arrestprotected java.lang.String getLawParms()
getLawParms in class Arrestpublic boolean isFullyControlled()
LegalBehavior
isFullyControlled in interface LegalBehaviorisFullyControlled in class Arrestpublic java.lang.String accountForYourself()
Behavior
accountForYourself in interface BehavioraccountForYourself in class Arrestpublic java.lang.String rulingOrganization()
LegalBehavior
rulingOrganization in interface LegalBehaviorrulingOrganization in class ArrestClanpublic CMObject copyOf()
CMObject
copyOf in interface CMObjectcopyOf in class StdBehaviorpublic java.lang.String conquestInfo(Area myArea)
LegalBehavior
conquestInfo in interface LegalBehaviorconquestInfo in class ArrestmyArea - the geographic legal area
public int controlPoints()
LegalBehavior
controlPoints in interface LegalBehaviorcontrolPoints in class ArrestLegalBehavior.setControlPoints(String, int),
LegalBehavior.getControlPoints(String)public int getControlPoints(java.lang.String clanID)
LegalBehavior
getControlPoints in interface LegalBehaviorgetControlPoints in class ArrestclanID - the clan to assign the control points to
LegalBehavior.controlPoints(),
LegalBehavior.setControlPoints(String, int)public int revoltChance()
LegalBehavior
revoltChance in interface LegalBehaviorrevoltChance in class Arrestpublic void setParms(java.lang.String newParms)
Behavior
setParms in interface BehaviorsetParms in class ArrestnewParms - the parameter string for this behaviorBehavior.getParms()public void startBehavior(PhysicalAgent E)
Behavior
startBehavior in interface BehaviorstartBehavior in class StdBehaviorE - 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 Arrestprotected 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 hasItemSameAs(MOB M,
Item I)
protected boolean hasItemSameName(MOB M,
java.lang.String name)
public boolean tick(Tickable ticking,
int tickID)
Tickable
tick in interface Tickabletick in class Arrestticking - a reference to this Tickable objecttickID - the TICKID_ constant describing this periodic call, as defined in Tickable
Tickable,
ServiceEngine,
TickableGroupprotected java.lang.String getManadatoryWorshipID()
public void recalculateControlPoints(Area A)
public boolean okMessage(Environmental myHost,
CMMsg msg)
MsgListener
okMessage in interface MsgListenerokMessage in class StdBehaviormyHost - either the initiator of the event, or the host of this objectmsg - the CMMsg that wants to be executed
CMMsg,
CMMsg.source()protected void declareWinner(java.lang.String clanID)
protected void registerClanItem(ClanItem I)
protected void deRegisterClanItem(Item I)
protected boolean flagFound(Area A,
java.lang.String clanID)
protected boolean flagFound(Area A,
Clan C)
public void setControlPoints(java.lang.String clanID,
int newControlPoints)
LegalBehavior
setControlPoints in interface LegalBehaviorsetControlPoints in class ArrestclanID - 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 MsgListenerexecuteMsg in class ArrestmyHost - 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 Arrestprotected boolean theLawIsEnabled()
theLawIsEnabled in class Arrest
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||