cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class BotDamaged

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BotDamaged
All Implemented Interfaces:
IWorldChangeEvent, IWorldEvent, Event

public class BotDamaged
extends InfoMessage
implements IWorldEvent, IWorldChangeEvent

Definition of the event DAM.

Complete message documentation: Asynchronous message. This bot has been damaged.


Field Summary
protected  boolean BulletHit
          If this damage was caused by bullet.
protected  boolean CausedByWorld
          If this damage was caused by world - falling into lava, or falling down.
protected  int Damage
          Amount of damage taken.
protected  java.lang.String DamageType
          A string describing what kind of damage.
protected  boolean DirectDamage
          If the damage is direct.
protected  boolean Flaming
          If this damage is causing our bot to burn.
protected  UnrealId Instigator
          Id of the player who is damaging the bot, filled only if instigator is in the field of view of the bot.
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  long SimTime
           
protected  boolean VehicleHit
          If this damage was caused by vehicle running over us.
protected  java.lang.String WeaponName
          Name of the weapon that caused this damage.
 
Constructor Summary
BotDamaged()
          Parameter-less contructor for the message.
BotDamaged(BotDamaged original)
          Cloning constructor from the full message.
BotDamaged(int Damage, java.lang.String DamageType, java.lang.String WeaponName, boolean Flaming, boolean CausedByWorld, boolean DirectDamage, boolean BulletHit, boolean VehicleHit, UnrealId Instigator)
          Creates new instance of the message BotDamaged.
 
Method Summary
 int getDamage()
          Amount of damage taken.
 java.lang.String getDamageType()
          A string describing what kind of damage.
 UnrealId getInstigator()
          Id of the player who is damaging the bot, filled only if instigator is in the field of view of the bot.
 long getSimTime()
          Returns the simulation time when the event has occurred.
 java.lang.String getWeaponName()
          Name of the weapon that caused this damage.
 boolean isBulletHit()
          If this damage was caused by bullet.
 boolean isCausedByWorld()
          If this damage was caused by world - falling into lava, or falling down.
 boolean isDirectDamage()
          If the damage is direct.
 boolean isFlaming()
          If this damage is causing our bot to burn.
 boolean isVehicleHit()
          If this damage was caused by vehicle running over us.
protected  void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 java.lang.String toHtmlString()
           
 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

SimTime

protected long SimTime

Damage

protected int Damage
Amount of damage taken.


DamageType

protected java.lang.String DamageType
A string describing what kind of damage.


WeaponName

protected java.lang.String WeaponName
Name of the weapon that caused this damage. Not sent right now.


Flaming

protected boolean Flaming
If this damage is causing our bot to burn. TODO


CausedByWorld

protected boolean CausedByWorld
If this damage was caused by world - falling into lava, or falling down.


DirectDamage

protected boolean DirectDamage
If the damage is direct. TODO


BulletHit

protected boolean BulletHit
If this damage was caused by bullet.


VehicleHit

protected boolean VehicleHit
If this damage was caused by vehicle running over us.


Instigator

protected UnrealId Instigator
Id of the player who is damaging the bot, filled only if instigator is in the field of view of the bot.

Constructor Detail

BotDamaged

public BotDamaged()
Parameter-less contructor for the message.


BotDamaged

public BotDamaged(int Damage,
                  java.lang.String DamageType,
                  java.lang.String WeaponName,
                  boolean Flaming,
                  boolean CausedByWorld,
                  boolean DirectDamage,
                  boolean BulletHit,
                  boolean VehicleHit,
                  UnrealId Instigator)
Creates new instance of the message BotDamaged. Asynchronous message. This bot has been damaged. Corresponding GameBots message is DAM.

Parameters:
Damage - Amount of damage taken.
DamageType - A string describing what kind of damage.
WeaponName - Name of the weapon that caused this damage. Not sent right now.
Flaming - If this damage is causing our bot to burn. TODO
CausedByWorld - If this damage was caused by world - falling into lava, or falling down.
DirectDamage - If the damage is direct. TODO
BulletHit - If this damage was caused by bullet.
VehicleHit - If this damage was caused by vehicle running over us.
Instigator - Id of the player who is damaging the bot, filled only if instigator is in the field of view of the bot.

BotDamaged

public BotDamaged(BotDamaged original)
Cloning constructor from the full message.

Parameters:
original -
Method Detail

getSimTime

public long getSimTime()
Description copied from interface: IWorldEvent
Returns the simulation time when the event has occurred.

Specified by:
getSimTime in interface IWorldChangeEvent
Specified by:
getSimTime in interface IWorldEvent
Returns:
timestamp

setSimTime

protected void setSimTime(long SimTime)
Used by Yylex to slip correct time of the object or programmatically.


getDamage

public int getDamage()
Amount of damage taken.


getDamageType

public java.lang.String getDamageType()
A string describing what kind of damage.


getWeaponName

public java.lang.String getWeaponName()
Name of the weapon that caused this damage. Not sent right now.


isFlaming

public boolean isFlaming()
If this damage is causing our bot to burn. TODO


isCausedByWorld

public boolean isCausedByWorld()
If this damage was caused by world - falling into lava, or falling down.


isDirectDamage

public boolean isDirectDamage()
If the damage is direct. TODO


isBulletHit

public boolean isBulletHit()
If this damage was caused by bullet.


isVehicleHit

public boolean isVehicleHit()
If this damage was caused by vehicle running over us.


getInstigator

public UnrealId getInstigator()
Id of the player who is damaging the bot, filled only if instigator is in the field of view of the bot.


toString

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

toHtmlString

public java.lang.String toHtmlString()