com.planet_ink.coffee_mud.Libraries.interfaces
Interface AbilityMapper

All Superinterfaces:
java.lang.Cloneable, CMLibrary, CMObject, java.lang.Comparable<CMObject>
All Known Implementing Classes:
CMAbleMap

public interface AbilityMapper
extends CMLibrary

The Ability Mapper Library handles everything dealing with the relationship between players, races, etc and Abilities (Skills, Spells, Prayers, etc). The principle duty is to map the provider of player Abilities to those Abilities, along with any requirements for being provided the skills, and the condition the skill is in when it is received.


Nested Class Summary
static interface AbilityMapper.AbilityMapping
          An official Ability Mapping, used by many of the AbilityMapper classes.
static class AbilityMapper.Cost
          An enum usually used to index an array of different kinds of skill use costs.
static interface AbilityMapper.QualifyingID
          A mapping between an Ability ID and it's qualifying level
 
Method Summary
 AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID, int qualLevel, java.lang.String abilityID, boolean autoGain)
          Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID.
 AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID, int qualLevel, java.lang.String abilityID, boolean autoGain, java.util.List<java.lang.String> preReqSkillsList)
          Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID.
 AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID, int qualLevel, java.lang.String abilityID, boolean autoGain, java.util.List<java.lang.String> preReqSkillsList, java.lang.String extraMasks)
          Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID.
 AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID, int qualLevel, java.lang.String abilityID, boolean autoGain, java.lang.String extraMasks)
          Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID.
 AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID, int qualLevel, java.lang.String abilityID, int defaultProficiency, boolean autoGain)
          Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID.
 AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID, int qualLevel, java.lang.String abilityID, int defaultProficiency, boolean autoGain, java.util.List<java.lang.String> skillPreReqs)
          Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID.
 AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID, int qualLevel, java.lang.String abilityID, int defaultProficiency, int maxProficiency, java.lang.String defaultParam, boolean autoGain, boolean secret, java.util.List<java.lang.String> preReqSkillsList, java.lang.String extraMask, java.lang.Integer[] costOverrides)
          Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID.
 AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID, int qualLevel, java.lang.String abilityID, int defaultProficiency, java.lang.String defaultParam, boolean autoGain)
          Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID.
 AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID, int qualLevel, java.lang.String abilityID, int defaultProficiency, java.lang.String defaultParam, boolean autoGain, boolean secret)
          Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID.
 AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID, int qualLevel, java.lang.String abilityID, int defaultProficiency, java.lang.String defaultParam, boolean autoGain, boolean secret, java.util.List<java.lang.String> preReqSkillsList, java.lang.String extraMask)
          Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID.
 AbilityMapper.AbilityMapping addDynaAbilityMapping(java.lang.String ID, int qualLevel, java.lang.String abilityID, int defaultProficiency, java.lang.String defaultParam, boolean autoGain, boolean secret, java.lang.String extraMask)
          Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID.
 void addPreRequisites(java.lang.String ID, java.util.List<java.lang.String> preReqSkillsList, java.lang.String extraMask)
          Adds to the list of allowed skills, expertises, etc that come from the requirements listed for the given skill.
 boolean availableToTheme(java.lang.String abilityID, int theme, boolean publicly)
          Discovers whether the given ability is qualified for by a class that is available to the given theme id number.
 boolean classOnly(MOB mob, java.lang.String classID, java.lang.String abilityID)
          Returns whether the given class qualifies for the given ability.
 boolean classOnly(java.lang.String classID, java.lang.String abilityID)
          Returns whether the given class qualifies for the given ability.
 AbilityMapper.AbilityMapping delCharAbilityMapping(java.lang.String ID, java.lang.String abilityID)
          Removes the specified mapping between charclass, race, or whatever, and an Ability, by String ability ID.
 void delCharMappings(java.lang.String ID)
          Removes all ability mappings for the given charclass, race, or whatever.
 java.lang.String formatPreRequisites(DVector preReqs)
          Given a set of common Ability/skill pre-requisites for learning, coded, this method will return those pre-requisites formatted in a friendly, readable form.
 java.util.Iterator<java.lang.String> getAbilityAllowsList(java.lang.String ableID)
          Returns an iterator over the list of expertises and skills which having the given skill will allow.
 AbilityMapper.AbilityMapping getAbleMap(java.lang.String ID, java.lang.String abilityID)
          Returns the ability mapping that is defined by the given char class, race, or clan ID for the given Ability ID(), or null.
 java.util.Map<java.lang.String,AbilityMapper.AbilityMapping> getAbleMapping(java.lang.String ID)
          Returns the raw Ability mappings for the given class, race, or clan ID.
 AbilityMapper.AbilityMapping getAllAbleMap(java.lang.String abilityID)
          Returns the ability mapping that is defined by the All Qualifies list for the given Ability ID(), or null.
 java.lang.Integer[] getAllCostOverrides(java.lang.String abilityID)
          Returns any All-Qualifies overrides to the standard system white standards for casting costs (the amount of mana or moves to use a skill).
 boolean getAllQualified(java.lang.String ID, boolean checkAll, java.lang.String abilityID)
          Returns whether the given ability, for the given charclass, race, or clan government ID, and optionally checking the All Qualifies list, is part of the All Qualified list.
 java.util.Map<java.lang.String,java.util.Map<java.lang.String,AbilityMapper.AbilityMapping>> getAllQualifiesMap(java.util.Map<java.lang.String,java.lang.Object> cache)
          Loads the All-Qualifies list from the filesystem.
 boolean getAllSecretSkill(java.lang.String abilityID)
          Returns whether the given Ability ID() is both mapped on the All Qualifies list AND is a secret skill.
 java.lang.String getApplicableMask(MOB studentM, Ability A)
          Returns the first applicable zapper mask that applies to the given mob for the given ability.
 PairList<java.lang.String,java.lang.Integer> getAvailabilityList(Ability A, int abbreviateAt)
          Returns a String list of all the classes and levels that qualify for the given skill.
 int getCalculatedMedianLowestQualifyingLevel()
          Returns the median lowest qualifying level for all abilities, given you an idea of the middle-skill-gaining levels, for some reason.
 java.util.Enumeration<AbilityMapper.AbilityMapping> getClassAbles(java.lang.String ID, boolean addAll)
          Returns an enumeration of all the AbilityMapping object for all the abilities the given class, race, whatever qualifies for ever.
 java.util.List<AbilityMapper.QualifyingID> getClassAllowsList(java.lang.String ID)
          Returns the list of things allowed by skill which the given class/race/whatever qualifies over their life, along with qualifying levels.
 java.lang.String getCommonExtraMask(Ability A)
          Returns the general zapper mask that defines the requirements to learn the given ability, by ID.
 DVector getCommonPreRequisites(Ability A)
          Returns the coded form of the skill prerequisites for the given ability.
 DVector getCommonPreRequisites(MOB mob, Ability A)
          Returns the coded form of the skill prerequisites for the given ability that apply to the given mob by race or class.
 java.lang.Integer[] getCostOverrides(MOB mob, java.lang.String abilityID)
          Returns any mapping-based overrides to the standard system white standards for casting costs (the amount of mana or moves to use a skill) relevant to the given mob, based on their class, race, etc.
 java.lang.Integer[] getCostOverrides(java.lang.String abilityID)
          Returns the first mapping-based override to the standard system white standards for casting costs (the amount of mana or moves to use a skill).
 java.lang.Integer[] getCostOverrides(java.lang.String ID, boolean checkAll, java.lang.String abilityID)
          Returns any mapping-based overrides to the standard system white standards for casting costs (the amount of mana or moves to use a skill).
 java.util.List<java.lang.String> getCurrentlyQualifyingIDs(MOB studentM, java.lang.String AID)
          Returns the list of CharClass IDs, or Race IDs, or Clan Govt IDs, or whatever by which the given student might qualify for the given Ability ID.
 boolean getDefaultGain(java.lang.String ID, boolean checkAll, java.lang.String abilityID)
          Returns whether the given ability, for the given charclass, race, or clan government ID, and optionally checking the All Qualifies list, is gained by default or must be trained.
 java.lang.String getDefaultParm(java.lang.String ID, boolean checkAll, java.lang.String abilityID)
          Returns the default argument/parameter to add to the given Ability by ID() when gained by the class, race, clan ID, optionally also checking the All-Qualifies list.
 int getDefaultProficiency(java.lang.String ID, boolean checkAll, java.lang.String abilityID)
          Returns the default proficiency to give to the given Ability by ID() when gained by the class, race, clan ID, optionally also checking the All-Qualifies list.
 java.lang.String getExtraMask(java.lang.String ID, boolean checkAll, java.lang.String abilityID)
          Returns the zapper mask that applies to the given class or race for the given ability ID(), optionally checking the All-Qualifies list or not.
 java.util.List<java.lang.String> getLevelListings(java.lang.String ID, boolean checkAll, int level)
          Returns the AbilityIDs of all the skills qualified for by the given char class or race or whatever, at the given level, and optionally including the all-qualified skills.
 Converter<java.lang.String,AbilityMapper.AbilityMapping> getMapper(java.lang.String classID)
          Returns a converter from an ability id to an ability mapping
 int getMaxProficiency(MOB mob, boolean checkAll, java.lang.String abilityID)
          Returns the max allowed proficiency for those with the given Ability by ID() when carried by the mob by class, race, clan ID, optionally also checking the All-Qualifies list.
 int getMaxProficiency(java.lang.String abilityID)
          Returns the max allowed proficiency for those with the given Ability by ID() when carried by any class, race, clan ID, while also checking the All-Qualifies list.
 int getMaxProficiency(java.lang.String ID, boolean checkAll, java.lang.String abilityID)
          Returns the max allowed proficiency for those with the given Ability by ID() when carried by the class, race, clan ID, optionally also checking the All-Qualifies list.
 java.lang.String getPreReqStrings(java.lang.String ID, boolean checkAll, java.lang.String abilityID)
          Gets the raw pre-requisites definition for the given mapping by class, race, clan ID and ability ID(), optionally also checking the All-Qualifies list.
 int getQualifyingLevel(java.lang.String ID, boolean checkAll, java.lang.String abilityID)
          Returns the level at which the given class or race qualifies for the given ability ID(), optionally checking the All-Qualifies list or not.
 AbilityMapper.AbilityMapping getQualifyingMapping(java.lang.String ID, boolean checkAll, java.lang.String abilityID)
          Returns the mapping which the given class or race qualifies for the given ability ID(), optionally checking the All-Qualifies list or not.
 java.util.List<AbilityMapper.AbilityMapping> getQualifyingMappings(boolean checkAll, java.lang.String abilityID)
          Returns the mappings which any class or race qualifies for the given ability ID(), optionally checking the All-Qualifies list or not.
 boolean getSecretSkill(MOB mob, java.lang.String abilityID)
          Returns whether the given ability ID() represents a skill that is secret to the given mob, by whatever class, race, or clan they qualify for it by.
 boolean getSecretSkill(java.lang.String abilityID)
          Returns whether the given Ability ID() is secret in every mapping (race, class, govt clan id, all qualifies) or not.
 boolean getSecretSkill(java.lang.String ID, boolean checkAll, java.lang.String abilityID)
          Returns whether the given ability, for the given charclass, race, or clan government ID, and optionally checking the All Qualifies list, is a secret skill, or whether it can be seen and known about.
 DVector getUnmetPreRequisites(MOB studentM, Ability A)
          Given a mob who wants to learn the given Ability skill, this method will check the mob (by race/class/whatever) against the ability they qualify for, determining if there are any pre-requisite skills needed to learn this skill.
 java.util.List<AbilityMapper.AbilityMapping> getUpToLevelListings(java.lang.String ID, int level, boolean ignoreAll, boolean gainedOnly)
          Returns the full AbilityMappings of all the skills qualified for by the given char class or race or whatever, at every level up to and including the given level, and optionally excluding the all-qualified skills and non-gained skills.
 CMObject lowestQualifyingClassRaceGovt(MOB studentM, Ability A)
          Returns the class, race, or clan government object that qualifies the given mob at the lowest level for the given ability.
 int lowestQualifyingLevel(java.lang.String abilityID)
          Returns the lowest class level at which any class qualifies for the given ability, returning 0 if non found.
 AbilityMapper.AbilityMapping makeAbilityMapping(java.lang.String ID, int qualLevel, java.lang.String abilityID, int defaultProficiency, int maxProficiency, java.lang.String defaultParam, boolean autoGain, boolean secret, boolean isAllQualified, java.util.List<java.lang.String> preReqSkillsList, java.lang.String extraMask, java.lang.Integer[] costOverrides)
          Creates a raw Ability Mapping object.
 AbilityMapper.AbilityMapping newAbilityMapping()
          Creates a new, blank ability mapping object
 int numMappedAbilities()
          Returns the total number of abilities mapped to a class or race or something.
 boolean qualifiesByAnyCharClass(java.lang.String abilityID)
          Returns whether the given Ability ID() represents a skill qualified for by any existing character class, including All-Qualified abilities.
 boolean qualifiesByAnyCharClassOrRace(java.lang.String abilityID)
          Returns whether the given Ability ID() represents a skill qualified for by any existing character class, or race, including All-Qualified abilities.
 boolean qualifiesByCurrentClassAndLevel(MOB studentM, Ability A)
          Returns whether the given mob qualifies for the given ability only because of their current class at its current level.
 boolean qualifiesByLevel(MOB studentM, Ability A)
          Returns whether the given mob qualifies for the given ability because of any of their char classes at its current level, race, or clan.
 boolean qualifiesByLevel(MOB studentM, java.lang.String abilityID)
          Returns whether the given mob qualifies for the given ability because of any of their char classes at its current level, race, or clan.
 boolean qualifiesOnlyByACharClass(MOB studentM, Ability A)
          Returns whether the given mob qualifies for the given ability only because of their a char class they have, at its current level.
 boolean qualifiesOnlyByClan(MOB studentM, Ability A)
          Returns whether the given mob qualifies for the given ability only because of their clan affiliations.
 boolean qualifiesOnlyByRace(MOB studentM, Ability A)
          Returns whether the given mob qualifies for the given ability only because of their race.
 int qualifyingClassLevel(MOB studentM, Ability A)
          Returns the lowest char class level at which the given mob (by race or class) qualified for the given ability if any.
 java.lang.String qualifyingID(MOB studentM, Ability A)
          Returns the CharClass ID, Race ID, Clan Govt ID, etc or whatever by which the student BEST qualifies for the given Ability.
 int qualifyingLevel(MOB studentM, Ability A)
          Returns the lowest class or player level at which the given mob (by race or class) qualified for the given ability if any.
 void saveAllQualifysFile(java.util.Map<java.lang.String,java.util.Map<java.lang.String,AbilityMapper.AbilityMapping>> newMap)
          Saves the All-Qualifies list to the filesystem.
 
Methods inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.CMLibrary
activate, getServiceClient, L, propertiesLoaded, shutdown
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, name, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

addCharAbilityMapping

AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID,
                                                   int qualLevel,
                                                   java.lang.String abilityID,
                                                   boolean autoGain)
Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID. Also allows specifying numerous other attributes.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
qualLevel - the charclass or race player level at which one qualifies to receive the ability
abilityID - the Ability ID()
autoGain - true if the player/race automatically gets the ability, false if they must pay COSTs
Returns:
the finished AbilityMapping
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[]), delCharAbilityMapping(String, String), addCharAbilityMapping(String, int, String, boolean, List)

addCharAbilityMapping

AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID,
                                                   int qualLevel,
                                                   java.lang.String abilityID,
                                                   boolean autoGain,
                                                   java.util.List<java.lang.String> preReqSkillsList)
Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID. Also allows specifying numerous other attributes.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
qualLevel - the charclass or race player level at which one qualifies to receive the ability
abilityID - the Ability ID()
autoGain - true if the player/race automatically gets the ability, false if they must pay COSTs
preReqSkillsList - String list of required Ability IDs with optional min. proff in parenthesis
Returns:
the finished AbilityMapping
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[]), delCharAbilityMapping(String, String), addCharAbilityMapping(String, int, String, boolean), addCharAbilityMapping(String, int, String, boolean, String)

addCharAbilityMapping

AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID,
                                                   int qualLevel,
                                                   java.lang.String abilityID,
                                                   boolean autoGain,
                                                   java.lang.String extraMasks)
Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID. Also allows specifying numerous other attributes.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
qualLevel - the charclass or race player level at which one qualifies to receive the ability
abilityID - the Ability ID()
autoGain - true if the player/race automatically gets the ability, false if they must pay COSTs
extraMasks - a zappermask for the player with any miscellaneough requirements
Returns:
the finished AbilityMapping
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[]), delCharAbilityMapping(String, String), addCharAbilityMapping(String, int, String, boolean, List), addCharAbilityMapping(String, int, String, boolean, List, String)

addCharAbilityMapping

AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID,
                                                   int qualLevel,
                                                   java.lang.String abilityID,
                                                   boolean autoGain,
                                                   java.util.List<java.lang.String> preReqSkillsList,
                                                   java.lang.String extraMasks)
Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID. Also allows specifying numerous other attributes.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
qualLevel - the charclass or race player level at which one qualifies to receive the ability
abilityID - the Ability ID()
autoGain - true if the player/race automatically gets the ability, false if they must pay COSTs
preReqSkillsList - String list of required Ability IDs with optional min. proff in parenthesis
extraMasks - a zappermask for the player with any miscellaneough requirements
Returns:
the finished AbilityMapping
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[]), delCharAbilityMapping(String, String), addCharAbilityMapping(String, int, String, boolean, String), addCharAbilityMapping(String, int, String, int, String, boolean)

addCharAbilityMapping

AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID,
                                                   int qualLevel,
                                                   java.lang.String abilityID,
                                                   int defaultProficiency,
                                                   java.lang.String defaultParam,
                                                   boolean autoGain)
Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID. Also allows specifying numerous other attributes.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
qualLevel - the charclass or race player level at which one qualifies to receive the ability
abilityID - the Ability ID()
defaultProficiency - the initial proficiency at which this mapping bestows the ability
defaultParam - if the Ability allows parameters, these are the parameters this mapping gives
autoGain - true if the player/race automatically gets the ability, false if they must pay COSTs
Returns:
the finished AbilityMapping
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[]), delCharAbilityMapping(String, String), addCharAbilityMapping(String, int, String, boolean, List, String), addCharAbilityMapping(String, int, String, int, boolean)

addCharAbilityMapping

AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID,
                                                   int qualLevel,
                                                   java.lang.String abilityID,
                                                   int defaultProficiency,
                                                   boolean autoGain)
Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID. Also allows specifying numerous other attributes.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
qualLevel - the charclass or race player level at which one qualifies to receive the ability
abilityID - the Ability ID()
defaultProficiency - the initial proficiency at which this mapping bestows the ability
autoGain - true if the player/race automatically gets the ability, false if they must pay COSTs
Returns:
the finished AbilityMapping
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[]), delCharAbilityMapping(String, String), addCharAbilityMapping(String, int, String, int, String, boolean), addCharAbilityMapping(String, int, String, int, String, boolean, boolean)

addCharAbilityMapping

AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID,
                                                   int qualLevel,
                                                   java.lang.String abilityID,
                                                   int defaultProficiency,
                                                   boolean autoGain,
                                                   java.util.List<java.lang.String> skillPreReqs)
Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID. Also allows specifying numerous other attributes.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
qualLevel - the charclass or race player level at which one qualifies to receive the ability
abilityID - the Ability ID()
defaultProficiency - the initial proficiency at which this mapping bestows the ability
autoGain - true if the player/race automatically gets the ability, false if they must pay COSTs
skillPreReqs - String list of required Ability IDs with optional min. proff in parenthesis
Returns:
the finished AbilityMapping
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[]), delCharAbilityMapping(String, String), addCharAbilityMapping(String, int, String, int, String, boolean), addCharAbilityMapping(String, int, String, int, String, boolean, boolean)

addCharAbilityMapping

AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID,
                                                   int qualLevel,
                                                   java.lang.String abilityID,
                                                   int defaultProficiency,
                                                   java.lang.String defaultParam,
                                                   boolean autoGain,
                                                   boolean secret)
Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID. Also allows specifying numerous other attributes.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
qualLevel - the charclass or race player level at which one qualifies to receive the ability
abilityID - the Ability ID()
defaultProficiency - the initial proficiency at which this mapping bestows the ability
defaultParam - if the Ability allows parameters, these are the parameters this mapping gives
autoGain - true if the player/race automatically gets the ability, false if they must pay COSTs
secret - true if this mapping is NOT available to Qualify and WillQualify commands, false if it is.
Returns:
the finished AbilityMapping
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[]), delCharAbilityMapping(String, String), addCharAbilityMapping(String, int, String, int, boolean), addCharAbilityMapping(String, int, String, int, String, boolean, boolean, List, String)

addCharAbilityMapping

AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID,
                                                   int qualLevel,
                                                   java.lang.String abilityID,
                                                   int defaultProficiency,
                                                   java.lang.String defaultParam,
                                                   boolean autoGain,
                                                   boolean secret,
                                                   java.util.List<java.lang.String> preReqSkillsList,
                                                   java.lang.String extraMask)
Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID. Also allows specifying numerous other attributes.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
qualLevel - the charclass or race player level at which one qualifies to receive the ability
abilityID - the Ability ID()
defaultProficiency - the initial proficiency at which this mapping bestows the ability
defaultParam - if the Ability allows parameters, these are the parameters this mapping gives
autoGain - true if the player/race automatically gets the ability, false if they must pay COSTs
secret - true if this mapping is NOT available to Qualify and WillQualify commands, false if it is.
preReqSkillsList - String list of required Ability IDs with optional min. proff in parenthesis
extraMask - a zappermask for the player with any miscellaneough requirements
Returns:
the finished AbilityMapping
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[]), delCharAbilityMapping(String, String), addCharAbilityMapping(String, int, String, int, String, boolean, boolean), addCharAbilityMapping(String, int, String, int, int, String, boolean, boolean, List, String, Integer[])

addCharAbilityMapping

AbilityMapper.AbilityMapping addCharAbilityMapping(java.lang.String ID,
                                                   int qualLevel,
                                                   java.lang.String abilityID,
                                                   int defaultProficiency,
                                                   int maxProficiency,
                                                   java.lang.String defaultParam,
                                                   boolean autoGain,
                                                   boolean secret,
                                                   java.util.List<java.lang.String> preReqSkillsList,
                                                   java.lang.String extraMask,
                                                   java.lang.Integer[] costOverrides)
Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID. Also allows specifying numerous other attributes.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
qualLevel - the charclass or race player level at which one qualifies to receive the ability
abilityID - the Ability ID()
defaultProficiency - the initial proficiency at which this mapping bestows the ability
maxProficiency - the maximum proficiency that this mapping allows (100 default)
defaultParam - if the Ability allows parameters, these are the parameters this mapping gives
autoGain - true if the player/race automatically gets the ability, false if they must pay COSTs
secret - true if this mapping is NOT available to Qualify and WillQualify commands, false if it is.
preReqSkillsList - String list of required Ability IDs with optional min. proff in parenthesis
extraMask - a zappermask for the player with any miscellaneough requirements
costOverrides - overrides of the CMProps-based cost formulas for gaining this skill
Returns:
the finished AbilityMapping
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[]), delCharAbilityMapping(String, String), addCharAbilityMapping(String, int, String, int, String, boolean, boolean, List, String), addDynaAbilityMapping(String, int, String, int, String, boolean, boolean, String)

makeAbilityMapping

AbilityMapper.AbilityMapping makeAbilityMapping(java.lang.String ID,
                                                int qualLevel,
                                                java.lang.String abilityID,
                                                int defaultProficiency,
                                                int maxProficiency,
                                                java.lang.String defaultParam,
                                                boolean autoGain,
                                                boolean secret,
                                                boolean isAllQualified,
                                                java.util.List<java.lang.String> preReqSkillsList,
                                                java.lang.String extraMask,
                                                java.lang.Integer[] costOverrides)
Creates a raw Ability Mapping object.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
qualLevel - the charclass or race player level at which one qualifies to receive the ability
abilityID - the Ability ID()
defaultProficiency - the initial proficiency at which this mapping bestows the ability
maxProficiency - the maximum proficiency that this mapping allows (100 default)
defaultParam - if the Ability allows parameters, these are the parameters this mapping gives
autoGain - true if the player/race automatically gets the ability, false if they must pay COSTs
secret - true if this mapping is NOT available to Qualify and WillQualify commands, false if it is.
isAllQualified - true if all classes qualify for this skill, as from the All Qualifies list.
preReqSkillsList - String list of required Ability IDs with optional min. proff in parenthesis
extraMask - a zappermask for the player with any miscellaneough requirements
costOverrides - overrides of the CMProps-based cost formulas for gaining this skill
Returns:
the finished AbilityMapping
See Also:
AbilityMapper.AbilityMapping, delCharAbilityMapping(String, String), newAbilityMapping()

newAbilityMapping

AbilityMapper.AbilityMapping newAbilityMapping()
Creates a new, blank ability mapping object

Returns:
a new, blank ability mapping object
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[])

addDynaAbilityMapping

AbilityMapper.AbilityMapping addDynaAbilityMapping(java.lang.String ID,
                                                   int qualLevel,
                                                   java.lang.String abilityID,
                                                   int defaultProficiency,
                                                   java.lang.String defaultParam,
                                                   boolean autoGain,
                                                   boolean secret,
                                                   java.lang.String extraMask)
Adds a mapping between a charclass, race, or whatever, and an Ability, by String Ability ID. Also allows specifying numerous other attributes. Substantially identical to methods like addCharAbilityMapping(String, int, String, int, String, boolean, boolean, List, String) except that the Each/global ability mappings are not initialized if this is the first class mapping, meaning it's best to call this at runtime instead of boot time.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
qualLevel - the charclass or race player level at which one qualifies to receive the ability
abilityID - the Ability ID()
defaultProficiency - the initial proficiency at which this mapping bestows the ability
defaultParam - if the Ability allows parameters, these are the parameters this mapping gives
autoGain - true if the player/race automatically gets the ability, false if they must pay COSTs
secret - true if this mapping is NOT available to Qualify and WillQualify commands, false if it is.
extraMask - a zappermask for the player with any miscellaneough requirements
Returns:
the finished AbilityMapping
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[]), delCharAbilityMapping(String, String), addCharAbilityMapping(String, int, String, int, int, String, boolean, boolean, List, String, Integer[])

delCharAbilityMapping

AbilityMapper.AbilityMapping delCharAbilityMapping(java.lang.String ID,
                                                   java.lang.String abilityID)
Removes the specified mapping between charclass, race, or whatever, and an Ability, by String ability ID.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
abilityID - the Ability ID()
Returns:
the mapping removed
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[]), addCharAbilityMapping(String, int, String, int, int, String, boolean, boolean, List, String, Integer[]), delCharMappings(String)

delCharMappings

void delCharMappings(java.lang.String ID)
Removes all ability mappings for the given charclass, race, or whatever.

Parameters:
ID - the race ID(), charclass ID(), "All" is also acceptable.
See Also:
AbilityMapper.AbilityMapping, makeAbilityMapping(String, int, String, int, int, String, boolean, boolean, boolean, List, String, Integer[]), addCharAbilityMapping(String, int, String, int, int, String, boolean, boolean, List, String, Integer[]), delCharAbilityMapping(String, String)

addPreRequisites

void addPreRequisites(java.lang.String ID,
                      java.util.List<java.lang.String> preReqSkillsList,
                      java.lang.String extraMask)
Adds to the list of allowed skills, expertises, etc that come from the requirements listed for the given skill. Used mostly by the Expertise system, but also used by the class system to cross-reference skill requirements.

Parameters:
ID - the Ability ID of the skill gaining pre-requisites
preReqSkillsList - the formatted list of prereqs, typically Ability IDs.
extraMask - a zappermask of other requirements that a person must have for the skill

getClassAbles

java.util.Enumeration<AbilityMapper.AbilityMapping> getClassAbles(java.lang.String ID,
                                                                  boolean addAll)
Returns an enumeration of all the AbilityMapping object for all the abilities the given class, race, whatever qualifies for ever. Will include common (all qualified) abilities if specified.

Parameters:
ID - the race ID(), charclass ID(), etc
addAll - true to include all-qualified abilities, false for just class unique
Returns:
an enumeration of AbilityMapping objects
See Also:
AbilityMapper.AbilityMapping

lowestQualifyingLevel

int lowestQualifyingLevel(java.lang.String abilityID)
Returns the lowest class level at which any class qualifies for the given ability, returning 0 if non found.

Parameters:
abilityID - the ability ID()
Returns:
the lowest qualifying level

getCalculatedMedianLowestQualifyingLevel

int getCalculatedMedianLowestQualifyingLevel()
Returns the median lowest qualifying level for all abilities, given you an idea of the middle-skill-gaining levels, for some reason.

Returns:
the median lowest qualifying level for all abilities

getLevelListings

java.util.List<java.lang.String> getLevelListings(java.lang.String ID,
                                                  boolean checkAll,
                                                  int level)
Returns the AbilityIDs of all the skills qualified for by the given char class or race or whatever, at the given level, and optionally including the all-qualified skills.

Parameters:
ID - the charclass ID(), race ID(), or whatever
checkAll - true to check the All Qualifies list, or false otherwise
level - the specific level to check.
Returns:
the AbilityIDs of all the skills qualified for at that level
See Also:
getUpToLevelListings(String, int, boolean, boolean)

getUpToLevelListings

java.util.List<AbilityMapper.AbilityMapping> getUpToLevelListings(java.lang.String ID,
                                                                  int level,
                                                                  boolean ignoreAll,
                                                                  boolean gainedOnly)
Returns the full AbilityMappings of all the skills qualified for by the given char class or race or whatever, at every level up to and including the given level, and optionally excluding the all-qualified skills and non-gained skills.

Parameters:
ID - the charclass ID(), race ID(), or whatever
level - the specific level to check.
ignoreAll - true to ignore the All Qualifies list, or false otherwise
gainedOnly - true to only include the auto-gain-only skills, false otherwise
Returns:
the AbilityIDs of all the skills qualified for at that level
See Also:
getLevelListings(String, boolean, int)

getAbleMapping

java.util.Map<java.lang.String,AbilityMapper.AbilityMapping> getAbleMapping(java.lang.String ID)
Returns the raw Ability mappings for the given class, race, or clan ID. Does nto include all-qualified.

Parameters:
ID - the charclass ID(), race ID(), or whatever
Returns:
the map of AbilityIDs to their ability mappings.

getQualifyingLevel

int getQualifyingLevel(java.lang.String ID,
                       boolean checkAll,
                       java.lang.String abilityID)
Returns the level at which the given class or race qualifies for the given ability ID(), optionally checking the All-Qualifies list or not. Returns -1 for no match.

Parameters:
ID - the charclass ID(), race ID(), or whatever
checkAll - true to check the All Qualifies list, false to skip it
abilityID - the Ability ID() to find a level for
Returns:
the level at which the give class or race qualifies, or -1
See Also:
qualifyingLevel(MOB, Ability), qualifyingClassLevel(MOB, Ability), lowestQualifyingClassRaceGovt(MOB, Ability)

getQualifyingMapping

AbilityMapper.AbilityMapping getQualifyingMapping(java.lang.String ID,
                                                  boolean checkAll,
                                                  java.lang.String abilityID)
Returns the mapping which the given class or race qualifies for the given ability ID(), optionally checking the All-Qualifies list or not. Returns null for no match.

Parameters:
ID - the charclass ID(), race ID(), or whatever
checkAll - true to check the All Qualifies list, false to skip it
abilityID - the Ability ID() to find a map for
Returns:
the level at which the give class or race qualifies, or null
See Also:
qualifyingLevel(MOB, Ability), qualifyingClassLevel(MOB, Ability), lowestQualifyingClassRaceGovt(MOB, Ability)

getQualifyingMappings

java.util.List<AbilityMapper.AbilityMapping> getQualifyingMappings(boolean checkAll,
                                                                   java.lang.String abilityID)
Returns the mappings which any class or race qualifies for the given ability ID(), optionally checking the All-Qualifies list or not. Returns empty list for no match.

Parameters:
checkAll - true to check the All Qualifies list, false to skip it
abilityID - the Ability ID() to find a map for
Returns:
the level at which the give class or race qualifies, or null
See Also:
qualifyingLevel(MOB, Ability), qualifyingClassLevel(MOB, Ability), lowestQualifyingClassRaceGovt(MOB, Ability)

qualifyingLevel

int qualifyingLevel(MOB studentM,
                    Ability A)
Returns the lowest class or player level at which the given mob (by race or class) qualified for the given ability if any. Returns -1 for no match. This method is called when you are trying to guage how powerful the player is with the skill.

Parameters:
studentM - the mob, whose charclass ID(), race ID() are checked
A - the Ability to find a level for
Returns:
the best level at which the given mob qualified, or -1
See Also:
getQualifyingLevel(String, boolean, String), qualifyingClassLevel(MOB, Ability), lowestQualifyingClassRaceGovt(MOB, Ability)

qualifyingClassLevel

int qualifyingClassLevel(MOB studentM,
                         Ability A)
Returns the lowest char class level at which the given mob (by race or class) qualified for the given ability if any. Returns -1 for no match. This method is called when you are trying to guage how powerful the player is with the skill, and only care about class skills.

Parameters:
studentM - the mob, whose charclass ID() is checked
A - the Ability to find a level for
Returns:
the best char class level at which the given mob qualified, or -1
See Also:
getQualifyingLevel(String, boolean, String), qualifyingLevel(MOB, Ability), lowestQualifyingClassRaceGovt(MOB, Ability)

lowestQualifyingClassRaceGovt

CMObject lowestQualifyingClassRaceGovt(MOB studentM,
                                       Ability A)
Returns the class, race, or clan government object that qualifies the given mob at the lowest level for the given ability.

Parameters:
studentM - the mob whose class, race, etc to check
A - the Ability to check
Returns:
the char class, race, or clan government object.
See Also:
getQualifyingLevel(String, boolean, String), qualifyingLevel(MOB, Ability), qualifyingClassLevel(MOB, Ability)

qualifiesOnlyByClan

boolean qualifiesOnlyByClan(MOB studentM,
                            Ability A)
Returns whether the given mob qualifies for the given ability only because of their clan affiliations.

Parameters:
studentM - the mob to check
A - the ability to check
Returns:
true if the student only qualifies because of their clan
See Also:
qualifiesOnlyByRace(MOB, Ability), qualifiesByLevel(MOB, Ability), qualifiesByLevel(MOB, String), qualifiesOnlyByACharClass(MOB, Ability), qualifiesByCurrentClassAndLevel(MOB, Ability)

qualifiesOnlyByRace

boolean qualifiesOnlyByRace(MOB studentM,
                            Ability A)
Returns whether the given mob qualifies for the given ability only because of their race.

Parameters:
studentM - the mob to check
A - the ability to check
Returns:
true if the student only qualifies because of their race
See Also:
qualifiesOnlyByClan(MOB, Ability), qualifiesByLevel(MOB, Ability), qualifiesByLevel(MOB, String), qualifiesOnlyByACharClass(MOB, Ability), qualifiesByCurrentClassAndLevel(MOB, Ability)

qualifiesByCurrentClassAndLevel

boolean qualifiesByCurrentClassAndLevel(MOB studentM,
                                        Ability A)
Returns whether the given mob qualifies for the given ability only because of their current class at its current level.

Parameters:
studentM - the mob to check
A - the ability to check
Returns:
true if the student only qualifies because of their current char class
See Also:
qualifiesOnlyByClan(MOB, Ability), qualifiesByLevel(MOB, Ability), qualifiesByLevel(MOB, String), qualifiesOnlyByACharClass(MOB, Ability), qualifiesOnlyByRace(MOB, Ability)

qualifiesOnlyByACharClass

boolean qualifiesOnlyByACharClass(MOB studentM,
                                  Ability A)
Returns whether the given mob qualifies for the given ability only because of their a char class they have, at its current level.

Parameters:
studentM - the mob to check
A - the ability to check
Returns:
true if the student only qualifies because of a char class they have
See Also:
qualifiesOnlyByClan(MOB, Ability), qualifiesByLevel(MOB, Ability), qualifiesByLevel(MOB, String), qualifiesByCurrentClassAndLevel(MOB, Ability), qualifiesOnlyByRace(MOB, Ability)

qualifiesByLevel

boolean qualifiesByLevel(MOB studentM,
                         Ability A)
Returns whether the given mob qualifies for the given ability because of any of their char classes at its current level, race, or clan.

Parameters:
studentM - the mob to check
A - the ability to check
Returns:
true if the student qualifies because of their classes, race, etc
See Also:
qualifiesOnlyByClan(MOB, Ability), qualifiesByLevel(MOB, Ability), qualifiesByLevel(MOB, String), qualifiesByCurrentClassAndLevel(MOB, Ability), qualifiesOnlyByRace(MOB, Ability)

qualifiesByLevel

boolean qualifiesByLevel(MOB studentM,
                         java.lang.String abilityID)
Returns whether the given mob qualifies for the given ability because of any of their char classes at its current level, race, or clan.

Parameters:
studentM - the mob to check
abilityID - the Ability ID() to check
Returns:
true if the student qualifies because of their classes, race, etc
See Also:
qualifiesOnlyByClan(MOB, Ability), qualifiesByLevel(MOB, Ability), qualifiesByLevel(MOB, String), qualifiesByCurrentClassAndLevel(MOB, Ability), qualifiesOnlyByRace(MOB, Ability)

qualifiesByAnyCharClass

boolean qualifiesByAnyCharClass(java.lang.String abilityID)
Returns whether the given Ability ID() represents a skill qualified for by any existing character class, including All-Qualified abilities.

Parameters:
abilityID - the ability ID()
Returns:
true if a class qualifies for it, false otherwise
See Also:
classOnly(String, String), classOnly(MOB, String, String)

qualifiesByAnyCharClassOrRace

boolean qualifiesByAnyCharClassOrRace(java.lang.String abilityID)
Returns whether the given Ability ID() represents a skill qualified for by any existing character class, or race, including All-Qualified abilities.

Parameters:
abilityID - the ability ID()
Returns:
true if a class or race qualifies for it, false otherwise
See Also:
classOnly(String, String), qualifiesByAnyCharClass(String)

classOnly

boolean classOnly(java.lang.String classID,
                  java.lang.String abilityID)
Returns whether the given class qualifies for the given ability. Does not check all-qualifies list, so this is only class (or race) specific qualifications. Returns true ONLY if the given class or race is the ONLY one who qualifies.

Parameters:
classID - the class ID(), race ID() or whatever
abilityID - the ability ID()
Returns:
true if the class qualifies for this ability
See Also:
classOnly(MOB, String, String), qualifiesByAnyCharClass(String)

classOnly

boolean classOnly(MOB mob,
                  java.lang.String classID,
                  java.lang.String abilityID)
Returns whether the given class qualifies for the given ability. Does not check all-qualifies list, so this is only class (or race) specific qualifications. Will also specifically check the given mobs class object with the given ID, which is strange. Returns true ONLY if the given class or race is the ONLY one who qualifies.

Parameters:
mob - the mob whose classes to also check
classID - the class ID(), race ID() or whatever to specifically check
abilityID - the ability ID() to use
Returns:
true if the class qualifies for this ability
See Also:
classOnly(String, String), qualifiesByAnyCharClass(String)

availableToTheme

boolean availableToTheme(java.lang.String abilityID,
                         int theme,
                         boolean publicly)
Discovers whether the given ability is qualified for by a class that is available to the given theme id number.

Parameters:
abilityID - the Ability ID()
theme - the theme code
publicly - true to disqualify skill-only masks, false to allow
Returns:
true if the ability is qualifies for by a char class of the theme
See Also:
Area.THEME_ALLTHEMES

numMappedAbilities

int numMappedAbilities()
Returns the total number of abilities mapped to a class or race or something.

Returns:
the total number of abilities mapped to a class or race or something.
See Also:
getAllAbleMap(String), getAbleMap(String, String)

getAllAbleMap

AbilityMapper.AbilityMapping getAllAbleMap(java.lang.String abilityID)
Returns the ability mapping that is defined by the All Qualifies list for the given Ability ID(), or null.

Parameters:
abilityID - the Ability ID()
Returns:
the ability mapping that is defined, or null
See Also:
AbilityMapper.AbilityMapping, numMappedAbilities(), getAbleMap(String, String)

getAbleMap

AbilityMapper.AbilityMapping getAbleMap(java.lang.String ID,
                                        java.lang.String abilityID)
Returns the ability mapping that is defined by the given char class, race, or clan ID for the given Ability ID(), or null.

Parameters:
ID - the CharClass ID(), Race ID(), or clan ID
abilityID - the Ability ID()
Returns:
the ability mapping that is defined, or null
See Also:
AbilityMapper.AbilityMapping, numMappedAbilities(), getAllAbleMap(String)

getAbilityAllowsList

java.util.Iterator<java.lang.String> getAbilityAllowsList(java.lang.String ableID)
Returns an iterator over the list of expertises and skills which having the given skill will allow.

Parameters:
ableID - the skill to get the allows list for
Returns:
an iterator over the list of expertises and skills
See Also:
getClassAllowsList(String)

getClassAllowsList

java.util.List<AbilityMapper.QualifyingID> getClassAllowsList(java.lang.String ID)
Returns the list of things allowed by skill which the given class/race/whatever qualifies over their life, along with qualifying levels. This is intended entirely for gathering expertises qualified for by class skills.

Parameters:
ID - the charclass ID(), race ID(), or whatever
Returns:
the list of skill and skill qualifying information for that class
See Also:
getAbilityAllowsList(String), AbilityMapper.QualifyingID

getExtraMask

java.lang.String getExtraMask(java.lang.String ID,
                              boolean checkAll,
                              java.lang.String abilityID)
Returns the zapper mask that applies to the given class or race for the given ability ID(), optionally checking the All-Qualifies list or not. Returns null for no match. The mask is checked against a potential learner of this skill.

Parameters:
ID - the charclass ID(), race ID(), or whatever
checkAll - true to check the All Qualifies list, false to skip it
abilityID - the Ability ID() to find a level for
Returns:
the zapper mask that applies
See Also:
MaskingLibrary

getApplicableMask

java.lang.String getApplicableMask(MOB studentM,
                                   Ability A)
Returns the first applicable zapper mask that applies to the given mob for the given ability. Returns null for nothing found. The mask is checked against a potential learner of this skill.

Parameters:
studentM - the mob, whose clans, charclass ID(), race ID() are checked
A - the Ability to find a mask for
Returns:
the zapper mask that applies
See Also:
MaskingLibrary

getCommonExtraMask

java.lang.String getCommonExtraMask(Ability A)
Returns the general zapper mask that defines the requirements to learn the given ability, by ID. The mask is applied to the learner mob.

Parameters:
A - the Ability whose ID is looked up
Returns:
the zapper mask, or ""
See Also:
MaskingLibrary

getUnmetPreRequisites

DVector getUnmetPreRequisites(MOB studentM,
                              Ability A)
Given a mob who wants to learn the given Ability skill, this method will check the mob (by race/class/whatever) against the ability they qualify for, determining if there are any pre-requisite skills needed to learn this skill. If they are found, it returns those pre-requisites, specially coded.

Parameters:
studentM - the mob who wants to learn
A - the Ability the mob wants to learn
Returns:
any pre-requisites, or null for none.
See Also:
getCommonPreRequisites(MOB, Ability), getCommonPreRequisites(Ability), formatPreRequisites(DVector), getPreReqStrings(String, boolean, String)

getCommonPreRequisites

DVector getCommonPreRequisites(Ability A)
Returns the coded form of the skill prerequisites for the given ability. Skill prerequisites are typically other skills needed to learn this one. They are called Common because, for the given ability, they apply to everyone.

Parameters:
A - the ability to look for prerequisites to learn
Returns:
the coded skill prerequisites
See Also:
getCommonPreRequisites(MOB, Ability), getUnmetPreRequisites(MOB, Ability), formatPreRequisites(DVector), getPreReqStrings(String, boolean, String)

getCommonPreRequisites

DVector getCommonPreRequisites(MOB mob,
                               Ability A)
Returns the coded form of the skill prerequisites for the given ability that apply to the given mob by race or class. Skill prerequisites are typically other skills needed to learn this one.

Parameters:
mob - the potential learner of the ability
A - the ability to look for prerequisites to learn
Returns:
the coded skill prerequisites
See Also:
getCommonPreRequisites(Ability), getUnmetPreRequisites(MOB, Ability), formatPreRequisites(DVector), getPreReqStrings(String, boolean, String)

formatPreRequisites

java.lang.String formatPreRequisites(DVector preReqs)
Given a set of common Ability/skill pre-requisites for learning, coded, this method will return those pre-requisites formatted in a friendly, readable form.

Parameters:
preReqs - the coded pre-requisites for this skill
Returns:
a friendly readable description of those pre-reqs
See Also:
getCommonPreRequisites(Ability), getUnmetPreRequisites(MOB, Ability), getCommonPreRequisites(MOB, Ability), getPreReqStrings(String, boolean, String)

getCurrentlyQualifyingIDs

java.util.List<java.lang.String> getCurrentlyQualifyingIDs(MOB studentM,
                                                           java.lang.String AID)
Returns the list of CharClass IDs, or Race IDs, or Clan Govt IDs, or whatever by which the given student might qualify for the given Ability ID.

Parameters:
studentM - the student to learn the ability
AID - the Ability ID
Returns:
the list of objects to qualify for the ability

qualifyingID

java.lang.String qualifyingID(MOB studentM,
                              Ability A)
Returns the CharClass ID, Race ID, Clan Govt ID, etc or whatever by which the student BEST qualifies for the given Ability.

Parameters:
studentM - the student
A - the Ability to qualify for
Returns:
the ID, or null for no match at all.

getPreReqStrings

java.lang.String getPreReqStrings(java.lang.String ID,
                                  boolean checkAll,
                                  java.lang.String abilityID)
Gets the raw pre-requisites definition for the given mapping by class, race, clan ID and ability ID(), optionally also checking the All-Qualifies list. Returns "" if not found, or there are no skill prerequisites. This is a formatted string where Ability IDs are generally semicolon delimited, with required proficiency in parenthesis.

Parameters:
ID - the charclass, race, or clan ID()
checkAll - true to check the All Qualifies list, or false not to
abilityID - the ability ID() to check
Returns:
the raw formatted pre-requisite string.
See Also:
getCommonPreRequisites(Ability), getUnmetPreRequisites(MOB, Ability), getCommonPreRequisites(MOB, Ability), formatPreRequisites(DVector)

getDefaultGain

boolean getDefaultGain(java.lang.String ID,
                       boolean checkAll,
                       java.lang.String abilityID)
Returns whether the given ability, for the given charclass, race, or clan government ID, and optionally checking the All Qualifies list, is gained by default or must be trained.

Parameters:
ID - the charclass, race, or clan ID()
checkAll - true to check the All Qualifies list, or false not to
abilityID - the ability ID() to check
Returns:
true if its gained automatically, or false if it must be trained

getAllQualified

boolean getAllQualified(java.lang.String ID,
                        boolean checkAll,
                        java.lang.String abilityID)
Returns whether the given ability, for the given charclass, race, or clan government ID, and optionally checking the All Qualifies list, is part of the All Qualified list.

Parameters:
ID - the charclass, race, or clan ID()
checkAll - true to check the All Qualifies list, or false not to
abilityID - the ability ID() to check
Returns:
true if the ability is part of the all qualifies list, false otherwise

getSecretSkill

boolean getSecretSkill(java.lang.String ID,
                       boolean checkAll,
                       java.lang.String abilityID)
Returns whether the given ability, for the given charclass, race, or clan government ID, and optionally checking the All Qualifies list, is a secret skill, or whether it can be seen and known about.

Parameters:
ID - the charclass, race, or clan ID()
checkAll - true to check the All Qualifies list, or false not to
abilityID - the ability ID() to check
Returns:
true if its secret, false otherwise

getAllSecretSkill

boolean getAllSecretSkill(java.lang.String abilityID)
Returns whether the given Ability ID() is both mapped on the All Qualifies list AND is a secret skill.

Parameters:
abilityID - the ability ID() to check
Returns:
true if its secret, false otherwise

getSecretSkill

boolean getSecretSkill(MOB mob,
                       java.lang.String abilityID)
Returns whether the given ability ID() represents a skill that is secret to the given mob, by whatever class, race, or clan they qualify for it by.

Parameters:
mob - the mob to check
abilityID - the ability ID() to check
Returns:
true if the ability is secret for this mob, false otherwise

getSecretSkill

boolean getSecretSkill(java.lang.String abilityID)
Returns whether the given Ability ID() is secret in every mapping (race, class, govt clan id, all qualifies) or not.

Parameters:
abilityID - the ability ID() to check
Returns:
true if its secret everywhere, false otherwise

getCostOverrides

java.lang.Integer[] getCostOverrides(java.lang.String ID,
                                     boolean checkAll,
                                     java.lang.String abilityID)
Returns any mapping-based overrides to the standard system white standards for casting costs (the amount of mana or moves to use a skill). The integer array is indexed by the ordinals of the Cost enum.

Parameters:
ID - the charclass, race, or clan ID()
checkAll - true to check the All Qualifies list, or false not to
abilityID - the ability ID() to check
Returns:
an integer array of the mapping-based overrides to usage costs
See Also:
AbilityMapper.Cost, getAllCostOverrides(String), getCostOverrides(String), getCostOverrides(MOB, String)

getAllCostOverrides

java.lang.Integer[] getAllCostOverrides(java.lang.String abilityID)
Returns any All-Qualifies overrides to the standard system white standards for casting costs (the amount of mana or moves to use a skill). The integer array is indexed by the ordinals of the Cost enum.

Parameters:
abilityID - the ability ID() to check
Returns:
an integer array of the mapping-based overrides to usage costs
See Also:
AbilityMapper.Cost, getCostOverrides(String, boolean, String), getCostOverrides(String), getCostOverrides(MOB, String)

getCostOverrides

java.lang.Integer[] getCostOverrides(MOB mob,
                                     java.lang.String abilityID)
Returns any mapping-based overrides to the standard system white standards for casting costs (the amount of mana or moves to use a skill) relevant to the given mob, based on their class, race, etc. The integer array is indexed by the ordinals of the Cost enum.

Parameters:
mob - the mob whose charclass, race, or clan ID() is relevant
abilityID - the ability ID() to check
Returns:
an integer array of the mapping-based overrides to usage costs
See Also:
AbilityMapper.Cost, getAllCostOverrides(String), getCostOverrides(String), getCostOverrides(String, boolean, String)

getCostOverrides

java.lang.Integer[] getCostOverrides(java.lang.String abilityID)
Returns the first mapping-based override to the standard system white standards for casting costs (the amount of mana or moves to use a skill). The integer array is indexed by the ordinals of the Cost enum.

Parameters:
abilityID - the ability ID() to check
Returns:
an integer array of the mapping-based overrides to usage costs
See Also:
AbilityMapper.Cost, getCostOverrides(String, boolean, String), getAllCostOverrides(String), getCostOverrides(MOB, String)

getDefaultParm

java.lang.String getDefaultParm(java.lang.String ID,
                                boolean checkAll,
                                java.lang.String abilityID)
Returns the default argument/parameter to add to the given Ability by ID() when gained by the class, race, clan ID, optionally also checking the All-Qualifies list. The argument is sent as the misc-text to the Ability when adding it as a skill.

Parameters:
ID - the charclass, race, or clan ID()
checkAll - true to check the All Qualifies list, or false not to
abilityID - the ability ID() to check
Returns:
the default misc-text arguments for this mapped Ability
See Also:
Environmental.setMiscText(String)

getDefaultProficiency

int getDefaultProficiency(java.lang.String ID,
                          boolean checkAll,
                          java.lang.String abilityID)
Returns the default proficiency to give to the given Ability by ID() when gained by the class, race, clan ID, optionally also checking the All-Qualifies list.

Parameters:
ID - the charclass, race, or clan ID()
checkAll - true to check the All Qualifies list, or false not to
abilityID - the ability ID() to check
Returns:
the default proficiency argument for this mapped Ability, usually 0
See Also:
Ability.proficiency(), getMaxProficiency(MOB, boolean, String)

getMaxProficiency

int getMaxProficiency(java.lang.String ID,
                      boolean checkAll,
                      java.lang.String abilityID)
Returns the max allowed proficiency for those with the given Ability by ID() when carried by the class, race, clan ID, optionally also checking the All-Qualifies list.

Parameters:
ID - the charclass, race, or clan ID()
checkAll - true to check the All Qualifies list, or false not to
abilityID - the ability ID() to check
Returns:
the max proficiency for someone with this this mapped Ability, usually 100
See Also:
Ability.proficiency(), getMaxProficiency(String), getMaxProficiency(String, boolean, String)

getMaxProficiency

int getMaxProficiency(java.lang.String abilityID)
Returns the max allowed proficiency for those with the given Ability by ID() when carried by any class, race, clan ID, while also checking the All-Qualifies list.

Parameters:
abilityID - the ability ID() to check
Returns:
the max proficiency for everyone with this this mapped Ability, usually 100
See Also:
getMaxProficiency(MOB, boolean, String), getMaxProficiency(String, boolean, String), Ability.proficiency()

getMaxProficiency

int getMaxProficiency(MOB mob,
                      boolean checkAll,
                      java.lang.String abilityID)
Returns the max allowed proficiency for those with the given Ability by ID() when carried by the mob by class, race, clan ID, optionally also checking the All-Qualifies list.

Parameters:
mob - the mob whose charclass, race, or clan ID() applies
checkAll - true to check the All Qualifies list, or false not to
abilityID - the ability ID() to check
Returns:
the max proficiency for the mob with this this mapped Ability, usually 100
See Also:
Ability.proficiency(), getDefaultProficiency(String, boolean, String), getMaxProficiency(String), getMaxProficiency(String, boolean, String)

getAllQualifiesMap

java.util.Map<java.lang.String,java.util.Map<java.lang.String,AbilityMapper.AbilityMapping>> getAllQualifiesMap(java.util.Map<java.lang.String,java.lang.Object> cache)
Loads the All-Qualifies list from the filesystem. This is the list that defines particular skills that either ALL classes qualify for together. Things like Skill_Write, or Swim.. The method takes an optional cache to preserve a loaded map over several sessions. Otherwise, it is usually only needed once.

Parameters:
cache - a cache to store the map in temporarily, or null
Returns:
the All-Qualifies skills in a coded map
See Also:
saveAllQualifysFile(Map)

getMapper

Converter<java.lang.String,AbilityMapper.AbilityMapping> getMapper(java.lang.String classID)
Returns a converter from an ability id to an ability mapping

Parameters:
classID - the classid (or 'all') that owns the mapping
Returns:
the converter

saveAllQualifysFile

void saveAllQualifysFile(java.util.Map<java.lang.String,java.util.Map<java.lang.String,AbilityMapper.AbilityMapping>> newMap)
Saves the All-Qualifies list to the filesystem. This is the list that defines particular skills that either ALL classes qualify for together. Things like Skill_Write, or Swim.

Parameters:
newMap - the All-Qualifies skills in a coded map
See Also:
getAllQualified(String, boolean, String)

getAvailabilityList

PairList<java.lang.String,java.lang.Integer> getAvailabilityList(Ability A,
                                                                 int abbreviateAt)
Returns a String list of all the classes and levels that qualify for the given skill. If more than the given abbreviateAt skills qualify, then the list will start abstracting the list by returning abstract terms instead of class ids.

Parameters:
A - the skill to get a list of qualifiers for
abbreviateAt - the number of classes beyond which is starts aggregating
Returns:
a list of class ids/aggregate strings and levels