com.planet_ink.coffee_mud.Commands
Class Qualify

java.lang.Object
  extended by com.planet_ink.coffee_mud.Commands.StdCommand
      extended by com.planet_ink.coffee_mud.Commands.Skills
          extended by com.planet_ink.coffee_mud.Commands.Qualify
All Implemented Interfaces:
Command, CMObject, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class Qualify
extends Skills


Field Summary
protected static int SKILL_ANY
           
protected static int SKILL_BUILDING_ONLY
           
protected static int SKILL_CRAFTING_ONLY
           
protected static int SKILL_EPICUREAN_ONLY
           
protected static int SKILL_GATHERING_ONLY
           
 
Fields inherited from class com.planet_ink.coffee_mud.Commands.Skills
nameComparator
 
Fields inherited from class com.planet_ink.coffee_mud.Commands.StdCommand
ID, noCoinFilter
 
Constructor Summary
Qualify()
           
 
Method Summary
 boolean canBeOrdered()
          Whether the a group leader or charmer can order their followers to do this command.
 boolean execute(MOB mob, java.util.List<java.lang.String> commands, int metaFlags)
          This method actually performs the command, when the given parsed set of command-line words.
 java.lang.String[] getAccessWords()
          Returns the set of command words, with the most public one first, that are entered by the user to initiate this command.
 java.lang.StringBuffer getQualifiedAbilities(MOB viewerM, MOB ableM, Filterer<Ability> filter, java.lang.String prefix, boolean shortOnly)
           
 java.lang.StringBuffer getQualifiedAbilities(MOB viewerM, MOB ableM, int ofType, int ofDomain, java.lang.String prefix, boolean shortOnly)
           
protected  java.util.Set<java.lang.Integer> getQualifiedTypes(MOB ableM)
           
 
Methods inherited from class com.planet_ink.coffee_mud.Commands.Skills
getAbilities, getAbilities, isDomainIncludedInAnyAbility, parseDomainInfo, parsedOutIndividualSkill, parsedOutIndividualSkill, parseOutLevel
 
Methods inherited from class com.planet_ink.coffee_mud.Commands.StdCommand
actionsCost, checkArguments, checkedActionsCost, combatActionsCost, compareTo, copyOf, executeInternal, I, ID, initializeClass, L, name, newInstance, preExecute, securityCheck
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SKILL_ANY

protected static final int SKILL_ANY
See Also:
Constant Field Values

SKILL_CRAFTING_ONLY

protected static final int SKILL_CRAFTING_ONLY
See Also:
Constant Field Values

SKILL_BUILDING_ONLY

protected static final int SKILL_BUILDING_ONLY
See Also:
Constant Field Values

SKILL_GATHERING_ONLY

protected static final int SKILL_GATHERING_ONLY
See Also:
Constant Field Values

SKILL_EPICUREAN_ONLY

protected static final int SKILL_EPICUREAN_ONLY
See Also:
Constant Field Values
Constructor Detail

Qualify

public Qualify()
Method Detail

getAccessWords

public java.lang.String[] getAccessWords()
Description copied from interface: Command
Returns the set of command words, with the most public one first, that are entered by the user to initiate this command.

Specified by:
getAccessWords in interface Command
Overrides:
getAccessWords in class Skills
Returns:
the set of command words that the user enters

getQualifiedAbilities

public java.lang.StringBuffer getQualifiedAbilities(MOB viewerM,
                                                    MOB ableM,
                                                    int ofType,
                                                    int ofDomain,
                                                    java.lang.String prefix,
                                                    boolean shortOnly)

getQualifiedTypes

protected java.util.Set<java.lang.Integer> getQualifiedTypes(MOB ableM)

getQualifiedAbilities

public java.lang.StringBuffer getQualifiedAbilities(MOB viewerM,
                                                    MOB ableM,
                                                    Filterer<Ability> filter,
                                                    java.lang.String prefix,
                                                    boolean shortOnly)

execute

public boolean execute(MOB mob,
                       java.util.List<java.lang.String> commands,
                       int metaFlags)
                throws java.io.IOException
Description copied from interface: Command
This method actually performs the command, when the given parsed set of command-line words. The commands list is almost always the set of strings, starting with the access word that triggered the command. Some commands have custom APIs however, that allow almost anything to be in the commands list, or even for the commands to be null. This method is not allowed to be called until the player or mob has satisfied the actionsCost requirements and the securityCheck

Specified by:
execute in interface Command
Overrides:
execute in class Skills
Parameters:
mob - the mob or player issueing the command
commands - usually the command words and parameters; a set of strings
metaFlags - flags denoting how the command is being executed
Returns:
whether the command was successfully executed. Is almost meaningless.
Throws:
java.io.IOException - usually means the player has dropped carrier
See Also:
Command.actionsCost(MOB, List), Command.securityCheck(MOB)

canBeOrdered

public boolean canBeOrdered()
Description copied from interface: Command
Whether the a group leader or charmer can order their followers to do this command.

Specified by:
canBeOrdered in interface Command
Overrides:
canBeOrdered in class Skills
Returns:
whether this command can be ordered.