
            /**
            IMPORTANT !!!
       
            DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbinfomessages BY
            THE JavaClassesGenerator.xslt. MODIFY THESE FILES INSTEAD OF THIS ONE.
       
            IMPORTANT END !!!
            */
            package
            cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
	    		import java.util.*;    
    import javax.vecmath.*;    
    import cz.cuni.amis.pogamut.base.communication.messages.*;    
    import cz.cuni.amis.pogamut.base.agent.worldview.*;    
    import cz.cuni.amis.pogamut.base.agent.worldview.objects.*;    
    import cz.cuni.amis.pogamut.base.communication.translator.*;    
    import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;    
    import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;    
    import cz.cuni.amis.pogamut.base.exceptions.*;    
    import cz.cuni.amis.pogamut.base3d.worldview.objects.*;    
    import cz.cuni.amis.pogamut.ut2004.communication.messages.*;    
    import cz.cuni.amis.pogamut.ut2004.agent.worldview.objects.*;    
                
            
            /**
              
		Synchronous message. Information about your bot's state.
	
                          Corresponding GameBots message is 
                          SLF.
                      
             */
            
            public class
            Self
                    extends GBObjectUpdate
                
	            	implements IGBWorldObjectEvent, IWorldObject, ILocated, ILocomotive, IRotable
                        
            {
            
            
            
    	/** Example how the message looks like - used during parser tests. */
    	public static final String PROTOTYPE = 
    		"SLF {Id unreal_id} {Name text} {Vehicle False} {Location 0,0,0} {Velocity 0,0,0} {Rotation 0,0,0} {Team 0} {Weapon unreal_id} {Shooting False} {Health 0} {PrimaryAmmo 0} {SecondaryAmmo 0} {Adrenaline 0} {Armor 0} {SmallArmor 0} {AltFiring False} {Crouched False} {Walking False} {FloorLocation 0,0,0} {FloorNormal 0,0,0} {Combo text} {UDamageTime 0}";
    
            
            /////// Properties BEGIN
            
        /**
        Unique Id of the bot. */
        protected
         UnrealId Id = 
        	null;
        
        
        /**
        Unique Id of the bot. */
        public
        UnrealId getId() {
            return
         Id;
        }
        

        
        /**
        Human readable bot name. */
        protected
         String Name = 
        	null;
        
        
        /**
        Human readable bot name. */
        public
        String getName() {
            return
         Name;
        }
        

        
        /**
        If we are vehicle just these attr. are sent in SLF: "Id","Vehicle""Rotation", "Location","Velocity ","Name ","Team" ,"Health" 
	"Armor","Adrenaline", "FloorLocation", "FloorNormal". */
        protected
         boolean Vehicle = 
        	false;
        
        
        /**
        If we are vehicle just these attr. are sent in SLF: "Id","Vehicle""Rotation", "Location","Velocity ","Name ","Team" ,"Health" 
	"Armor","Adrenaline", "FloorLocation", "FloorNormal". */
        public
        boolean isVehicle() {
            return
         Vehicle;
        }
        

        
        /**
        
			An absolute location of the bot.
		 */
        protected
         Location Location = 
        	null;
        
        
        /**
        
			An absolute location of the bot.
		 */
        public
        Location getLocation() {
            return
         Location;
        }
        

        
        /**
        
			Absolute velocity of the bot as a vector of movement per one
			game second.
		 */
        protected
         Velocity Velocity = 
        	null;
        
        
        /**
        
			Absolute velocity of the bot as a vector of movement per one
			game second.
		 */
        public
        Velocity getVelocity() {
            return
         Velocity;
        }
        

        
        /**
        
			Which direction the bot is facing in absolute terms.
		 */
        protected
         Rotation Rotation = 
        	null;
        
        
        /**
        
			Which direction the bot is facing in absolute terms.
		 */
        public
        Rotation getRotation() {
            return
         Rotation;
        }
        

        
        /**
        
			What team the bot is on. 255 is no team. 0-3 are red,
			blue, green, gold in that order.
		 */
        protected
         int Team = 
        	0;
        
        
        /**
        
			What team the bot is on. 255 is no team. 0-3 are red,
			blue, green, gold in that order.
		 */
        public
        int getTeam() {
            return
         Team;
        }
        

        
        /**
        
			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.
		 */
        protected
         UnrealId Weapon = 
        	null;
        
        
        /**
        
			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.
		 */
        public
        UnrealId getWeapon() {
            return
         Weapon;
        }
        

        
        /**
        If the bot is shooting or not. */
        protected
         boolean Shooting = 
        	false;
        
        
        /**
        If the bot is shooting or not. */
        public
        boolean isShooting() {
            return
         Shooting;
        }
        

        
        /**
        
			How much health the bot has left. Starts at 100, ranges from
			0 to 200.
		 */
        protected
         int Health = 
        	0;
        
        
        /**
        
			How much health the bot has left. Starts at 100, ranges from
			0 to 200.
		 */
        public
        int getHealth() {
            return
         Health;
        }
        

        
        /**
        
			How much ammo the bot has left for current weapon primary
			mode.
		 */
        protected
         int PrimaryAmmo = 
        	0;
        
        
        /**
        
			How much ammo the bot has left for current weapon primary
			mode.
		 */
        public
        int getPrimaryAmmo() {
            return
         PrimaryAmmo;
        }
        

        
        /**
        
			How much ammo the bot has left for current weapon secondary
			mode. Weapon does not have to support sec. fire mode.
		 */
        protected
         int SecondaryAmmo = 
        	0;
        
        
        /**
        
			How much ammo the bot has left for current weapon secondary
			mode. Weapon does not have to support sec. fire mode.
		 */
        public
        int getSecondaryAmmo() {
            return
         SecondaryAmmo;
        }
        

        
        /**
        How much adrenaline the bot has. */
        protected
         int Adrenaline = 
        	0;
        
        
        /**
        How much adrenaline the bot has. */
        public
        int getAdrenaline() {
            return
         Adrenaline;
        }
        

        
        /**
        
			How much armor the bot is wearing. The Armor in UT is divided into 2
			parts - high armor and small armor. High armor can range from 0 to 100,
			SmallArmor ranges from 0 to 50. This armor attribute holds the result 
			of SmallArmor + HighArmor. Thus its maximum is 150. 
		 */
        protected
         int Armor = 
        	0;
        
        
        /**
        
			How much armor the bot is wearing. The Armor in UT is divided into 2
			parts - high armor and small armor. High armor can range from 0 to 100,
			SmallArmor ranges from 0 to 50. This armor attribute holds the result 
			of SmallArmor + HighArmor. Thus its maximum is 150. 
		 */
        public
        int getArmor() {
            return
         Armor;
        }
        

        
        /**
        
			SmallArmor of the bot. Ranges from 0 to 50. To get HighArmor substract this value
			from Armor value.
		 */
        protected
         int SmallArmor = 
        	0;
        
        
        /**
        
			SmallArmor of the bot. Ranges from 0 to 50. To get HighArmor substract this value
			from Armor value.
		 */
        public
        int getSmallArmor() {
            return
         SmallArmor;
        }
        

        
        /**
        
			If we are firing in secondary firing mode. 
		 */
        protected
         boolean AltFiring = 
        	false;
        
        
        /**
        
			If we are firing in secondary firing mode. 
		 */
        public
        boolean isAltFiring() {
            return
         AltFiring;
        }
        

        
        /**
        
			If we are currently crouched.
		 */
        protected
         boolean Crouched = 
        	false;
        
        
        /**
        
			If we are currently crouched.
		 */
        public
        boolean isCrouched() {
            return
         Crouched;
        }
        

        
        /**
        
			If we are currently in walking mode.
		 */
        protected
         boolean Walking = 
        	false;
        
        
        /**
        
			If we are currently in walking mode.
		 */
        public
        boolean isWalking() {
            return
         Walking;
        }
        

        
        /**
        
			Holds current floor location under the bot.
		 */
        protected
         Location FloorLocation = 
        	null;
        
        
        /**
        
			Holds current floor location under the bot.
		 */
        public
        Location getFloorLocation() {
            return
         FloorLocation;
        }
        

        
        /**
        
			Holds current floor normal under the bot.
		 */
        protected
         Location FloorNormal = 
        	null;
        
        
        /**
        
			Holds current floor normal under the bot.
		 */
        public
        Location getFloorNormal() {
            return
         FloorNormal;
        }
        

        
        /**
        
			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.
		 */
        protected
         String Combo = 
        	null;
        
        
        /**
        
			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.
		 */
        public
        String getCombo() {
            return
         Combo;
        }
        

        
        /**
        
			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.
		 */
        protected
         double UDamageTime = 
        	0;
        
        
        /**
        
			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.
		 */
        public
        double getUDamageTime() {
            return
         UDamageTime;
        }
        

        
            /////// Properties END
            
            /////// Extra Java code BEGIN
                        	
            	/////// Additional code from xslt BEGIN            	 
            		
       							protected double Time = 0;
       							
       							protected double getTime() {
       								return Time;
       							}
       							
       							protected void setTime(double time) {
       								this.Time = time;
       							}
       						
       							public double getLastSeenTime() {
       								return Time;
       							}
       						
       					
       					public boolean equals(Object obj) {
	                      if (!(obj instanceof Self)) return false;
	                      Self cast = (Self)obj;
	                      if (this.getId() != null) return this.getId().equals(cast.getId());
	                      else return cast.getId() == null;
	                    }
	                    
	                    public int hashCode() {
	                      if (getId() != null) return getId().hashCode();
	                      return 0;
	                    }
            			
            			
            		
            		
            	/////// Additional code from xslt END            
				                    
	            /////// Extra Java from XML BEGIN
            		
            	/////// Extra Java from XML END
            	    
            /////// Extra Java code END
            
            
            
            /**
              * Cloning constructor.
              */
             public Self(Self original) {
                
                     this.Id=original.Id;
                
                     this.Name=original.Name;
                
                     this.Vehicle=original.Vehicle;
                
                     this.Location=original.Location;
                
                     this.Velocity=original.Velocity;
                
                     this.Rotation=original.Rotation;
                
                     this.Team=original.Team;
                
                     this.Weapon=original.Weapon;
                
                     this.Shooting=original.Shooting;
                
                     this.Health=original.Health;
                
                     this.PrimaryAmmo=original.PrimaryAmmo;
                
                     this.SecondaryAmmo=original.SecondaryAmmo;
                
                     this.Adrenaline=original.Adrenaline;
                
                     this.Armor=original.Armor;
                
                     this.SmallArmor=original.SmallArmor;
                
                     this.AltFiring=original.AltFiring;
                
                     this.Crouched=original.Crouched;
                
                     this.Walking=original.Walking;
                
                     this.FloorLocation=original.FloorLocation;
                
                     this.FloorNormal=original.FloorNormal;
                
                     this.Combo=original.Combo;
                
                     this.UDamageTime=original.UDamageTime;
                
             }   
             
             
                 /**
                  * Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
                  */
	             public Self() {
	             }
             
	    		
	    		/**
	    		 * Here we save the original object for which this object is an update.
	    		 */ 
	    		private IWorldObject orig = null;
	    		
	            public IWorldObject update(IWorldObject obj) {
		            if(obj == null) {
		               orig = this;
		               return this;
		            }
		            orig = obj;
		            // typecast
		            Self  o = (Self)obj;
		            
		            
		                o.Name=Name;
		            
		                o.Vehicle=Vehicle;
		            
		                o.Location=Location;
		            
		                o.Velocity=Velocity;
		            
		                o.Rotation=Rotation;
		            
		                o.Team=Team;
		            
		                o.Weapon=Weapon;
		            
		                o.Shooting=Shooting;
		            
		                o.Health=Health;
		            
		                o.PrimaryAmmo=PrimaryAmmo;
		            
		                o.SecondaryAmmo=SecondaryAmmo;
		            
		                o.Adrenaline=Adrenaline;
		            
		                o.Armor=Armor;
		            
		                o.SmallArmor=SmallArmor;
		            
		                o.AltFiring=AltFiring;
		            
		                o.Crouched=Crouched;
		            
		                o.Walking=Walking;
		            
		                o.FloorLocation=FloorLocation;
		            
		                o.FloorNormal=FloorNormal;
		            
		                o.Combo=Combo;
		            
		                o.UDamageTime=UDamageTime;
		            
								o.Time = Time;
							
		            
		            return o;
		        }
	        
	            /**
	             * 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).
	             */ 
		        public IWorldObject getObject() {
		            if (orig == null) return this;
		            return orig;
		        }
	        
                
                 
            public String toString() {
                return
                
                		super.toString() + " | " +
                		
				               "Id = " + 
				               String.valueOf(Id) + " | " +
				            
				               "Name = " + 
				               String.valueOf(Name) + " | " +
				            
				               "Vehicle = " + 
				               String.valueOf(Vehicle) + " | " +
				            
				               "Location = " + 
				               String.valueOf(Location) + " | " +
				            
				               "Velocity = " + 
				               String.valueOf(Velocity) + " | " +
				            
				               "Rotation = " + 
				               String.valueOf(Rotation) + " | " +
				            
				               "Team = " + 
				               String.valueOf(Team) + " | " +
				            
				               "Weapon = " + 
				               String.valueOf(Weapon) + " | " +
				            
				               "Shooting = " + 
				               String.valueOf(Shooting) + " | " +
				            
				               "Health = " + 
				               String.valueOf(Health) + " | " +
				            
				               "PrimaryAmmo = " + 
				               String.valueOf(PrimaryAmmo) + " | " +
				            
				               "SecondaryAmmo = " + 
				               String.valueOf(SecondaryAmmo) + " | " +
				            
				               "Adrenaline = " + 
				               String.valueOf(Adrenaline) + " | " +
				            
				               "Armor = " + 
				               String.valueOf(Armor) + " | " +
				            
				               "SmallArmor = " + 
				               String.valueOf(SmallArmor) + " | " +
				            
				               "AltFiring = " + 
				               String.valueOf(AltFiring) + " | " +
				            
				               "Crouched = " + 
				               String.valueOf(Crouched) + " | " +
				            
				               "Walking = " + 
				               String.valueOf(Walking) + " | " +
				            
				               "FloorLocation = " + 
				               String.valueOf(FloorLocation) + " | " +
				            
				               "FloorNormal = " + 
				               String.valueOf(FloorNormal) + " | " +
				            
				               "Combo = " + 
				               String.valueOf(Combo) + " | " +
				            
				               "UDamageTime = " + 
				               String.valueOf(UDamageTime) + " | " +
				             "";
                	 
             }
             
             public String toHtmlString() {
                return super.toString() +
             
            "<b>Id</b> : " + 
            String.valueOf(Id) + 
            " <br/> " +
             
            "<b>Name</b> : " + 
            String.valueOf(Name) + 
            " <br/> " +
             
            "<b>Vehicle</b> : " + 
            String.valueOf(Vehicle) + 
            " <br/> " +
             
            "<b>Location</b> : " + 
            String.valueOf(Location) + 
            " <br/> " +
             
            "<b>Velocity</b> : " + 
            String.valueOf(Velocity) + 
            " <br/> " +
             
            "<b>Rotation</b> : " + 
            String.valueOf(Rotation) + 
            " <br/> " +
             
            "<b>Team</b> : " + 
            String.valueOf(Team) + 
            " <br/> " +
             
            "<b>Weapon</b> : " + 
            String.valueOf(Weapon) + 
            " <br/> " +
             
            "<b>Shooting</b> : " + 
            String.valueOf(Shooting) + 
            " <br/> " +
             
            "<b>Health</b> : " + 
            String.valueOf(Health) + 
            " <br/> " +
             
            "<b>PrimaryAmmo</b> : " + 
            String.valueOf(PrimaryAmmo) + 
            " <br/> " +
             
            "<b>SecondaryAmmo</b> : " + 
            String.valueOf(SecondaryAmmo) + 
            " <br/> " +
             
            "<b>Adrenaline</b> : " + 
            String.valueOf(Adrenaline) + 
            " <br/> " +
             
            "<b>Armor</b> : " + 
            String.valueOf(Armor) + 
            " <br/> " +
             
            "<b>SmallArmor</b> : " + 
            String.valueOf(SmallArmor) + 
            " <br/> " +
             
            "<b>AltFiring</b> : " + 
            String.valueOf(AltFiring) + 
            " <br/> " +
             
            "<b>Crouched</b> : " + 
            String.valueOf(Crouched) + 
            " <br/> " +
             
            "<b>Walking</b> : " + 
            String.valueOf(Walking) + 
            " <br/> " +
             
            "<b>FloorLocation</b> : " + 
            String.valueOf(FloorLocation) + 
            " <br/> " +
             
            "<b>FloorNormal</b> : " + 
            String.valueOf(FloorNormal) + 
            " <br/> " +
             
            "<b>Combo</b> : " + 
            String.valueOf(Combo) + 
            " <br/> " +
             
            "<b>UDamageTime</b> : " + 
            String.valueOf(UDamageTime) + 
            " <br/> " +
             "";
             }            
             
             
             
             }
                         
        