cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class SelfMessage.SelfLocalMessage

Package class diagram package SelfMessage.SelfLocalMessage
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.SelfMessage.SelfLocalMessage
All Implemented Interfaces:
IWorldObject, ILocalWorldObject, Cloneable
Enclosing class:
SelfMessage

public class SelfMessage.SelfLocalMessage
extends SelfLocal

Implementation of the local part of the GameBots2004 message SLF, used to facade SLFMessage.

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


Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.SelfLocal
SimTime
 
Constructor Summary
SelfMessage.SelfLocalMessage()
           
 
Method Summary
 SelfMessage.SelfLocalMessage 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.
 int getHelmetArmor()
          (UT3) Armor rating of the helmet.
 UnrealId getId()
          Unique Id of this self message instance.
 SelfMessage.SelfLocalMessage getLocal()
           
 Location getLocation()
          An absolute location of the bot.
 String getName()
          Human readable bot name.
 String getPowerUp()
          (UT3) Type of Powerup.
 double getPowerUpTime()
          (UT3) Time when the PowerUp effect expires.
 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 getShieldBeltArmor()
          (UT3) Armor rating of the shieldbelt.
 int getSmallArmor()
          Also refered to as a "low armor".
 IStaticWorldObject getStatic()
           
 int getTeam()
          What team the bot is on.
 int getThighpadArmor()
          (UT3) Armor rating of the thighpad.
 double getUDamageTime()
          Time when the UDamage effect expires.
 Velocity getVelocity()
          Absolute velocity of the bot as a vector of movement per one game second.
 int getVestArmor()
          (UT3) Armor rating of the vest.
 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.
 String toHtmlString()
           
 String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.SelfLocal
getCompositeClass, getSimTime, setSimTime
 
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
 

Constructor Detail

SelfMessage.SelfLocalMessage

public SelfMessage.SelfLocalMessage()
Method Detail

clone

public SelfMessage.SelfLocalMessage clone()
Specified by:
clone in interface ILocalWorldObject
Specified by:
clone in class SelfLocal

getLocal

public SelfMessage.SelfLocalMessage getLocal()
Overrides:
getLocal in class SelfLocal

getShared

public ISharedWorldObject getShared()
Overrides:
getShared in class SelfLocal

getStatic

public IStaticWorldObject getStatic()
Overrides:
getStatic 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

getHelmetArmor

public int getHelmetArmor()
(UT3) Armor rating of the helmet. Maximum is 20 points of proection, removing 50% of damage or completely blocking a single headshot.

Specified by:
getHelmetArmor in class SelfLocal

getVestArmor

public int getVestArmor()
(UT3) Armor rating of the vest. Maximum provides 50 points of protection, removing 75% of damage.

Specified by:
getVestArmor in class SelfLocal

getThighpadArmor

public int getThighpadArmor()
(UT3) Armor rating of the thighpad. Maximum provide 30 points of protection, removing 50% of damage.

Specified by:
getThighpadArmor in class SelfLocal

getShieldBeltArmor

public int getShieldBeltArmor()
(UT3) Armor rating of the shieldbelt. Maximum provides 100 points of protection, removing 100% of damage.

Specified by:
getShieldBeltArmor 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

getPowerUp

public String getPowerUp()
(UT3) Type of Powerup.

Specified by:
getPowerUp in class SelfLocal

getPowerUpTime

public double getPowerUpTime()
(UT3) Time when the PowerUp effect expires. If the number is higher than the current time, it means the bot has the PowerUp effect active right now.

Specified by:
getPowerUpTime 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

toString

public String toString()
Overrides:
toString in class SelfLocal

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class SelfLocal


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