ColumbiaUniv
public interface ExpertiseLibrary extends CMLibrary
Modifier and Type | Interface | Description |
---|---|---|
static interface |
ExpertiseLibrary.ExpertiseDefinition |
Class definiing a single level of a particular expertise, along
with all requirements to gain it.
|
static class |
ExpertiseLibrary.XType |
The Expertise Type num, which describes what skill aspect that this expertise
will modify
|
idConverter
Modifier and Type | Method | Description |
---|---|---|
boolean |
addModifyDefinition(java.lang.String codedLine,
boolean andSave) |
Adds a temporary or permanent expertise and all of its stage
definitions from a coded string.
|
boolean |
canBeTaught(MOB teacher,
MOB student,
Environmental item,
java.lang.String msg) |
Given an Ability or ExpertiseDefinition, or msg containing a learn coded string,
this will return whether the given teacher can teach, and the given student can
learn the ability or expertise.
|
boolean |
confirmAndTeach(MOB teacherM,
MOB studentM,
CMObject teachableO,
java.lang.Runnable callBack) |
Given a teacher, student, and either an Ability or Expertise, this method
will confirm the lesson with the student, and call the Runnable if approval
is given.
|
java.lang.String |
confirmExpertiseLine(java.lang.String row,
java.lang.String ID,
boolean addIfPossible) |
Validate the syntax of a coded expertise definition line,
returning a readable error if found.
|
java.util.Enumeration<ExpertiseLibrary.ExpertiseDefinition> |
definitions() |
Returns an enumeration of all expertise stage definitions
|
boolean |
delDefinition(java.lang.String ID,
boolean andSave) |
Can delete either a single definition stage, or all stages of a expertise,
and optionally save.
|
java.util.Iterator<java.lang.String> |
filterUniqueExpertiseIDList(java.util.Iterator<java.lang.String> i) |
Given an iterator of expertise stage ids, this will return an iterator
of unique expertise stage ids, filtering out other later stages.
|
ExpertiseLibrary.ExpertiseDefinition |
findDefinition(java.lang.String ID,
boolean exactOnly) |
Find an expertise stage definition by name or id
|
java.lang.String |
findExpertiseID(java.lang.String ID,
boolean exact) |
Finds the expertise ID being searched for, or null
|
java.lang.String |
getApplicableExpertise(java.lang.String abilityID,
ExpertiseLibrary.XType code) |
Returns the base expertise id that applies to the given ability and expertise type
|
java.lang.String[] |
getApplicableExpertises(java.lang.String abilityID,
ExpertiseLibrary.XType code) |
Returns all stage expertise ids that apply to the given ability and
expertise type.
|
ExpertiseLibrary.ExpertiseDefinition |
getConfirmedDefinition(MOB mob,
java.lang.String ID) |
Given a mob and expertise id, this method will return the definition for the
expertise that the mob actually has, if it is the same.
|
ExpertiseLibrary.ExpertiseDefinition |
getDefinition(java.lang.String ID) |
Returns a single expertise stage definition
|
java.lang.String |
getExpertiseHelp(java.lang.String ID) |
Gets the help/info about a specific expertise stage.
|
java.lang.String |
getExpertiseInstructions() |
Returns the instructions for the coded line version of
base expertise definitions.
|
int |
getExpertiseLevelCached(MOB mob,
java.lang.String abilityID,
ExpertiseLibrary.XType code) |
If the given mob has an expertise that applies the given
expertise type to the given ability id, then this method will
return how many levels of that expertise the mob has, or 0
if none.
|
int |
getExpertiseLevelCalced(MOB mob,
java.lang.String abilityID,
ExpertiseLibrary.XType code) |
If the given mob has an expertise that applies the given
expertise type to the given ability id, then this method will
return how many levels of that expertise the mob has, or 0
if none.
|
int |
getHighestListableStageBySkill(MOB mob,
java.lang.String ableID,
ExpertiseLibrary.XType flag) |
Finds the expertise that applies to the given mob and ability id and expertise
type, and then returns the highest stage that is qualified for by the mob.
|
java.util.List<java.lang.String> |
getPeerStageCodes(java.lang.String expertiseCode) |
Returns the other individual expertise stage ids for
all stages in the base expertise as the given full
stage expertise id.
|
java.util.List<java.lang.String> |
getStageCodes(java.lang.String baseExpertiseCode) |
Returns the individual expertise stage ids for
all stages in a given base expertise id.
|
void |
handleBeingTaught(MOB teacher,
MOB student,
Environmental item,
java.lang.String msg,
int add) |
Handles the teaching of an Ability or ExpertiseDefinition, either given,
or by parsing a coded Learn string from a message.
|
java.util.List<ExpertiseLibrary.ExpertiseDefinition> |
myListableExpertises(MOB mob) |
Returns all the expertises that the given mob can list
for possible training.
|
java.util.List<ExpertiseLibrary.ExpertiseDefinition> |
myQualifiedExpertises(MOB mob) |
Returns all the expertises that the given mob qualifies for.
|
int |
numExpertises() |
Returns the number of expertise definitions, which
includes all stages for each expertise type.
|
int |
numStages(java.lang.String baseExpertiseCode) |
Returns the number of stages of the given base
expertise ID.
|
boolean |
postTeach(MOB teacher,
MOB student,
CMObject teachObj) |
Posts a teaching message of the given Ability or ExpertiseDefinition
for the given teacher and student.
|
void |
recompileExpertises() |
Re-loads all expertise definitions from the file
/resources/expertises.txt (.1, .2, etc)
|
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, ID, initializeClass, name, newInstance
int numExpertises()
delDefinition(String, boolean)
,
addModifyDefinition(String, boolean)
,
numStages(String)
,
getDefinition(String)
,
definitions()
boolean addModifyDefinition(java.lang.String codedLine, boolean andSave)
codedLine
- the coded expertise lineandSave
- true to save, false to leave in ramdelDefinition(String, boolean)
,
numExpertises()
,
numStages(String)
,
getDefinition(String)
,
definitions()
,
CMMiscUtils.createCostManager(CostType, Double)
,
confirmExpertiseLine(String, String, boolean)
boolean delDefinition(java.lang.String ID, boolean andSave)
ID
- either a fully qualified, or base expertise nameandSave
- true to save, false to just change ramaddModifyDefinition(String, boolean)
,
numExpertises()
,
numStages(String)
,
getDefinition(String)
,
definitions()
ExpertiseLibrary.ExpertiseDefinition getDefinition(java.lang.String ID)
ID
- a full expertise id, including stagedelDefinition(String, boolean)
,
addModifyDefinition(String, boolean)
,
numExpertises()
,
numStages(String)
,
definitions()
ExpertiseLibrary.ExpertiseDefinition findDefinition(java.lang.String ID, boolean exactOnly)
ID
- search stringexactOnly
- true for only exact matches, false to be looserdelDefinition(String, boolean)
,
addModifyDefinition(String, boolean)
,
numExpertises()
,
definitions()
java.util.Enumeration<ExpertiseLibrary.ExpertiseDefinition> definitions()
delDefinition(String, boolean)
,
addModifyDefinition(String, boolean)
,
numExpertises()
,
findDefinition(String, boolean)
void recompileExpertises()
java.lang.String getExpertiseInstructions()
java.lang.String getExpertiseHelp(java.lang.String ID)
ID
- the expertise stage id, or search stringjava.lang.String findExpertiseID(java.lang.String ID, boolean exact)
ID
- the ID to search forexact
- true for exact matches onlyint numStages(java.lang.String baseExpertiseCode)
baseExpertiseCode
- full base expertise codenumExpertises()
,
getStageCodes(String)
,
getDefinition(String)
java.util.List<java.lang.String> getStageCodes(java.lang.String baseExpertiseCode)
baseExpertiseCode
- the base expertise id codenumExpertises()
,
numStages(String)
,
getDefinition(String)
java.util.List<java.lang.String> getPeerStageCodes(java.lang.String expertiseCode)
expertiseCode
- the full stage expertise id codenumExpertises()
,
numStages(String)
,
getDefinition(String)
,
getStageCodes(String)
java.lang.String confirmExpertiseLine(java.lang.String row, java.lang.String ID, boolean addIfPossible)
row
- the coded definitionID
- the expertise definition id codeaddIfPossible
- true to cache, false to notaddModifyDefinition(String, boolean)
,
CMMiscUtils.createCostManager(CostType, Double)
ExpertiseLibrary.ExpertiseDefinition getConfirmedDefinition(MOB mob, java.lang.String ID)
mob
- the mob/player to checkID
- the expertise stage idgetDefinition(String)
,
myListableExpertises(MOB)
,
myQualifiedExpertises(MOB)
,
getExpertiseLevelCached(MOB, String, XType)
,
getExpertiseLevelCalced(MOB, String, XType)
java.util.List<ExpertiseLibrary.ExpertiseDefinition> myQualifiedExpertises(MOB mob)
mob
- the mob to checkgetDefinition(String)
,
myListableExpertises(MOB)
,
getConfirmedDefinition(MOB, String)
,
getExpertiseLevelCached(MOB, String, XType)
,
getExpertiseLevelCalced(MOB, String, XType)
,
getHighestListableStageBySkill(MOB, String, XType)
java.util.List<ExpertiseLibrary.ExpertiseDefinition> myListableExpertises(MOB mob)
mob
- the mob to checkgetDefinition(String)
,
myQualifiedExpertises(MOB)
,
getConfirmedDefinition(MOB, String)
,
getExpertiseLevelCached(MOB, String, XType)
,
getExpertiseLevelCalced(MOB, String, XType)
,
getHighestListableStageBySkill(MOB, String, XType)
int getExpertiseLevelCached(MOB mob, java.lang.String abilityID, ExpertiseLibrary.XType code)
mob
- the player to checkabilityID
- the ability to checkcode
- the expertise type to checkgetDefinition(String)
,
myListableExpertises(MOB)
,
myQualifiedExpertises(MOB)
,
getConfirmedDefinition(MOB, String)
,
getExpertiseLevelCalced(MOB, String, XType)
int getExpertiseLevelCalced(MOB mob, java.lang.String abilityID, ExpertiseLibrary.XType code)
mob
- the player to checkabilityID
- the ability to checkcode
- the expertise type to checkgetDefinition(String)
,
myListableExpertises(MOB)
,
myQualifiedExpertises(MOB)
,
getConfirmedDefinition(MOB, String)
,
getExpertiseLevelCached(MOB, String, XType)
int getHighestListableStageBySkill(MOB mob, java.lang.String ableID, ExpertiseLibrary.XType flag)
mob
- the mob to checkableID
- the ability idflag
- the expertise typemyListableExpertises(MOB)
,
myQualifiedExpertises(MOB)
,
getHighestListableStageBySkill(MOB, String, XType)
java.lang.String getApplicableExpertise(java.lang.String abilityID, ExpertiseLibrary.XType code)
abilityID
- ability IDcode
- expertise typegetApplicableExpertises(String, XType)
java.lang.String[] getApplicableExpertises(java.lang.String abilityID, ExpertiseLibrary.XType code)
abilityID
- ability IDcode
- expertise typegetApplicableExpertise(String, XType)
void handleBeingTaught(MOB teacher, MOB student, Environmental item, java.lang.String msg, int add)
teacher
- the teacher mobstudent
- the student mobitem
- the Ability or ExpertiseDefinition objectmsg
- an optional coded learn stringadd
- an amount of ability proficiency to add over defaulthandleBeingTaught(MOB, MOB, Environmental, String, int)
,
canBeTaught(MOB, MOB, Environmental, String)
,
confirmAndTeach(MOB, MOB, CMObject, Runnable)
,
postTeach(MOB, MOB, CMObject)
boolean canBeTaught(MOB teacher, MOB student, Environmental item, java.lang.String msg)
teacher
- the teacher mobstudent
- the student mobitem
- the Ability or ExpertiseDefinition objectmsg
- an optional coded learn stringhandleBeingTaught(MOB, MOB, Environmental, String, int)
,
confirmAndTeach(MOB, MOB, CMObject, Runnable)
,
postTeach(MOB, MOB, CMObject)
boolean confirmAndTeach(MOB teacherM, MOB studentM, CMObject teachableO, java.lang.Runnable callBack)
teacherM
- the teacherstudentM
- the studentteachableO
- the ability or expertisecallBack
- the runnable to call on approvalhandleBeingTaught(MOB, MOB, Environmental, String, int)
,
canBeTaught(MOB, MOB, Environmental, String)
,
postTeach(MOB, MOB, CMObject)
boolean postTeach(MOB teacher, MOB student, CMObject teachObj)
teacher
- the teacher mobstudent
- the student mobteachObj
- the ability or expertisedefinitionhandleBeingTaught(MOB, MOB, Environmental, String, int)
,
canBeTaught(MOB, MOB, Environmental, String)
,
confirmAndTeach(MOB, MOB, CMObject, Runnable)
java.util.Iterator<java.lang.String> filterUniqueExpertiseIDList(java.util.Iterator<java.lang.String> i)
i
- the id list to filter