java.lang.Object
burningbox.org.dsh.commands.AbstractCommand
burningbox.org.dsh.commands.UndoableAbstractCommand
burningbox.org.dsh.commands.AbCommand
- All Implemented Interfaces:
- CombatCommand, RegularCommand
- public class AbCommand
- extends UndoableAbstractCommand
- implements RegularCommand, CombatCommand
Adds or remove hit points to a monster or a character.
min is then -10 (death) and max is the max hit points.
CVS Info :
$Author: jmettraux $
$Date: 2002/06/26 15:00:57 $
$Id: AbCommand.java,v 1.3 2002/06/26 15:00:57 jmettraux Exp $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
targetName
protected java.lang.String targetName
abilityDefinition
protected java.lang.String abilityDefinition
delta
protected int delta
AbCommand
public AbCommand()
incrementHitPoints
private static boolean incrementHitPoints(java.lang.String targetName,
int hpCount)
modifyAbility
public boolean modifyAbility(int delta)
isAbilityDefinitionOk
private boolean isAbilityDefinitionOk()
execute
public boolean execute()
- Description copied from class:
AbstractCommand
- This method is called when the command is executed.
- Specified by:
execute in class AbstractCommand
getUndoInfo
public java.lang.String getUndoInfo()
- Description copied from class:
UndoableAbstractCommand
- A one-line info about the consequences of any undo
- Specified by:
getUndoInfo in class UndoableAbstractCommand
undo
public void undo()
- Description copied from class:
UndoableAbstractCommand
- This method is called to undo a command.
- Specified by:
undo in class UndoableAbstractCommand
getSyntax
public java.lang.String getSyntax()
- Description copied from class:
AbstractCommand
- as the name implies
- Specified by:
getSyntax in class AbstractCommand
getHelp
public java.lang.String getHelp()
- Description copied from class:
AbstractCommand
- as the name implies
- Specified by:
getHelp in class AbstractCommand