rl.common.game.elements
Class Weapon
java.lang.Object
rl.common.game.elements.Equipment
rl.common.game.elements.Weapon
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- AntiPersonnel, Artillery, GaussCannon, InfantryMortar, InfantryWeaponFire, Laser, MassDriverCannon, Missile, PointDefence, ThorJavelin, VehicleMissile
public abstract class Weapon
- extends Equipment
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
WeaponTypeName
public static final java.lang.String[] WeaponTypeName
Weapon
public Weapon()
getRange
public int getRange()
isBallistic
public boolean isBallistic()
getType
public Equipment.Type getType()
- Specified by:
getType in class Equipment
isOffensiveWeapon
public abstract boolean isOffensiveWeapon()
isDirectFireWeapon
public abstract boolean isDirectFireWeapon()
isIndirectFireWeapon
public abstract boolean isIndirectFireWeapon()
isArtilleryWeapon
public abstract boolean isArtilleryWeapon()
getWeaponType
public abstract Weapon.WeaponType getWeaponType()
getDamageTemplate
public abstract WeaponDamageTemplate getDamageTemplate()
usesAmmunitionTypes
public abstract boolean usesAmmunitionTypes()
getAmmunitionTypeNames
public abstract java.util.Vector<java.lang.String> getAmmunitionTypeNames()
usesAmmunition
public abstract boolean usesAmmunition()
getAmmunitionCapacity
public abstract int getAmmunitionCapacity()
setValue
public void setValue(org.jdom.Element val)
throws java.lang.IllegalArgumentException
- Overrides:
setValue in class Equipment
- Throws:
java.lang.IllegalArgumentException
getInfantryDamage
public int getInfantryDamage(int modifiedDieRoll)
- Returns the number of infantry casualties from this weapon
- Parameters:
modifiedDieRoll - the modified die roll to hit the infantry unit
- Returns:
- the amount of casualties done to the unit