com.planet_ink.coffee_mud.Commands
Class Go

java.lang.Object
  extended by com.planet_ink.coffee_mud.Commands.StdCommand
      extended by com.planet_ink.coffee_mud.Commands.Go
All Implemented Interfaces:
Command, CMObject, java.lang.Cloneable, java.lang.Comparable<CMObject>
Direct Known Subclasses:
Crawl, Down, East, Enter, Flee, North, Northeast, Northwest, Pull, Push, Run, South, Southeast, Southwest, Up, West

public class Go
extends StdCommand


Field Summary
protected  java.util.Vector ifneccvec
           
protected  Command stander
           
 
Fields inherited from class com.planet_ink.coffee_mud.Commands.StdCommand
ID
 
Fields inherited from interface com.planet_ink.coffee_mud.Commands.interfaces.Command
METAFLAG_AS, METAFLAG_FORCED, METAFLAG_MPFORCED, METAFLAG_ORDER, METAFLAG_POSSESSED, METAFLAG_SNOOPED
 
Constructor Summary
Go()
           
 
Method Summary
 double actionsCost(MOB mob, java.util.Vector cmds)
          Returns the number of actions required to completely activate this command.
static java.util.Vector addRiders(Rider theRider, Rideable riding, java.util.Vector riders)
           
 boolean canBeOrdered()
          Whether the a group leader or charmer can order their followers to do this command.
 int energyExpenseFactor()
           
 boolean execute(MOB mob, java.util.Vector 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.
 boolean move(MOB mob, int directionCode, boolean flee, boolean nolook, boolean noriders)
           
 boolean move(MOB mob, int directionCode, boolean flee, boolean nolook, boolean noriders, boolean always)
           
 java.util.Vector ridersAhead(Rider theRider, Room sourceRoom, Room destRoom, int directionCode, boolean flee)
           
 void ridersBehind(java.util.Vector riders, Room sourceRoom, Room destRoom, int directionCode, boolean flee)
           
 void standIfNecessary(MOB mob, int metaFlags)
           
 
Methods inherited from class com.planet_ink.coffee_mud.Commands.StdCommand
combatActionsCost, compareTo, copyOf, ID, initializeClass, newInstance, preExecute, securityCheck, staffCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stander

protected Command stander

ifneccvec

protected java.util.Vector ifneccvec
Constructor Detail

Go

public Go()
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 StdCommand
Returns:
the set of command words that the user enters

energyExpenseFactor

public int energyExpenseFactor()

ridersBehind

public void ridersBehind(java.util.Vector riders,
                         Room sourceRoom,
                         Room destRoom,
                         int directionCode,
                         boolean flee)

addRiders

public static java.util.Vector addRiders(Rider theRider,
                                         Rideable riding,
                                         java.util.Vector riders)

ridersAhead

public java.util.Vector ridersAhead(Rider theRider,
                                    Room sourceRoom,
                                    Room destRoom,
                                    int directionCode,
                                    boolean flee)

move

public boolean move(MOB mob,
                    int directionCode,
                    boolean flee,
                    boolean nolook,
                    boolean noriders)

move

public boolean move(MOB mob,
                    int directionCode,
                    boolean flee,
                    boolean nolook,
                    boolean noriders,
                    boolean always)

standIfNecessary

public void standIfNecessary(MOB mob,
                             int metaFlags)
                      throws java.io.IOException
Throws:
java.io.IOException

execute

public boolean execute(MOB mob,
                       java.util.Vector 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 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, Vector), Command.securityCheck(MOB)

actionsCost

public double actionsCost(MOB mob,
                          java.util.Vector cmds)
Description copied from interface: Command
Returns the number of actions required to completely activate this command. A value of 0.0 means perform instantly. This method only applies when the user is not in combat.

Specified by:
actionsCost in interface Command
Overrides:
actionsCost in class StdCommand
Parameters:
mob - the mob executing the command, if any
cmds - the parameters to be passed to the command, if any
Returns:
the number of player free actions required to do this
See Also:
Command.combatActionsCost(MOB, Vector)

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.