CMObject
, Tickable
, CMLibrary
, ExpertiseLibrary
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
public class ColumbiaUniv extends StdLibrary implements ExpertiseLibrary
ExpertiseLibrary.ExpertiseDefinition, ExpertiseLibrary.XType
Modifier and Type | Field | Description |
---|---|---|
protected SHashtable<java.lang.String,java.util.List<java.lang.String>> |
baseEduSetLists |
|
protected SHashtable<java.lang.String,ExpertiseLibrary.ExpertiseDefinition> |
completeEduMap |
|
protected java.util.Map<java.lang.String,java.lang.String>[] |
completeUsageMap |
|
protected java.util.Map<java.lang.String,java.lang.String[]>[] |
completeUsageMaps |
|
protected java.util.Map<java.lang.String,java.lang.String> |
helpMap |
idConverter
isDebugging, name, serviceClient, tickStatus
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_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, 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_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
Constructor | Description |
---|---|
ColumbiaUniv() |
Modifier and Type | Method | Description |
---|---|---|
protected ExpertiseLibrary.ExpertiseDefinition |
addDefinition(java.lang.String ID,
java.lang.String name,
java.lang.String baseName,
java.lang.String listMask,
java.lang.String finalMask,
java.lang.String[] costs,
java.lang.String[] data) |
|
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.
|
protected ExpertiseLibrary.ExpertiseDefinition |
createNewExpertiseDefinition(java.lang.String ID,
java.lang.String name,
java.lang.String baseName) |
|
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.
|
protected int |
getConfirmedExpertiseLevel(MOB mob,
java.lang.String baseID,
Pair<java.lang.String,java.lang.Integer> e) |
|
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.
|
protected java.util.List<java.lang.String> |
getExpertiseLines() |
|
protected java.lang.String |
getGuessedBaseExpertiseName(java.lang.String expertiseCode) |
|
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.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
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.
|
protected java.lang.Object |
parseLearnID(java.lang.String msg) |
|
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, initializeClass, name, newInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, shutdown, tick
protected SHashtable<java.lang.String,ExpertiseLibrary.ExpertiseDefinition> completeEduMap
protected SHashtable<java.lang.String,java.util.List<java.lang.String>> baseEduSetLists
protected java.util.Map<java.lang.String,java.lang.String>[] completeUsageMap
protected java.util.Map<java.lang.String,java.lang.String[]>[] completeUsageMaps
protected java.util.Map<java.lang.String,java.lang.String> helpMap
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdLibrary
protected ExpertiseLibrary.ExpertiseDefinition addDefinition(java.lang.String ID, java.lang.String name, java.lang.String baseName, java.lang.String listMask, java.lang.String finalMask, java.lang.String[] costs, java.lang.String[] data)
public boolean addModifyDefinition(java.lang.String codedLine, boolean andSave)
ExpertiseLibrary
addModifyDefinition
in interface ExpertiseLibrary
codedLine
- the coded expertise lineandSave
- true to save, false to leave in ramExpertiseLibrary.delDefinition(String, boolean)
,
ExpertiseLibrary.numExpertises()
,
ExpertiseLibrary.numStages(String)
,
ExpertiseLibrary.getDefinition(String)
,
ExpertiseLibrary.definitions()
,
CMMiscUtils.createCostManager(CostType, Double)
,
ExpertiseLibrary.confirmExpertiseLine(String, String, boolean)
public java.lang.String findExpertiseID(java.lang.String ID, boolean exact)
ExpertiseLibrary
findExpertiseID
in interface ExpertiseLibrary
ID
- the ID to search forexact
- true for exact matches onlypublic java.lang.String getExpertiseHelp(java.lang.String ID)
ExpertiseLibrary
getExpertiseHelp
in interface ExpertiseLibrary
ID
- the expertise stage id, or search stringpublic boolean delDefinition(java.lang.String ID, boolean andSave)
ExpertiseLibrary
delDefinition
in interface ExpertiseLibrary
ID
- either a fully qualified, or base expertise nameandSave
- true to save, false to just change ramExpertiseLibrary.addModifyDefinition(String, boolean)
,
ExpertiseLibrary.numExpertises()
,
ExpertiseLibrary.numStages(String)
,
ExpertiseLibrary.getDefinition(String)
,
ExpertiseLibrary.definitions()
public java.util.Enumeration<ExpertiseLibrary.ExpertiseDefinition> definitions()
ExpertiseLibrary
definitions
in interface ExpertiseLibrary
ExpertiseLibrary.delDefinition(String, boolean)
,
ExpertiseLibrary.addModifyDefinition(String, boolean)
,
ExpertiseLibrary.numExpertises()
,
ExpertiseLibrary.findDefinition(String, boolean)
public ExpertiseLibrary.ExpertiseDefinition getDefinition(java.lang.String ID)
ExpertiseLibrary
getDefinition
in interface ExpertiseLibrary
ID
- a full expertise id, including stageExpertiseLibrary.delDefinition(String, boolean)
,
ExpertiseLibrary.addModifyDefinition(String, boolean)
,
ExpertiseLibrary.numExpertises()
,
ExpertiseLibrary.numStages(String)
,
ExpertiseLibrary.definitions()
public ExpertiseLibrary.ExpertiseDefinition findDefinition(java.lang.String ID, boolean exactOnly)
ExpertiseLibrary
findDefinition
in interface ExpertiseLibrary
ID
- search stringexactOnly
- true for only exact matches, false to be looserExpertiseLibrary.delDefinition(String, boolean)
,
ExpertiseLibrary.addModifyDefinition(String, boolean)
,
ExpertiseLibrary.numExpertises()
,
ExpertiseLibrary.definitions()
public java.util.List<ExpertiseLibrary.ExpertiseDefinition> myQualifiedExpertises(MOB mob)
ExpertiseLibrary
myQualifiedExpertises
in interface ExpertiseLibrary
mob
- the mob to checkExpertiseLibrary.getDefinition(String)
,
ExpertiseLibrary.myListableExpertises(MOB)
,
ExpertiseLibrary.getConfirmedDefinition(MOB, String)
,
ExpertiseLibrary.getExpertiseLevelCached(MOB, String, XType)
,
ExpertiseLibrary.getExpertiseLevelCalced(MOB, String, XType)
,
ExpertiseLibrary.getHighestListableStageBySkill(MOB, String, XType)
public java.util.List<ExpertiseLibrary.ExpertiseDefinition> myListableExpertises(MOB mob)
ExpertiseLibrary
myListableExpertises
in interface ExpertiseLibrary
mob
- the mob to checkExpertiseLibrary.getDefinition(String)
,
ExpertiseLibrary.myQualifiedExpertises(MOB)
,
ExpertiseLibrary.getConfirmedDefinition(MOB, String)
,
ExpertiseLibrary.getExpertiseLevelCached(MOB, String, XType)
,
ExpertiseLibrary.getExpertiseLevelCalced(MOB, String, XType)
,
ExpertiseLibrary.getHighestListableStageBySkill(MOB, String, XType)
public int getExpertiseLevelCached(MOB mob, java.lang.String abilityID, ExpertiseLibrary.XType code)
ExpertiseLibrary
getExpertiseLevelCached
in interface ExpertiseLibrary
mob
- the player to checkabilityID
- the ability to checkcode
- the expertise type to checkExpertiseLibrary.getDefinition(String)
,
ExpertiseLibrary.myListableExpertises(MOB)
,
ExpertiseLibrary.myQualifiedExpertises(MOB)
,
ExpertiseLibrary.getConfirmedDefinition(MOB, String)
,
ExpertiseLibrary.getExpertiseLevelCalced(MOB, String, XType)
public int getHighestListableStageBySkill(MOB mob, java.lang.String ableID, ExpertiseLibrary.XType flag)
ExpertiseLibrary
getHighestListableStageBySkill
in interface ExpertiseLibrary
mob
- the mob to checkableID
- the ability idflag
- the expertise typeExpertiseLibrary.myListableExpertises(MOB)
,
ExpertiseLibrary.myQualifiedExpertises(MOB)
,
ExpertiseLibrary.getHighestListableStageBySkill(MOB, String, XType)
public int numExpertises()
ExpertiseLibrary
numExpertises
in interface ExpertiseLibrary
ExpertiseLibrary.delDefinition(String, boolean)
,
ExpertiseLibrary.addModifyDefinition(String, boolean)
,
ExpertiseLibrary.numStages(String)
,
ExpertiseLibrary.getDefinition(String)
,
ExpertiseLibrary.definitions()
public java.util.List<java.lang.String> getStageCodes(java.lang.String baseExpertiseCode)
ExpertiseLibrary
getStageCodes
in interface ExpertiseLibrary
baseExpertiseCode
- the base expertise id codeExpertiseLibrary.numExpertises()
,
ExpertiseLibrary.numStages(String)
,
ExpertiseLibrary.getDefinition(String)
public int numStages(java.lang.String baseExpertiseCode)
ExpertiseLibrary
numStages
in interface ExpertiseLibrary
baseExpertiseCode
- full base expertise codeExpertiseLibrary.numExpertises()
,
ExpertiseLibrary.getStageCodes(String)
,
ExpertiseLibrary.getDefinition(String)
protected java.lang.String getGuessedBaseExpertiseName(java.lang.String expertiseCode)
public java.util.List<java.lang.String> getPeerStageCodes(java.lang.String expertiseCode)
ExpertiseLibrary
getPeerStageCodes
in interface ExpertiseLibrary
expertiseCode
- the full stage expertise id codeExpertiseLibrary.numExpertises()
,
ExpertiseLibrary.numStages(String)
,
ExpertiseLibrary.getDefinition(String)
,
ExpertiseLibrary.getStageCodes(String)
public java.lang.String getApplicableExpertise(java.lang.String abilityID, ExpertiseLibrary.XType code)
ExpertiseLibrary
getApplicableExpertise
in interface ExpertiseLibrary
abilityID
- ability IDcode
- expertise typeExpertiseLibrary.getApplicableExpertises(String, XType)
public java.lang.String[] getApplicableExpertises(java.lang.String abilityID, ExpertiseLibrary.XType code)
ExpertiseLibrary
getApplicableExpertises
in interface ExpertiseLibrary
abilityID
- ability IDcode
- expertise typeExpertiseLibrary.getApplicableExpertise(String, XType)
public ExpertiseLibrary.ExpertiseDefinition getConfirmedDefinition(MOB mob, java.lang.String ID)
ExpertiseLibrary
getConfirmedDefinition
in interface ExpertiseLibrary
mob
- the mob/player to checkID
- the expertise stage idExpertiseLibrary.getDefinition(String)
,
ExpertiseLibrary.myListableExpertises(MOB)
,
ExpertiseLibrary.myQualifiedExpertises(MOB)
,
ExpertiseLibrary.getExpertiseLevelCached(MOB, String, XType)
,
ExpertiseLibrary.getExpertiseLevelCalced(MOB, String, XType)
protected int getConfirmedExpertiseLevel(MOB mob, java.lang.String baseID, Pair<java.lang.String,java.lang.Integer> e)
public int getExpertiseLevelCalced(MOB mob, java.lang.String abilityID, ExpertiseLibrary.XType code)
ExpertiseLibrary
getExpertiseLevelCalced
in interface ExpertiseLibrary
mob
- the player to checkabilityID
- the ability to checkcode
- the expertise type to checkExpertiseLibrary.getDefinition(String)
,
ExpertiseLibrary.myListableExpertises(MOB)
,
ExpertiseLibrary.myQualifiedExpertises(MOB)
,
ExpertiseLibrary.getConfirmedDefinition(MOB, String)
,
ExpertiseLibrary.getExpertiseLevelCached(MOB, String, XType)
public java.lang.String confirmExpertiseLine(java.lang.String row, java.lang.String ID, boolean addIfPossible)
ExpertiseLibrary
confirmExpertiseLine
in interface ExpertiseLibrary
row
- the coded definitionID
- the expertise definition id codeaddIfPossible
- true to cache, false to notExpertiseLibrary.addModifyDefinition(String, boolean)
,
CMMiscUtils.createCostManager(CostType, Double)
public java.lang.String getExpertiseInstructions()
ExpertiseLibrary
getExpertiseInstructions
in interface ExpertiseLibrary
protected java.util.List<java.lang.String> getExpertiseLines()
public void recompileExpertises()
ExpertiseLibrary
public java.util.Iterator<java.lang.String> filterUniqueExpertiseIDList(java.util.Iterator<java.lang.String> i)
ExpertiseLibrary
filterUniqueExpertiseIDList
in interface ExpertiseLibrary
i
- the id list to filterprotected java.lang.Object parseLearnID(java.lang.String msg)
public boolean canBeTaught(MOB teacher, MOB student, Environmental item, java.lang.String msg)
ExpertiseLibrary
canBeTaught
in interface ExpertiseLibrary
teacher
- the teacher mobstudent
- the student mobitem
- the Ability or ExpertiseDefinition objectmsg
- an optional coded learn stringExpertiseLibrary.handleBeingTaught(MOB, MOB, Environmental, String, int)
,
ExpertiseLibrary.confirmAndTeach(MOB, MOB, CMObject, Runnable)
,
ExpertiseLibrary.postTeach(MOB, MOB, CMObject)
public void handleBeingTaught(MOB teacher, MOB student, Environmental item, java.lang.String msg, int add)
ExpertiseLibrary
handleBeingTaught
in interface ExpertiseLibrary
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 defaultExpertiseLibrary.handleBeingTaught(MOB, MOB, Environmental, String, int)
,
ExpertiseLibrary.canBeTaught(MOB, MOB, Environmental, String)
,
ExpertiseLibrary.confirmAndTeach(MOB, MOB, CMObject, Runnable)
,
ExpertiseLibrary.postTeach(MOB, MOB, CMObject)
public boolean confirmAndTeach(MOB teacherM, MOB studentM, CMObject teachableO, java.lang.Runnable callBack)
ExpertiseLibrary
confirmAndTeach
in interface ExpertiseLibrary
teacherM
- the teacherstudentM
- the studentteachableO
- the ability or expertisecallBack
- the runnable to call on approvalExpertiseLibrary.handleBeingTaught(MOB, MOB, Environmental, String, int)
,
ExpertiseLibrary.canBeTaught(MOB, MOB, Environmental, String)
,
ExpertiseLibrary.postTeach(MOB, MOB, CMObject)
public boolean postTeach(MOB teacher, MOB student, CMObject teachObj)
ExpertiseLibrary
postTeach
in interface ExpertiseLibrary
teacher
- the teacher mobstudent
- the student mobteachObj
- the ability or expertisedefinitionExpertiseLibrary.handleBeingTaught(MOB, MOB, Environmental, String, int)
,
ExpertiseLibrary.canBeTaught(MOB, MOB, Environmental, String)
,
ExpertiseLibrary.confirmAndTeach(MOB, MOB, CMObject, Runnable)
protected ExpertiseLibrary.ExpertiseDefinition createNewExpertiseDefinition(java.lang.String ID, java.lang.String name, java.lang.String baseName)