com.planet_ink.coffee_mud.Commands
Class Stat
java.lang.Object
com.planet_ink.coffee_mud.Commands.StdCommand
com.planet_ink.coffee_mud.Commands.Skills
com.planet_ink.coffee_mud.Commands.Stat
- All Implemented Interfaces:
- Command, CMObject, java.lang.Cloneable, java.lang.Comparable<CMObject>
public class Stat
- extends Skills
Constructor Summary |
Stat()
|
Method Summary |
protected void |
addCharStatsChars(CharStats cstats,
int headerWidth,
int numberWidth,
int[] col,
java.lang.StringBuilder str)
|
protected void |
addCharStatsPhys(PhyStats pstats,
int headerWidth,
int numberWidth,
int[] col,
java.lang.StringBuilder str)
|
protected void |
addCharStatsState(CharState cstats,
int headerWidth,
int numberWidth,
int[] col,
java.lang.StringBuilder str)
|
protected void |
addCharThing(int headerWidth,
int numberWidth,
int[] col,
java.lang.StringBuilder str,
java.lang.String title,
java.lang.String val)
|
int |
averageDamage(MOB M)
|
boolean |
canBeOrdered()
Whether the a group leader or charmer can order their followers
to do this command. |
java.lang.String |
doDisposition(int dispositionMask)
|
java.lang.String |
doSenses(int senseMask)
|
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. |
protected Item |
getItemTarget(MOB mob,
java.lang.String itemName)
|
protected MOB |
getMOBTarget(MOB mob,
java.lang.String MOBname)
|
MOB |
getTarget(MOB mob,
java.lang.String targetName,
boolean quiet)
|
void |
recoverMOB(MOB M)
|
void |
reportOnDiffMOB(Environmental test,
int diff,
java.lang.StringBuilder str)
|
void |
reportOnDiffMOB(java.lang.String name,
int diff,
java.lang.StringBuilder str)
|
boolean |
securityCheck(MOB mob)
Whether this command is available to the given player |
boolean |
showTableStats(MOB mob,
int days,
int scale,
java.lang.String rest)
|
void |
testMOB(MOB target,
MOB M,
Environmental test)
|
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ABLETYPE_EQUIPMENT
public static final int ABLETYPE_EQUIPMENT
- See Also:
- Constant Field Values
ABLETYPE_INVENTORY
public static final int ABLETYPE_INVENTORY
- See Also:
- Constant Field Values
ABLETYPE_QUESTWINS
public static final int ABLETYPE_QUESTWINS
- See Also:
- Constant Field Values
ABLETYPE_TATTOOS
public static final int ABLETYPE_TATTOOS
- See Also:
- Constant Field Values
ABLETYPE_COMBAT
public static final int ABLETYPE_COMBAT
- See Also:
- Constant Field Values
ABLETYPE_SCRIPTS
public static final int ABLETYPE_SCRIPTS
- See Also:
- Constant Field Values
ABLETYPE_TITLES
public static final int ABLETYPE_TITLES
- See Also:
- Constant Field Values
ABLETYPE_ROOMSEXPLORED
public static final int ABLETYPE_ROOMSEXPLORED
- See Also:
- Constant Field Values
ABLETYPE_AREASEXPLORED
public static final int ABLETYPE_AREASEXPLORED
- See Also:
- Constant Field Values
ABLETYPE_WORLDEXPLORED
public static final int ABLETYPE_WORLDEXPLORED
- See Also:
- Constant Field Values
ABLETYPE_FACTIONS
public static final int ABLETYPE_FACTIONS
- See Also:
- Constant Field Values
ABLETYPE_CHARSTATS
public static final int ABLETYPE_CHARSTATS
- See Also:
- Constant Field Values
ABLETYPE_LEVELTIMES
public static final int ABLETYPE_LEVELTIMES
- See Also:
- Constant Field Values
ABLETYPE_AFFECTS
public static final int ABLETYPE_AFFECTS
- See Also:
- Constant Field Values
ABLETYPE_DESCS
public static final java.lang.String[][] ABLETYPE_DESCS
Stat
public Stat()
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
getTarget
public MOB getTarget(MOB mob,
java.lang.String targetName,
boolean quiet)
doSenses
public java.lang.String doSenses(int senseMask)
doDisposition
public java.lang.String doDisposition(int dispositionMask)
showTableStats
public boolean showTableStats(MOB mob,
int days,
int scale,
java.lang.String rest)
averageDamage
public int averageDamage(MOB M)
addCharStatsChars
protected void addCharStatsChars(CharStats cstats,
int headerWidth,
int numberWidth,
int[] col,
java.lang.StringBuilder str)
addCharThing
protected void addCharThing(int headerWidth,
int numberWidth,
int[] col,
java.lang.StringBuilder str,
java.lang.String title,
java.lang.String val)
addCharStatsState
protected void addCharStatsState(CharState cstats,
int headerWidth,
int numberWidth,
int[] col,
java.lang.StringBuilder str)
getMOBTarget
protected MOB getMOBTarget(MOB mob,
java.lang.String MOBname)
getItemTarget
protected Item getItemTarget(MOB mob,
java.lang.String itemName)
addCharStatsPhys
protected void addCharStatsPhys(PhyStats pstats,
int headerWidth,
int numberWidth,
int[] col,
java.lang.StringBuilder str)
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 commandcommands
- usually the command words and parameters; a set of stringsmetaFlags
- 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)
recoverMOB
public void recoverMOB(MOB M)
testMOB
public void testMOB(MOB target,
MOB M,
Environmental test)
reportOnDiffMOB
public void reportOnDiffMOB(java.lang.String name,
int diff,
java.lang.StringBuilder str)
reportOnDiffMOB
public void reportOnDiffMOB(Environmental test,
int diff,
java.lang.StringBuilder str)
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.
securityCheck
public boolean securityCheck(MOB mob)
- Description copied from interface:
Command
- Whether this command is available to the given player
- Specified by:
securityCheck
in interface Command
- Overrides:
securityCheck
in class StdCommand
- Parameters:
mob
- the player mob who might not even know about this command
- Returns:
- true if the command is available, and false if it is unknown