|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Libraries.StdLibrary
com.planet_ink.coffee_mud.Libraries.CMAbleComps
public class CMAbleComps
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.AbilityComponents |
|---|
AbilityComponents.AbilityLimits |
| Field Summary |
|---|
| Fields inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary |
|---|
isDebugging, name, serviceClient, tickStatus |
| Constructor Summary | |
|---|---|
CMAbleComps()
|
|
| Method Summary | |
|---|---|
java.lang.String |
addAbilityComponent(java.lang.String s,
java.util.Map<java.lang.String,java.util.List<AbilityComponent>> H)
Adds a new coded ability component to the given component map. |
void |
alterAbilityComponentFile(java.lang.String compID,
boolean delete)
Alters and saved the ability components definition to on the filesystem (components.txt). |
java.util.List<java.lang.Object> |
componentCheck(MOB mob,
java.util.List<AbilityComponent> req,
boolean mithrilOK)
Checks whether the given mob has the given components required to use a skill available to him/her, and if found, returns them as a FoundComponents list. |
java.util.List<Item> |
componentsSample(java.util.List<AbilityComponent> req,
boolean mithrilOK)
Returns a very dirty approximate of a sample of what components appear to be required. |
AbilityComponent |
createBlankAbilityComponent()
Creates a new blank ability component object |
MaterialLibrary.DeadResourceRecord |
destroyAbilityComponents(java.util.List<java.lang.Object> found)
If the ability component recipe used to build the list of found components needed to use a skill requires that any of the componenets are destroyed. |
PairList<java.lang.String,java.lang.String> |
getAbilityComponentCoded(AbilityComponent comp)
Breaks an ability component decoded objects into a series of key/value pairs, where the first is always the connector, and the keys are as follows: ANDOR, DISPOSITION, FATE, AMOUNT, COMPONENTID, SUBTYPE, MASK. |
protected java.util.List<PairList<java.lang.String,java.lang.String>> |
getAbilityComponentCodedListLists(java.util.List<AbilityComponent> req)
|
protected java.util.List<PairList<java.lang.String,java.lang.String>> |
getAbilityComponentCodedPairsList(java.lang.String AID)
|
java.lang.String |
getAbilityComponentCodedString(java.util.List<AbilityComponent> comps)
Reconstructs the coded ability component definition string (ID=parms) from the given cached decoded structures list. |
java.lang.String |
getAbilityComponentCodedString(java.lang.String AID)
Reconstructs the coded ability component definition string (ID=parms) from the internal cached structures, given a particular Ability ID. |
protected java.lang.String |
getAbilityComponentCodedStringFromCodedList(java.util.List<PairList<java.lang.String,java.lang.String>> comps)
|
java.lang.String |
getAbilityComponentDesc(MOB mob,
AbilityComponent comp,
boolean useConnector)
Returns a friendly readable description of a specific component in the given decoded ability components definition list. |
java.lang.String |
getAbilityComponentDesc(MOB mob,
java.util.List<AbilityComponent> req)
Returns a friendly readable form of the component requirements of the given Ability/Skill Component List, or null if it has no requirements. |
java.lang.String |
getAbilityComponentDesc(MOB mob,
java.lang.String AID)
Returns a friendly readable form of the component requirements of the given Ability/Skill ID(), or null if that ability has no requirements. |
java.util.Map<java.lang.String,java.util.List<AbilityComponent>> |
getAbilityComponentMap()
Returns the master ability component map, keyed by the Ability ID. |
java.util.List<AbilityComponent> |
getAbilityComponents(java.lang.String AID)
Gets the decoded ability component definition for a given Ability ID(). |
AbilityComponents.AbilityLimits |
getSpecialSkillLimit(MOB studentM)
Returns the character-class based common skill ability limits object applicable to the given mob, or zeroes if there's a problem. |
AbilityComponents.AbilityLimits |
getSpecialSkillLimit(MOB studentM,
Ability A)
Returns the character-class based common skill ability limits object applicable to the given mob and the given ability. |
AbilityComponents.AbilityLimits |
getSpecialSkillRemainder(MOB studentM,
Ability A)
Returns the character-class based common skill ability limits object applicable to the given mob and the given ability, and then subtracts the number of each common skill already learned to derive a remaining number of each type. |
AbilityComponents.AbilityLimits |
getSpecialSkillRemainders(MOB student)
Returns the character-class based common skill ability limits object applicable to the given mob, and then subtracts the number of each common skill already learned to derive a remaining number of each type. |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
protected boolean |
IsItemComponent(MOB mob,
AbilityComponent comp,
int[] amt,
Item I,
java.util.List<java.lang.Object> thisSet,
boolean mithrilOK)
|
protected boolean |
isRightMaterial(long type,
long itemMaterial,
boolean mithrilOK)
|
protected Item |
makeItemComponent(AbilityComponent comp,
boolean mithrilOK)
|
void |
setAbilityComponentCodedFromCodedPairs(PairList<java.lang.String,java.lang.String> decodedDV,
AbilityComponent comp)
Copies the key/value pairs from a PairList of specific abilitycomponent fields into the given AbilityComponent object. |
| Methods inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary |
|---|
activate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, shutdown, tick |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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, initializeClass, name, newInstance |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Constructor Detail |
|---|
public CMAbleComps()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectID in class StdLibrary
protected final boolean isRightMaterial(long type,
long itemMaterial,
boolean mithrilOK)
protected Item makeItemComponent(AbilityComponent comp,
boolean mithrilOK)
protected boolean IsItemComponent(MOB mob,
AbilityComponent comp,
int[] amt,
Item I,
java.util.List<java.lang.Object> thisSet,
boolean mithrilOK)
public java.util.List<Item> componentsSample(java.util.List<AbilityComponent> req,
boolean mithrilOK)
AbilityComponents
componentsSample in interface AbilityComponentsreq - the ability components rules definitionmithrilOK - true to allow mithril as a metal substitute
AbilityComponents.getAbilityComponents(String)
public java.util.List<java.lang.Object> componentCheck(MOB mob,
java.util.List<AbilityComponent> req,
boolean mithrilOK)
AbilityComponents
componentCheck in interface AbilityComponentsmob - the mob whose inventory or room or both to checkreq - the ability components rules definitionmithrilOK - true to allow mithril as a metal substitute
AbilityComponents.getAbilityComponents(String)public java.util.List<AbilityComponent> getAbilityComponents(java.lang.String AID)
AbilityComponents
getAbilityComponents in interface AbilityComponentsAID - the Ability ID()
protected java.util.List<PairList<java.lang.String,java.lang.String>> getAbilityComponentCodedPairsList(java.lang.String AID)
public PairList<java.lang.String,java.lang.String> getAbilityComponentCoded(AbilityComponent comp)
AbilityComponents
getAbilityComponentCoded in interface AbilityComponentscomp - the decoded ability component to produce fields from
AbilityComponents.setAbilityComponentCodedFromCodedPairs(PairList, AbilityComponent)
public void setAbilityComponentCodedFromCodedPairs(PairList<java.lang.String,java.lang.String> decodedDV,
AbilityComponent comp)
AbilityComponents
setAbilityComponentCodedFromCodedPairs in interface AbilityComponentsdecodedDV - the key/value pairs of the ability component values.comp - the decoded ability component to copy field data intoAbilityComponents.getAbilityComponentCoded(AbilityComponent)protected java.util.List<PairList<java.lang.String,java.lang.String>> getAbilityComponentCodedListLists(java.util.List<AbilityComponent> req)
public AbilityComponent createBlankAbilityComponent()
AbilityComponents
createBlankAbilityComponent in interface AbilityComponentspublic java.lang.String getAbilityComponentCodedString(java.util.List<AbilityComponent> comps)
AbilityComponents
getAbilityComponentCodedString in interface AbilityComponentscomps - the decoded ability components definition list
AbilityComponents.getAbilityComponentCodedString(String)protected java.lang.String getAbilityComponentCodedStringFromCodedList(java.util.List<PairList<java.lang.String,java.lang.String>> comps)
public java.lang.String getAbilityComponentCodedString(java.lang.String AID)
AbilityComponents
getAbilityComponentCodedString in interface AbilityComponentsAID - the Ability ID()
AbilityComponents.getAbilityComponentCodedString(List)
public java.lang.String getAbilityComponentDesc(MOB mob,
AbilityComponent comp,
boolean useConnector)
AbilityComponents
getAbilityComponentDesc in interface AbilityComponentsmob - the mob to check this components applicability to.comp - the complete ability component decodeduseConnector - true to use a connector AND/OR, false otherwise
AbilityComponents.getAbilityComponentDesc(MOB, List),
AbilityComponents.getAbilityComponentDesc(MOB, String)
public java.lang.String getAbilityComponentDesc(MOB mob,
java.lang.String AID)
AbilityComponents
getAbilityComponentDesc in interface AbilityComponentsmob - the player mob who wants to knowAID - the Ability ID() of the skill whose components to check
AbilityComponents.getAbilityComponentDesc(MOB, List),
AbilityComponents.getAbilityComponentDesc(MOB, AbilityComponent, boolean)
public java.lang.String getAbilityComponentDesc(MOB mob,
java.util.List<AbilityComponent> req)
AbilityComponents
getAbilityComponentDesc in interface AbilityComponentsmob - the player mob who wants to knowreq - the coded requirements list
AbilityComponents.getAbilityComponentDesc(MOB, AbilityComponent, boolean),
AbilityComponents.getAbilityComponentDesc(MOB, String)
public java.lang.String addAbilityComponent(java.lang.String s,
java.util.Map<java.lang.String,java.util.List<AbilityComponent>> H)
AbilityComponents
addAbilityComponent in interface AbilityComponentss - the new coded ability component stringH - the map to add the new component to
public java.util.Map<java.lang.String,java.util.List<AbilityComponent>> getAbilityComponentMap()
AbilityComponents
getAbilityComponentMap in interface AbilityComponentspublic MaterialLibrary.DeadResourceRecord destroyAbilityComponents(java.util.List<java.lang.Object> found)
AbilityComponents
destroyAbilityComponents in interface AbilityComponentsfound - the components found with componentCheck
AbilityComponents.componentCheck(MOB, List, boolean),
MaterialLibrary.DeadResourceRecord
public void alterAbilityComponentFile(java.lang.String compID,
boolean delete)
AbilityComponents
alterAbilityComponentFile in interface AbilityComponentscompID - the ID of the component being altereddelete - true to delete, false to add or modifypublic AbilityComponents.AbilityLimits getSpecialSkillLimit(MOB studentM)
AbilityComponents
getSpecialSkillLimit in interface AbilityComponentsstudentM - the mob to find limits for
AbilityComponents.getSpecialSkillLimit(MOB, Ability),
AbilityComponents.getSpecialSkillRemainder(MOB, Ability),
AbilityComponents.getSpecialSkillRemainders(MOB),
AbilityComponents.AbilityLimits
public AbilityComponents.AbilityLimits getSpecialSkillLimit(MOB studentM,
Ability A)
AbilityComponents
getSpecialSkillLimit in interface AbilityComponentsstudentM - the mob to find limits forA - the ability object to find limits for
AbilityComponents.getSpecialSkillLimit(MOB),
AbilityComponents.getSpecialSkillRemainder(MOB, Ability),
AbilityComponents.getSpecialSkillRemainders(MOB),
AbilityComponents.AbilityLimits,
AbilityComponents.AbilityLimits.specificSkillLimit()
public AbilityComponents.AbilityLimits getSpecialSkillRemainder(MOB studentM,
Ability A)
AbilityComponents
getSpecialSkillRemainder in interface AbilityComponentsstudentM - the mob to find limits forA - the ability object to find limits for
AbilityComponents.getSpecialSkillLimit(MOB, Ability),
AbilityComponents.getSpecialSkillLimit(MOB),
AbilityComponents.getSpecialSkillRemainders(MOB),
AbilityComponents.AbilityLimits,
AbilityComponents.AbilityLimits.specificSkillLimit()public AbilityComponents.AbilityLimits getSpecialSkillRemainders(MOB student)
AbilityComponents
getSpecialSkillRemainders in interface AbilityComponentsstudent - the mob to find limits for
AbilityComponents.getSpecialSkillLimit(MOB, Ability),
AbilityComponents.getSpecialSkillLimit(MOB),
AbilityComponents.getSpecialSkillRemainder(MOB, Ability),
AbilityComponents.AbilityLimits
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||