cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor
Class WeaponDescriptor

java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.ItemDescriptor
      extended by cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.WeaponDescriptor

public class WeaponDescriptor
extends ItemDescriptor

Weapon descriptor describes all characteristics of a weapon.


Constructor Summary
WeaponDescriptor()
           
 
Method Summary
 double getPriAimError()
          How big aiming error this firing mode has.
 int getPriAmmoClipSize()
          If this mode has clips how big they are.
 ItemType getPriAmmoItemType()
           
 int getPriAmmoPerFire()
          How much ammo this weapon consumes for one shot.
 java.lang.String getPriAmmoType()
          The class of primary firing mode ammunition type.
 double getPriBotRefireRate()
          How fast we can refire the weapon.
 double getPriDamage()
          Damage of the projectile.
 double getPriDamageAtten()
          Attenuate instant-hit/projectile damage by this multiplier.
 double getPriDamageRadius()
          If the projectile does splash damage, the value here won't be zero and will specify the radius of the splash damage in ut units.
 java.lang.String getPriDamageType()
          Class of this ammunitions damage type.
 int getPriFireCount()
          Firing mode fire count.
 java.lang.String getPriFireModeType()
          Returns the class of primary firing mode.
 double getPriFireRate()
          How fast this weapon fires.
 int getPriInitialAmount()
          Initial amount of ammunition.
 double getPriLifeSpan()
          Life span of this projectile.
 int getPriMaxAmount()
          Maximum amount of this ammunition we can hold in our inventory.
 double getPriMaxEffectDistance()
          Maximum effective distance of the projectile.
 double getPriMaxRange()
          Maximum firing range.
 double getPriMaxSpeed()
          Maximum possible speed of this projectile.
 java.lang.String getPriProjType()
          Holds the class of the projectile of this firing mode.
 double getPriSpeed()
          Default speed of the projectile - probably the projectile has this speed when fired.
 double getPriSpread()
          When the weapon is spreading some projectiles, here is how big the spread is.
 int getPriSpreadStyle()
          The style of weapon spread.
 double getPriTossZ()
          Probably the amount of speed added to Z velocity vector when this projectile is fired.
 double getSecAimError()
          How big aiming error this firing mode has.
 int getSecAmmoClipSize()
          If this mode has clips how big they are.
 ItemType getSecAmmoItemType()
           
 int getSecAmmoPerFire()
          How much ammo this weapon consumes for one shot.
 java.lang.String getSecAmmoType()
          The class of secondary firing mode ammunition type.
 double getSecBotRefireRate()
          How fast we can refire the weapon.
 double getSecDamage()
          Damage of the projectile.
 double getSecDamageAtten()
          Attenuate instant-hit/projectile damage by this multiplier.
 double getSecDamageRadius()
          If the projectile does splash damage, the value here won't be zero and will specify the radius of the splash damage in ut units.
 java.lang.String getSecDamageType()
          Class of this ammunitions damage type.
 int getSecFireCount()
          Firing mode fire count.
 java.lang.String getSecFireModeType()
          Returns the class of secondary firing mode.
 double getSecFireRate()
          How fast this weapon fires.
 int getSecInitialAmount()
          Initial amount of ammunition.
 double getSecLifeSpan()
          Life span of this projectile.
 int getSecMaxAmount()
          Maximum amount of this ammunition we can hold in our inventory.
 double getSecMaxEffectDistance()
          Maximum effective distance of the projectile.
 double getSecMaxRange()
          Maximum firing range.
 double getSecMaxSpeed()
          Maximum possible speed of this projectile.
 java.lang.String getSecProjType()
          Holds the class of the projectile of this firing mode.
 double getSecSpeed()
          Default speed of the projectile - probably the projectile has this speed when fired.
 double getSecSpread()
          When the weapon is spreading some projectiles, here is how big the spread is.
 int getSecSpreadStyle()
          The style of weapon spread.
 double getSecTossZ()
          Probably the amount of speed added to Z velocity vector when this projectile is fired.
 boolean isMelee()
          UT engine informs us, if this weapon is known as melee (short range, close combat).
 boolean isPriAlwaysGibs()
          If this damage will kill us instantly.
 boolean isPriArmorStops()
          If this damage can be stopped by an armor.
 boolean isPriDetonatesGoop()
          If this damage can detonate goop created by bio rifle (not sure).
 boolean isPriExtraMomZ()
          If the hit by this damage will add some speed to the target (will "push" the target a bit).
 boolean isPriFireOnRelease()
          If to fire this firing mode you need to press shooting button (start shooting) and then release it (stop shooting).
 boolean isPriInstantHit()
          If this firing mode does instant hits - will hit the target at the moment it is fired.
 boolean isPriLeadTarget()
          If this firing mode is capable of shooting projectiles that will lead the target.
 boolean isPriModeExclusive()
          If true you are unable to fire both firing modes of this weapon at the same time.
 boolean isPriRecomSplashDamage()
          If the engine recomends us to use splash damage.
 boolean isPriSpecial()
          If this damage is special.
 boolean isPriSplashDamage()
          If our weapons primary firing mode does splash damage - area effect.
 boolean isPriSplashJump()
          If this weapon can be used to boost jumping height.
 boolean isPriSuperWeapon()
          If this damage is caused by super weapon and will damage also team mates even if friendly fire is off.
 boolean isPriTossed()
          If the weapon in this firing mode is tossing projectiles.
 boolean isPriWaitForRelease()
          If to fire this mode you need to stop pressing shooting button between two shots to shoot.
 boolean isSecAlwaysGibs()
          If this damage will kill us instantly.
 boolean isSecArmorStops()
          If this damage can be stopped by an armor.
 boolean isSecDetonatesGoop()
          If this damage can detonate goop created by bio rifle (not sure).
 boolean isSecExtraMomZ()
          If the hit by this damage will add some speed to the target (will "push" the target a bit).
 boolean isSecFireOnRelease()
          If to fire this firing mode you need to press shooting button (start shooting) and then release it (stop shooting).
 boolean isSecInstantHit()
          If this firing mode does instant hits - will hit the target at the moment it is fired.
 boolean isSecLeadTarget()
          If this firing mode is capable of shooting projectiles that will lead the target.
 boolean isSecModeExclusive()
          If true you are unable to fire both firing modes of this weapon at the same time.
 boolean isSecRecomSplashDamage()
          If the engine recomends us to use splash damage.
 boolean isSecSpecial()
          If this damage is special.
 boolean isSecSplashDamage()
          If our weapons secondary firing mode does splash damage - area effect.
 boolean isSecSplashJump()
          If this weapon can be used to boost jumping height.
 boolean isSecSuperWeapon()
          If this damage is caused by super weapon and will damage also team mates even if friendly fire is off.
 boolean isSecTossed()
          If the weapon in this firing mode is tossing projectiles.
 boolean isSecWaitForRelease()
          If to fire this mode you need to stop pressing shooting button between two shots to shoot.
 boolean isSniping()
          UT engine infroms us, if this weapon is a sniper weapon (long range, high damage).
 boolean isUsesAltAmmo()
          Whether this weapon uses two separate ammo classes - first for primary firing mode, second for secondary.
 java.lang.String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.ItemDescriptor
doReflexion, fieldToName, firstCharToUpperCase, getAmount, getInventoryType, getItemCategory, getPickupType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WeaponDescriptor

public WeaponDescriptor()
Method Detail

toString

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

isMelee

public boolean isMelee()
UT engine informs us, if this weapon is known as melee (short range, close combat).

Returns:
melee

isSniping

public boolean isSniping()
UT engine infroms us, if this weapon is a sniper weapon (long range, high damage).

Returns:
sniping

isUsesAltAmmo

public boolean isUsesAltAmmo()
Whether this weapon uses two separate ammo classes - first for primary firing mode, second for secondary.

Returns:
usesAltAmmo

getPriFireModeType

public java.lang.String getPriFireModeType()
Returns the class of primary firing mode. If none, the weapon has NOT primary firing mode that means all information for primary firing mode are not relevant and will have default values.

Returns:
priFireModeType

isPriSplashDamage

public boolean isPriSplashDamage()
If our weapons primary firing mode does splash damage - area effect. Weapon will damage everything in certain raidus.

Returns:
priSplashDamage

isPriSplashJump

public boolean isPriSplashJump()
If this weapon can be used to boost jumping height.

Returns:
priSplashJump

isPriRecomSplashDamage

public boolean isPriRecomSplashDamage()
If the engine recomends us to use splash damage. For AI?

Returns:
priRecomSplashDamage

isPriTossed

public boolean isPriTossed()
If the weapon in this firing mode is tossing projectiles. The projectiles will usually fall down to the ground slowly (they won't fly in a line).

Returns:
priTossed

isPriLeadTarget

public boolean isPriLeadTarget()
If this firing mode is capable of shooting projectiles that will lead the target.

Returns:
priLeadTarget

isPriInstantHit

public boolean isPriInstantHit()
If this firing mode does instant hits - will hit the target at the moment it is fired. Usually true for weapon like machine gun. False for slow projectiles.

Returns:
priInsantHit

isPriFireOnRelease

public boolean isPriFireOnRelease()
If to fire this firing mode you need to press shooting button (start shooting) and then release it (stop shooting). Usually true for charged weapons. You'll first charge your weapon and when decided you've charged the weapon enough, you release the key and the weapon fires.

Returns:
priFireOnRelease

isPriWaitForRelease

public boolean isPriWaitForRelease()
If to fire this mode you need to stop pressing shooting button between two shots to shoot. You will fire once when pressing the button, then you need to press it again to fire again.

Returns:
priWaitForRelease

isPriModeExclusive

public boolean isPriModeExclusive()
If true you are unable to fire both firing modes of this weapon at the same time.

Returns:
priModeExlusive

getPriFireRate

public double getPriFireRate()
How fast this weapon fires. Delay between two shots, when shooting continuously.

Returns:
priFireRate

getPriBotRefireRate

public double getPriBotRefireRate()
How fast we can refire the weapon. Delay between when we stop shooting and when we can start shooting again.

Returns:
priBotRefireRate

getPriAmmoPerFire

public int getPriAmmoPerFire()
How much ammo this weapon consumes for one shot.

Returns:
priAmmoPerFire

getPriAmmoClipSize

public int getPriAmmoClipSize()
If this mode has clips how big they are.

Returns:
priAmmoClipSize

getPriAimError

public double getPriAimError()
How big aiming error this firing mode has. 0 - none, 1000 quite a bit.

Returns:
priAimError

getPriSpread

public double getPriSpread()
When the weapon is spreading some projectiles, here is how big the spread is. In UT rotator units. No relation to AimError.

Returns:
priSpread

getPriSpreadStyle

public int getPriSpreadStyle()
The style of weapon spread. Is in fact enum. Definition below (starts from 0 and goes up). var() enum ESpreadStyle { SS_None, SS_Random, // spread is max random angle deviation SS_Line, // spread is angle between each projectile SS_Ring } SpreadStyle;

Returns:
priSpreadStyle

getPriFireCount

public int getPriFireCount()
Firing mode fire count.

Returns:
priFireCount

getPriDamageAtten

public double getPriDamageAtten()
Attenuate instant-hit/projectile damage by this multiplier.

Returns:
priDamageAtten

getPriAmmoType

public java.lang.String getPriAmmoType()
The class of primary firing mode ammunition type. If none, then the firing mode does not use any ammunition. That means all ammo specific information is not relevant and will have default values (ammo specific information starts from this attribute and ends at priProjType attribute - that is not ammo specific).

Returns:
priAmmoType

getPriAmmoItemType

public ItemType getPriAmmoItemType()
Returns:
ammo type as ItemType, null if not exist or uses primary ammo

getPriInitialAmount

public int getPriInitialAmount()
Initial amount of ammunition. We get this if we pick up the item for the first time.

Returns:
priInitialAmount

getPriMaxAmount

public int getPriMaxAmount()
Maximum amount of this ammunition we can hold in our inventory.

Returns:
priMaxAmount

getPriMaxRange

public double getPriMaxRange()
Maximum firing range. 0 if not limited - probably.

Returns:
priMaxRange

getPriDamageType

public java.lang.String getPriDamageType()
Class of this ammunitions damage type. If ammo is not none, then this shouldn't be none either.

Returns:
priDamageType

isPriArmorStops

public boolean isPriArmorStops()
If this damage can be stopped by an armor.

Returns:
priArmorStops

isPriAlwaysGibs

public boolean isPriAlwaysGibs()
If this damage will kill us instantly.

Returns:
priAlwaysGibs

isPriSpecial

public boolean isPriSpecial()
If this damage is special.

Returns:
priSpecial

isPriDetonatesGoop

public boolean isPriDetonatesGoop()
If this damage can detonate goop created by bio rifle (not sure).

Returns:
priDetonatesGoop

isPriSuperWeapon

public boolean isPriSuperWeapon()
If this damage is caused by super weapon and will damage also team mates even if friendly fire is off.

Returns:
priSuperWeapon

isPriExtraMomZ

public boolean isPriExtraMomZ()
If the hit by this damage will add some speed to the target (will "push" the target a bit).

Returns:
priExtraMomZ

getPriProjType

public java.lang.String getPriProjType()
Holds the class of the projectile of this firing mode. If none, then the mode does not spawn projectiles. all the info below is then not relevant and will have default values on.

Returns:
priProjType

getPriDamage

public double getPriDamage()
Damage of the projectile.

Returns:
priDamage

getPriSpeed

public double getPriSpeed()
Default speed of the projectile - probably the projectile has this speed when fired.

Returns:
priSpeed

getPriMaxSpeed

public double getPriMaxSpeed()
Maximum possible speed of this projectile.

Returns:
priMaxSpeed

getPriLifeSpan

public double getPriLifeSpan()
Life span of this projectile. How long the projectile lasts in the environment. If 0 than probably unlimited.

Returns:
priLifeSpan

getPriDamageRadius

public double getPriDamageRadius()
If the projectile does splash damage, the value here won't be zero and will specify the radius of the splash damage in ut units.

Returns:
priDamageRadius

getPriTossZ

public double getPriTossZ()
Probably the amount of speed added to Z velocity vector when this projectile is fired. In UT units.

Returns:
priTossZ

getPriMaxEffectDistance

public double getPriMaxEffectDistance()
Maximum effective distance of the projectile. Probably 0 if not limited.

Returns:
priMaxEffectDistance

getSecFireModeType

public java.lang.String getSecFireModeType()
Returns the class of secondary firing mode. If none, the weapon has NOT secondary firing mode that means all information for secondary firing mode are not relevant and will have default values.

Returns:
secFireModeType

isSecSplashDamage

public boolean isSecSplashDamage()
If our weapons secondary firing mode does splash damage - area effect. Weapon will damage everything in certain raidus.

Returns:
secSplashDamage

isSecSplashJump

public boolean isSecSplashJump()
If this weapon can be used to boost jumping height.

Returns:
secSplashJump

isSecRecomSplashDamage

public boolean isSecRecomSplashDamage()
If the engine recomends us to use splash damage. For AI?

Returns:
secRecomSplashDamage

isSecTossed

public boolean isSecTossed()
If the weapon in this firing mode is tossing projectiles. The projectiles will usually fall down to the ground slowly (they won't fly in a line).

Returns:
secTossed

isSecLeadTarget

public boolean isSecLeadTarget()
If this firing mode is capable of shooting projectiles that will lead the target.

Returns:
secLeadTarget

isSecInstantHit

public boolean isSecInstantHit()
If this firing mode does instant hits - will hit the target at the moment it is fired. Usually true for weapon like machine gun. False for slow projectiles.

Returns:
secInsantHit

isSecFireOnRelease

public boolean isSecFireOnRelease()
If to fire this firing mode you need to press shooting button (start shooting) and then release it (stop shooting). Usually true for charged weapons. You'll first charge your weapon and when decided you've charged the weapon enough, you release the key and the weapon fires.

Returns:
secFireOnRelease

isSecWaitForRelease

public boolean isSecWaitForRelease()
If to fire this mode you need to stop pressing shooting button between two shots to shoot. You will fire once when pressing the button, then you need to press it again to fire again.

Returns:
secWaitForRelease

isSecModeExclusive

public boolean isSecModeExclusive()
If true you are unable to fire both firing modes of this weapon at the same time.

Returns:
secModeExlusive

getSecFireRate

public double getSecFireRate()
How fast this weapon fires. Delay between two shots, when shooting continuously.

Returns:
secFireRate

getSecBotRefireRate

public double getSecBotRefireRate()
How fast we can refire the weapon. Delay between when we stop shooting and when we can start shooting again.

Returns:
secBotRefireRate

getSecAmmoPerFire

public int getSecAmmoPerFire()
How much ammo this weapon consumes for one shot.

Returns:
secAmmoPerFire

getSecAmmoClipSize

public int getSecAmmoClipSize()
If this mode has clips how big they are.

Returns:
secAmmoClipSize

getSecAimError

public double getSecAimError()
How big aiming error this firing mode has. 0 - none, 1000 quite a bit.

Returns:
secAimError

getSecSpread

public double getSecSpread()
When the weapon is spreading some projectiles, here is how big the spread is. In UT rotator units. No relation to AimError.

Returns:
secSpread

getSecSpreadStyle

public int getSecSpreadStyle()
The style of weapon spread. Is in fact enum. Definition below (starts from 0 and goes up). var() enum ESpreadStyle { SS_None, SS_Random, // spread is max random angle deviation SS_Line, // spread is angle between each projectile SS_Ring } SpreadStyle;

Returns:
secSpreadStyle

getSecFireCount

public int getSecFireCount()
Firing mode fire count.

Returns:
secFireCount

getSecDamageAtten

public double getSecDamageAtten()
Attenuate instant-hit/projectile damage by this multiplier.

Returns:
secDamageAtten

getSecAmmoType

public java.lang.String getSecAmmoType()
The class of secondary firing mode ammunition type. If none, then the firing mode does not use any ammunition. That means all ammo specific information is not relevant and will have default values (ammo specific informaton starts from this attribute and ends at secProjType attribute - that is not ammo specific).

Returns:
secAmmoType

getSecAmmoItemType

public ItemType getSecAmmoItemType()
Returns:
secondary ammo type as ItemType, null if not exist or uses primary ammo

getSecInitialAmount

public int getSecInitialAmount()
Initial amount of ammunition. We get this if we pick up the item for the first time.

Returns:
secInitialAmount

getSecMaxAmount

public int getSecMaxAmount()
Maximum amount of this ammunition we can hold in our inventory.

Returns:
secMaxAmount

getSecMaxRange

public double getSecMaxRange()
Maximum firing range. 0 if not limited - probably.

Returns:
secMaxRange

getSecDamageType

public java.lang.String getSecDamageType()
Class of this ammunitions damage type. If ammo is not none, then this shouldn't be none either.

Returns:
secDamageType

isSecArmorStops

public boolean isSecArmorStops()
If this damage can be stopped by an armor.

Returns:
secArmorStops

isSecAlwaysGibs

public boolean isSecAlwaysGibs()
If this damage will kill us instantly.

Returns:
secAlwaysGibs

isSecSpecial

public boolean isSecSpecial()
If this damage is special.

Returns:
secSpecial

isSecDetonatesGoop

public boolean isSecDetonatesGoop()
If this damage can detonate goop created by bio rifle (not sure).

Returns:
secDetonatesGoop

isSecSuperWeapon

public boolean isSecSuperWeapon()
If this damage is caused by super weapon and will damage also team mates even if friendly fire is off.

Returns:
secSuperWeapon

isSecExtraMomZ

public boolean isSecExtraMomZ()
If the hit by this damage will add some speed to the target (will "push" the target a bit).

Returns:
secExtraMomZ

getSecProjType

public java.lang.String getSecProjType()
Holds the class of the projectile of this firing mode. If none, then the mode does not spawn projectiles. all the info below is then not relevant and will have default values on.

Returns:
secProjType

getSecDamage

public double getSecDamage()
Damage of the projectile.

Returns:
secDamage

getSecSpeed

public double getSecSpeed()
Default speed of the projectile - probably the projectile has this speed when fired.

Returns:
secSpeed

getSecMaxSpeed

public double getSecMaxSpeed()
Maximum possible speed of this projectile.

Returns:
secMaxSpeed

getSecLifeSpan

public double getSecLifeSpan()
Life span of this projectile. How long the projectile lasts in the environment. If 0 than probably unlimited.

Returns:
secLifeSpan

getSecDamageRadius

public double getSecDamageRadius()
If the projectile does splash damage, the value here won't be zero and will specify the radius of the splash damage in ut units.

Returns:
secDamageRadius

getSecTossZ

public double getSecTossZ()
Probably the amount of speed added to Z velocity vector when this projectile is fired. In UT units.

Returns:
secTossZ

getSecMaxEffectDistance

public double getSecMaxEffectDistance()
Maximum effective distance of the projectile. Probably 0 if not limited.

Returns:
secMaxEffectDistance