cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands
Class ChangeAttribute

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.ChangeAttribute

public class ChangeAttribute
extends CommandMessage

Representation of the GameBots2004 command CHATTR. Will change the specified attribute of the bot. This command can be issued also by bot on the bot itself (in this case Id attribute is not parsed). Issuing by bot is allowed just when the game has allowed cheating (bAllowCheats = True in GameBots2004.ini file).


Field Summary
protected  java.lang.Integer Adrenaline
          Sets the bot adrenaline.
protected  java.lang.Integer Health
          Sets the bot health.
protected  UnrealId Id
          Id of the target bot.
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
 
Constructor Summary
ChangeAttribute()
          Creates new instance of command ChangeAttribute.
ChangeAttribute(ChangeAttribute original)
          Cloning constructor.
ChangeAttribute(UnrealId Id, java.lang.Integer Health, java.lang.Integer Adrenaline)
          Creates new instance of command ChangeAttribute.
 
Method Summary
 java.lang.Integer getAdrenaline()
          Sets the bot adrenaline.
 java.lang.Integer getHealth()
          Sets the bot health.
 UnrealId getId()
          Id of the target bot.
 ChangeAttribute setAdrenaline(java.lang.Integer Adrenaline)
          Sets the bot adrenaline.
 ChangeAttribute setHealth(java.lang.Integer Health)
          Sets the bot health.
 ChangeAttribute setId(UnrealId Id)
          Id of the target bot.
 java.lang.String toHtmlString()
           
 java.lang.String toMessage()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOTYPE

public static final java.lang.String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

Id

protected UnrealId Id
Id of the target bot. Not used if sent as a command for the bot.


Health

protected java.lang.Integer Health
Sets the bot health. Maximum health level is 199 in UT2004.


Adrenaline

protected java.lang.Integer Adrenaline
Sets the bot adrenaline. From 0 to 100.

Constructor Detail

ChangeAttribute

public ChangeAttribute(UnrealId Id,
                       java.lang.Integer Health,
                       java.lang.Integer Adrenaline)
Creates new instance of command ChangeAttribute. Will change the specified attribute of the bot. This command can be issued also by bot on the bot itself (in this case Id attribute is not parsed). Issuing by bot is allowed just when the game has allowed cheating (bAllowCheats = True in GameBots2004.ini file). Corresponding GameBots message for this command is CHATTR.

Parameters:
Id - Id of the target bot. Not used if sent as a command for the bot.
Health - Sets the bot health. Maximum health level is 199 in UT2004.
Adrenaline - Sets the bot adrenaline. From 0 to 100.

ChangeAttribute

public ChangeAttribute()
Creates new instance of command ChangeAttribute. Will change the specified attribute of the bot. This command can be issued also by bot on the bot itself (in this case Id attribute is not parsed). Issuing by bot is allowed just when the game has allowed cheating (bAllowCheats = True in GameBots2004.ini file). Corresponding GameBots message for this command is CHATTR.

WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!


ChangeAttribute

public ChangeAttribute(ChangeAttribute original)
Cloning constructor.

Parameters:
original -
Method Detail

getId

public UnrealId getId()
Id of the target bot. Not used if sent as a command for the bot.


setId

public ChangeAttribute setId(UnrealId Id)
Id of the target bot. Not used if sent as a command for the bot.


getHealth

public java.lang.Integer getHealth()
Sets the bot health. Maximum health level is 199 in UT2004.


setHealth

public ChangeAttribute setHealth(java.lang.Integer Health)
Sets the bot health. Maximum health level is 199 in UT2004.


getAdrenaline

public java.lang.Integer getAdrenaline()
Sets the bot adrenaline. From 0 to 100.


setAdrenaline

public ChangeAttribute setAdrenaline(java.lang.Integer Adrenaline)
Sets the bot adrenaline. From 0 to 100.


toString

public java.lang.String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()