com.planet_ink.coffee_mud.CharClasses.interfaces
Interface CharClass

All Superinterfaces:
java.lang.Cloneable, CMObject, java.lang.Comparable<CMObject>, Modifiable, MsgListener, StatsAffecting, Tickable
All Known Implementing Classes:
Abjurer, Alterer, Apprentice, Arcanist, Archon, Artisan, Assassin, Barbarian, Bard, Beastmaster, Burglar, Charlatan, Cleric, Conjurer, Delver, Diviner, Doomsayer, Druid, Enchanter, Evoker, Fighter, Gaian, Gaoler, GenCharClass, Healer, Illusionist, Jester, Mage, Mer, Minstrel, Missionary, Monk, Necromancer, Oracle, Paladin, Pirate, PlayerClass, Prancer, Purist, Qualifier, Ranger, Sailor, Scholar, Shaman, SkyWatcher, SpecialistMage, StdCharClass, Templar, Thief, Transmuter, Trapper, Wizard

public interface CharClass
extends Tickable, StatsAffecting, MsgListener, CMObject, Modifiable

This class represents a player or mobs character class. One of more of these objects are associated with each mob through the mob interfaces charStats() object.

See Also:
MOB.charStats(), CharStats

Nested Class Summary
static class CharClass.SubClassRule
          This defines how this class fits into the SUB subclassing class system.
 
Field Summary
static int ARMOR_ANY
          constant returned by allowedArmorLevel() to designate any allowed armors.
static int ARMOR_CLOTH
          constant returned by allowedArmorLevel() to designate only cloth armors.
static java.lang.String[] ARMOR_DESCS
          list of string descriptions for the CharClass.ARMOR_* constants, ordered by their value.
static int ARMOR_LEATHER
          constant returned by allowedArmorLevel() to designate only leather armors.
static java.lang.String[] ARMOR_LONGDESC
          list of long string descriptions for the CharClass.ARMOR_* constants, ordered by their value.
static int ARMOR_METALONLY
          constant returned by allowedArmorLevel() to designate only metal armors.
static int ARMOR_NONMETAL
          constant returned by allowedArmorLevel() to designate only nonmetal armors.
static int ARMOR_OREONLY
          constant returned by allowedArmorLevel() to designate only metal/stone armors.
static int ARMOR_VEGAN
          constant returned by allowedArmorLevel() to designate only plant/wood armors.
static long ARMOR_WEARMASK
          useful constant for calculating the wear locations to which armor restrictions apply
static java.lang.String[] GENFLAG_DESCS
          constant string list naming each of the GENFLAG_* constants in the order of their value
static int GENFLAG_NOEXP
          for character classes that define themselves using getParms, this can designate expless bitmaps
static int GENFLAG_NOLEVELS
          for character classes that define themselves using getParms, this can designate levelless bitmaps
static int GENFLAG_NORACE
          for character classes that define themselves using getParms, this can designate racelessness bitmaps
static int GENFLAG_THINQUALLIST
          for character classes that define themselves using getParms, this can designate expless bitmaps
static int WEAPONS_ALLCLERIC
          constant returned by allowedWeaponLevel() to designate any cleric weapons only.
static int WEAPONS_ANY
          constant returned by allowedWeaponLevel() to designate any weapons.
static int WEAPONS_BURGLAR
          constant returned by allowedWeaponLevel() to designate burglar class weapons only.
static int WEAPONS_DAGGERONLY
          constant returned by allowedWeaponLevel() to designate daggers only.
static int WEAPONS_EVILCLERIC
          constant returned by allowedWeaponLevel() to designate evil cleric weapons only.
static int WEAPONS_FLAILONLY
          constant returned by allowedWeaponLevel() to designate flails only.
static int WEAPONS_GOODCLERIC
          constant returned by allowedWeaponLevel() to designate good cleric weapons only.
static java.lang.String[] WEAPONS_LONGDESC
          list of string descriptions for the CharClass.WEAPONS_* constants, ordered by their value.
static int WEAPONS_MAGELIKE
          constant returned by allowedWeaponLevel() to designate mage weapons only.
static int WEAPONS_MERLIKE
          constant returned by allowedWeaponLevel() to designate natural weapons only.
static int WEAPONS_NATURAL
          constant returned by allowedWeaponLevel() to designate natural weapons only.
static int WEAPONS_NEUTRALCLERIC
          constant returned by allowedWeaponLevel() to designate neutral cleric weapons only.
static int WEAPONS_ROCKY
          constant returned by allowedWeaponLevel() to designate stone weapons only.
static int[][] WEAPONS_SETS
          constant set of integer arrays defining the Weapon.CLASS_* constants for the CharClass.WEAPONS_* constants, ordered by CharClass.WEAPONS_* values.
static int WEAPONS_STAFFONLY
          constant returned by allowedWeaponLevel() to designate staffs only.
static int WEAPONS_THIEFLIKE
          constant returned by allowedWeaponLevel() to designate swords/daggers only.
 
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
 int addedExpertise(MOB host, ExpertiseLibrary.Flag expertiseCode, java.lang.String abilityID)
          Whenever a uses a skill, this method can return any additional expertise granted explicitly by the class.
 int adjustExperienceGain(MOB host, MOB mob, MOB victim, int amount)
          Whenever a player or mob of this race gains experience, this method gets a chance to modify the amount before the gain actually occurs.
 int allowedArmorLevel()
          A code designating what kind of armor can be used by this class without affecting their skills.
 int allowedWeaponLevel()
          A code designating what kind of weapons can be used by this class without fumbling their usage.
 int availabilityCode()
          Returns one or a combination of the Area.THEME_* constants from the Area interface.
 java.lang.String baseClass()
          Returns the base-class of this class.
 boolean canBeABenificiary(MOB killer, MOB killed, MOB mob, java.util.Set<MOB> followers)
          Returns whether this class, for the given mob of this class, should share in the experience gained by the killer for having killed the killed.
 boolean canBeADivider(MOB killer, MOB killed, MOB mob, java.util.Set<MOB> followers)
          Returns whether this class, for the given mob of this class, should count in the division of experience gained by the killer for having killed the killed.
 int classDurationModifier(MOB myChar, Ability skill, int duration)
          This method is called whenever a player casts a spell which has a lasting effect on the target.
 int classLevelModifier(MOB myChar, Ability skill, int level)
          This method is called whenever a player casts a spell which has an affect that is level dependent.
 java.lang.String classParms()
          Returns any boot-time parameters that are required to fully define this instance of a charclass.
 void endCharacter(MOB mob)
          Called when a class is no longer the current dominant class of a player or mob, usually during class training.
 boolean expless()
          Whether players of this class can gain or lose experience points.
 java.lang.String getArmorLimitDesc()
          Returns a text description of any armor restrictions imposed by this class upon its members.
 int getAttackAttribute()
          Returns which of the CharStats.STAT_* constants should be used to calculate the standard attack prowess points given when a member of this class gains a level.
 java.lang.String getAttackDesc()
          Returns a text description of the attack bonuses gained by members of this class.
 int getBonusAttackLevel()
          Returns the number of bonus attack points received by members of this class when they gain a level.
 int getBonusPracLevel()
          Returns the number of bonus practices received by members of this class when they gain a level.
 java.lang.String getDamageDesc()
          Returns a text description of the damage bonuses gained by members of this class.
 java.lang.String getHitPointDesc()
          Returns a text description of the hit point bonuses gained by members of this class.
 java.lang.String getHitPointsFormula()
          Returns the formula used every time a player of this class gains a level as this class.
 int getLevelCap()
          Returns the highest class level that can be achieved by a player who has this class.
 int getLevelsPerBonusDamage()
          Returns the number of levels which must be gained by a member of this class before they gain 1 more point of default damage per hit.
 java.lang.String getManaDesc()
          Returns a text description of the mana bonuses gained by members of this class.
 java.lang.String getManaFormula()
          Returns the formula used every time a player of this class gains a level as this class.
 java.lang.String getMaxStatDesc()
          Returns the list of max stats for members of this class.
 Pair<java.lang.String,java.lang.Integer>[] getMinimumStatRequirements()
          Returns pairings of stat names and the minimum a player must have in the state in order to learn this class.
 java.lang.String getMovementDesc()
          Returns a text description of the movement bonuses gained by members of this class.
 java.lang.String getMovementFormula()
          Returns the formula used every time a player of this class gains a level as this class.
 java.lang.String getOtherBonusDesc()
          Returns a text description of any bonus properties granted by this class to its members.
 java.lang.String getOtherLimitsDesc()
          Returns a text description of any misc restrictions imposed by this class upon its members.
 int getPracsFirstLevel()
          Returns the number of practices received by members of this class when they are first created.
 java.lang.String getPracticeDesc()
          Returns a text description of the practice bonuses gained by members of this class.
 java.lang.String getPrimeStatDesc()
          Returns the prime statistic of this class
 java.lang.String getRaceQualDesc()
          Returns a text description of the race requirements required to become a member of this character class
 java.lang.String[] getRequiredRaceList()
          Returns an array of Strings containing either the names of particular races, racial categories, or the word "ANY" to mean any class is OK.
 CMSecurity.SecGroup getSecurityFlags(int classLevel)
          Returns a read only set of security flags granted to all mobs/players who are this class, and the given class level or lower.
 java.lang.String getStartingMoney()
          Returns a text string for amount of money for characters starting as this character.
 java.lang.String getStatQualDesc()
          Returns a text description of the stat qualifications required to become a member of this character class
 CharClass.SubClassRule getSubClassRule()
          This defines how this class fits into the SUB subclassing class system.
 java.lang.String getTrainDesc()
          Returns a text description of the train bonuses gained by members of this class.
 int getTrainsFirstLevel()
          Returns the number of training points received by members of this class when they are first created.
 java.lang.String getWeaponLimitDesc()
          Returns a text description of any weapon restrictions imposed by this class upon its members.
 void grantAbilities(MOB mob, boolean isBorrowedClass)
          Typically called when a mob gains a level in this class, to allow the class to assign any new skills.
 boolean isAllowedRace(Race R)
          Returns whether the given race matches the required race list rules.
 boolean isGeneric()
          Returns whether this class is fully defined using the setParms method, as opposed to being defined by its Java code.
 boolean isValidClassBeneficiary(MOB killer, MOB killed, MOB mob, java.util.Set<MOB> followers)
          Returns whether the given mob should share in the experience gained by the killer for having killed the killed.
 boolean isValidClassDivider(MOB killer, MOB killed, MOB mob, java.util.Set<MOB> followers)
          Returns whether the given mob should count in the division of experience gained by the killer for having killed the killed.
 void level(MOB mob, java.util.List<java.lang.String> gainedAbilityIDs)
          This method is called whenever a player gains a level while a member of this class.
 boolean leveless()
          Whether players of this class can be associated with an experience level.
 CharClass makeGenCharClass()
          Converts this class into a generic one, if it is not already.
 int maxCommonSkills()
          Max number of common skills (both crafting and non-crafting) this class can learn.
 int maxCraftingSkills()
          Max number of common crafting skills this class can learn.
 int maxLanguages()
          Max number of languages this class can learn.
 int maxNonCraftingSkills()
          Max number of common gathering/non-crafting skills this class can learn.
 int[] maxStatAdjustments()
          Returns a bonus or negative adjustments to the base maximum for the CharStats.STAT_* base statistics.
 java.lang.String name()
          Returns the generally displayable name of this class.
 java.lang.String name(int classLevel)
          Returns the displayable name of this class, when the mob is the given class level.
 java.lang.String[] nameSet()
          Returns all of the displayable names of this class.
 java.util.List<Item> outfit(MOB myChar)
          Returns a vector of Item objects representing the standard clothing, weapons, or other objects commonly given to players of this class just starting out.
 boolean qualifiesForThisClass(MOB mob, boolean quiet)
          Returns whether this given mob qualifies for this class, and optionally gives them an error message.
 boolean raceless()
          Whether this class can be associated with a race.
 void setClassParms(java.lang.String parms)
          Sets any boot-time parameters that are required to fully define this instance of a charclass.
 boolean showThinQualifyList()
          Whether players of this class see qualifying skills only if they meet all prereqs.
 void startCharacter(MOB mob, boolean isBorrowedClass, boolean verifyOnly)
          This method should be called whenever a mob has this class added to their charStats list.
 void unLevel(MOB mob)
          This method is called whenever a player loses a level while a member of this class.
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, 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.StatsAffecting
affectCharState, affectCharStats, affectPhyStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.MsgListener
executeMsg, okMessage
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 

Field Detail

ARMOR_ANY

static final int ARMOR_ANY
constant returned by allowedArmorLevel() to designate any allowed armors. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedArmorLevel()

See Also:
Constant Field Values

ARMOR_CLOTH

static final int ARMOR_CLOTH
constant returned by allowedArmorLevel() to designate only cloth armors. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedArmorLevel()

See Also:
Constant Field Values

ARMOR_LEATHER

static final int ARMOR_LEATHER
constant returned by allowedArmorLevel() to designate only leather armors. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedArmorLevel()

See Also:
Constant Field Values

ARMOR_NONMETAL

static final int ARMOR_NONMETAL
constant returned by allowedArmorLevel() to designate only nonmetal armors. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedArmorLevel()

See Also:
Constant Field Values

ARMOR_VEGAN

static final int ARMOR_VEGAN
constant returned by allowedArmorLevel() to designate only plant/wood armors. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedArmorLevel()

See Also:
Constant Field Values

ARMOR_METALONLY

static final int ARMOR_METALONLY
constant returned by allowedArmorLevel() to designate only metal armors. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedArmorLevel()

See Also:
Constant Field Values

ARMOR_OREONLY

static final int ARMOR_OREONLY
constant returned by allowedArmorLevel() to designate only metal/stone armors. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedArmorLevel()

See Also:
Constant Field Values

ARMOR_WEARMASK

static final long ARMOR_WEARMASK
useful constant for calculating the wear locations to which armor restrictions apply

See Also:
Constant Field Values

ARMOR_DESCS

static final java.lang.String[] ARMOR_DESCS
list of string descriptions for the CharClass.ARMOR_* constants, ordered by their value. @see CharClass


ARMOR_LONGDESC

static final java.lang.String[] ARMOR_LONGDESC
list of long string descriptions for the CharClass.ARMOR_* constants, ordered by their value. @see CharClass


WEAPONS_ANY

static final int WEAPONS_ANY
constant returned by allowedWeaponLevel() to designate any weapons. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_DAGGERONLY

static final int WEAPONS_DAGGERONLY
constant returned by allowedWeaponLevel() to designate daggers only. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_THIEFLIKE

static final int WEAPONS_THIEFLIKE
constant returned by allowedWeaponLevel() to designate swords/daggers only. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_NATURAL

static final int WEAPONS_NATURAL
constant returned by allowedWeaponLevel() to designate natural weapons only. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_BURGLAR

static final int WEAPONS_BURGLAR
constant returned by allowedWeaponLevel() to designate burglar class weapons only. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_ROCKY

static final int WEAPONS_ROCKY
constant returned by allowedWeaponLevel() to designate stone weapons only. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_MAGELIKE

static final int WEAPONS_MAGELIKE
constant returned by allowedWeaponLevel() to designate mage weapons only. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_EVILCLERIC

static final int WEAPONS_EVILCLERIC
constant returned by allowedWeaponLevel() to designate evil cleric weapons only. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_GOODCLERIC

static final int WEAPONS_GOODCLERIC
constant returned by allowedWeaponLevel() to designate good cleric weapons only. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_NEUTRALCLERIC

static final int WEAPONS_NEUTRALCLERIC
constant returned by allowedWeaponLevel() to designate neutral cleric weapons only. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_ALLCLERIC

static final int WEAPONS_ALLCLERIC
constant returned by allowedWeaponLevel() to designate any cleric weapons only. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_FLAILONLY

static final int WEAPONS_FLAILONLY
constant returned by allowedWeaponLevel() to designate flails only. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_MERLIKE

static final int WEAPONS_MERLIKE
constant returned by allowedWeaponLevel() to designate natural weapons only. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_STAFFONLY

static final int WEAPONS_STAFFONLY
constant returned by allowedWeaponLevel() to designate staffs only. @see com.planet_ink.coffee_mud.CharClass.StdCharClass#allowedWeaponLevel()

See Also:
Constant Field Values

WEAPONS_SETS

static final int[][] WEAPONS_SETS
constant set of integer arrays defining the Weapon.CLASS_* constants for the CharClass.WEAPONS_* constants, ordered by CharClass.WEAPONS_* values.


WEAPONS_LONGDESC

static final java.lang.String[] WEAPONS_LONGDESC
list of string descriptions for the CharClass.WEAPONS_* constants, ordered by their value. @see CharClass


GENFLAG_NORACE

static final int GENFLAG_NORACE
for character classes that define themselves using getParms, this can designate racelessness bitmaps

See Also:
Constant Field Values

GENFLAG_NOLEVELS

static final int GENFLAG_NOLEVELS
for character classes that define themselves using getParms, this can designate levelless bitmaps

See Also:
Constant Field Values

GENFLAG_NOEXP

static final int GENFLAG_NOEXP
for character classes that define themselves using getParms, this can designate expless bitmaps

See Also:
Constant Field Values

GENFLAG_THINQUALLIST

static final int GENFLAG_THINQUALLIST
for character classes that define themselves using getParms, this can designate expless bitmaps

See Also:
Constant Field Values

GENFLAG_DESCS

static final java.lang.String[] GENFLAG_DESCS
constant string list naming each of the GENFLAG_* constants in the order of their value

Method Detail

name

java.lang.String name()
Returns the generally displayable name of this class. Usually deferred to by name(int), which is more often called.

Specified by:
name in interface CMObject
Specified by:
name in interface Tickable
Returns:
the displayable name of this object instance
See Also:
name(int), nameSet()

name

java.lang.String name(int classLevel)
Returns the displayable name of this class, when the mob is the given class level. Usually defers to name()

Parameters:
classLevel - the level to look up a name for
Returns:
the displayable name of this class
See Also:
name(), nameSet()

nameSet

java.lang.String[] nameSet()
Returns all of the displayable names of this class. Usually defers to name()

Returns:
all of the displayable names of this class
See Also:
name(), name(int)

baseClass

java.lang.String baseClass()
Returns the base-class of this class. Typically only important in multi-classing systems that restrict class changing to those classes part of the same base class. True multi-classing systems don't need to worry about this value. Can be the same as the ID() method.

Returns:
the base-class of this class

availabilityCode

int availabilityCode()
Returns one or a combination of the Area.THEME_* constants from the Area interface. This bitmap then describes the types of areas, skills, and classes which can interact. This bitmap is also used to to tell whether the class is available for selection by users at char creation time, whether they can change to this class via spells, or whether the class is utterly unavailable to them.

Returns:
the availability/theme of this class
See Also:
Area

qualifiesForThisClass

boolean qualifiesForThisClass(MOB mob,
                              boolean quiet)
Returns whether this given mob qualifies for this class, and optionally gives them an error message. There are strange rules here. If the mob is null, then this method returns true unless subclassing is on, and this class is not a subclass. If the mob has a class of StdCharClass, then char creation rules apply, otherwise train rules apply.

Parameters:
mob - the mob to evaluate the worthiness of
quiet - false to give the mob error messages, true for silence
Returns:
whether the given mob is worthy of this class

classParms

java.lang.String classParms()
Returns any boot-time parameters that are required to fully define this instance of a charclass. Charclasses are shared among mobs, but that doesn't mean mulitple instances of a single class can't generate different versions of themselves for the classloader, with different parameters. GenCharClass is an example.

Returns:
any parameters used to define this class
See Also:
setClassParms(String), isGeneric()

setClassParms

void setClassParms(java.lang.String parms)
Sets any boot-time parameters that are required to fully define this instance of a charclass. Charclasses are shared among mobs, but that doesn't mean mulitple instances of a single class can't generate different versions of themselves for the classloader, with different parameters. GenCharClass is an example.

Parameters:
parms - any parameters used to define this class
See Also:
classParms(), isGeneric()

isGeneric

boolean isGeneric()
Returns whether this class is fully defined using the setParms method, as opposed to being defined by its Java code.

Returns:
whether this class is defined fully by parameters
See Also:
classParms(), makeGenCharClass(), setClassParms(String)

makeGenCharClass

CharClass makeGenCharClass()
Converts this class into a generic one, if it is not already. If it is generic, this method returns itself. Otherwise, the standard char class is converted to a generic one and returned.

Returns:
a generic version of this class.
See Also:
isGeneric()

getSecurityFlags

CMSecurity.SecGroup getSecurityFlags(int classLevel)
Returns a read only set of security flags granted to all mobs/players who are this class, and the given class level or lower.

Parameters:
classLevel - the class level of the mob
Returns:
a vector of security flags

startCharacter

void startCharacter(MOB mob,
                    boolean isBorrowedClass,
                    boolean verifyOnly)
This method should be called whenever a mob has this class added to their charStats list. Its purpose is to outfit the mob with any necessary abilities, or perform other necessary changes to the mob to reflect the class addition or change. A character class is considered borrowed if its existence is derived from something else, or its skills/abilities should not be saved as a permanent feature of the mob.

Parameters:
mob - the mob being outfitted with this class
isBorrowedClass - whether the charclasses skills are borrowed(true) or permanent
verifyOnly - send true if no skills or changes are to be made

endCharacter

void endCharacter(MOB mob)
Called when a class is no longer the current dominant class of a player or mob, usually during class training.

Parameters:
mob - the mob whose career to end or put aside

isValidClassBeneficiary

boolean isValidClassBeneficiary(MOB killer,
                                MOB killed,
                                MOB mob,
                                java.util.Set<MOB> followers)
Returns whether the given mob should share in the experience gained by the killer for having killed the killed. Assumes the mob is in the same room, and requires the followers of the killer be passed in. The class that determines this is usually that of the group leader.

Parameters:
killer - the killer mob
killed - who the killer mob killed
mob - the mob whose sharing capacity is being evaluated
followers - the killers followers
Returns:
whether the mob shares in the exp gains

isValidClassDivider

boolean isValidClassDivider(MOB killer,
                            MOB killed,
                            MOB mob,
                            java.util.Set<MOB> followers)
Returns whether the given mob should count in the division of experience gained by the killer for having killed the killed. Assumes the mob is in the same room, and requires the followers of the killer be passed in. The class that determines this is usually that of the group leader.

Parameters:
killer - the killer mob
killed - who the killer mob killed
mob - the mob whose sharing capacity is being evaluated
followers - the killers followers
Returns:
whether the mob shares in the exp gains

canBeADivider

boolean canBeADivider(MOB killer,
                      MOB killed,
                      MOB mob,
                      java.util.Set<MOB> followers)
Returns whether this class, for the given mob of this class, should count in the division of experience gained by the killer for having killed the killed. Assumes the mob is in the same room, and requires the followers of the killer be passed in.

Parameters:
killer - the killer mob
killed - who the killer mob killed
mob - the mob whose sharing capacity is being evaluated
followers - the killers followers
Returns:
whether the mob shares in the exp gains

canBeABenificiary

boolean canBeABenificiary(MOB killer,
                          MOB killed,
                          MOB mob,
                          java.util.Set<MOB> followers)
Returns whether this class, for the given mob of this class, should share in the experience gained by the killer for having killed the killed. Assumes the mob is in the same room, and requires the followers of the killer be passed in.

Parameters:
killer - the killer mob
killed - who the killer mob killed
mob - the mob whose sharing capacity is being evaluated
followers - the killers followers
Returns:
whether the mob shares in the exp gains

grantAbilities

void grantAbilities(MOB mob,
                    boolean isBorrowedClass)
Typically called when a mob gains a level in this class, to allow the class to assign any new skills. Can also be called just to populate a mob with class skills, so it should also confirm any lower level skills also.

Parameters:
mob - the mob to give abilities to.
isBorrowedClass - whether the skills are savable (false) or temporary (true)
See Also:
AbilityContainer.addAbility(Ability)

level

void level(MOB mob,
           java.util.List<java.lang.String> gainedAbilityIDs)
This method is called whenever a player gains a level while a member of this class. If there are any special things which need to be done to a player who gains a level, they can be done in this method. By default, it doesn't do anything.

Parameters:
mob - the mob to level up
gainedAbilityIDs - the set of abilities/skill IDs gained during this leveling process

adjustExperienceGain

int adjustExperienceGain(MOB host,
                         MOB mob,
                         MOB victim,
                         int amount)
Whenever a player or mob of this race gains experience, this method gets a chance to modify the amount before the gain actually occurs.

Parameters:
host - the player or mob whose class is being queried
mob - the player or mob gaining experience
victim - if applicable, the mob or player who died to give the exp
amount - the amount of exp on track for gaining
Returns:
the adjusted amount of experience to gain

addedExpertise

int addedExpertise(MOB host,
                   ExpertiseLibrary.Flag expertiseCode,
                   java.lang.String abilityID)
Whenever a uses a skill, this method can return any additional expertise granted explicitly by the class.

Parameters:
host - the player or mob whose class is being queried
expertiseCode - the expertise code
abilityID - the Ability ID
Returns:
the inherent expertise level for this
See Also:
ExpertiseLibrary.Flag

unLevel

void unLevel(MOB mob)
This method is called whenever a player loses a level while a member of this class. If there are any special things which need to be done to a player who loses a level, they can be done in this method. By default, it doesn't do anything.

Parameters:
mob - the mob to level down

outfit

java.util.List<Item> outfit(MOB myChar)
Returns a vector of Item objects representing the standard clothing, weapons, or other objects commonly given to players of this class just starting out.

Parameters:
myChar - one who will receive the objects
Returns:
a vector of Item objects

classDurationModifier

int classDurationModifier(MOB myChar,
                          Ability skill,
                          int duration)
This method is called whenever a player casts a spell which has a lasting effect on the target. This method is called even if the class is not the players CURRENT class.

Parameters:
myChar - the caster or skill user
skill - the skill or spell that was cast.
duration - the default duration
Returns:
usually, it just returns default again

classLevelModifier

int classLevelModifier(MOB myChar,
                       Ability skill,
                       int level)
This method is called whenever a player casts a spell which has an affect that is level dependent. This method is called even if the class is not the players CURRENT class.

Parameters:
myChar - the caster or skill user
skill - the skill or spell that was cast.
level - the default level
Returns:
usually, it just returns level again

getBonusPracLevel

int getBonusPracLevel()
Returns the number of bonus practices received by members of this class when they gain a level. This is over and above the normal formula applied during the leveling process.

Returns:
the number of bonus practices to grant

getBonusAttackLevel

int getBonusAttackLevel()
Returns the number of bonus attack points received by members of this class when they gain a level. This is over and above the normal formula applied during the leveling process.

Returns:
the number of bonus attack points to grant

getAttackAttribute

int getAttackAttribute()
Returns which of the CharStats.STAT_* constants should be used to calculate the standard attack prowess points given when a member of this class gains a level.

Returns:
a CharStats.STAT_* attribute constant code
See Also:
CharStats

getPracsFirstLevel

int getPracsFirstLevel()
Returns the number of practices received by members of this class when they are first created.

Returns:
the number of initial practices to grant

getTrainsFirstLevel

int getTrainsFirstLevel()
Returns the number of training points received by members of this class when they are first created.

Returns:
the number of initial trains to grant

getLevelsPerBonusDamage

int getLevelsPerBonusDamage()
Returns the number of levels which must be gained by a member of this class before they gain 1 more point of default damage per hit.

Returns:
the number of levels between damage gains

getMovementFormula

java.lang.String getMovementFormula()
Returns the formula used every time a player of this class gains a level as this class. The total is added (or removed on unlevel) from the players movement score. Variables may be included in the formula, which are: @x1: Players current class level @x2: Players adjusted Strength @x3: Players Max adjusted Strength @x4: Players adjusted Dexterity @x5: Players Max adjusted Dexterity @x6: Players adjusted Constitution @x7: Players Max adjusted Constitution @x8: Players adjusted Wisdom @x9: Players adjusted Intelligence

Returns:
the formula that causes a gain or loss in movement
See Also:
getMovementDesc()

getMovementDesc

java.lang.String getMovementDesc()
Returns a text description of the movement bonuses gained by members of this class.

Returns:
a text description of the movement bonuses
See Also:
getMovementFormula()

getHitPointsFormula

java.lang.String getHitPointsFormula()
Returns the formula used every time a player of this class gains a level as this class. The total is added (or removed on unlevel) from the players hit points score. Variables may be included in the formula, which are: \@x1: Players current class level \@x2: Players adjusted Strength @x3: Players Max adjusted Strength \@x4: Players adjusted Dexterity @x5: Players Max adjusted Dexterity @x6: Players adjusted Constitution @x7: Players Max adjusted Constitution @x8: Players adjusted Wisdom @x9: Players adjusted Intelligence

Returns:
the formula that causes a gain or loss in hit points
See Also:
getHitPointDesc()

getHitPointDesc

java.lang.String getHitPointDesc()
Returns a text description of the hit point bonuses gained by members of this class.

Returns:
a text description of the hit point bonuses
See Also:
getHitPointsFormula()

getManaFormula

java.lang.String getManaFormula()
Returns the formula used every time a player of this class gains a level as this class. The total is added (or removed on unlevel) from the players mana score. Variables may be included in the formula, which are: @x1: Players current class level @x2: Players adjusted Wisdom @x3: Players Max adjusted Wisdom @x4: Players adjusted Intelligence @x5: Players Max adjusted Intelligence @x6: Players adjusted Attack Attr @x7: Players Max adjusted Attack Attr @x8: Players adjusted Charisma @x9: Players adjusted Constitution

Returns:
the formula that causes a gain or loss in mana
See Also:
getManaDesc(), getAttackAttribute()

getManaDesc

java.lang.String getManaDesc()
Returns a text description of the mana bonuses gained by members of this class.

Returns:
a text description of the mana bonuses
See Also:
getManaFormula()

getRequiredRaceList

java.lang.String[] getRequiredRaceList()
Returns an array of Strings containing either the names of particular races, racial categories, or the word "ANY" to mean any class is OK. All others are not permitted to be this class.

Returns:
a list of races, racecats, or ANY
See Also:
isAllowedRace(Race)

isAllowedRace

boolean isAllowedRace(Race R)
Returns whether the given race matches the required race list rules.

Parameters:
R - the race to check
Returns:
true if the race can be this class, false otherwse
See Also:
getRequiredRaceList()

getMinimumStatRequirements

Pair<java.lang.String,java.lang.Integer>[] getMinimumStatRequirements()
Returns pairings of stat names and the minimum a player must have in the state in order to learn this class.

Returns:
a pairs of stat names and minimum

getWeaponLimitDesc

java.lang.String getWeaponLimitDesc()
Returns a text description of any weapon restrictions imposed by this class upon its members.

Returns:
a text description of weapon retrictions

getArmorLimitDesc

java.lang.String getArmorLimitDesc()
Returns a text description of any armor restrictions imposed by this class upon its members.

Returns:
a text description of armor retrictions

getOtherLimitsDesc

java.lang.String getOtherLimitsDesc()
Returns a text description of any misc restrictions imposed by this class upon its members.

Returns:
a text description of misc retrictions

getOtherBonusDesc

java.lang.String getOtherBonusDesc()
Returns a text description of any bonus properties granted by this class to its members.

Returns:
a text description of bonus properties

getStatQualDesc

java.lang.String getStatQualDesc()
Returns a text description of the stat qualifications required to become a member of this character class

Returns:
a txt description of stat qualifications

getRaceQualDesc

java.lang.String getRaceQualDesc()
Returns a text description of the race requirements required to become a member of this character class

Returns:
a txt description of race requirements

getAttackDesc

java.lang.String getAttackDesc()
Returns a text description of the attack bonuses gained by members of this class.

Returns:
a text description of the attack bonuses

getPrimeStatDesc

java.lang.String getPrimeStatDesc()
Returns the prime statistic of this class

Returns:
the prime statistic of this class

getDamageDesc

java.lang.String getDamageDesc()
Returns a text description of the damage bonuses gained by members of this class.

Returns:
a text description of the damage bonuses

getTrainDesc

java.lang.String getTrainDesc()
Returns a text description of the train bonuses gained by members of this class.

Returns:
a text description of the train bonuses

getPracticeDesc

java.lang.String getPracticeDesc()
Returns a text description of the practice bonuses gained by members of this class.

Returns:
a text description of the practice bonuses

getMaxStatDesc

java.lang.String getMaxStatDesc()
Returns the list of max stats for members of this class.

Returns:
the max stat values for this class.

getStartingMoney

java.lang.String getStartingMoney()
Returns a text string for amount of money for characters starting as this character. Can be a number, or something like "485 gold".

Returns:
a text string for starting money.

getLevelCap

int getLevelCap()
Returns the highest class level that can be achieved by a player who has this class. Once this level is reached, the class behaves as it is were levelless. Default is -1, meaning the cap does not exist.

Returns:
highest class level for this class;

maxStatAdjustments

int[] maxStatAdjustments()
Returns a bonus or negative adjustments to the base maximum for the CharStats.STAT_* base statistics. The maximum is the most a player can train up to. The array only holds enough to the first 6 base stats.

Returns:
a six element array of adjustments to max base stats
See Also:
CharStats

raceless

boolean raceless()
Whether this class can be associated with a race.

Returns:
whether this class can have a class
See Also:
Race

leveless

boolean leveless()
Whether players of this class can be associated with an experience level.

Returns:
whether players of this class can have a level

expless

boolean expless()
Whether players of this class can gain or lose experience points.

Returns:
whether players of this class can gain or lose experience points

getSubClassRule

CharClass.SubClassRule getSubClassRule()
This defines how this class fits into the SUB subclassing class system. A class may be one that can change to any class, or only another class if it is the same base class, or many no class at all.

Returns:
the rule to use in the subclassing system

showThinQualifyList

boolean showThinQualifyList()
Whether players of this class see qualifying skills only if they meet all prereqs.

Returns:
whether players of this class see qualifying skills only if they meet all prereqs

maxNonCraftingSkills

int maxNonCraftingSkills()
Max number of common gathering/non-crafting skills this class can learn. 0 means unlimited. Skills directly qualified for by the class are excepted.

Returns:
Max number of common gathering/non-crafting skills this class can learn.

maxCraftingSkills

int maxCraftingSkills()
Max number of common crafting skills this class can learn. 0 means unlimited. Skills directly qualified for by the class are excepted.

Returns:
Max number of common crafting skills this class can learn.

maxCommonSkills

int maxCommonSkills()
Max number of common skills (both crafting and non-crafting) this class can learn. 0 means unlimited. Skills directly qualified for by the class are excepted.

Returns:
Max number of common skills this class can learn.

maxLanguages

int maxLanguages()
Max number of languages this class can learn. 0 means unlimited. Languages directly qualified for by the class or race are excepted.

Returns:
Max number of languages this class can learn.

allowedArmorLevel

int allowedArmorLevel()
A code designating what kind of armor can be used by this class without affecting their skills. The worn locations this coded type refers to locations defined by ARMOR_WEARMASK

Returns:
the encoded allowed armor type
See Also:
ARMOR_WEARMASK, ARMOR_ANY

allowedWeaponLevel

int allowedWeaponLevel()
A code designating what kind of weapons can be used by this class without fumbling their usage.

Returns:
the encoded allowed weapon type
See Also:
WEAPONS_ANY