com.planet_ink.coffee_mud.Common.interfaces
Interface Clan

All Superinterfaces:
java.lang.Cloneable, CMCommon, CMObject, java.lang.Comparable<CMObject>, Modifiable, Tickable
All Known Implementing Classes:
DefaultClan

public interface Clan
extends java.lang.Cloneable, Tickable, CMCommon, Modifiable


Nested Class Summary
static class Clan.Authority
          An enumeration of relationships between a clan position and a particular power of clans.
static class Clan.AutoPromoteFlag
          An enumeration of ways auto-promotion can work in a clan
static class Clan.ClanVote
          Represents an individual clan vote
static class Clan.FullMemberRecord
          A internal membership record, as returned by the database, plus extra fields from cmchar
static class Clan.Function
          An enumation of all the major clan functions gated by internal security
static class Clan.MemberRecord
          A internal membership record, as returned by the database
static class Clan.Trophy
          enum for the getTrophies @see Clan#getTrophies() method.
 
Field Summary
static java.lang.String[] CLAN_STATS
          Stat variables associated with clan objects.
static int CLANSTATUS_ACTIVE
          constant for the getStatus() method, denoting normal status.
static java.lang.String[] CLANSTATUS_DESC
          constant descriptor strings for the CLANSTATUS_* constants, ordered by their value.
static int CLANSTATUS_FADING
          constant for the getStatus() method, denoting fading status.
static int CLANSTATUS_PENDING
          constant for the getStatus() method, denoting unapproved status.
static int REL_ALLY
          constant for getClanRelations method, denoting ally with.
static java.lang.String[] REL_COLORS
           
static java.lang.String[] REL_DESCS
          descriptor strings for the REL_* constants, ordered by their value.
static int REL_FRIENDLY
          constant for getClanRelations method, denoting friendly to.
static int REL_HOSTILE
          constant for getClanRelations method, denoting hostile to.
static int REL_NEUTRAL
          constant for getClanRelations method, denoting neutral status towards.
static int[] REL_NEUTRALITYGAUGE
          constant used to determine something about clan relations
static java.lang.String[] REL_STATES
          long descriptor strings for the REL_* constants, ordered by their value.
static int REL_WAR
          constant for getClanRelations method, denoting at war with.
static int[][] RELATIONSHIP_VECTOR
          table used to determine how two clans are related when their declared relations differ.
static java.lang.String[] VSTAT_DESCS
          Descriptors for the values of ClanVote.voteStatus member.
static int VSTAT_FAILED
          Vote has failed constant for the ClanVote.voteStatus member.
static int VSTAT_PASSED
          Vote has passed constant for the ClanVote.voteStatus member.
static int VSTAT_STARTED
          Vote just started constant for the ClanVote.voteStatus member.
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
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_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, 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_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Method Summary
 void addMember(MOB M, int role)
          Adds a new member to this clan
 void addVote(Clan.ClanVote CV)
          Adds a new ClanVote object to the list of ongoing votes for this
 void adjDeposit(MOB memberM, double newValue)
          Adjusts the amount of base gold value deposited by this member.
 void adjExp(MOB memberM, int howMuch)
          Adjusts the amount of experience earned by this
 int applyExpMods(MOB memberM, int exp)
          Adjusts the amount of experience earned by a player based on the tax rate.
 long calculateMapPoints()
          Returns the total control points earned by this clan
 long calculateMapPoints(java.util.List<Area> controlledAreas)
          Returns the total control points represented by the list of controlled areas given.
 boolean canBeAssigned(MOB mob, int role)
          Returns whether the given user can be assigned the given role
 SearchIDList<Ability> clanAbilities(MOB mob)
          Return a vector of skills, spells, and other abilities granted to the given mob of the given mobs level.
 void clanAnnounce(java.lang.String msg)
          Sends a message to all members of all clans.
 ChameleonList<Ability> clanEffects(MOB mob)
          Return a vector of skills, spells, and other effects granted to the given mob of the given mobs level.
 java.lang.String clanID()
          Returns the unique identifying ID of the clan for reference elsewhere.
 void create()
          Orders the system to create this clan in the database.
 void delMember(MOB M)
          Del a member from this clan
 void delVote(Clan.ClanVote CV)
          Removes a new ClanVote object from the list of ongoing votes for this
 void destroyClan()
          Orders the system to destroy this clan in the database.
 boolean doesOutRank(int highRoleID, int lowRoleID)
          Returns whether the high role id outranks the low roldid
 MOB findMember(java.lang.String name)
          Returns the named member, if possible
 Clan.MemberRecord findMemberRecord(java.lang.String name)
          Returns the named member, if possible
 java.lang.String getAcceptanceSettings()
          Returns a mask used to identify whether a player is allowed to join a particular
 Clan.Authority getAuthority(int roleID, Clan.Function function)
          Returns whether the given roleID is allowed to perform the given function.
 int getAutoPosition()
          Returns whether membership is automatically approved to this And if so, what the default position for members are.
 java.lang.String getBasicRequirementMask()
          Returns the inner (government usually) requirements to even apply to this clan
 java.lang.String getCategory()
          Returns the category of the clan, which is almost always the same as the government category.
 java.lang.String getClanClass()
          Retrieves this Clan's enforced character class.
 int getClanLevel()
          Returns the current clan level
 int getClanRelations(java.lang.String id)
          Returns a REL_* constant denoting the relationship between this clan and the clan of the given name.
 java.util.List<Area> getControlledAreas()
          Returns all the areas on the map controlled by this
 double getCurrentClanGoldDonations(MOB killer)
          Returns the amount of base gold value this clan has received.
 int getCurrentClanKills(MOB killer)
          Returns the number of other-clan kills this clan has recorded.
 long getCurrentClanXPDonations(MOB killer)
          Returns the amount of xp this clan has earned.
 java.lang.String getDetail(MOB mob)
          Creates the string for the 'clandetail' command, based on the security of the given mob who will view the details.
 java.lang.String getDonation()
          Returns the roomID of this clans donation room
 long getExp()
          Gets the amount of experience earned by this
 ItemCollection getExtItems()
          Gets external items belonging to this clan, which should be destroyed with the clan, but can still be transient.
 java.util.List<Clan.FullMemberRecord> getFullMemberList()
          Returns the set of members, where each row represents a FullMemberRecord
 ClanGovernment getGovernment()
          Returns the object representing the government of this
 int getGovernmentID()
          Returns the id representing the government type of this
 java.lang.String getGovernmentName()
          Returns Clan, Republic, or another one of the clan government types.
 long getLastRelationChange(java.lang.String id)
          Returns the time/date stamp when this clan last changed its relations with the given
 java.util.List<Clan.MemberRecord> getMemberList()
          Returns the set of members, where each row represents a MemberRecord
 java.util.List<Clan.MemberRecord> getMemberList(int PosFilter)
          Returns the set of members, where each row represents a MemberRecord.
 int getMinClanMembers()
          Returns the minimum clan members for the clan to become active, or to prevent being purged.
 java.lang.String getMorgue()
          Returns the roomID of this clans morgue room
 int getMostInRole(int roleID)
          Returns the maximum number of players who can hold the given role in this For assignment purposes.
 java.lang.String getName()
          Returns the name of the clan, which is almost always the same as the ID, which is why clans can't change their names.
 int getNumberRoles()
          Returns the number of roles (max roleid)
 int getNumVoters(Clan.Function function)
          Returns the number of members allowed to vote on the given function.
 java.lang.String getPolitics()
          Returns an XML string used to identify the political relations between this clan and others.
 java.lang.String getPremise()
          Retrieves this Clan's basic story.
 java.lang.String getRecall()
          Returns the roomID of this clans recall room (their clan home)
 MOB getResponsibleMember()
          Returns the highest ranking member of this
 int getRoleFromName(java.lang.String position)
          For the clan government type, this function will return the clan role that most closely matches the given string "position".
 java.lang.String getRoleName(int roleID, boolean titleCase, boolean plural)
          Returns the friendly descriptive name of a given role in a clan, based on very specific criteria.
 java.lang.String[] getRolesList()
          Returns the list of roles for people in this clan, from lowest rank to the highest.
 int getSize()
          Returns the number of members of this
 int getStatus()
          Returns one of the CLANSTAT_* constants describing the pending status of this clan for acceptable, or whether its one its way out.
 double getTaxes()
          Gets the tax rate for this
 int getTopQualifiedRoleID(Clan.Function func, MOB mob)
          Returns the roleid constant representing the highest rank in this clan type that can perform the given function or null.
 java.util.List<java.lang.Integer> getTopRankedRoles(Clan.Function func)
          Returns the roleid(s) constant representing the highest rank roleid(s) in this clan type that can perform the given function.
 int getTrophies()
          Returns a bitmap representing the trophies won by this The bitmap is made up of TROPHY_* constants.
 boolean isLoyaltyThroughItems()
          Returns whether this clan attains conquest loyalty through giving out clan items.
 boolean isOnlyFamilyApplicants()
          Returns whether this clan only accepts applicants from people who are family of current members/founder.
 boolean isPubliclyListedFor(MOB mob)
          Returns whether this clan gets listed with the clanlist command.
 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 isWorshipConquest()
          Returns whether this clan attains conquest loyalty through mobs worshiping the same deity as their leader.
 int numClanEffects(MOB mob)
          Return size of a vector of skills, spells, and other effects granted to the given mob of the given mobs level.
 void recordClanKill(MOB killer, MOB killed)
          Called when a member of this clan kills a member of another Will update the clan in the database.
 void setAcceptanceSettings(java.lang.String newSettings)
          Sets a mask used to identify whether a player is allowed to join a particular
 void setAutoPosition(int pos)
          Sets whether membership is automatically approved to this And if so, what the default position for members are.
 void setCategory(java.lang.String newCategory)
          Sets a new category for this, which is almost always the same as the government category.
 void setClanClass(java.lang.String newClass)
          Sets this Clan's enforced character class.
 void setClanLevel(int newClanLevel)
          Sets the new clan level
 void setClanRelations(java.lang.String id, int rel, long time)
          Sets a new relationship between this clan and the clan with the given id.
 void setDonation(java.lang.String newDonation)
          Sets the roomID of this clans donation room
 void setExp(long exp)
          Sets the amount of experience earned by this
 void setGovernmentID(int type)
          Returns the id constant representing the government type of this
 void setMinClanMembers(int amt)
          Sets the minimum clan members for the clan to become active, or to prevent being purged.
 void setMorgue(java.lang.String newRecall)
          Sets the roomID of this clans morgue room
 void setName(java.lang.String newName)
          Sets a new name for this
 void setPolitics(java.lang.String politics)
          Sets an XML string used to identify the political relations between this clan and others.
 void setPremise(java.lang.String newPremise)
          Sets this Clan's basic story.
 void setRecall(java.lang.String newRecall)
          Sets the roomID of this clans recall room (their clan home)
 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 setStatus(int newStatus)
          Sets one of the CLANSTAT_* constants describing the pending status of this clan for acceptable, or whether its one its way out.
 void setTaxes(double rate)
          Sets the tax rate for this
 void setTrophies(int trophyFlag)
          Sets a bitmap representing the trophies won by this The bitmap is made up of TROPHY_* constants.
 void update()
          Orders the system to update this clan in the database.
 boolean updateClanPrivileges(MOB mob)
          This method is called when a given mobs clan status changes, for instance if they are added to the clan, removed from it, or change their rank.
 void updateVotes()
          Orders the system to save any changes to existing ongoing votes for this
 java.util.Enumeration<Clan.ClanVote> votes()
          If the clan type allows voting, this returns a series of ClanVote objects
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, name, tick
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, 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

VSTAT_STARTED

static final int VSTAT_STARTED
Vote just started constant for the ClanVote.voteStatus member. @see ClanVote#voteStatus

See Also:
Constant Field Values

VSTAT_FAILED

static final int VSTAT_FAILED
Vote has failed constant for the ClanVote.voteStatus member. @see ClanVote#voteStatus

See Also:
Constant Field Values

VSTAT_PASSED

static final int VSTAT_PASSED
Vote has passed constant for the ClanVote.voteStatus member. @see ClanVote#voteStatus

See Also:
Constant Field Values

VSTAT_DESCS

static final java.lang.String[] VSTAT_DESCS
Descriptors for the values of ClanVote.voteStatus member. @see ClanVote#voteStatus


CLAN_STATS

static final java.lang.String[] CLAN_STATS
Stat variables associated with clan objects.


CLANSTATUS_ACTIVE

static final int CLANSTATUS_ACTIVE
constant for the getStatus() method, denoting normal status. @see Clan#getStatus() .

See Also:
Constant Field Values

CLANSTATUS_PENDING

static final int CLANSTATUS_PENDING
constant for the getStatus() method, denoting unapproved status. @see Clan#getStatus() .

See Also:
Constant Field Values

CLANSTATUS_FADING

static final int CLANSTATUS_FADING
constant for the getStatus() method, denoting fading status. @see Clan#getStatus() .

See Also:
Constant Field Values

CLANSTATUS_DESC

static final java.lang.String[] CLANSTATUS_DESC
constant descriptor strings for the CLANSTATUS_* constants, ordered by their value. @see Clan .


REL_NEUTRAL

static final int REL_NEUTRAL
constant for getClanRelations method, denoting neutral status towards. @see Clan#getClanRelations(String)

See Also:
Constant Field Values

REL_WAR

static final int REL_WAR
constant for getClanRelations method, denoting at war with. @see Clan#getClanRelations(String)

See Also:
Constant Field Values

REL_HOSTILE

static final int REL_HOSTILE
constant for getClanRelations method, denoting hostile to. @see Clan#getClanRelations(String)

See Also:
Constant Field Values

REL_FRIENDLY

static final int REL_FRIENDLY
constant for getClanRelations method, denoting friendly to. @see Clan#getClanRelations(String)

See Also:
Constant Field Values

REL_ALLY

static final int REL_ALLY
constant for getClanRelations method, denoting ally with. @see Clan#getClanRelations(String)

See Also:
Constant Field Values

REL_NEUTRALITYGAUGE

static final int[] REL_NEUTRALITYGAUGE
constant used to determine something about clan relations


RELATIONSHIP_VECTOR

static final int[][] RELATIONSHIP_VECTOR
table used to determine how two clans are related when their declared relations differ. both axis are REL_* constants. @see Clan


REL_DESCS

static final java.lang.String[] REL_DESCS
descriptor strings for the REL_* constants, ordered by their value. @see Clan


REL_COLORS

static final java.lang.String[] REL_COLORS

REL_STATES

static final java.lang.String[] REL_STATES
long descriptor strings for the REL_* constants, ordered by their value. @see Clan

Method Detail

getAuthority

Clan.Authority getAuthority(int roleID,
                            Clan.Function function)
Returns whether the given roleID is allowed to perform the given function. The return value can designate that they may do it now, that they may not do it, or that it requires a vote. A return value 1 means they can do it now, 0 means it requires a vote, and -1 means they can never do it. The functions are defined in the Clan interface as FUNC_* constants.

Parameters:
roleID - the roleID whose priviledges to check.
function - the ClanFunction function constant to use
Returns:
the ClanPositionPower enum
See Also:
Clan, Clan.Authority

clanAnnounce

void clanAnnounce(java.lang.String msg)
Sends a message to all members of all clans.

Parameters:
msg - the message to send

votes

java.util.Enumeration<Clan.ClanVote> votes()
If the clan type allows voting, this returns a series of ClanVote objects

Returns:
the set of clan votes
See Also:
Clan.ClanVote

updateVotes

void updateVotes()
Orders the system to save any changes to existing ongoing votes for this


addVote

void addVote(Clan.ClanVote CV)
Adds a new ClanVote object to the list of ongoing votes for this

Parameters:
CV - the clanvote object to add
See Also:
Clan.ClanVote

delVote

void delVote(Clan.ClanVote CV)
Removes a new ClanVote object from the list of ongoing votes for this

Parameters:
CV - the clanvote object to remove
See Also:
Clan.ClanVote

getNumVoters

int getNumVoters(Clan.Function function)
Returns the number of members allowed to vote on the given function. The function is one of the FUNC_* constants.

Parameters:
function - the FUNC_* constant
Returns:
the number of members of this clan who can vote on it
See Also:
Clan

getSize

int getSize()
Returns the number of members of this

Returns:
the membership count.

getName

java.lang.String getName()
Returns the name of the clan, which is almost always the same as the ID, which is why clans can't change their names.

Returns:
the name of the
See Also:
setName(String)

clanID

java.lang.String clanID()
Returns the unique identifying ID of the clan for reference elsewhere.

Returns:
the unique identifier of the
See Also:
getName()

setName

void setName(java.lang.String newName)
Sets a new name for this

Parameters:
newName - the new name of this clan
See Also:
getName(), clanID()

getCategory

java.lang.String getCategory()
Returns the category of the clan, which is almost always the same as the government category. This is significant since a player can only belong to N clans of a given category. See also MAXCLANS in coffeemud.ini.

Returns:
the name of the
See Also:
setCategory(String)

setCategory

void setCategory(java.lang.String newCategory)
Sets a new category for this, which is almost always the same as the government category. This is significant since a player can only belong to N clans of a given category. See also MAXCLANS in coffeemud.ini.

Parameters:
newCategory - the new cata of this clan
See Also:
getCategory()

getGovernmentName

java.lang.String getGovernmentName()
Returns Clan, Republic, or another one of the clan government types.

Returns:
the clans government types
See Also:
Clan

updateClanPrivileges

boolean updateClanPrivileges(MOB mob)
This method is called when a given mobs clan status changes, for instance if they are added to the clan, removed from it, or change their rank.

Parameters:
mob - the mob whose status needs updating
Returns:
whether the update succeeded

clanAbilities

SearchIDList<Ability> clanAbilities(MOB mob)
Return a vector of skills, spells, and other abilities granted to the given mob of the given mobs level.

Parameters:
mob - the mob to grant the abilities to
Returns:
a vector of the Ability objects
See Also:
Ability

clanEffects

ChameleonList<Ability> clanEffects(MOB mob)
Return a vector of skills, spells, and other effects granted to the given mob of the given mobs level.

Parameters:
mob - the mob to grant the abilities to
Returns:
a vector of the Ability objects
See Also:
Ability

numClanEffects

int numClanEffects(MOB mob)
Return size of a vector of skills, spells, and other effects granted to the given mob of the given mobs level. Much more efficient than getting the whole list and checking its size.

Parameters:
mob - the mob to grant the abilities to
Returns:
a size of a vector of the Ability objects
See Also:
Ability

getPremise

java.lang.String getPremise()
Retrieves this Clan's basic story. This is to make the Clan's more RP based and so we can provide up-to-date information on Clans on the web server.

Returns:
the story of this clan
See Also:
setPremise(String)

doesOutRank

boolean doesOutRank(int highRoleID,
                    int lowRoleID)
Returns whether the high role id outranks the low roldid

Parameters:
highRoleID - first
lowRoleID - second
Returns:
true if highRoleiD outranks lowRoleID

setPremise

void setPremise(java.lang.String newPremise)
Sets this Clan's basic story.

Parameters:
newPremise - the new premise text
See Also:
getPremise()

setClanClass

void setClanClass(java.lang.String newClass)
Sets this Clan's enforced character class.

Parameters:
newClass - the new enforced character class
See Also:
getClanClass()

getClanClass

java.lang.String getClanClass()
Retrieves this Clan's enforced character class. All players who join this clan become this class.

Returns:
the class of this clan
See Also:
setClanClass(String)

getDetail

java.lang.String getDetail(MOB mob)
Creates the string for the 'clandetail' command, based on the security of the given mob who will view the details.

Parameters:
mob - the one who will view the details
Returns:
the details view of this clan for the given mob

getAcceptanceSettings

java.lang.String getAcceptanceSettings()
Returns a mask used to identify whether a player is allowed to join a particular

Returns:
the mask used to identify prospects
See Also:
MaskingLibrary, setAcceptanceSettings(String)

setAcceptanceSettings

void setAcceptanceSettings(java.lang.String newSettings)
Sets a mask used to identify whether a player is allowed to join a particular

Parameters:
newSettings - the mask used to identify prospects
See Also:
MaskingLibrary, getAcceptanceSettings()

getPolitics

java.lang.String getPolitics()
Returns an XML string used to identify the political relations between this clan and others.

Returns:
xml document describing the politics of this clan
See Also:
setPolitics(String)

setPolitics

void setPolitics(java.lang.String politics)
Sets an XML string used to identify the political relations between this clan and others.

Parameters:
politics - xml document describing the politics of this clan
See Also:
getPolitics()

getAutoPosition

int getAutoPosition()
Returns whether membership is automatically approved to this And if so, what the default position for members are.

Returns:
xml document describing the politics of this clan
See Also:
setAutoPosition(int)

setAutoPosition

void setAutoPosition(int pos)
Sets whether membership is automatically approved to this And if so, what the default position for members are.

Parameters:
pos - the positition to give to applicants
See Also:
getAutoPosition()

getStatus

int getStatus()
Returns one of the CLANSTAT_* constants describing the pending status of this clan for acceptable, or whether its one its way out.

Returns:
a CLANSTAT_* constant
See Also:
Clan, setStatus(int)

setStatus

void setStatus(int newStatus)
Sets one of the CLANSTAT_* constants describing the pending status of this clan for acceptable, or whether its one its way out.

Parameters:
newStatus - a CLANSTAT_* constant
See Also:
Clan, getStatus()

isRivalrous

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.

Returns:
true or false
See Also:
Clan, setRivalrous(boolean)

setRivalrous

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

Parameters:
isRivalrous - true or false
See Also:
Clan, isRivalrous()

getClanLevel

int getClanLevel()
Returns the current clan level

Returns:
the current clan level
See Also:
setClanLevel(int)

setClanLevel

void setClanLevel(int newClanLevel)
Sets the new clan level

Parameters:
newClanLevel - the new clan level
See Also:
getClanLevel()

getRecall

java.lang.String getRecall()
Returns the roomID of this clans recall room (their clan home)

Returns:
the roomid of this clans clan home
See Also:
setRecall(String)

setRecall

void setRecall(java.lang.String newRecall)
Sets the roomID of this clans recall room (their clan home)

Parameters:
newRecall - the roomid of this clans clan home
See Also:
getRecall()

getMorgue

java.lang.String getMorgue()
Returns the roomID of this clans morgue room

Returns:
the roomID of this clans morgue room
See Also:
setMorgue(String)

setMorgue

void setMorgue(java.lang.String newRecall)
Sets the roomID of this clans morgue room

Parameters:
newRecall - the roomID of this clans morgue room
See Also:
getMorgue()

getTrophies

int getTrophies()
Returns a bitmap representing the trophies won by this The bitmap is made up of TROPHY_* constants.

Returns:
a bitmap of the trophies
See Also:
Clan, setTrophies(int)

setTrophies

void setTrophies(int trophyFlag)
Sets a bitmap representing the trophies won by this The bitmap is made up of TROPHY_* constants.

Parameters:
trophyFlag - a bitmap of the trophies
See Also:
Clan, getTrophies()

getDonation

java.lang.String getDonation()
Returns the roomID of this clans donation room

Returns:
the roomID of this clans donation room
See Also:
setDonation(String)

setDonation

void setDonation(java.lang.String newDonation)
Sets the roomID of this clans donation room

Parameters:
newDonation - the roomID of this clans donation room
See Also:
getDonation()

getExp

long getExp()
Gets the amount of experience earned by this

Returns:
the experience earned

setExp

void setExp(long exp)
Sets the amount of experience earned by this

Parameters:
exp - the experience earned

getBasicRequirementMask

java.lang.String getBasicRequirementMask()
Returns the inner (government usually) requirements to even apply to this clan

Returns:
the zapper mask that applies

adjExp

void adjExp(MOB memberM,
            int howMuch)
Adjusts the amount of experience earned by this

Parameters:
memberM - member the person contributing the xp
howMuch - the experience adjustment, + or -

adjDeposit

void adjDeposit(MOB memberM,
                double newValue)
Adjusts the amount of base gold value deposited by this member.

Parameters:
memberM - member the person contributing
newValue - the value adjustment, + or -

applyExpMods

int applyExpMods(MOB memberM,
                 int exp)
Adjusts the amount of experience earned by a player based on the tax rate. Will automatically adjust the exp of the clan and save it.

Parameters:
memberM - member the person contributing the xp
exp - the old experience
Returns:
the exp adjusted by the clan, if at all.

recordClanKill

void recordClanKill(MOB killer,
                    MOB killed)
Called when a member of this clan kills a member of another Will update the clan in the database.

Parameters:
killer - the member of this clan that did the killing
killed - the mob or member of other clan killed

getCurrentClanKills

int getCurrentClanKills(MOB killer)
Returns the number of other-clan kills this clan has recorded.

Parameters:
killer - the member of this clan that did the killing or NULL for all
Returns:
the number of kills.

getCurrentClanGoldDonations

double getCurrentClanGoldDonations(MOB killer)
Returns the amount of base gold value this clan has received.

Parameters:
killer - the member of this clan that did the killing or NULL for all
Returns:
the amount of deposits.

getCurrentClanXPDonations

long getCurrentClanXPDonations(MOB killer)
Returns the amount of xp this clan has earned.

Parameters:
killer - the member of this clan that did the killing or NULL for all
Returns:
the number of xp contributed.

calculateMapPoints

long calculateMapPoints(java.util.List<Area> controlledAreas)
Returns the total control points represented by the list of controlled areas given.

Parameters:
controlledAreas - the areas controlled
Returns:
the number of control points represented
See Also:
calculateMapPoints(), getControlledAreas(), Conquerable

calculateMapPoints

long calculateMapPoints()
Returns the total control points earned by this clan

Returns:
the number of control points represented
See Also:
calculateMapPoints(List), getControlledAreas(), Conquerable

getControlledAreas

java.util.List<Area> getControlledAreas()
Returns all the areas on the map controlled by this

Returns:
a vector of area objects
See Also:
Conquerable, Area

setTaxes

void setTaxes(double rate)
Sets the tax rate for this

Parameters:
rate - the tax rate 0-100.0
See Also:
getTaxes()

getTaxes

double getTaxes()
Gets the tax rate for this

Returns:
rate the tax rate 0-100.0
See Also:
setTaxes(double)

getMostInRole

int getMostInRole(int roleID)
Returns the maximum number of players who can hold the given role in this For assignment purposes.

Parameters:
roleID - the role to get a max for
Returns:
the max

getRoleName

java.lang.String getRoleName(int roleID,
                             boolean titleCase,
                             boolean plural)
Returns the friendly descriptive name of a given role in a clan, based on very specific criteria.

Parameters:
roleID - the role code of the role to describe
titleCase - whether or not to uppercase the first word
plural - whether or not to return the word as a plural
Returns:
the friendly descriptive name of a given role in a clan

getRoleFromName

int getRoleFromName(java.lang.String position)
For the clan government type, this function will return the clan role that most closely matches the given string "position". It will return -1 if no position is found that matches the string. The returned value will an an official role bitmask.

Parameters:
position - the name of the position to look for
Returns:
the role mask/code number for this government, oe -1

isPubliclyListedFor

boolean isPubliclyListedFor(MOB mob)
Returns whether this clan gets listed with the clanlist command. Does not affect clanlog messaging.

Parameters:
mob - the person viewing
Returns:
true if it is, false otherwise.

isOnlyFamilyApplicants

boolean isOnlyFamilyApplicants()
Returns whether this clan only accepts applicants from people who are family of current members/founder.

Returns:
true if it is, false otherwise.

getRolesList

java.lang.String[] getRolesList()
Returns the list of roles for people in this clan, from lowest rank to the highest. Must correspond with roleIDs

Returns:
the role list

getMemberList

java.util.List<Clan.MemberRecord> getMemberList()
Returns the set of members, where each row represents a MemberRecord

Returns:
the membership
See Also:
getMemberList(int), getFullMemberList(), Clan.MemberRecord

findMemberRecord

Clan.MemberRecord findMemberRecord(java.lang.String name)
Returns the named member, if possible

Parameters:
name - the name of the member
Returns:
the member record
See Also:
getMemberList(int), getFullMemberList(), Clan.MemberRecord

findMember

MOB findMember(java.lang.String name)
Returns the named member, if possible

Parameters:
name - the name of the member
Returns:
the member mob
See Also:
getMemberList(int), getFullMemberList(), Clan.MemberRecord

getFullMemberList

java.util.List<Clan.FullMemberRecord> getFullMemberList()
Returns the set of members, where each row represents a FullMemberRecord

Returns:
the membership
See Also:
getMemberList(), Clan.FullMemberRecord

getMemberList

java.util.List<Clan.MemberRecord> getMemberList(int PosFilter)
Returns the set of members, where each row represents a MemberRecord. Will filter by the given POS_* constant.

Parameters:
PosFilter - the position filter
Returns:
the membership
See Also:
Clan, Clan.MemberRecord

getResponsibleMember

MOB getResponsibleMember()
Returns the highest ranking member of this

Returns:
the mob object for the highest ranking member.

getClanRelations

int getClanRelations(java.lang.String id)
Returns a REL_* constant denoting the relationship between this clan and the clan of the given name.

Parameters:
id - the name of another
Returns:
the REL_* constant
See Also:
setClanRelations(String, int, long), getLastRelationChange(String)

getLastRelationChange

long getLastRelationChange(java.lang.String id)
Returns the time/date stamp when this clan last changed its relations with the given

Parameters:
id - the other clan
Returns:
when the last change was
See Also:
setClanRelations(String, int, long), getClanRelations(String)

setClanRelations

void setClanRelations(java.lang.String id,
                      int rel,
                      long time)
Sets a new relationship between this clan and the clan with the given id.

Parameters:
id - another clan
rel - the REL_* constant for the new relationship
time - a current date/time stamp for this change

getGovernmentID

int getGovernmentID()
Returns the id representing the government type of this

Returns:
the if constant
See Also:
Clan, setGovernmentID(int), getGovernment()

getGovernment

ClanGovernment getGovernment()
Returns the object representing the government of this

Returns:
the if constant
See Also:
ClanGovernment, getGovernmentID(), setGovernmentID(int)

getMinClanMembers

int getMinClanMembers()
Returns the minimum clan members for the clan to become active, or to prevent being purged. A value of 0 keeps the clan alive forever

Returns:
minimum number of clan members.

setMinClanMembers

void setMinClanMembers(int amt)
Sets the minimum clan members for the clan to become active, or to prevent being purged. A value of 0 keeps the clan alive forever

Parameters:
amt - the new min clan members

isLoyaltyThroughItems

boolean isLoyaltyThroughItems()
Returns whether this clan attains conquest loyalty through giving out clan items.

Returns:
true if if does, false otherwise

isWorshipConquest

boolean isWorshipConquest()
Returns whether this clan attains conquest loyalty through mobs worshiping the same deity as their leader.

Returns:
true if if does, false otherwise

setGovernmentID

void setGovernmentID(int type)
Returns the id constant representing the government type of this

Parameters:
type - the type id constant
See Also:
Clan, getGovernmentID(), getGovernment()

getTopQualifiedRoleID

int getTopQualifiedRoleID(Clan.Function func,
                          MOB mob)
Returns the roleid constant representing the highest rank in this clan type that can perform the given function or null.

Parameters:
func - the function (or null) they must be able to do
mob - the mob to check for a top rank
Returns:
the roleid constant
See Also:
ClanPosition, Clan.Function

getTopRankedRoles

java.util.List<java.lang.Integer> getTopRankedRoles(Clan.Function func)
Returns the roleid(s) constant representing the highest rank roleid(s) in this clan type that can perform the given function.

Parameters:
func - the function to perform, or null just to return privileged rank
Returns:
the top roleid
See Also:
ClanPosition, Clan.Function

getNumberRoles

int getNumberRoles()
Returns the number of roles (max roleid)

Returns:
number of roles

delMember

void delMember(MOB M)
Del a member from this clan

Parameters:
M - the member to remove

addMember

void addMember(MOB M,
               int role)
Adds a new member to this clan

Parameters:
M - the member to add
role - the coded role number

update

void update()
Orders the system to update this clan in the database.


destroyClan

void destroyClan()
Orders the system to destroy this clan in the database.


create

void create()
Orders the system to create this clan in the database.


getExtItems

ItemCollection getExtItems()
Gets external items belonging to this clan, which should be destroyed with the clan, but can still be transient. These are items like artifacts, or ships, vehicles, etc.

Returns:
an item collection
See Also:
ItemCollection, Item

canBeAssigned

boolean canBeAssigned(MOB mob,
                      int role)
Returns whether the given user can be assigned the given role

Parameters:
mob - the mob to check
role - the role to check for
Returns:
true if they can, false otherwise