|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AbilityComponents
Library for configureing and managing the rules for what resource components (magic dust, tools, etc) are required every time a particular skill is used. Normally this would be part of the skill itself, but since this feature was added so late, it's separate. Also here are common skill limit utilities, for determining how many common skills a player can learn.
Nested Class Summary | |
---|---|
static interface |
AbilityComponents.AbilityLimits
Ability Limits object, denoting how many of different types of common skills and langs that a player can learn, including an entry for a specific skill. |
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. |
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. |
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 studentM)
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. |
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 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 |
---|
java.util.List<java.lang.Object> componentCheck(MOB mob, java.util.List<AbilityComponent> req, boolean mithrilOK)
mob
- the mob whose inventory or room or both to checkreq
- the ability components rules definitionmithrilOK
- true to allow mithril as a metal substitute
getAbilityComponents(String)
java.util.List<Item> componentsSample(java.util.List<AbilityComponent> req, boolean mithrilOK)
req
- the ability components rules definitionmithrilOK
- true to allow mithril as a metal substitute
getAbilityComponents(String)
MaterialLibrary.DeadResourceRecord destroyAbilityComponents(java.util.List<java.lang.Object> found)
found
- the components found with componentCheck
componentCheck(MOB, List, boolean)
,
MaterialLibrary.DeadResourceRecord
java.lang.String getAbilityComponentDesc(MOB mob, java.lang.String AID)
mob
- the player mob who wants to knowAID
- the Ability ID() of the skill whose components to check
getAbilityComponentDesc(MOB, List)
,
getAbilityComponentDesc(MOB, AbilityComponent, boolean)
java.lang.String getAbilityComponentDesc(MOB mob, java.util.List<AbilityComponent> req)
mob
- the player mob who wants to knowreq
- the coded requirements list
getAbilityComponentDesc(MOB, AbilityComponent, boolean)
,
getAbilityComponentDesc(MOB, String)
java.lang.String getAbilityComponentDesc(MOB mob, AbilityComponent comp, boolean useConnector)
mob
- the mob to check this components applicability to.comp
- the complete ability component decodeduseConnector
- true to use a connector AND/OR, false otherwise
getAbilityComponentDesc(MOB, List)
,
getAbilityComponentDesc(MOB, String)
java.util.Map<java.lang.String,java.util.List<AbilityComponent>> getAbilityComponentMap()
java.lang.String addAbilityComponent(java.lang.String s, java.util.Map<java.lang.String,java.util.List<AbilityComponent>> H)
s
- the new coded ability component stringH
- the map to add the new component to
java.util.List<AbilityComponent> getAbilityComponents(java.lang.String AID)
AID
- the Ability ID()
PairList<java.lang.String,java.lang.String> getAbilityComponentCoded(AbilityComponent comp)
comp
- the decoded ability component to produce fields from
setAbilityComponentCodedFromCodedPairs(PairList, AbilityComponent)
void setAbilityComponentCodedFromCodedPairs(PairList<java.lang.String,java.lang.String> decodedDV, AbilityComponent comp)
decodedDV
- the key/value pairs of the ability component values.comp
- the decoded ability component to copy field data intogetAbilityComponentCoded(AbilityComponent)
java.lang.String getAbilityComponentCodedString(java.lang.String AID)
AID
- the Ability ID()
getAbilityComponentCodedString(List)
java.lang.String getAbilityComponentCodedString(java.util.List<AbilityComponent> comps)
comps
- the decoded ability components definition list
getAbilityComponentCodedString(String)
AbilityComponent createBlankAbilityComponent()
void alterAbilityComponentFile(java.lang.String compID, boolean delete)
compID
- the ID of the component being altereddelete
- true to delete, false to add or modifyAbilityComponents.AbilityLimits getSpecialSkillLimit(MOB studentM)
studentM
- the mob to find limits for
getSpecialSkillLimit(MOB, Ability)
,
getSpecialSkillRemainder(MOB, Ability)
,
getSpecialSkillRemainders(MOB)
,
AbilityComponents.AbilityLimits
AbilityComponents.AbilityLimits getSpecialSkillLimit(MOB studentM, Ability A)
studentM
- the mob to find limits forA
- the ability object to find limits for
getSpecialSkillLimit(MOB)
,
getSpecialSkillRemainder(MOB, Ability)
,
getSpecialSkillRemainders(MOB)
,
AbilityComponents.AbilityLimits
,
AbilityComponents.AbilityLimits.specificSkillLimit()
AbilityComponents.AbilityLimits getSpecialSkillRemainder(MOB studentM, Ability A)
studentM
- the mob to find limits forA
- the ability object to find limits for
getSpecialSkillLimit(MOB, Ability)
,
getSpecialSkillLimit(MOB)
,
getSpecialSkillRemainders(MOB)
,
AbilityComponents.AbilityLimits
,
AbilityComponents.AbilityLimits.specificSkillLimit()
AbilityComponents.AbilityLimits getSpecialSkillRemainders(MOB studentM)
studentM
- the mob to find limits for
getSpecialSkillLimit(MOB, Ability)
,
getSpecialSkillLimit(MOB)
,
getSpecialSkillRemainder(MOB, Ability)
,
AbilityComponents.AbilityLimits
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |