View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor;
2   
3   import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType;
4   import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemTypeTranslator;
5   
6   /**
7    * Weapon descriptor describes all characteristics of a weapon.
8    * 
9    * @author Ondrej, knight
10   */
11  public class WeaponDescriptor extends ItemDescriptor {
12  
13  	private final ItemTypeTranslator itemTypeTranslator;
14  	
15  	public WeaponDescriptor(ItemTypeTranslator translator) {
16  		this.itemTypeTranslator = translator;
17  	}
18  
19  	// Attributes
20  	@ItemDescriptorField
21  	private boolean melee = false;
22  	@ItemDescriptorField
23  	private boolean sniping = false;
24  	@ItemDescriptorField
25  	private boolean usesAltAmmo = false;
26  
27  	// Primary firing mode
28  	@ItemDescriptorField
29  	private String priFireModeType;
30  	@ItemDescriptorField
31  	private boolean priSplashDamage = false;
32  	@ItemDescriptorField
33  	private boolean priSplashJump = false;
34  	@ItemDescriptorField
35  	private boolean priRecomSplashDamage = false;
36  	@ItemDescriptorField
37  	private boolean priTossed = false;
38  	@ItemDescriptorField
39  	private boolean priLeadTarget = false;
40  	@ItemDescriptorField
41  	private boolean priInstantHit = false;
42  	@ItemDescriptorField
43  	private boolean priFireOnRelease = false; // fire when released
44  	@ItemDescriptorField
45  	private boolean priWaitForRelease = false; // if we want to refire, we need
46  												// to stop pushing, push again
47  	@ItemDescriptorField
48  	private boolean priModeExclusive = false;
49  	@ItemDescriptorField
50  	private double priFireRate = 0; // how fast the weapon fire
51  	@ItemDescriptorField
52  	private double priBotRefireRate = 0; // when stoped shooting, how fast we
53  											// can resume
54  	@ItemDescriptorField
55  	private int priAmmoPerFire = 0;
56  	@ItemDescriptorField
57  	private int priAmmoClipSize = 0;
58  	@ItemDescriptorField
59  	private double priAimError = 0; // 0=none 1000=quite a bit
60  	@ItemDescriptorField
61  	private double priSpread = 0; // rotator units. no relation to AimError
62  	@ItemDescriptorField
63  	private int priSpreadStyle = 0; // is enum in fact
64  	@ItemDescriptorField
65  	private int priFireCount = 0;
66  	@ItemDescriptorField
67  	private double priDamageAtten = 0; // attenuate instant-hit/projectile
68  										// damage by this multiplier
69  
70  	// Primary firing mode ammo
71  	@ItemDescriptorField
72  	private String priAmmoType;
73  	@ItemDescriptorField
74  	private int priInitialAmount = 0;
75  	@ItemDescriptorField
76  	private int priMaxAmount = 0;
77  	@ItemDescriptorField	
78  	private double priMaxRange = 0;
79  
80  	// Primary firing mode ammo damage type
81  	@ItemDescriptorField
82  	private String priDamageType;
83  	@ItemDescriptorField
84  	private boolean priArmorStops = true;
85  	@ItemDescriptorField
86  	private boolean priAlwaysGibs = false;
87  	@ItemDescriptorField
88  	private boolean priSpecial = false;
89  	@ItemDescriptorField
90  	private boolean priDetonatesGoop = false;
91  	@ItemDescriptorField
92  	private boolean priSuperWeapon = false;
93  	@ItemDescriptorField
94  	private boolean priExtraMomZ = false;
95  
96  	// Primary firing mode projectile
97  	@ItemDescriptorField
98  	private String priProjType;
99  	@ItemDescriptorField
100 	private double priDamage = 0;
101 	@ItemDescriptorField
102 	private double priSpeed = 0;
103 	@ItemDescriptorField
104 	private double priMaxSpeed = 0;
105 	@ItemDescriptorField
106 	private double priLifeSpan = 0;
107 	@ItemDescriptorField
108 	private double priDamageRadius = 0;
109 	@ItemDescriptorField
110 	private double priTossZ = 0;
111 	@ItemDescriptorField
112 	private double priMaxEffectDistance = 0;
113 
114 	// Secondary firing mode
115 	@ItemDescriptorField
116 	private String secFireModeType;
117 	@ItemDescriptorField
118 	private boolean secSplashDamage = false;
119 	@ItemDescriptorField
120 	private boolean secSplashJump = false;
121 	@ItemDescriptorField
122 	private boolean secRecomSplashDamage = false;
123 	@ItemDescriptorField
124 	private boolean secTossed = false;
125 	@ItemDescriptorField
126 	private boolean secLeadTarget = false;
127 	@ItemDescriptorField
128 	private boolean secInstantHit = false;
129 	@ItemDescriptorField
130 	private boolean secFireOnRelease = false; // fire when released
131 	@ItemDescriptorField
132 	private boolean secWaitForRelease = false; // if we want to refire, we need
133 												// to stop pushing, push again
134 	@ItemDescriptorField
135 	private boolean secModeExclusive = false;
136 	@ItemDescriptorField
137 	private double secFireRate = 0; // how fast the weapon fire
138 	@ItemDescriptorField
139 	private double secBotRefireRate = 0; // when stoped shooting, how fast we
140 											// can resume
141 	@ItemDescriptorField
142 	private int secAmmoPerFire = 0;
143 	@ItemDescriptorField
144 	private int secAmmoClipSize = 0;
145 	@ItemDescriptorField
146 	private double secAimError = 0; // 0=none 1000=quite a bit
147 	@ItemDescriptorField
148 	private double secSpread = 0; // rotator units. no relation to AimError
149 	@ItemDescriptorField
150 	private int secSpreadStyle = 0; // is enum in fact
151 	@ItemDescriptorField
152 	private int secFireCount = 0;
153 	@ItemDescriptorField
154 	private double secDamageAtten = 0; // attenuate instant-hit/projectile
155 										// damage by this multiplier
156 
157 	// Secondary firing mode ammo
158 	@ItemDescriptorField
159 	private String secAmmoType;
160 	@ItemDescriptorField
161 	private int secInitialAmount = 0;
162 	@ItemDescriptorField
163 	private int secMaxAmount = 0;
164 	@ItemDescriptorField
165 	private double secMaxRange = 0;
166 
167 	// Secondary firing mode ammo damage type
168 	@ItemDescriptorField
169 	private String secDamageType;
170 	@ItemDescriptorField
171 	private boolean secArmorStops = true;
172 	@ItemDescriptorField
173 	private boolean secAlwaysGibs = false;
174 	@ItemDescriptorField
175 	private boolean secSpecial = false;
176 	@ItemDescriptorField
177 	private boolean secDetonatesGoop = false;
178 	@ItemDescriptorField
179 	private boolean secSuperWeapon = false;
180 	@ItemDescriptorField
181 	private boolean secExtraMomZ = false;
182 
183 	// Secondary firing mode projectile
184 	@ItemDescriptorField
185 	private String secProjType;
186 	@ItemDescriptorField
187 	private double secDamage = 0;
188 	@ItemDescriptorField
189 	private double secSpeed = 0;
190 	@ItemDescriptorField
191 	private double secMaxSpeed = 0;
192 	@ItemDescriptorField
193 	private double secLifeSpan = 0;
194 	@ItemDescriptorField
195 	private double secDamageRadius = 0;
196 	@ItemDescriptorField
197 	private double secTossZ = 0;
198 	@ItemDescriptorField
199 	private double secMaxEffectDistance = 0;
200 
201 	@Override
202 	public String toString() {
203 		return "WeaponDescriptor[pickupType="+ getPickupType() + ", inventoryType=" + getInventoryType() + ", itemCategory=" + getItemCategory() + "]";
204 	}
205 
206 	/**
207 	 * UT engine informs us, if this weapon is known as melee (short range,
208 	 * close combat).
209 	 * 
210 	 * @return melee
211 	 */
212 	public boolean isMelee() {
213 		return melee;
214 	}
215 
216 	/**
217 	 * UT engine infroms us, if this weapon is a sniper weapon (long range, high
218 	 * damage).
219 	 * 
220 	 * @return sniping
221 	 */
222 	public boolean isSniping() {
223 		return sniping;
224 	}
225 
226 	/**
227 	 * Whether this weapon uses two separate ammo classes - first for primary
228 	 * firing mode, second for secondary.
229 	 * 
230 	 * @return usesAltAmmo
231 	 */
232 	public boolean isUsesAltAmmo() {
233 		return usesAltAmmo;
234 	}
235 
236 	/**
237 	 * Returns the class of primary firing mode. If none, the weapon has NOT
238 	 * primary firing mode that means all information for primary firing mode
239 	 * are not relevant and will have default values.
240 	 * 
241 	 * @return priFireModeType
242 	 */
243 	public String getPriFireModeType() {
244 		return priFireModeType;
245 	}
246 
247 	/**
248 	 * If our weapons primary firing mode does splash damage - area effect.
249 	 * Weapon will damage everything in certain raidus.
250 	 * 
251 	 * @return priSplashDamage
252 	 */
253 	public boolean isPriSplashDamage() {
254 		return priSplashDamage;
255 	}
256 
257 	/**
258 	 * If this weapon can be used to boost jumping height.
259 	 * 
260 	 * @return priSplashJump
261 	 */
262 	public boolean isPriSplashJump() {
263 		return priSplashJump;
264 	}
265 
266 	/**
267 	 * If the engine recomends us to use splash damage. For AI?
268 	 * 
269 	 * @return priRecomSplashDamage
270 	 * @todo Find correct information about this.
271 	 */
272 	public boolean isPriRecomSplashDamage() {
273 		return priRecomSplashDamage;
274 	}
275 
276 	/**
277 	 * If the weapon in this firing mode is tossing projectiles. The projectiles
278 	 * will usually fall down to the ground slowly (they won't fly in a line).
279 	 * 
280 	 * @return priTossed
281 	 */
282 	public boolean isPriTossed() {
283 		return priTossed;
284 	}
285 
286 	/**
287 	 * If this firing mode is capable of shooting projectiles that will lead the
288 	 * target.
289 	 * 
290 	 * @return priLeadTarget
291 	 * @todo Find correct info about this.
292 	 */
293 	public boolean isPriLeadTarget() {
294 		return priLeadTarget;
295 	}
296 
297 	/**
298 	 * If this firing mode does instant hits - will hit the target at the moment
299 	 * it is fired. Usually true for weapon like machine gun. False for slow
300 	 * projectiles.
301 	 * 
302 	 * @return priInsantHit
303 	 */
304 	public boolean isPriInstantHit() {
305 		return priInstantHit;
306 	}
307 
308 	/**
309 	 * If to fire this firing mode you need to press shooting button (start
310 	 * shooting) and then release it (stop shooting). Usually true for charged
311 	 * weapons. You'll first charge your weapon and when decided you've charged
312 	 * the weapon enough, you release the key and the weapon fires.
313 	 * 
314 	 * @return priFireOnRelease
315 	 */
316 	public boolean isPriFireOnRelease() {
317 		return priFireOnRelease;
318 	}
319 
320 	/**
321 	 * If to fire this mode you need to stop pressing shooting button between
322 	 * two shots to shoot. You will fire once when pressing the button, then you
323 	 * need to press it again to fire again.
324 	 * 
325 	 * @return priWaitForRelease
326 	 */
327 	public boolean isPriWaitForRelease() {
328 		return priWaitForRelease;
329 	}
330 
331 	/**
332 	 * If true you are unable to fire both firing modes of this weapon at the
333 	 * same time.
334 	 * 
335 	 * @return priModeExlusive
336 	 */
337 	public boolean isPriModeExclusive() {
338 		return priModeExclusive;
339 	}
340 
341 	/**
342 	 * How fast this weapon fires. Delay between two shots, when shooting
343 	 * continuously.
344 	 * 
345 	 * @return priFireRate
346 	 */
347 	public double getPriFireRate() {
348 		return priFireRate;
349 	}
350 
351 	/**
352 	 * How fast we can refire the weapon. Delay between when we stop shooting
353 	 * and when we can start shooting again.
354 	 * 
355 	 * @return priBotRefireRate
356 	 */
357 	public double getPriBotRefireRate() {
358 		return priBotRefireRate;
359 	}
360 
361 	/**
362 	 * How much ammo this weapon consumes for one shot.
363 	 * 
364 	 * @return priAmmoPerFire
365 	 */
366 	public int getPriAmmoPerFire() {
367 		return priAmmoPerFire;
368 	}
369 
370 	/**
371 	 * If this mode has clips how big they are.
372 	 * 
373 	 * @return priAmmoClipSize
374 	 * @todo Find correct info.
375 	 */
376 	public int getPriAmmoClipSize() {
377 		return priAmmoClipSize;
378 	}
379 
380 	/**
381 	 * How big aiming error this firing mode has. 0 - none, 1000 quite a bit.
382 	 * 
383 	 * @return priAimError
384 	 */
385 	public double getPriAimError() {
386 		return priAimError;
387 	}
388 
389 	/**
390 	 * When the weapon is spreading some projectiles, here is how big the spread
391 	 * is. In UT rotator units. No relation to AimError.
392 	 * 
393 	 * @return priSpread
394 	 */
395 	public double getPriSpread() {
396 		return priSpread;
397 	}
398 
399 	/**
400 	 * The style of weapon spread. Is in fact enum. Definition below (starts
401 	 * from 0 and goes up).
402 	 * 
403 	 * var() enum ESpreadStyle { SS_None, SS_Random, // spread is max random
404 	 * angle deviation SS_Line, // spread is angle between each projectile
405 	 * SS_Ring } SpreadStyle;
406 	 * 
407 	 * @return priSpreadStyle
408 	 */
409 	public int getPriSpreadStyle() {
410 		return priSpreadStyle;
411 	}
412 
413 	/**
414 	 * Firing mode fire count.
415 	 * 
416 	 * @return priFireCount
417 	 * @todo Find out what this is.
418 	 */
419 	public int getPriFireCount() {
420 		return priFireCount;
421 	}
422 
423 	/**
424 	 * Attenuate instant-hit/projectile damage by this multiplier.
425 	 * 
426 	 * @return priDamageAtten
427 	 */
428 	public double getPriDamageAtten() {
429 		return priDamageAtten;
430 	}
431 
432 	/**
433 	 * The class of primary firing mode ammunition type. If none, then the
434 	 * firing mode does not use any ammunition. That means all ammo specific
435 	 * information is not relevant and will have default values (ammo specific
436 	 * information starts from this attribute and ends at priProjType attribute -
437 	 * that is not ammo specific).
438 	 * 
439 	 * @return priAmmoType
440 	 */
441 	public String getPriAmmoType() {
442 		return priAmmoType;
443 	}
444 	
445 	private ItemType priAmmoItemType = null;
446 
447 	
448 	/**
449 	 * @return ammo type as {@link ItemType}, null if not exist or uses primary ammo
450 	 */
451 	public ItemType getPriAmmoItemType() {
452 		if (getPriAmmoType() == null) return null;
453 		if (priAmmoItemType != null) return priAmmoItemType;
454 		priAmmoItemType = itemTypeTranslator.get(getPriAmmoType());
455 		return priAmmoItemType;
456 	}
457 
458 	/**
459 	 * Initial amount of ammunition. We get this if we pick up the item for the
460 	 * first time.
461 	 * 
462 	 * @return priInitialAmount
463 	 */
464 	public int getPriInitialAmount() {
465 		return priInitialAmount;
466 	}
467 
468 	/**
469 	 * Maximum amount of this ammunition we can hold in our inventory.
470 	 * 
471 	 * @return priMaxAmount
472 	 */
473 	public int getPriMaxAmount() {
474 		return priMaxAmount;
475 	}
476 
477 	/**
478 	 * Maximum firing range. 0 if not limited - probably.
479 	 * 
480 	 * @return priMaxRange
481 	 * @todo Find out how this works.
482 	 */
483 	public double getPriMaxRange() {
484 		return priMaxRange;
485 	}
486 
487 	/**
488 	 * Class of this ammunitions damage type. If ammo is not none, then this
489 	 * shouldn't be none either.
490 	 * 
491 	 * @return priDamageType
492 	 */
493 	public String getPriDamageType() {
494 		return priDamageType;
495 	}
496 
497 	/**
498 	 * If this damage can be stopped by an armor.
499 	 * 
500 	 * @return priArmorStops
501 	 */
502 	public boolean isPriArmorStops() {
503 		return priArmorStops;
504 	}
505 
506 	/**
507 	 * If this damage will kill us instantly.
508 	 * 
509 	 * @return priAlwaysGibs
510 	 */
511 	public boolean isPriAlwaysGibs() {
512 		return priAlwaysGibs;
513 	}
514 
515 	/**
516 	 * If this damage is special.
517 	 * 
518 	 * @return priSpecial
519 	 * @todo find out what it is.
520 	 */
521 	public boolean isPriSpecial() {
522 		return priSpecial;
523 	}
524 
525 	/**
526 	 * If this damage can detonate goop created by bio rifle (not sure).
527 	 * 
528 	 * @return priDetonatesGoop
529 	 * @todo Find out correct info.
530 	 */
531 	public boolean isPriDetonatesGoop() {
532 		return priDetonatesGoop;
533 	}
534 
535 	/**
536 	 * If this damage is caused by super weapon and will damage also team mates
537 	 * even if friendly fire is off.
538 	 * 
539 	 * @return priSuperWeapon
540 	 */
541 	public boolean isPriSuperWeapon() {
542 		return priSuperWeapon;
543 	}
544 
545 	/**
546 	 * If the hit by this damage will add some speed to the target (will "push"
547 	 * the target a bit).
548 	 * 
549 	 * @return priExtraMomZ
550 	 */
551 	public boolean isPriExtraMomZ() {
552 		return priExtraMomZ;
553 	}
554 
555 	/**
556 	 * Holds the class of the projectile of this firing mode. If none, then the
557 	 * mode does not spawn projectiles. all the info below is then not relevant
558 	 * and will have default values on.
559 	 * 
560 	 * @return priProjType
561 	 */
562 	public String getPriProjType() {
563 		return priProjType;
564 	}
565 
566 	/**
567 	 * Damage of the projectile.
568 	 * 
569 	 * @return priDamage
570 	 */
571 	public double getPriDamage() {
572 		return priDamage;
573 	}
574 
575 	/**
576 	 * Default speed of the projectile - probably the projectile has this speed
577 	 * when fired.
578 	 * 
579 	 * @return priSpeed
580 	 */
581 	public double getPriSpeed() {
582 		return priSpeed;
583 	}
584 
585 	/**
586 	 * Maximum possible speed of this projectile.
587 	 * 
588 	 * @return priMaxSpeed
589 	 */
590 	public double getPriMaxSpeed() {
591 		return priMaxSpeed;
592 	}
593 
594 	/**
595 	 * Life span of this projectile. How long the projectile lasts in the
596 	 * environment. If 0 than probably unlimited.
597 	 * 
598 	 * @return priLifeSpan
599 	 */
600 	public double getPriLifeSpan() {
601 		return priLifeSpan;
602 	}
603 
604 	/**
605 	 * If the projectile does splash damage, the value here won't be zero and
606 	 * will specify the radius of the splash damage in ut units.
607 	 * 
608 	 * @return priDamageRadius
609 	 */
610 	public double getPriDamageRadius() {
611 		return priDamageRadius;
612 	}
613 
614 	/**
615 	 * Probably the amount of speed added to Z velocity vector when this
616 	 * projectile is fired. In UT units.
617 	 * 
618 	 * @return priTossZ
619 	 * @todo Find out correct info.
620 	 */
621 	public double getPriTossZ() {
622 		return priTossZ;
623 	}
624 
625 	/**
626 	 * Maximum effective distance of the projectile. Probably 0 if not limited.
627 	 * 
628 	 * @return priMaxEffectDistance
629 	 * @todo Find out correct info.
630 	 */
631 	public double getPriMaxEffectDistance() {
632 		return priMaxEffectDistance;
633 	}
634 
635 	/**
636 	 * Returns the class of secondary firing mode. If none, the weapon has NOT
637 	 * secondary firing mode that means all information for secondary firing
638 	 * mode are not relevant and will have default values.
639 	 * 
640 	 * @return secFireModeType
641 	 */
642 	public String getSecFireModeType() {
643 		return secFireModeType;
644 	}
645 
646 	/**
647 	 * If our weapons secondary firing mode does splash damage - area effect.
648 	 * Weapon will damage everything in certain raidus.
649 	 * 
650 	 * @return secSplashDamage
651 	 */
652 	public boolean isSecSplashDamage() {
653 		return secSplashDamage;
654 	}
655 
656 	/**
657 	 * If this weapon can be used to boost jumping height.
658 	 * 
659 	 * @return secSplashJump
660 	 */
661 	public boolean isSecSplashJump() {
662 		return secSplashJump;
663 	}
664 
665 	/**
666 	 * If the engine recomends us to use splash damage. For AI?
667 	 * 
668 	 * @return secRecomSplashDamage
669 	 * @todo Find correct information about this.
670 	 */
671 	public boolean isSecRecomSplashDamage() {
672 		return secRecomSplashDamage;
673 	}
674 
675 	/**
676 	 * If the weapon in this firing mode is tossing projectiles. The projectiles
677 	 * will usually fall down to the ground slowly (they won't fly in a line).
678 	 * 
679 	 * @return secTossed
680 	 */
681 	public boolean isSecTossed() {
682 		return secTossed;
683 	}
684 
685 	/**
686 	 * If this firing mode is capable of shooting projectiles that will lead the
687 	 * target.
688 	 * 
689 	 * @return secLeadTarget
690 	 * @todo Find correct info about this.
691 	 */
692 	public boolean isSecLeadTarget() {
693 		return secLeadTarget;
694 	}
695 
696 	/**
697 	 * If this firing mode does instant hits - will hit the target at the moment
698 	 * it is fired. Usually true for weapon like machine gun. False for slow
699 	 * projectiles.
700 	 * 
701 	 * @return secInsantHit
702 	 */
703 	public boolean isSecInstantHit() {
704 		return secInstantHit;
705 	}
706 
707 	/**
708 	 * If to fire this firing mode you need to press shooting button (start
709 	 * shooting) and then release it (stop shooting). Usually true for charged
710 	 * weapons. You'll first charge your weapon and when decided you've charged
711 	 * the weapon enough, you release the key and the weapon fires.
712 	 * 
713 	 * @return secFireOnRelease
714 	 */
715 	public boolean isSecFireOnRelease() {
716 		return secFireOnRelease;
717 	}
718 
719 	/**
720 	 * If to fire this mode you need to stop pressing shooting button between
721 	 * two shots to shoot. You will fire once when pressing the button, then you
722 	 * need to press it again to fire again.
723 	 * 
724 	 * @return secWaitForRelease
725 	 */
726 	public boolean isSecWaitForRelease() {
727 		return secWaitForRelease;
728 	}
729 
730 	/**
731 	 * If true you are unable to fire both firing modes of this weapon at the
732 	 * same time.
733 	 * 
734 	 * @return secModeExlusive
735 	 */
736 	public boolean isSecModeExclusive() {
737 		return secModeExclusive;
738 	}
739 
740 	/**
741 	 * How fast this weapon fires. Delay between two shots, when shooting
742 	 * continuously.
743 	 * 
744 	 * @return secFireRate
745 	 */
746 	public double getSecFireRate() {
747 		return secFireRate;
748 	}
749 
750 	/**
751 	 * How fast we can refire the weapon. Delay between when we stop shooting
752 	 * and when we can start shooting again.
753 	 * 
754 	 * @return secBotRefireRate
755 	 */
756 	public double getSecBotRefireRate() {
757 		return secBotRefireRate;
758 	}
759 
760 	/**
761 	 * How much ammo this weapon consumes for one shot.
762 	 * 
763 	 * @return secAmmoPerFire
764 	 */
765 	public int getSecAmmoPerFire() {
766 		return secAmmoPerFire;
767 	}
768 
769 	/**
770 	 * If this mode has clips how big they are.
771 	 * 
772 	 * @return secAmmoClipSize
773 	 * @todo Find correct info.
774 	 */
775 	public int getSecAmmoClipSize() {
776 		return secAmmoClipSize;
777 	}
778 
779 	/**
780 	 * How big aiming error this firing mode has. 0 - none, 1000 quite a bit.
781 	 * 
782 	 * @return secAimError
783 	 */
784 	public double getSecAimError() {
785 		return secAimError;
786 	}
787 
788 	/**
789 	 * When the weapon is spreading some projectiles, here is how big the spread
790 	 * is. In UT rotator units. No relation to AimError.
791 	 * 
792 	 * @return secSpread
793 	 */
794 	public double getSecSpread() {
795 		return secSpread;
796 	}
797 
798 	/**
799 	 * The style of weapon spread. Is in fact enum. Definition below (starts
800 	 * from 0 and goes up).
801 	 * 
802 	 * var() enum ESpreadStyle { SS_None, SS_Random, // spread is max random
803 	 * angle deviation SS_Line, // spread is angle between each projectile
804 	 * SS_Ring } SpreadStyle;
805 	 * 
806 	 * @return secSpreadStyle
807 	 */
808 	public int getSecSpreadStyle() {
809 		return secSpreadStyle;
810 	}
811 
812 	/**
813 	 * Firing mode fire count.
814 	 * 
815 	 * @return secFireCount
816 	 * @todo Find out what this is.
817 	 */
818 	public int getSecFireCount() {
819 		return secFireCount;
820 	}
821 
822 	/**
823 	 * Attenuate instant-hit/projectile damage by this multiplier.
824 	 * 
825 	 * @return secDamageAtten
826 	 */
827 	public double getSecDamageAtten() {
828 		return secDamageAtten;
829 	}
830 
831 	/**
832 	 * The class of secondary firing mode ammunition type. If none, then the
833 	 * firing mode does not use any ammunition. That means all ammo specific
834 	 * information is not relevant and will have default values (ammo specific
835 	 * informaton starts from this attribute and ends at secProjType attribute -
836 	 * that is not ammo specific).
837 	 * 
838 	 * @return secAmmoType
839 	 */
840 	public String getSecAmmoType() {
841 		return secAmmoType;
842 	}
843 	
844 	private ItemType secAmmoItemType = null;
845 	
846 	/**
847 	 * @return secondary ammo type as {@link ItemType}, null if not exist or uses primary ammo
848 	 */
849 	public ItemType getSecAmmoItemType() {
850 		if (getSecAmmoType() == null || getSecAmmoType().equals("None")) return null;
851 		if (secAmmoItemType != null) return secAmmoItemType;
852 		secAmmoItemType = itemTypeTranslator.get(getSecAmmoType());
853 		return secAmmoItemType;
854 	}
855 
856 
857 	/**
858 	 * Initial amount of ammunition. We get this if we pick up the item for the
859 	 * first time.
860 	 * 
861 	 * @return secInitialAmount
862 	 */
863 	public int getSecInitialAmount() {
864 		return secInitialAmount;
865 	}
866 
867 	/**
868 	 * Maximum amount of this ammunition we can hold in our inventory.
869 	 * 
870 	 * @return secMaxAmount
871 	 */
872 	public int getSecMaxAmount() {
873 		return secMaxAmount;
874 	}
875 
876 	/**
877 	 * Maximum firing range. 0 if not limited - probably.
878 	 * 
879 	 * @return secMaxRange
880 	 * @todo Find out how this works.
881 	 */
882 	public double getSecMaxRange() {
883 		return secMaxRange;
884 	}
885 
886 	/**
887 	 * Class of this ammunitions damage type. If ammo is not none, then this
888 	 * shouldn't be none either.
889 	 * 
890 	 * @return secDamageType
891 	 */
892 	public String getSecDamageType() {
893 		return secDamageType;
894 	}
895 
896 	/**
897 	 * If this damage can be stopped by an armor.
898 	 * 
899 	 * @return secArmorStops
900 	 */
901 	public boolean isSecArmorStops() {
902 		return secArmorStops;
903 	}
904 
905 	/**
906 	 * If this damage will kill us instantly.
907 	 * 
908 	 * @return secAlwaysGibs
909 	 */
910 	public boolean isSecAlwaysGibs() {
911 		return secAlwaysGibs;
912 	}
913 
914 	/**
915 	 * If this damage is special.
916 	 * 
917 	 * @return secSpecial
918 	 * @todo find out what it is.
919 	 */
920 	public boolean isSecSpecial() {
921 		return secSpecial;
922 	}
923 
924 	/**
925 	 * If this damage can detonate goop created by bio rifle (not sure).
926 	 * 
927 	 * @return secDetonatesGoop
928 	 * @todo Find out correct info.
929 	 */
930 	public boolean isSecDetonatesGoop() {
931 		return secDetonatesGoop;
932 	}
933 
934 	/**
935 	 * If this damage is caused by super weapon and will damage also team mates
936 	 * even if friendly fire is off.
937 	 * 
938 	 * @return secSuperWeapon
939 	 */
940 	public boolean isSecSuperWeapon() {
941 		return secSuperWeapon;
942 	}
943 
944 	/**
945 	 * If the hit by this damage will add some speed to the target (will "push"
946 	 * the target a bit).
947 	 * 
948 	 * @return secExtraMomZ
949 	 */
950 	public boolean isSecExtraMomZ() {
951 		return secExtraMomZ;
952 	}
953 
954 	/**
955 	 * Holds the class of the projectile of this firing mode. If none, then the
956 	 * mode does not spawn projectiles. all the info below is then not relevant
957 	 * and will have default values on.
958 	 * 
959 	 * @return secProjType
960 	 */
961 	public String getSecProjType() {
962 		return secProjType;
963 	}
964 
965 	/**
966 	 * Damage of the projectile.
967 	 * 
968 	 * @return secDamage
969 	 */
970 	public double getSecDamage() {
971 		return secDamage;
972 	}
973 
974 	/**
975 	 * Default speed of the projectile - probably the projectile has this speed
976 	 * when fired.
977 	 * 
978 	 * @return secSpeed
979 	 */
980 	public double getSecSpeed() {
981 		return secSpeed;
982 	}
983 
984 	/**
985 	 * Maximum possible speed of this projectile.
986 	 * 
987 	 * @return secMaxSpeed
988 	 */
989 	public double getSecMaxSpeed() {
990 		return secMaxSpeed;
991 	}
992 
993 	/**
994 	 * Life span of this projectile. How long the projectile lasts in the
995 	 * environment. If 0 than probably unlimited.
996 	 * 
997 	 * @return secLifeSpan
998 	 */
999 	public double getSecLifeSpan() {
1000 		return secLifeSpan;
1001 	}
1002 
1003 	/**
1004 	 * If the projectile does splash damage, the value here won't be zero and
1005 	 * will specify the radius of the splash damage in ut units.
1006 	 * 
1007 	 * @return secDamageRadius
1008 	 */
1009 	public double getSecDamageRadius() {
1010 		return secDamageRadius;
1011 	}
1012 
1013 	/**
1014 	 * Probably the amount of speed added to Z velocity vector when this
1015 	 * projectile is fired. In UT units.
1016 	 * 
1017 	 * @return secTossZ
1018 	 * @todo Find out correct info.
1019 	 */
1020 	public double getSecTossZ() {
1021 		return secTossZ;
1022 	}
1023 
1024 	/**
1025 	 * Maximum effective distance of the projectile. Probably 0 if not limited.
1026 	 * 
1027 	 * @return secMaxEffectDistance
1028 	 * @todo Find out correct info.
1029 	 */
1030 	public double getSecMaxEffectDistance() {
1031 		return secMaxEffectDistance;
1032 	}
1033 
1034 }