com.planet_ink.coffee_mud.Common
Class DefaultClanGovernment

java.lang.Object
  extended by com.planet_ink.coffee_mud.Common.DefaultClanGovernment
All Implemented Interfaces:
ClanGovernment, CMCommon, CMObject, Modifiable, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class DefaultClanGovernment
extends java.lang.Object
implements ClanGovernment


Field Summary
 int acceptPos
          The role automatically assigned to those who are accepted
 Clan.AutoPromoteFlag autoPromoteBy
          Whether an unfilled topRole is automatically filled by those who meet its innermask
 int autoRole
          The role automatically assigned to those who apply successfully
 java.lang.String category
          The category of this government type.
protected  int[] clanAbilityLevels
           
protected  java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,SearchIDList<Ability>>> clanAbilityMap
           
protected  java.lang.String[] clanAbilityNames
           
protected  java.lang.String[] clanAbilityParms
           
protected  int[] clanAbilityProficiencies
           
protected  boolean[] clanAbilityQuals
           
protected  java.util.Set<java.lang.Integer>[] clanAbilityRoles
           
protected  int[] clanEffectLevels
           
protected  java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,SearchIDList<Ability>>> clanEffectMap
           
protected  java.lang.String[] clanEffectNames
           
protected  java.lang.String[] clanEffectParms
           
protected  java.util.Set<java.lang.Integer>[] clanEffectRoles
           
 boolean conquestByWorship
          Whether loyalty and conquest are determined by what deity the mobs are
 boolean conquestEnabled
          Whether conquest is enabled for this clan
 boolean conquestItemLoyalty
          Whether clan items increase loyalty in conquered areas for this clan type
static java.lang.String DEFAULT_XP_FORMULA
           
static java.util.List<Ability> empty
           
static SearchIDList<Ability> emptyIDs
           
 java.lang.String entryScriptParam
          Entry script parameter
 java.lang.String exitScriptParam
          Exit script parameter
 java.lang.String helpStr
          A save help entry of this government type for players
 int ID
          If this is a default government type, this is its ID, otherwise -1
 boolean isDefault
          Whether this is the default government
 boolean isFamilyOnly
          Whether mambers must all be in the same family
 boolean isPublic
          Whether this clan type is shown on the list
 boolean isRivalrous
          Whether clans made from this government are rivalrous by default
 int[] levelProgression
          The list of xp amounts to progress in level
 java.lang.String longDesc
          A long description of this government type for players
 int maxVoteDays
          maximum number of mud days a vote will go on for
 java.lang.String name
          The name of this government type, which is its identifier when ID above is -1
 java.lang.Integer overrideMinMembers
          The number of minimum members for the clan to survive -- overrides coffeemud.ini
protected  java.util.Map<java.lang.Object,ClanPosition> positionMap
          A fast-lookup cache for positions
 ClanPosition[] positions
          The list of ClanPosition objects for each holdable position in this government
 java.lang.String requiredMaskStr
          Zapper mask for requirements to even apply
 java.lang.String shortDesc
          A short description of this government type for players
 int voteQuorumPct
          minimum % of voters who must have voted for a vote to be valid if time expires
 CMath.CompiledFormula xpCalculationFormula
           
 java.lang.String xpCalculationFormulaStr
          uncompiled level xp calculation formula
 
Constructor Summary
DefaultClanGovernment()
           
 
Method Summary
 ClanPosition addPosition()
          Adds the position.
 int compareTo(CMObject o)
           
 CMObject copyOf()
          Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.
 void delPosition(ClanPosition pos)
          Del position.
 ClanPosition findPositionRole(java.lang.Integer roleID)
          returns clan position by the given role id
 ClanPosition findPositionRole(java.lang.String pos)
          returns clan position based on role id, or some part of its id or name.
 int getAcceptPos()
          Gets the accept pos.
 Clan.AutoPromoteFlag getAutoPromoteBy()
          Gets the auto promote by.
 int getAutoRole()
          Gets the auto role.
 java.lang.String getCategory()
          Gets the category.
 SearchIDList<Ability> getClanLevelAbilities(MOB mob, Clan clan, java.lang.Integer level)
          Return the list of abilities owned by someone who is part of a clan of the given level.
 ChameleonList<Ability> getClanLevelEffects(MOB mob, Clan clan, java.lang.Integer level)
          Return the list of effects owned by someone who is part of a clan of the given level.
 java.util.List<Ability> getClanLevelEffectsList(java.lang.Integer mobClanRole, java.lang.Integer level)
           
 ChameleonList<Ability> getEmptyClanLevelEffects(MOB mob, Clan clan)
           
 java.lang.String getEntryScript()
          Gets the Scriptable parm when joining/creating a clan.
 java.lang.String getExitScript()
          Gets the Scriptable parm when resigning/exiling a clan.
 java.lang.String getHelpStr()
          Gets the help str.
 int getID()
          Gets the iD.
 int[] getLevelProgression()
          Gets the level progression.
 java.lang.String getLongDesc()
          Gets the long desc.
 int getMaxVoteDays()
          Gets the max vote days.
 java.lang.String getName()
          Gets the name.
 java.lang.Integer getOverrideMinMembers()
          Gets the override min members.
 ClanPosition getPosition(java.lang.String pos)
          Gets the position.
 ClanPosition[] getPositions()
          Gets the positions.
 java.lang.String getRequiredMaskStr()
          Gets the required mask str.
 int getSaveStatIndex()
          Returns the index into the stat codes array where extra savable fields begins.
 java.lang.String getShortDesc()
          Gets the short desc.
 java.lang.String getStat(java.lang.String code)
          An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders.
 java.lang.String[] getStatCodes()
          Returns an array of the string names of those fields which are modifiable on this object at run-time by builders.
 int getVoteQuorumPct()
          Gets the vote quorum pct.
 CMath.CompiledFormula getXPCalculationFormula()
          Returns the compiled xp calculation formula
 java.lang.String getXpCalculationFormulaStr()
          Gets the xp calculation formula.
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 void initializeClass()
          Called ONCE after all objects are loaded, but before the map is read in during initialization.
 boolean isConquestByWorship()
          Checks if is conquest by worship.
 boolean isConquestEnabled()
          Checks if is conquest enabled.
 boolean isConquestItemLoyalty()
          Checks if is conquest item loyalty.
 boolean isDefault()
          Checks if is default.
 boolean isFamilyOnly()
          Checks if is family only.
 boolean isPublic()
          Checks if is public.
 boolean isRivalrous()
          Returns true if this clan is rivalrous with other rivalrous clans, meaning that pvp is enabled between them, and war can be declared between them.
 boolean isStat(java.lang.String code)
          An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders.
 java.lang.String name()
          The displayable name of this object.
 CMObject newInstance()
          return a new instance of the object
 void setAcceptPos(int acceptPos)
          Sets the accept pos.
 void setAutoPromoteBy(Clan.AutoPromoteFlag autoPromoteBy)
          Sets the auto promote by.
 void setAutoRole(int autoRole)
          Sets the auto role.
 void setCategory(java.lang.String category)
          Sets the category.
 void setConquestByWorship(boolean conquestByWorship)
          Sets the conquest by worship.
 void setConquestEnabled(boolean conquestEnabled)
          Sets the conquest enabled.
 void setConquestItemLoyalty(boolean conquestItemLoyalty)
          Sets the conquest item loyalty.
 void setDefault(boolean isDefault)
          Sets the default.
 void setEntryScript(java.lang.String scriptParm)
          Sets the Scriptable parm when joining/creating a clan.
 void setExitScript(java.lang.String scriptParm)
          Sets the Scriptable parm when resigning/exiling a clan.
 void setFamilyOnly(boolean isFamilyOnly)
          Sets the family only.
 void setID(int iD)
          Sets the iD.
 void setLevelProgression(int[] levelProgression)
          Sets the level progression.
 void setLongDesc(java.lang.String longDesc)
          Sets the long desc.
 void setMaxVoteDays(int maxVoteDays)
          Sets the max vote days.
 void setName(java.lang.String name)
          Sets the name.
 void setOverrideMinMembers(java.lang.Integer overrideMinMembers)
          Sets the override min members.
 void setPositions(ClanPosition[] positions)
          Sets the positions.
 void setPublic(boolean isPublic)
          Sets the public.
 void setRequiredMaskStr(java.lang.String requiredMaskStr)
          Sets the required mask str.
 void setRivalrous(boolean isRivalrous)
          Set to true if this clan is rivalrous with other rivalrous clans, meaning that pvp is enabled between them, and war can be declared
 void setShortDesc(java.lang.String shortDesc)
          Sets the short desc.
 void setStat(java.lang.String code, java.lang.String val)
          An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders.
 void setVoteQuorumPct(int voteQuorumPct)
          Sets the vote quorum pct.
 void setXpCalculationFormulaStr(java.lang.String newXpCalculationFormula)
          Sets the xp calculation formula.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public int ID
If this is a default government type, this is its ID, otherwise -1


name

public java.lang.String name
The name of this government type, which is its identifier when ID above is -1


category

public java.lang.String category
The category of this government type. Players can only belong to one of each category


autoRole

public int autoRole
The role automatically assigned to those who apply successfully


acceptPos

public int acceptPos
The role automatically assigned to those who are accepted


shortDesc

public java.lang.String shortDesc
A short description of this government type for players


longDesc

public java.lang.String longDesc
A long description of this government type for players


requiredMaskStr

public java.lang.String requiredMaskStr
Zapper mask for requirements to even apply


entryScriptParam

public java.lang.String entryScriptParam
Entry script parameter


exitScriptParam

public java.lang.String exitScriptParam
Exit script parameter


isPublic

public boolean isPublic
Whether this clan type is shown on the list


isFamilyOnly

public boolean isFamilyOnly
Whether mambers must all be in the same family


isRivalrous

public boolean isRivalrous
Whether clans made from this government are rivalrous by default


overrideMinMembers

public java.lang.Integer overrideMinMembers
The number of minimum members for the clan to survive -- overrides coffeemud.ini


conquestEnabled

public boolean conquestEnabled
Whether conquest is enabled for this clan


conquestItemLoyalty

public boolean conquestItemLoyalty
Whether clan items increase loyalty in conquered areas for this clan type


conquestByWorship

public boolean conquestByWorship
Whether loyalty and conquest are determined by what deity the mobs are


maxVoteDays

public int maxVoteDays
maximum number of mud days a vote will go on for


voteQuorumPct

public int voteQuorumPct
minimum % of voters who must have voted for a vote to be valid if time expires


xpCalculationFormulaStr

public java.lang.String xpCalculationFormulaStr
uncompiled level xp calculation formula


isDefault

public boolean isDefault
Whether this is the default government


positions

public ClanPosition[] positions
The list of ClanPosition objects for each holdable position in this government


autoPromoteBy

public Clan.AutoPromoteFlag autoPromoteBy
Whether an unfilled topRole is automatically filled by those who meet its innermask


positionMap

protected java.util.Map<java.lang.Object,ClanPosition> positionMap
A fast-lookup cache for positions


emptyIDs

public static final SearchIDList<Ability> emptyIDs

empty

public static final java.util.List<Ability> empty

DEFAULT_XP_FORMULA

public static final java.lang.String DEFAULT_XP_FORMULA
See Also:
Constant Field Values

xpCalculationFormula

public CMath.CompiledFormula xpCalculationFormula

clanAbilityMap

protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,SearchIDList<Ability>>> clanAbilityMap

clanEffectNames

protected java.lang.String[] clanEffectNames

clanEffectLevels

protected int[] clanEffectLevels

clanEffectParms

protected java.lang.String[] clanEffectParms

clanEffectRoles

protected java.util.Set<java.lang.Integer>[] clanEffectRoles

clanEffectMap

protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,SearchIDList<Ability>>> clanEffectMap

clanAbilityNames

protected java.lang.String[] clanAbilityNames

clanAbilityLevels

protected int[] clanAbilityLevels

clanAbilityProficiencies

protected int[] clanAbilityProficiencies

clanAbilityQuals

protected boolean[] clanAbilityQuals

clanAbilityRoles

protected java.util.Set<java.lang.Integer>[] clanAbilityRoles

clanAbilityParms

protected java.lang.String[] clanAbilityParms

levelProgression

public int[] levelProgression
The list of xp amounts to progress in level


helpStr

public java.lang.String helpStr
A save help entry of this government type for players

Constructor Detail

DefaultClanGovernment

public DefaultClanGovernment()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Returns:
the name of this class

name

public java.lang.String name()
Description copied from interface: CMObject
The displayable name of this object. May be modified by phyStats() object. Is derived from the Name().

Specified by:
name in interface CMObject
Returns:
the modified final name of this object on the map.
See Also:
Environmental.Name()

newInstance

public CMObject newInstance()
return a new instance of the object

Specified by:
newInstance in interface CMObject
Returns:
a new instance of this class

initializeClass

public void initializeClass()
Description copied from interface: CMObject
Called ONCE after all objects are loaded, but before the map is read in during initialization.

Specified by:
initializeClass in interface CMObject

compareTo

public int compareTo(CMObject o)
Specified by:
compareTo in interface java.lang.Comparable<CMObject>

copyOf

public CMObject copyOf()
Description copied from interface: CMObject
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.

Specified by:
copyOf in interface CMObject
Returns:
a clone of this object

getID

public int getID()
Description copied from interface: ClanGovernment
Gets the iD.

Specified by:
getID in interface ClanGovernment
Returns:
the iD

setID

public void setID(int iD)
Description copied from interface: ClanGovernment
Sets the iD.

Specified by:
setID in interface ClanGovernment
Parameters:
iD - the new iD

getName

public java.lang.String getName()
Description copied from interface: ClanGovernment
Gets the name.

Specified by:
getName in interface ClanGovernment
Returns:
the name

setName

public void setName(java.lang.String name)
Description copied from interface: ClanGovernment
Sets the name.

Specified by:
setName in interface ClanGovernment
Parameters:
name - the new name

getCategory

public java.lang.String getCategory()
Description copied from interface: ClanGovernment
Gets the category.

Specified by:
getCategory in interface ClanGovernment
Returns:
the category

setCategory

public void setCategory(java.lang.String category)
Description copied from interface: ClanGovernment
Sets the category.

Specified by:
setCategory in interface ClanGovernment
Parameters:
category - the new category

getAutoRole

public int getAutoRole()
Description copied from interface: ClanGovernment
Gets the auto role.

Specified by:
getAutoRole in interface ClanGovernment
Returns:
the auto role

setAutoRole

public void setAutoRole(int autoRole)
Description copied from interface: ClanGovernment
Sets the auto role.

Specified by:
setAutoRole in interface ClanGovernment
Parameters:
autoRole - the new auto role

isRivalrous

public boolean isRivalrous()
Description copied from interface: ClanGovernment
Returns true if this clan is rivalrous with other rivalrous clans, meaning that pvp is enabled between them, and war can be declared between them.

Specified by:
isRivalrous in interface ClanGovernment
Returns:
true or false

setRivalrous

public void setRivalrous(boolean isRivalrous)
Description copied from interface: ClanGovernment
Set to true if this clan is rivalrous with other rivalrous clans, meaning that pvp is enabled between them, and war can be declared

Specified by:
setRivalrous in interface ClanGovernment
Parameters:
isRivalrous - true or false

getAcceptPos

public int getAcceptPos()
Description copied from interface: ClanGovernment
Gets the accept pos.

Specified by:
getAcceptPos in interface ClanGovernment
Returns:
the accept pos

setAcceptPos

public void setAcceptPos(int acceptPos)
Description copied from interface: ClanGovernment
Sets the accept pos.

Specified by:
setAcceptPos in interface ClanGovernment
Parameters:
acceptPos - the new accept pos

getShortDesc

public java.lang.String getShortDesc()
Description copied from interface: ClanGovernment
Gets the short desc.

Specified by:
getShortDesc in interface ClanGovernment
Returns:
the short desc

setShortDesc

public void setShortDesc(java.lang.String shortDesc)
Description copied from interface: ClanGovernment
Sets the short desc.

Specified by:
setShortDesc in interface ClanGovernment
Parameters:
shortDesc - the new short desc

getLongDesc

public java.lang.String getLongDesc()
Description copied from interface: ClanGovernment
Gets the long desc.

Specified by:
getLongDesc in interface ClanGovernment
Returns:
the long desc

setLongDesc

public void setLongDesc(java.lang.String longDesc)
Description copied from interface: ClanGovernment
Sets the long desc.

Specified by:
setLongDesc in interface ClanGovernment
Parameters:
longDesc - the new long desc

getRequiredMaskStr

public java.lang.String getRequiredMaskStr()
Description copied from interface: ClanGovernment
Gets the required mask str.

Specified by:
getRequiredMaskStr in interface ClanGovernment
Returns:
the required mask str

setRequiredMaskStr

public void setRequiredMaskStr(java.lang.String requiredMaskStr)
Description copied from interface: ClanGovernment
Sets the required mask str.

Specified by:
setRequiredMaskStr in interface ClanGovernment
Parameters:
requiredMaskStr - the new required mask str

isPublic

public boolean isPublic()
Description copied from interface: ClanGovernment
Checks if is public.

Specified by:
isPublic in interface ClanGovernment
Returns:
true, if is public

setPublic

public void setPublic(boolean isPublic)
Description copied from interface: ClanGovernment
Sets the public.

Specified by:
setPublic in interface ClanGovernment
Parameters:
isPublic - the new public

isFamilyOnly

public boolean isFamilyOnly()
Description copied from interface: ClanGovernment
Checks if is family only.

Specified by:
isFamilyOnly in interface ClanGovernment
Returns:
true, if is family only

setFamilyOnly

public void setFamilyOnly(boolean isFamilyOnly)
Description copied from interface: ClanGovernment
Sets the family only.

Specified by:
setFamilyOnly in interface ClanGovernment
Parameters:
isFamilyOnly - the new family only

getOverrideMinMembers

public java.lang.Integer getOverrideMinMembers()
Description copied from interface: ClanGovernment
Gets the override min members.

Specified by:
getOverrideMinMembers in interface ClanGovernment
Returns:
the override min members

setOverrideMinMembers

public void setOverrideMinMembers(java.lang.Integer overrideMinMembers)
Description copied from interface: ClanGovernment
Sets the override min members.

Specified by:
setOverrideMinMembers in interface ClanGovernment
Parameters:
overrideMinMembers - the new override min members

isConquestEnabled

public boolean isConquestEnabled()
Description copied from interface: ClanGovernment
Checks if is conquest enabled.

Specified by:
isConquestEnabled in interface ClanGovernment
Returns:
true, if is conquest enabled

setConquestEnabled

public void setConquestEnabled(boolean conquestEnabled)
Description copied from interface: ClanGovernment
Sets the conquest enabled.

Specified by:
setConquestEnabled in interface ClanGovernment
Parameters:
conquestEnabled - the new conquest enabled

isConquestItemLoyalty

public boolean isConquestItemLoyalty()
Description copied from interface: ClanGovernment
Checks if is conquest item loyalty.

Specified by:
isConquestItemLoyalty in interface ClanGovernment
Returns:
true, if is conquest item loyalty

setConquestItemLoyalty

public void setConquestItemLoyalty(boolean conquestItemLoyalty)
Description copied from interface: ClanGovernment
Sets the conquest item loyalty.

Specified by:
setConquestItemLoyalty in interface ClanGovernment
Parameters:
conquestItemLoyalty - the new conquest item loyalty

isConquestByWorship

public boolean isConquestByWorship()
Description copied from interface: ClanGovernment
Checks if is conquest by worship.

Specified by:
isConquestByWorship in interface ClanGovernment
Returns:
true, if is conquest by worship

setConquestByWorship

public void setConquestByWorship(boolean conquestByWorship)
Description copied from interface: ClanGovernment
Sets the conquest by worship.

Specified by:
setConquestByWorship in interface ClanGovernment
Parameters:
conquestByWorship - the new conquest by worship

getMaxVoteDays

public int getMaxVoteDays()
Description copied from interface: ClanGovernment
Gets the max vote days.

Specified by:
getMaxVoteDays in interface ClanGovernment
Returns:
the max vote days

setMaxVoteDays

public void setMaxVoteDays(int maxVoteDays)
Description copied from interface: ClanGovernment
Sets the max vote days.

Specified by:
setMaxVoteDays in interface ClanGovernment
Parameters:
maxVoteDays - the new max vote days

getVoteQuorumPct

public int getVoteQuorumPct()
Description copied from interface: ClanGovernment
Gets the vote quorum pct.

Specified by:
getVoteQuorumPct in interface ClanGovernment
Returns:
the vote quorum pct

setVoteQuorumPct

public void setVoteQuorumPct(int voteQuorumPct)
Description copied from interface: ClanGovernment
Sets the vote quorum pct.

Specified by:
setVoteQuorumPct in interface ClanGovernment
Parameters:
voteQuorumPct - the new vote quorum pct

getXpCalculationFormulaStr

public java.lang.String getXpCalculationFormulaStr()
Description copied from interface: ClanGovernment
Gets the xp calculation formula.

Specified by:
getXpCalculationFormulaStr in interface ClanGovernment
Returns:
the xp calculation formula

getXPCalculationFormula

public CMath.CompiledFormula getXPCalculationFormula()
Description copied from interface: ClanGovernment
Returns the compiled xp calculation formula

Specified by:
getXPCalculationFormula in interface ClanGovernment
Returns:
the compiled xp calculation formula

setXpCalculationFormulaStr

public void setXpCalculationFormulaStr(java.lang.String newXpCalculationFormula)
Description copied from interface: ClanGovernment
Sets the xp calculation formula.

Specified by:
setXpCalculationFormulaStr in interface ClanGovernment
Parameters:
newXpCalculationFormula - the new xp calculation formula

isDefault

public boolean isDefault()
Description copied from interface: ClanGovernment
Checks if is default.

Specified by:
isDefault in interface ClanGovernment
Returns:
true, if is default

setDefault

public void setDefault(boolean isDefault)
Description copied from interface: ClanGovernment
Sets the default.

Specified by:
setDefault in interface ClanGovernment
Parameters:
isDefault - the new default

getPositions

public ClanPosition[] getPositions()
Description copied from interface: ClanGovernment
Gets the positions.

Specified by:
getPositions in interface ClanGovernment
Returns:
the positions

setPositions

public void setPositions(ClanPosition[] positions)
Description copied from interface: ClanGovernment
Sets the positions.

Specified by:
setPositions in interface ClanGovernment
Parameters:
positions - the new positions

getAutoPromoteBy

public Clan.AutoPromoteFlag getAutoPromoteBy()
Description copied from interface: ClanGovernment
Gets the auto promote by.

Specified by:
getAutoPromoteBy in interface ClanGovernment
Returns:
the auto promote by

setAutoPromoteBy

public void setAutoPromoteBy(Clan.AutoPromoteFlag autoPromoteBy)
Description copied from interface: ClanGovernment
Sets the auto promote by.

Specified by:
setAutoPromoteBy in interface ClanGovernment
Parameters:
autoPromoteBy - the new auto promote by

getLevelProgression

public int[] getLevelProgression()
Description copied from interface: ClanGovernment
Gets the level progression.

Specified by:
getLevelProgression in interface ClanGovernment
Returns:
the level progression

setLevelProgression

public void setLevelProgression(int[] levelProgression)
Description copied from interface: ClanGovernment
Sets the level progression.

Specified by:
setLevelProgression in interface ClanGovernment
Parameters:
levelProgression - the new level progression

getEntryScript

public java.lang.String getEntryScript()
Description copied from interface: ClanGovernment
Gets the Scriptable parm when joining/creating a clan.

Specified by:
getEntryScript in interface ClanGovernment
Returns:
the script for joining/creating a clan

setEntryScript

public void setEntryScript(java.lang.String scriptParm)
Description copied from interface: ClanGovernment
Sets the Scriptable parm when joining/creating a clan.

Specified by:
setEntryScript in interface ClanGovernment
Parameters:
scriptParm - the Scriptable parm

getExitScript

public java.lang.String getExitScript()
Description copied from interface: ClanGovernment
Gets the Scriptable parm when resigning/exiling a clan.

Specified by:
getExitScript in interface ClanGovernment
Returns:
the script for resigning/exiling a clan

setExitScript

public void setExitScript(java.lang.String scriptParm)
Description copied from interface: ClanGovernment
Sets the Scriptable parm when resigning/exiling a clan.

Specified by:
setExitScript in interface ClanGovernment
Parameters:
scriptParm - the Scriptable parm

getPosition

public ClanPosition getPosition(java.lang.String pos)
Description copied from interface: ClanGovernment
Gets the position.

Specified by:
getPosition in interface ClanGovernment
Parameters:
pos - the pos
Returns:
the position

findPositionRole

public ClanPosition findPositionRole(java.lang.String pos)
Description copied from interface: ClanGovernment
returns clan position based on role id, or some part of its id or name.

Specified by:
findPositionRole in interface ClanGovernment
Parameters:
pos - the role id, name, or id
Returns:
the clan position the pos goes to

findPositionRole

public ClanPosition findPositionRole(java.lang.Integer roleID)
Description copied from interface: ClanGovernment
returns clan position by the given role id

Specified by:
findPositionRole in interface ClanGovernment
Parameters:
roleID - the role id to look for
Returns:
the position role id goes to

delPosition

public void delPosition(ClanPosition pos)
Description copied from interface: ClanGovernment
Del position.

Specified by:
delPosition in interface ClanGovernment
Parameters:
pos - the pos

addPosition

public ClanPosition addPosition()
Description copied from interface: ClanGovernment
Adds the position.

Specified by:
addPosition in interface ClanGovernment
Returns:
the clan position

getStatCodes

public java.lang.String[] getStatCodes()
Description copied from interface: Modifiable
Returns an array of the string names of those fields which are modifiable on this object at run-time by builders.

Specified by:
getStatCodes in interface Modifiable
Returns:
list of the fields which may be set.
See Also:
Modifiable.getStat(String), Modifiable.setStat(String, String)

getSaveStatIndex

public int getSaveStatIndex()
Description copied from interface: Modifiable
Returns the index into the stat codes array where extra savable fields begins. This number is always the same as getStatCodes().length unless there are extra fields which need to be saved in xml for generic objects. This method is used by editors for post-build user-defined fields.

Specified by:
getSaveStatIndex in interface Modifiable
Returns:
the index into getStatCodes()
See Also:
Modifiable.getStatCodes(), Modifiable.getStat(String), Modifiable.setStat(String, String)

getStat

public java.lang.String getStat(java.lang.String code)
Description copied from interface: Modifiable
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. Values returned are always strings, even if the field itself is numeric or a list.

Specified by:
getStat in interface Modifiable
Parameters:
code - the name of the field to read.
Returns:
the value of the field read
See Also:
Modifiable.getStatCodes()

isStat

public boolean isStat(java.lang.String code)
Description copied from interface: Modifiable
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. Values returned are always strings, even if the field itself is numeric or a list.

Specified by:
isStat in interface Modifiable
Parameters:
code - the name of the field to read.
Returns:
true if the code is a real value, false otherwise
See Also:
Modifiable.getStatCodes()

setStat

public void setStat(java.lang.String code,
                    java.lang.String val)
Description copied from interface: Modifiable
An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. The value passed in is always a string, even if the field itself is numeric or a list.

Specified by:
setStat in interface Modifiable
Parameters:
code - the name of the field to set
val - the value to set the field to
See Also:
Modifiable.getStatCodes()

getHelpStr

public java.lang.String getHelpStr()
Description copied from interface: ClanGovernment
Gets the help str.

Specified by:
getHelpStr in interface ClanGovernment
Returns:
the help str

getClanLevelAbilities

public SearchIDList<Ability> getClanLevelAbilities(MOB mob,
                                                   Clan clan,
                                                   java.lang.Integer level)
Description copied from interface: ClanGovernment
Return the list of abilities owned by someone who is part of a clan of the given level.

Specified by:
getClanLevelAbilities in interface ClanGovernment
Parameters:
mob - the mob enabled
clan - the clan the abilities come from
level - clan level
Returns:
list of abilities

getClanLevelEffectsList

public java.util.List<Ability> getClanLevelEffectsList(java.lang.Integer mobClanRole,
                                                       java.lang.Integer level)

getEmptyClanLevelEffects

public ChameleonList<Ability> getEmptyClanLevelEffects(MOB mob,
                                                       Clan clan)

getClanLevelEffects

public ChameleonList<Ability> getClanLevelEffects(MOB mob,
                                                  Clan clan,
                                                  java.lang.Integer level)
Description copied from interface: ClanGovernment
Return the list of effects owned by someone who is part of a clan of the given level.

Specified by:
getClanLevelEffects in interface ClanGovernment
Parameters:
mob - the mob affected
clan - the clan the effects come from
level - clan level
Returns:
list of abilities