ClanGovernment, CMCommon, CMObject, Modifiable, java.lang.Cloneable, java.lang.Comparable<CMObject>public class DefaultClanGovernment extends java.lang.Object implements ClanGovernment
| Modifier and Type | Field | Description | 
|---|---|---|
| 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 | miscVarsStr | The miscellaneous vars for new clans | 
| 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 | 
| protected java.util.List<java.lang.String> | titleAwards | the list of awarded titles for this position | 
| 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 | 
idConverter| Constructor | Description | 
|---|---|
| DefaultClanGovernment() | 
| Modifier and Type | Method | Description | 
|---|---|---|
| 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 | getMiscVariableSettings() | Returns a miscellaneous variable setting configuration string
 to be applied to new clans created with this government. | 
| 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. | 
| java.util.List<java.lang.String> | getTitleAwards() | Returns a list of titles granted to players of clans
 in this government. | 
| 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 | setMiscVariableSettings(java.lang.String miscVars) | Sets a miscellaneous variable setting configuration string
 to be applied to new clans created with this government. | 
| 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. | 
public int ID
public java.lang.String name
public java.lang.String category
public int autoRole
public int acceptPos
public java.lang.String shortDesc
public java.lang.String longDesc
public java.lang.String requiredMaskStr
public java.lang.String entryScriptParam
public java.lang.String exitScriptParam
public boolean isPublic
public boolean isFamilyOnly
public boolean isRivalrous
public java.lang.Integer overrideMinMembers
public boolean conquestEnabled
public boolean conquestItemLoyalty
public boolean conquestByWorship
public int maxVoteDays
public int voteQuorumPct
public java.lang.String xpCalculationFormulaStr
public boolean isDefault
public java.lang.String miscVarsStr
public ClanPosition[] positions
public Clan.AutoPromoteFlag autoPromoteBy
protected java.util.Map<java.lang.Object,ClanPosition> positionMap
protected final java.util.List<java.lang.String> titleAwards
public static final SearchIDList<Ability> emptyIDs
public static final java.util.List<Ability> empty
public static final java.lang.String DEFAULT_XP_FORMULA
public CMath.CompiledFormula xpCalculationFormula
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,SearchIDList<Ability>>> clanAbilityMap
protected java.lang.String[] clanEffectNames
protected int[] clanEffectLevels
protected java.lang.String[] clanEffectParms
protected java.util.Set<java.lang.Integer>[] clanEffectRoles
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,SearchIDList<Ability>>> clanEffectMap
protected java.lang.String[] clanAbilityNames
protected int[] clanAbilityLevels
protected int[] clanAbilityProficiencies
protected boolean[] clanAbilityQuals
protected java.util.Set<java.lang.Integer>[] clanAbilityRoles
protected java.lang.String[] clanAbilityParms
public int[] levelProgression
public java.lang.String helpStr
public java.lang.String ID()
CMObjectpublic java.lang.String name()
CMObjectname in interface CMObjectEnvironmental.Name()public CMObject newInstance()
newInstance in interface CMObjectpublic void initializeClass()
CMObjectinitializeClass in interface CMObjectpublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>public CMObject copyOf()
CMObjectpublic int getID()
ClanGovernmentgetID in interface ClanGovernmentClanGovernment.getID()public void setID(int iD)
ClanGovernmentsetID in interface ClanGovernmentiD - the new iDClanGovernment.getID()public java.lang.String getName()
ClanGovernmentgetName in interface ClanGovernmentClanGovernment.setName(String)public void setName(java.lang.String name)
ClanGovernmentsetName in interface ClanGovernmentname - the new nameClanGovernment.getName()public java.lang.String getCategory()
ClanGovernmentgetCategory in interface ClanGovernmentClanGovernment.setCategory(String)public void setCategory(java.lang.String category)
ClanGovernmentsetCategory in interface ClanGovernmentcategory - the new categoryClanGovernment.getCategory()public int getAutoRole()
ClanGovernmentgetAutoRole in interface ClanGovernmentClanGovernment.setAutoRole(int)public void setAutoRole(int autoRole)
ClanGovernmentsetAutoRole in interface ClanGovernmentautoRole - the new auto roleClanGovernment.getAutoRole()public boolean isRivalrous()
ClanGovernmentisRivalrous in interface ClanGovernmentClanGovernment.setRivalrous(boolean)public void setRivalrous(boolean isRivalrous)
ClanGovernmentsetRivalrous in interface ClanGovernmentisRivalrous - true or falseClanGovernment.isRivalrous()public int getAcceptPos()
ClanGovernmentgetAcceptPos in interface ClanGovernmentClanGovernment.setAcceptPos(int)public void setAcceptPos(int acceptPos)
ClanGovernmentsetAcceptPos in interface ClanGovernmentacceptPos - the new accept posClanGovernment.getAcceptPos()public java.lang.String getShortDesc()
ClanGovernmentgetShortDesc in interface ClanGovernmentClanGovernment.setShortDesc(String)public void setShortDesc(java.lang.String shortDesc)
ClanGovernmentsetShortDesc in interface ClanGovernmentshortDesc - the new short descClanGovernment.getShortDesc()public java.lang.String getLongDesc()
ClanGovernmentgetLongDesc in interface ClanGovernmentClanGovernment.setLongDesc(String)public void setLongDesc(java.lang.String longDesc)
ClanGovernmentsetLongDesc in interface ClanGovernmentlongDesc - the new long descClanGovernment.getLongDesc()public java.lang.String getRequiredMaskStr()
ClanGovernmentgetRequiredMaskStr in interface ClanGovernmentClanGovernment.setRequiredMaskStr(String)public void setRequiredMaskStr(java.lang.String requiredMaskStr)
ClanGovernmentsetRequiredMaskStr in interface ClanGovernmentrequiredMaskStr - the new required mask strClanGovernment.getRequiredMaskStr()public boolean isPublic()
ClanGovernmentisPublic in interface ClanGovernmentClanGovernment.setPublic(boolean)public void setPublic(boolean isPublic)
ClanGovernmentsetPublic in interface ClanGovernmentisPublic - the new publicClanGovernment.isPublic()public boolean isFamilyOnly()
ClanGovernmentisFamilyOnly in interface ClanGovernmentClanGovernment.setFamilyOnly(boolean)public void setFamilyOnly(boolean isFamilyOnly)
ClanGovernmentsetFamilyOnly in interface ClanGovernmentisFamilyOnly - the new family onlyClanGovernment.isFamilyOnly()public java.lang.Integer getOverrideMinMembers()
ClanGovernmentgetOverrideMinMembers in interface ClanGovernmentClanGovernment.setOverrideMinMembers(Integer)public void setOverrideMinMembers(java.lang.Integer overrideMinMembers)
ClanGovernmentsetOverrideMinMembers in interface ClanGovernmentoverrideMinMembers - the new override min membersClanGovernment.getOverrideMinMembers()public boolean isConquestEnabled()
ClanGovernmentisConquestEnabled in interface ClanGovernmentClanGovernment.setConquestEnabled(boolean)public void setConquestEnabled(boolean conquestEnabled)
ClanGovernmentsetConquestEnabled in interface ClanGovernmentconquestEnabled - the new conquest enabledClanGovernment.isConquestEnabled()public boolean isConquestItemLoyalty()
ClanGovernmentisConquestItemLoyalty in interface ClanGovernmentClanGovernment.setConquestItemLoyalty(boolean)public void setConquestItemLoyalty(boolean conquestItemLoyalty)
ClanGovernmentsetConquestItemLoyalty in interface ClanGovernmentconquestItemLoyalty - the new conquest item loyaltyClanGovernment.isConquestItemLoyalty()public boolean isConquestByWorship()
ClanGovernmentisConquestByWorship in interface ClanGovernmentClanGovernment.setConquestByWorship(boolean)public void setConquestByWorship(boolean conquestByWorship)
ClanGovernmentsetConquestByWorship in interface ClanGovernmentconquestByWorship - the new conquest by worshipClanGovernment.isConquestByWorship()public int getMaxVoteDays()
ClanGovernmentgetMaxVoteDays in interface ClanGovernmentClanGovernment.setMaxVoteDays(int)public void setMaxVoteDays(int maxVoteDays)
ClanGovernmentsetMaxVoteDays in interface ClanGovernmentmaxVoteDays - the new max vote daysClanGovernment.getMaxVoteDays()public int getVoteQuorumPct()
ClanGovernmentgetVoteQuorumPct in interface ClanGovernmentClanGovernment.setVoteQuorumPct(int)public void setVoteQuorumPct(int voteQuorumPct)
ClanGovernmentsetVoteQuorumPct in interface ClanGovernmentvoteQuorumPct - the new vote quorum pctClanGovernment.getVoteQuorumPct()public java.lang.String getXpCalculationFormulaStr()
ClanGovernmentgetXpCalculationFormulaStr in interface ClanGovernmentClanGovernment.setXpCalculationFormulaStr(String), 
ClanGovernment.getXPCalculationFormula()public CMath.CompiledFormula getXPCalculationFormula()
ClanGovernmentgetXPCalculationFormula in interface ClanGovernmentClanGovernment.setXpCalculationFormulaStr(String), 
ClanGovernment.getXpCalculationFormulaStr()public void setXpCalculationFormulaStr(java.lang.String newXpCalculationFormula)
ClanGovernmentsetXpCalculationFormulaStr in interface ClanGovernmentnewXpCalculationFormula - the new xp calculation formulaClanGovernment.setXpCalculationFormulaStr(String), 
ClanGovernment.getXPCalculationFormula()public boolean isDefault()
ClanGovernmentisDefault in interface ClanGovernmentClanGovernment.setDefault(boolean)public void setDefault(boolean isDefault)
ClanGovernmentsetDefault in interface ClanGovernmentisDefault - the new defaultClanGovernment.isDefault()public ClanPosition[] getPositions()
ClanGovernmentgetPositions in interface ClanGovernmentClanGovernment.setPositions(ClanPosition[])public void setPositions(ClanPosition[] positions)
ClanGovernmentsetPositions in interface ClanGovernmentpositions - the new positionsClanGovernment.getPositions()public Clan.AutoPromoteFlag getAutoPromoteBy()
ClanGovernmentgetAutoPromoteBy in interface ClanGovernmentClanGovernment.setAutoPromoteBy(com.planet_ink.coffee_mud.Common.interfaces.Clan.AutoPromoteFlag)public void setAutoPromoteBy(Clan.AutoPromoteFlag autoPromoteBy)
ClanGovernmentsetAutoPromoteBy in interface ClanGovernmentautoPromoteBy - the new auto promote byClanGovernment.getAutoPromoteBy()public int[] getLevelProgression()
ClanGovernmentgetLevelProgression in interface ClanGovernmentClanGovernment.setLevelProgression(int[])public void setLevelProgression(int[] levelProgression)
ClanGovernmentsetLevelProgression in interface ClanGovernmentlevelProgression - the new level progressionClanGovernment.getLevelProgression()public java.lang.String getEntryScript()
ClanGovernmentgetEntryScript in interface ClanGovernmentClanGovernment.setEntryScript(String)public void setEntryScript(java.lang.String scriptParm)
ClanGovernmentsetEntryScript in interface ClanGovernmentscriptParm - the Scriptable parmClanGovernment.getEntryScript()public java.lang.String getExitScript()
ClanGovernmentgetExitScript in interface ClanGovernmentClanGovernment.setExitScript(String)public void setExitScript(java.lang.String scriptParm)
ClanGovernmentsetExitScript in interface ClanGovernmentscriptParm - the Scriptable parmClanGovernment.getExitScript()public java.util.List<java.lang.String> getTitleAwards()
ClanGovernmentgetTitleAwards in interface ClanGovernmentpublic ClanPosition getPosition(java.lang.String pos)
ClanGovernmentgetPosition in interface ClanGovernmentpos - the posClanGovernment.delPosition(ClanPosition), 
ClanGovernment.addPosition(), 
ClanGovernment.findPositionRole(Integer), 
ClanGovernment.findPositionRole(String)public java.lang.String getMiscVariableSettings()
ClanGovernmentgetMiscVariableSettings in interface ClanGovernmentClanGovernment.setMiscVariableSettings(String)public void setMiscVariableSettings(java.lang.String miscVars)
ClanGovernmentsetMiscVariableSettings in interface ClanGovernmentmiscVars - the coded var stringClanGovernment.getMiscVariableSettings()public ClanPosition findPositionRole(java.lang.String pos)
ClanGovernmentfindPositionRole in interface ClanGovernmentpos - the role id, name, or idClanGovernment.delPosition(ClanPosition), 
ClanGovernment.addPosition(), 
ClanGovernment.getPosition(String), 
ClanGovernment.findPositionRole(Integer)public ClanPosition findPositionRole(java.lang.Integer roleID)
ClanGovernmentfindPositionRole in interface ClanGovernmentroleID - the role id to look forClanGovernment.delPosition(ClanPosition), 
ClanGovernment.addPosition(), 
ClanGovernment.getPosition(String), 
ClanGovernment.findPositionRole(String)public void delPosition(ClanPosition pos)
ClanGovernmentdelPosition in interface ClanGovernmentpos - the posClanGovernment.addPosition(), 
ClanGovernment.getPosition(String), 
ClanGovernment.findPositionRole(Integer), 
ClanGovernment.findPositionRole(String)public ClanPosition addPosition()
ClanGovernmentaddPosition in interface ClanGovernmentClanGovernment.delPosition(ClanPosition), 
ClanGovernment.getPosition(String), 
ClanGovernment.findPositionRole(Integer), 
ClanGovernment.findPositionRole(String)public java.lang.String[] getStatCodes()
ModifiablegetStatCodes in interface ModifiableModifiable.getStat(String), 
Modifiable.setStat(String, String)public int getSaveStatIndex()
ModifiablegetSaveStatIndex in interface ModifiableModifiable.getStatCodes(), 
Modifiable.getStat(String), 
Modifiable.setStat(String, String)public java.lang.String getStat(java.lang.String code)
ModifiablegetStat in interface Modifiablecode - the name of the field to read.Modifiable.getStatCodes()public boolean isStat(java.lang.String code)
ModifiableisStat in interface Modifiablecode - the name of the field to read.Modifiable.getStatCodes()public void setStat(java.lang.String code,
                    java.lang.String val)
ModifiablesetStat in interface Modifiablecode - the name of the field to setval - the value to set the field toModifiable.getStatCodes()public java.lang.String getHelpStr()
ClanGovernmentgetHelpStr in interface ClanGovernmentpublic SearchIDList<Ability> getClanLevelAbilities(MOB mob, Clan clan, java.lang.Integer level)
ClanGovernmentgetClanLevelAbilities in interface ClanGovernmentmob - the mob enabledclan - the clan the abilities come fromlevel - clan levelpublic java.util.List<Ability> getClanLevelEffectsList(java.lang.Integer mobClanRole, java.lang.Integer level)
public ChameleonList<Ability> getEmptyClanLevelEffects(MOB mob, Clan clan)
public ChameleonList<Ability> getClanLevelEffects(MOB mob, Clan clan, java.lang.Integer level)
ClanGovernmentgetClanLevelEffects in interface ClanGovernmentmob - the mob affectedclan - the clan the effects come fromlevel - clan level