cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages
Class InitedMessage

Package class diagram package InitedMessage
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.udk.communication.messages.GBObjectUpdate
          extended by cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.InitedMessage
All Implemented Interfaces:
IWorldChangeEvent, IWorldObjectUpdatedEvent, IWorldObject, IGBWorldObjectEvent, cz.cuni.amis.utils.listener.Event

public class InitedMessage
extends GBObjectUpdate
implements IGBWorldObjectEvent, IWorldObject

Asynchronous message. Sent after succesfull init command (so usually just once). Holds many attributes of the bots like speed, id starting and max health, etc. Some attributes are not used due to GameBots mechanics. Corresponding GameBots message is INITED.


Nested Class Summary
 
Nested classes/interfaces inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent
IWorldObjectUpdatedEvent.DestroyWorldObject
 
Field Summary
protected  double AccelRate
          Accelartion rate of this bot.
protected  double AdrenalineMax
          Maxium amount of the adrenaline.
protected  double AdrenalineStart
          Amount of adrenaline at the start.
protected  double AirControl
          How well can be the bot controlled in the air (ranges from 0 to 1).
protected  double AirSpeed
          AirSpeed of the bot (in the air).
protected  UnrealId BotId
          A unique unreal Id of the new bot.
protected  double DamageScaling
          Damage scaling for this bot.
protected  double DodgeSpeedFactor
          Dodge speed factor.
protected  double DodgeSpeedZ
          Dodge jump Z boost of the bot.
protected  double GroundSpeed
          Groundspeed of the bot (on the ground).
protected  int HealthFull
          Full health of the bot (usually 100).
protected  int HealthMax
          Maximum health of the bot (default 199).
protected  int HealthStart
          Bot will always start with this health amount (usually 100).
static UnrealId InitedMessageId
           
protected  double JumpZ
          Bot Jump's Z boost.
protected  double LadderSpeed
          Ladderspeed of the bot (on the ladder).
protected  double MaxFallSpeed
          Max fall speed of the bot.
protected  int MaxMultiJump
          Maximum amount of succesing jumps.
protected  double MultiJumpBoost
          Not used in GB.
static String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  int ShieldStrengthMax
          Maximum strength of the bot armor (usually 150).
protected  int ShieldStrengthStart
          Starting strength of the bot armor (usually 0).
protected  double Time
           
protected  double WaterSpeed
          Waterspeed of the bot (in the water).
 
Constructor Summary
InitedMessage()
          Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
InitedMessage(InitedMessage original)
          Cloning constructor.
InitedMessage(UnrealId BotId, int HealthStart, int HealthFull, int HealthMax, double AdrenalineStart, double AdrenalineMax, int ShieldStrengthStart, int ShieldStrengthMax, int MaxMultiJump, double DamageScaling, double GroundSpeed, double WaterSpeed, double AirSpeed, double LadderSpeed, double AccelRate, double JumpZ, double MultiJumpBoost, double MaxFallSpeed, double DodgeSpeedFactor, double DodgeSpeedZ, double AirControl)
          Creates new instance of command InitedMessage.
 
Method Summary
 boolean equals(Object obj)
           
 double getAccelRate()
          Accelartion rate of this bot.
 double getAdrenalineMax()
          Maxium amount of the adrenaline.
 double getAdrenalineStart()
          Amount of adrenaline at the start.
 double getAirControl()
          How well can be the bot controlled in the air (ranges from 0 to 1).
 double getAirSpeed()
          AirSpeed of the bot (in the air).
 UnrealId getBotId()
          A unique unreal Id of the new bot.
 double getDamageScaling()
          Damage scaling for this bot.
 double getDodgeSpeedFactor()
          Dodge speed factor.
 double getDodgeSpeedZ()
          Dodge jump Z boost of the bot.
 double getGroundSpeed()
          Groundspeed of the bot (on the ground).
 int getHealthFull()
          Full health of the bot (usually 100).
 int getHealthMax()
          Maximum health of the bot (default 199).
 int getHealthStart()
          Bot will always start with this health amount (usually 100).
 UnrealId getId()
           
 double getJumpZ()
          Bot Jump's Z boost.
 double getLadderSpeed()
          Ladderspeed of the bot (on the ladder).
 double getLastSeenTime()
           
 ILocalWorldObject getLocal()
           
 double getMaxFallSpeed()
          Max fall speed of the bot.
 int getMaxMultiJump()
          Maximum amount of succesing jumps.
 double getMultiJumpBoost()
          Not used in GB.
 IWorldObject getObject()
          Returns original object (if method update() has already been called, for bot-programmer that is always true as the original object is updated and then the event is propagated).
 ISharedWorldObject getShared()
           
 int getShieldStrengthMax()
          Maximum strength of the bot armor (usually 150).
 int getShieldStrengthStart()
          Starting strength of the bot armor (usually 0).
 long getSimTime()
           
 IStaticWorldObject getStatic()
           
protected  double getTime()
           
 double getWaterSpeed()
          Waterspeed of the bot (in the water).
 int hashCode()
           
protected  void setTime(double time)
           
 String toHtmlString()
           
 String toString()
           
 IWorldObjectUpdateResult update(IWorldObject obj)
           
 
Methods inherited from class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
toJsonLiteral
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOTYPE

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

See Also:
Constant Field Values

BotId

protected UnrealId BotId
A unique unreal Id of the new bot.


HealthStart

protected int HealthStart
Bot will always start with this health amount (usually 100).


HealthFull

protected int HealthFull
Full health of the bot (usually 100).


HealthMax

protected int HealthMax
Maximum health of the bot (default 199).


AdrenalineStart

protected double AdrenalineStart
Amount of adrenaline at the start. Usually 0.


AdrenalineMax

protected double AdrenalineMax
Maxium amount of the adrenaline. Usually 100 (this can trigger the combos).


ShieldStrengthStart

protected int ShieldStrengthStart
Starting strength of the bot armor (usually 0).


ShieldStrengthMax

protected int ShieldStrengthMax
Maximum strength of the bot armor (usually 150).


MaxMultiJump

protected int MaxMultiJump
Maximum amount of succesing jumps. Currently limited to double jump in GB.


DamageScaling

protected double DamageScaling
Damage scaling for this bot. (he will deal reduced damage depending on the setting).


GroundSpeed

protected double GroundSpeed
Groundspeed of the bot (on the ground). Default 440.


WaterSpeed

protected double WaterSpeed
Waterspeed of the bot (in the water).


AirSpeed

protected double AirSpeed
AirSpeed of the bot (in the air).


LadderSpeed

protected double LadderSpeed
Ladderspeed of the bot (on the ladder).


AccelRate

protected double AccelRate
Accelartion rate of this bot. How fast he accelerates.


JumpZ

protected double JumpZ
Bot Jump's Z boost.


MultiJumpBoost

protected double MultiJumpBoost
Not used in GB.


MaxFallSpeed

protected double MaxFallSpeed
Max fall speed of the bot.


DodgeSpeedFactor

protected double DodgeSpeedFactor
Dodge speed factor.


DodgeSpeedZ

protected double DodgeSpeedZ
Dodge jump Z boost of the bot.


AirControl

protected double AirControl
How well can be the bot controlled in the air (ranges from 0 to 1).


InitedMessageId

public static final UnrealId InitedMessageId

Time

protected double Time
Constructor Detail

InitedMessage

public InitedMessage(UnrealId BotId,
                     int HealthStart,
                     int HealthFull,
                     int HealthMax,
                     double AdrenalineStart,
                     double AdrenalineMax,
                     int ShieldStrengthStart,
                     int ShieldStrengthMax,
                     int MaxMultiJump,
                     double DamageScaling,
                     double GroundSpeed,
                     double WaterSpeed,
                     double AirSpeed,
                     double LadderSpeed,
                     double AccelRate,
                     double JumpZ,
                     double MultiJumpBoost,
                     double MaxFallSpeed,
                     double DodgeSpeedFactor,
                     double DodgeSpeedZ,
                     double AirControl)
Creates new instance of command InitedMessage. Asynchronous message. Sent after succesfull init command (so usually just once). Holds many attributes of the bots like speed, id starting and max health, etc. Some attributes are not used due to GameBots mechanics. Corresponding GameBots message for this command is .

Parameters:
BotId - A unique unreal Id of the new bot.
HealthStart - Bot will always start with this health amount (usually 100).
HealthFull - Full health of the bot (usually 100).
HealthMax - Maximum health of the bot (default 199).
AdrenalineStart - Amount of adrenaline at the start. Usually 0.
AdrenalineMax - Maxium amount of the adrenaline. Usually 100 (this can trigger the combos).
ShieldStrengthStart - Starting strength of the bot armor (usually 0).
ShieldStrengthMax - Maximum strength of the bot armor (usually 150).
MaxMultiJump - Maximum amount of succesing jumps. Currently limited to double jump in GB.
DamageScaling - Damage scaling for this bot. (he will deal reduced damage depending on the setting).
GroundSpeed - Groundspeed of the bot (on the ground). Default 440.
WaterSpeed - Waterspeed of the bot (in the water).
AirSpeed - AirSpeed of the bot (in the air).
LadderSpeed - Ladderspeed of the bot (on the ladder).
AccelRate - Accelartion rate of this bot. How fast he accelerates.
JumpZ - Bot Jump's Z boost.
MultiJumpBoost - Not used in GB.
MaxFallSpeed - Max fall speed of the bot.
DodgeSpeedFactor - Dodge speed factor.
DodgeSpeedZ - Dodge jump Z boost of the bot.
AirControl - How well can be the bot controlled in the air (ranges from 0 to 1).

InitedMessage

public InitedMessage(InitedMessage original)
Cloning constructor.


InitedMessage

public InitedMessage()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).

Method Detail

getBotId

public UnrealId getBotId()
A unique unreal Id of the new bot.


getHealthStart

public int getHealthStart()
Bot will always start with this health amount (usually 100).


getHealthFull

public int getHealthFull()
Full health of the bot (usually 100).


getHealthMax

public int getHealthMax()
Maximum health of the bot (default 199).


getAdrenalineStart

public double getAdrenalineStart()
Amount of adrenaline at the start. Usually 0.


getAdrenalineMax

public double getAdrenalineMax()
Maxium amount of the adrenaline. Usually 100 (this can trigger the combos).


getShieldStrengthStart

public int getShieldStrengthStart()
Starting strength of the bot armor (usually 0).


getShieldStrengthMax

public int getShieldStrengthMax()
Maximum strength of the bot armor (usually 150).


getMaxMultiJump

public int getMaxMultiJump()
Maximum amount of succesing jumps. Currently limited to double jump in GB.


getDamageScaling

public double getDamageScaling()
Damage scaling for this bot. (he will deal reduced damage depending on the setting).


getGroundSpeed

public double getGroundSpeed()
Groundspeed of the bot (on the ground). Default 440.


getWaterSpeed

public double getWaterSpeed()
Waterspeed of the bot (in the water).


getAirSpeed

public double getAirSpeed()
AirSpeed of the bot (in the air).


getLadderSpeed

public double getLadderSpeed()
Ladderspeed of the bot (on the ladder).


getAccelRate

public double getAccelRate()
Accelartion rate of this bot. How fast he accelerates.


getJumpZ

public double getJumpZ()
Bot Jump's Z boost.


getMultiJumpBoost

public double getMultiJumpBoost()
Not used in GB.


getMaxFallSpeed

public double getMaxFallSpeed()
Max fall speed of the bot.


getDodgeSpeedFactor

public double getDodgeSpeedFactor()
Dodge speed factor.


getDodgeSpeedZ

public double getDodgeSpeedZ()
Dodge jump Z boost of the bot.


getAirControl

public double getAirControl()
How well can be the bot controlled in the air (ranges from 0 to 1).


getId

public UnrealId getId()
Specified by:
getId in interface IWorldObjectUpdatedEvent
Specified by:
getId in interface IWorldObject

getTime

protected double getTime()

setTime

protected void setTime(double time)

getLastSeenTime

public double getLastSeenTime()

getLocal

public ILocalWorldObject getLocal()

getShared

public ISharedWorldObject getShared()

getStatic

public IStaticWorldObject getStatic()

getSimTime

public long getSimTime()
Specified by:
getSimTime in interface IWorldChangeEvent
Specified by:
getSimTime in interface IWorldObject

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

update

public IWorldObjectUpdateResult update(IWorldObject obj)
Specified by:
update in interface IWorldObjectUpdatedEvent

getObject

public IWorldObject getObject()
Returns original object (if method update() has already been called, for bot-programmer that is always true as the original object is updated and then the event is propagated).


toString

public String toString()
Overrides:
toString in class InfoMessage

toHtmlString

public String toHtmlString()


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.