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

Package class diagram package SelfLocalImpl
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.SelfLocal
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.SelfLocalImpl
All Implemented Interfaces:
IWorldObject, ILocalWorldObject, Cloneable

public class SelfLocalImpl
extends SelfLocal

Implementation of the local part of the GameBots2004 message SLF.

Complete message documentation: Synchronous message. Information about your bot's state.


Nested Class Summary
static class SelfLocalImpl.SelfLocalUpdate
           
 
Field Summary
protected  String Action
          Name of the current BDI action.
protected  int Adrenaline
          How much adrenaline the bot has.
protected  boolean AltFiring
          If we are firing in secondary firing mode.
protected  String Anim
          For UE2.
protected  int Armor
          Combined size of high armor and low armor (or small armor).
protected  UnrealId BotId
          Unique Id of this bot.
protected  String Bubble
          For UE2.
protected  String Combo
          Name of the current combo (None if no combo active).
protected  boolean Crouched
          If we are currently crouched.
protected  String EmotCenter
          For UE2.
protected  String EmotLeft
          For UE2.
protected  String EmotRight
          For UE2.
protected  Location FloorLocation
          Holds current floor location under the bot.
protected  Location FloorNormal
          Holds current floor normal under the bot.
protected  int Health
          How much health the bot has left.
protected  UnrealId Id
          Unique Id of this self message instance.
protected  Location Location
          An absolute location of the bot.
protected  String Name
          Human readable bot name.
protected  int PrimaryAmmo
          How much ammo the bot has left for current weapon primary mode.
protected  Rotation Rotation
          Which direction the bot is facing in absolute terms.
protected  int SecondaryAmmo
          How much ammo the bot has left for current weapon secondary mode.
protected  boolean Shooting
          If the bot is shooting or not.
protected  int SmallArmor
          Also refered to as a "low armor".
protected  int Team
          What team the bot is on.
protected  double UDamageTime
          Time when the UDamage effect expires.
protected  boolean Vehicle
          If we are vehicle just these attr.
protected  Velocity Velocity
          Absolute velocity of the bot as a vector of movement per one game second.
protected  boolean Walking
          If we are currently in walking mode.
protected  String Weapon
          Id of the weapon we are holding.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.SelfLocal
SimTime
 
Constructor Summary
SelfLocalImpl()
          Parameter-less contructor for the message.
SelfLocalImpl(Self original)
          Cloning constructor from the full message.
SelfLocalImpl(SelfLocal original)
          Cloning constructor from the message part.
SelfLocalImpl(SelfLocalImpl original)
          Cloning constructor from the full message.
SelfLocalImpl(UnrealId Id, UnrealId BotId, String Name, boolean Vehicle, Location Location, Velocity Velocity, Rotation Rotation, int Team, String Weapon, boolean Shooting, int Health, int PrimaryAmmo, int SecondaryAmmo, int Adrenaline, int Armor, int SmallArmor, boolean AltFiring, boolean Crouched, boolean Walking, Location FloorLocation, Location FloorNormal, String Combo, double UDamageTime, String Action, String EmotLeft, String EmotCenter, String EmotRight, String Bubble, String Anim)
          Creates new instance of the message Self.
 
Method Summary
 SelfLocalImpl clone()
           
 String getAction()
          Name of the current BDI action.
 int getAdrenaline()
          How much adrenaline the bot has.
 String getAnim()
          For UE2.
 int getArmor()
          Combined size of high armor and low armor (or small armor).
 UnrealId getBotId()
          Unique Id of this bot.
 String getBubble()
          For UE2.
 String getCombo()
          Name of the current combo (None if no combo active).
 String getEmotCenter()
          For UE2.
 String getEmotLeft()
          For UE2.
 String getEmotRight()
          For UE2.
 Location getFloorLocation()
          Holds current floor location under the bot.
 Location getFloorNormal()
          Holds current floor normal under the bot.
 int getHealth()
          How much health the bot has left.
 UnrealId getId()
          Unique Id of this self message instance.
 SelfLocalImpl getLocal()
           
 Location getLocation()
          An absolute location of the bot.
 String getName()
          Human readable bot name.
 int getPrimaryAmmo()
          How much ammo the bot has left for current weapon primary mode.
 Rotation getRotation()
          Which direction the bot is facing in absolute terms.
 int getSecondaryAmmo()
          How much ammo the bot has left for current weapon secondary mode.
 ISharedWorldObject getShared()
           
 int getSmallArmor()
          Also refered to as a "low armor".
 IStaticWorldObject getStatic()
           
 int getTeam()
          What team the bot is on.
 double getUDamageTime()
          Time when the UDamage effect expires.
 Velocity getVelocity()
          Absolute velocity of the bot as a vector of movement per one game second.
 String getWeapon()
          Id of the weapon we are holding.
 boolean isAltFiring()
          If we are firing in secondary firing mode.
 boolean isCrouched()
          If we are currently crouched.
 boolean isShooting()
          If the bot is shooting or not.
 boolean isVehicle()
          If we are vehicle just these attr.
 boolean isWalking()
          If we are currently in walking mode.
 void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 String toHtmlString()
           
 String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.SelfLocal
getCompositeClass, getSimTime
 
Methods inherited from class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
toJsonLiteral
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Id

protected UnrealId Id
Unique Id of this self message instance.


BotId

protected UnrealId BotId
Unique Id of this bot.


Name

protected String Name
Human readable bot name.


Vehicle

protected boolean Vehicle
If we are vehicle just these attr. are sent in SLF: "Id","Vehicle""Rotation", "Location","Velocity ","Name ","Team" ,"Health" "Armor","Adrenaline", "FloorLocation", "FloorNormal".


Location

protected Location Location
An absolute location of the bot.


Velocity

protected Velocity Velocity
Absolute velocity of the bot as a vector of movement per one game second.


Rotation

protected Rotation Rotation
Which direction the bot is facing in absolute terms.


Team

protected int Team
What team the bot is on. 255 is no team. 0-3 are red, blue, green, gold in that order.


Weapon

protected String Weapon
Id of the weapon we are holding. This is unique Id of an item in our inventory and is different from the Id of the item we pick up from the ground! We can parse this string to look which weapon we hold. Weapon strings to look for include: "AssaultRifle", "ShieldGun", "FlakCannon", "BioRifle", "ShockRifle", "LinkGun", "SniperRifle", "RocketLauncher", "Minigun", "LightingGun", "Translocator". TODO: Look if this is all.


Shooting

protected boolean Shooting
If the bot is shooting or not.


Health

protected int Health
How much health the bot has left. Starts at 100, ranges from 0 to 200.


PrimaryAmmo

protected int PrimaryAmmo
How much ammo the bot has left for current weapon primary mode.


SecondaryAmmo

protected int SecondaryAmmo
How much ammo the bot has left for current weapon secondary mode. Weapon does not have to support sec. fire mode.


Adrenaline

protected int Adrenaline
How much adrenaline the bot has.


Armor

protected int Armor
Combined size of high armor and low armor (or small armor). The high and low armor are tracked separately. Low armor is limited to 50 points, while the high armor can have up to 150 points. Both stacks can have a combined size of 150 points as well, so if low armor is already at 50 points, high armor can have 100 points at max.


SmallArmor

protected int SmallArmor
Also refered to as a "low armor". Ranges from 0 to 50 points.


AltFiring

protected boolean AltFiring
If we are firing in secondary firing mode.


Crouched

protected boolean Crouched
If we are currently crouched.


Walking

protected boolean Walking
If we are currently in walking mode.


FloorLocation

protected Location FloorLocation
Holds current floor location under the bot.


FloorNormal

protected Location FloorNormal
Holds current floor normal under the bot.


Combo

protected String Combo
Name of the current combo (None if no combo active). Can be xGame.ComboBerserk, xGame.ComboDefensive, xGame.ComboInvis or xGame.ComboSpeed. To trigger combo adrenaline needs to be at 100 (maximum) and no other combo can be active.


UDamageTime

protected double UDamageTime
Time when the UDamage effect expires. If the number is higher then the current time, it means the bot has UDamage effect active right now.


Action

protected String Action
Name of the current BDI action.


EmotLeft

protected String EmotLeft
For UE2. Holds left emoticon of the bot, "None" means none set.


EmotCenter

protected String EmotCenter
For UE2. Holds center emoticon of the bot, "None" means none set.


EmotRight

protected String EmotRight
For UE2. Holds right emoticon of the bot, "None" means none set.


Bubble

protected String Bubble
For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.


Anim

protected String Anim
For UE2. Current played animation of the bot.

Constructor Detail

SelfLocalImpl

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


SelfLocalImpl

public SelfLocalImpl(UnrealId Id,
                     UnrealId BotId,
                     String Name,
                     boolean Vehicle,
                     Location Location,
                     Velocity Velocity,
                     Rotation Rotation,
                     int Team,
                     String Weapon,
                     boolean Shooting,
                     int Health,
                     int PrimaryAmmo,
                     int SecondaryAmmo,
                     int Adrenaline,
                     int Armor,
                     int SmallArmor,
                     boolean AltFiring,
                     boolean Crouched,
                     boolean Walking,
                     Location FloorLocation,
                     Location FloorNormal,
                     String Combo,
                     double UDamageTime,
                     String Action,
                     String EmotLeft,
                     String EmotCenter,
                     String EmotRight,
                     String Bubble,
                     String Anim)
Creates new instance of the message Self. Synchronous message. Information about your bot's state. Corresponding GameBots message (local part) is SLF.

Parameters:
Id - Unique Id of this self message instance.
BotId - Unique Id of this bot.
Name - Human readable bot name.
Vehicle - If we are vehicle just these attr. are sent in SLF: "Id","Vehicle""Rotation", "Location","Velocity ","Name ","Team" ,"Health" "Armor","Adrenaline", "FloorLocation", "FloorNormal".
Location - An absolute location of the bot.
Velocity - Absolute velocity of the bot as a vector of movement per one game second.
Rotation - Which direction the bot is facing in absolute terms.
Team - What team the bot is on. 255 is no team. 0-3 are red, blue, green, gold in that order.
Weapon - Id of the weapon we are holding. This is unique Id of an item in our inventory and is different from the Id of the item we pick up from the ground! We can parse this string to look which weapon we hold. Weapon strings to look for include: "AssaultRifle", "ShieldGun", "FlakCannon", "BioRifle", "ShockRifle", "LinkGun", "SniperRifle", "RocketLauncher", "Minigun", "LightingGun", "Translocator". TODO: Look if this is all.
Shooting - If the bot is shooting or not.
Health - How much health the bot has left. Starts at 100, ranges from 0 to 200.
PrimaryAmmo - How much ammo the bot has left for current weapon primary mode.
SecondaryAmmo - How much ammo the bot has left for current weapon secondary mode. Weapon does not have to support sec. fire mode.
Adrenaline - How much adrenaline the bot has.
Armor - Combined size of high armor and low armor (or small armor). The high and low armor are tracked separately. Low armor is limited to 50 points, while the high armor can have up to 150 points. Both stacks can have a combined size of 150 points as well, so if low armor is already at 50 points, high armor can have 100 points at max.
SmallArmor - Also refered to as a "low armor". Ranges from 0 to 50 points.
AltFiring - If we are firing in secondary firing mode.
Crouched - If we are currently crouched.
Walking - If we are currently in walking mode.
FloorLocation - Holds current floor location under the bot.
FloorNormal - Holds current floor normal under the bot.
Combo - Name of the current combo (None if no combo active). Can be xGame.ComboBerserk, xGame.ComboDefensive, xGame.ComboInvis or xGame.ComboSpeed. To trigger combo adrenaline needs to be at 100 (maximum) and no other combo can be active.
UDamageTime - Time when the UDamage effect expires. If the number is higher then the current time, it means the bot has UDamage effect active right now.
Action - Name of the current BDI action.
EmotLeft - For UE2. Holds left emoticon of the bot, "None" means none set.
EmotCenter - For UE2. Holds center emoticon of the bot, "None" means none set.
EmotRight - For UE2. Holds right emoticon of the bot, "None" means none set.
Bubble - For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.
Anim - For UE2. Current played animation of the bot.

SelfLocalImpl

public SelfLocalImpl(Self original)
Cloning constructor from the full message.

Parameters:
original -

SelfLocalImpl

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

Parameters:
original -

SelfLocalImpl

public SelfLocalImpl(SelfLocal original)
Cloning constructor from the message part.

Parameters:
original -
Method Detail

setSimTime

public void setSimTime(long SimTime)
Description copied from class: SelfLocal
Used by Yylex to slip correct time of the object or programmatically.

Overrides:
setSimTime in class SelfLocal

clone

public SelfLocalImpl clone()
Specified by:
clone in interface ILocalWorldObject
Specified by:
clone in class SelfLocal

getId

public UnrealId getId()
Unique Id of this self message instance.

Specified by:
getId in interface IWorldObject
Specified by:
getId in class SelfLocal

getBotId

public UnrealId getBotId()
Unique Id of this bot.

Specified by:
getBotId in class SelfLocal

getName

public String getName()
Human readable bot name.

Specified by:
getName in class SelfLocal

isVehicle

public boolean isVehicle()
If we are vehicle just these attr. are sent in SLF: "Id","Vehicle""Rotation", "Location","Velocity ","Name ","Team" ,"Health" "Armor","Adrenaline", "FloorLocation", "FloorNormal".

Specified by:
isVehicle in class SelfLocal

getLocation

public Location getLocation()
An absolute location of the bot.

Specified by:
getLocation in class SelfLocal

getVelocity

public Velocity getVelocity()
Absolute velocity of the bot as a vector of movement per one game second.

Specified by:
getVelocity in class SelfLocal

getRotation

public Rotation getRotation()
Which direction the bot is facing in absolute terms.

Specified by:
getRotation in class SelfLocal

getTeam

public int getTeam()
What team the bot is on. 255 is no team. 0-3 are red, blue, green, gold in that order.

Specified by:
getTeam in class SelfLocal

getWeapon

public String getWeapon()
Id of the weapon we are holding. This is unique Id of an item in our inventory and is different from the Id of the item we pick up from the ground! We can parse this string to look which weapon we hold. Weapon strings to look for include: "AssaultRifle", "ShieldGun", "FlakCannon", "BioRifle", "ShockRifle", "LinkGun", "SniperRifle", "RocketLauncher", "Minigun", "LightingGun", "Translocator". TODO: Look if this is all.

Specified by:
getWeapon in class SelfLocal

isShooting

public boolean isShooting()
If the bot is shooting or not.

Specified by:
isShooting in class SelfLocal

getHealth

public int getHealth()
How much health the bot has left. Starts at 100, ranges from 0 to 200.

Specified by:
getHealth in class SelfLocal

getPrimaryAmmo

public int getPrimaryAmmo()
How much ammo the bot has left for current weapon primary mode.

Specified by:
getPrimaryAmmo in class SelfLocal

getSecondaryAmmo

public int getSecondaryAmmo()
How much ammo the bot has left for current weapon secondary mode. Weapon does not have to support sec. fire mode.

Specified by:
getSecondaryAmmo in class SelfLocal

getAdrenaline

public int getAdrenaline()
How much adrenaline the bot has.

Specified by:
getAdrenaline in class SelfLocal

getArmor

public int getArmor()
Combined size of high armor and low armor (or small armor). The high and low armor are tracked separately. Low armor is limited to 50 points, while the high armor can have up to 150 points. Both stacks can have a combined size of 150 points as well, so if low armor is already at 50 points, high armor can have 100 points at max.

Specified by:
getArmor in class SelfLocal

getSmallArmor

public int getSmallArmor()
Also refered to as a "low armor". Ranges from 0 to 50 points.

Specified by:
getSmallArmor in class SelfLocal

isAltFiring

public boolean isAltFiring()
If we are firing in secondary firing mode.

Specified by:
isAltFiring in class SelfLocal

isCrouched

public boolean isCrouched()
If we are currently crouched.

Specified by:
isCrouched in class SelfLocal

isWalking

public boolean isWalking()
If we are currently in walking mode.

Specified by:
isWalking in class SelfLocal

getFloorLocation

public Location getFloorLocation()
Holds current floor location under the bot.

Specified by:
getFloorLocation in class SelfLocal

getFloorNormal

public Location getFloorNormal()
Holds current floor normal under the bot.

Specified by:
getFloorNormal in class SelfLocal

getCombo

public String getCombo()
Name of the current combo (None if no combo active). Can be xGame.ComboBerserk, xGame.ComboDefensive, xGame.ComboInvis or xGame.ComboSpeed. To trigger combo adrenaline needs to be at 100 (maximum) and no other combo can be active.

Specified by:
getCombo in class SelfLocal

getUDamageTime

public double getUDamageTime()
Time when the UDamage effect expires. If the number is higher then the current time, it means the bot has UDamage effect active right now.

Specified by:
getUDamageTime in class SelfLocal

getAction

public String getAction()
Name of the current BDI action.

Specified by:
getAction in class SelfLocal

getEmotLeft

public String getEmotLeft()
For UE2. Holds left emoticon of the bot, "None" means none set.

Specified by:
getEmotLeft in class SelfLocal

getEmotCenter

public String getEmotCenter()
For UE2. Holds center emoticon of the bot, "None" means none set.

Specified by:
getEmotCenter in class SelfLocal

getEmotRight

public String getEmotRight()
For UE2. Holds right emoticon of the bot, "None" means none set.

Specified by:
getEmotRight in class SelfLocal

getBubble

public String getBubble()
For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.

Specified by:
getBubble in class SelfLocal

getAnim

public String getAnim()
For UE2. Current played animation of the bot.

Specified by:
getAnim in class SelfLocal

getLocal

public SelfLocalImpl getLocal()
Overrides:
getLocal in class SelfLocal

getShared

public ISharedWorldObject getShared()
Overrides:
getShared in class SelfLocal

getStatic

public IStaticWorldObject getStatic()
Overrides:
getStatic in class SelfLocal

toString

public String toString()
Overrides:
toString in class SelfLocal

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class SelfLocal


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