View Javadoc

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