com.planet_ink.coffee_mud.Commands
Class Test
java.lang.Object
com.planet_ink.coffee_mud.Commands.StdCommand
com.planet_ink.coffee_mud.Commands.Test
- All Implemented Interfaces:
- Command, CMObject, java.lang.Cloneable, java.lang.Comparable<CMObject>
public class Test
- extends StdCommand
Constructor Summary |
Test()
|
Method Summary |
boolean |
canBeOrdered()
Whether the a group leader or charmer can order their followers
to do this command. |
boolean |
effectCheck(java.lang.String[] spells,
MOB mob)
|
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. |
void |
giveAbility(Physical P,
Ability A)
|
Item[] |
giveTo(Item I,
Ability A,
MOB mob1,
MOB mob2,
int code)
|
boolean |
isAllAdjusted(MOB mob)
|
boolean |
isAnyAdjusted(MOB mob)
|
static java.lang.String |
maliciousSemiSpellList()
|
int[] |
recoverMath(int level,
int con,
int inte,
int wis,
int str,
boolean isHungry,
boolean isThirsty,
boolean isFatigued,
boolean isSleeping,
boolean isSittingOrRiding,
boolean isFlying,
boolean isSwimming)
|
void |
reset(MOB[] mobs,
MOB[] backups,
Room R,
Item[] IS,
Room R2)
|
boolean |
securityCheck(MOB mob)
Whether this command is available to the given player |
static java.lang.String |
semiSpellList()
|
boolean |
spellCheck(java.lang.String[] spells,
MOB mob)
|
boolean |
testResistance(MOB mob)
|
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 |
spells
public static final java.lang.String[] spells
semiSpellList
public static java.lang.String semiSpellList
maliciousspells
public static final java.lang.String[] maliciousspells
maliciousSemiSpellList
public static java.lang.String maliciousSemiSpellList
Test
public Test()
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 StdCommand
- Returns:
- the set of command words that the user enters
semiSpellList
public static java.lang.String semiSpellList()
maliciousSemiSpellList
public static java.lang.String maliciousSemiSpellList()
isAllAdjusted
public boolean isAllAdjusted(MOB mob)
isAnyAdjusted
public boolean isAnyAdjusted(MOB mob)
giveAbility
public void giveAbility(Physical P,
Ability A)
testResistance
public boolean testResistance(MOB mob)
giveTo
public Item[] giveTo(Item I,
Ability A,
MOB mob1,
MOB mob2,
int code)
spellCheck
public boolean spellCheck(java.lang.String[] spells,
MOB mob)
effectCheck
public boolean effectCheck(java.lang.String[] spells,
MOB mob)
reset
public void reset(MOB[] mobs,
MOB[] backups,
Room R,
Item[] IS,
Room R2)
recoverMath
public int[] recoverMath(int level,
int con,
int inte,
int wis,
int str,
boolean isHungry,
boolean isThirsty,
boolean isFatigued,
boolean isSleeping,
boolean isSittingOrRiding,
boolean isFlying,
boolean isSwimming)
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 StdCommand
- 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)
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 StdCommand
- 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