megamek.common
Class WeaponType

java.lang.Object
  extended by megamek.common.EquipmentType
      extended by megamek.common.WeaponType
Direct Known Subclasses:
Weapon

public class WeaponType
extends EquipmentType

A type of mech or vehicle weapon. There is only one instance of this weapon for all weapons of this type.


Field Summary
 int ammoType
           
 int atClass
           
 boolean capital
           
static int CLASS_AC
           
static int CLASS_AR10
           
static int CLASS_ARTILLERY
           
static int CLASS_ATM
           
static int CLASS_CAPITAL_AC
           
static int CLASS_CAPITAL_GAUSS
           
static int CLASS_CAPITAL_LASER
           
static int CLASS_CAPITAL_MISSILE
           
static int CLASS_CAPITAL_PPC
           
static int CLASS_LASER
           
static int CLASS_LBX_AC
           
static int CLASS_LRM
           
static int CLASS_MML
           
static int CLASS_MRM
           
static int CLASS_NONE
           
static int CLASS_PLASMA
           
static int CLASS_POINT_DEFENSE
           
static int CLASS_PPC
           
static int CLASS_PULSE_LASER
           
static int CLASS_ROCKET_LAUNCHER
           
static int CLASS_SCREEN
           
static int CLASS_SRM
           
static int CLASS_SUB_CAPITAL_CANNON
           
static java.lang.String[] classNames
           
protected  int damage
           
static int DAMAGE_ARTILLERY
           
static int DAMAGE_MISSILE
           
static int DAMAGE_SPECIAL
           
static int DAMAGE_VARIABLE
           
protected  int damageLong
           
protected  int damageMedium
           
protected  int damageShort
           
protected  int explosionDamage
           
 double extAV
           
 int extremeRange
           
static java.math.BigInteger F_AERO_WEAPON
           
static java.math.BigInteger F_ALT_BOMB
           
static java.math.BigInteger F_AMS
           
static java.math.BigInteger F_ANTI_SHIP
           
static java.math.BigInteger F_ARTILLERY
           
static java.math.BigInteger F_AUTO_TARGET
           
static java.math.BigInteger F_B_POD
           
static java.math.BigInteger F_BA_WEAPON
           
static java.math.BigInteger F_BALLISTIC
           
static java.math.BigInteger F_BOMBAST_LASER
           
static java.math.BigInteger F_BURST_FIRE
           
static java.math.BigInteger F_C3M
           
static java.math.BigInteger F_CRUISE_MISSILE
           
static java.math.BigInteger F_DIRECT_FIRE
           
static java.math.BigInteger F_DIVE_BOMB
           
static java.math.BigInteger F_ENERGY
           
static java.math.BigInteger F_EXTINGUISHER
           
static java.math.BigInteger F_FLAMER
           
static java.math.BigInteger F_HEATASDICE
           
static java.math.BigInteger F_INCENDIARY_NEEDLES
           
static java.math.BigInteger F_INF_AA
           
static java.math.BigInteger F_INF_ARCHAIC
           
static java.math.BigInteger F_INF_BURST
           
static java.math.BigInteger F_INF_ENCUMBER
           
static java.math.BigInteger F_INF_NONPENETRATING
           
static java.math.BigInteger F_INF_POINT_BLANK
           
static java.math.BigInteger F_INF_SUPPORT
           
static java.math.BigInteger F_INFANTRY
           
static java.math.BigInteger F_INFANTRY_ATTACK
           
static java.math.BigInteger F_INFANTRY_ONLY
           
static java.math.BigInteger F_INFERNO
           
static java.math.BigInteger F_LASER
           
static java.math.BigInteger F_M_POD
           
static java.math.BigInteger F_MECH_WEAPON
           
static java.math.BigInteger F_MG
           
static java.math.BigInteger F_MGA
           
static java.math.BigInteger F_MISSILE
           
static java.math.BigInteger F_MISSILE_HITS
           
static java.math.BigInteger F_NO_AIM
           
static java.math.BigInteger F_NO_FIRES
           
static java.math.BigInteger F_ONESHOT
           
static java.math.BigInteger F_PLASMA
           
static java.math.BigInteger F_PLASMA_MFUK
           
static java.math.BigInteger F_PPC
           
static java.math.BigInteger F_PROTO_WEAPON
           
static java.math.BigInteger F_PROTOTYPE
           
static java.math.BigInteger F_PULSE
           
static java.math.BigInteger F_SOLO_ATTACK
           
static java.math.BigInteger F_SPACE_BOMB
           
static java.math.BigInteger F_SPLITABLE
           
static java.math.BigInteger F_TAG
           
static java.math.BigInteger F_TANK_WEAPON
           
static java.math.BigInteger F_TASER
           
protected  int heat
           
 double longAV
           
 int longRange
           
 int maxRange
           
 double medAV
           
 int mediumRange
           
 int minimumRange
           
static int NUM_CLASSES
           
 int rackSize
           
static int RANGE_EXT
           
static int RANGE_LONG
           
static int RANGE_MED
           
static int RANGE_SHORT
           
 double shortAV
           
 int shortRange
           
 boolean subCapital
           
 int waterExtremeRange
           
 int waterLongRange
           
 int waterMediumRange
           
 int waterShortRange
           
static int WEAPON_NA
           
 
Fields inherited from class megamek.common.EquipmentType
allTypes, armorCosts, armorNames, armorPointMultipliers, availRating, bv, BV_VARIABLE, cost, COST_VARIABLE, criticals, CRITICALS_VARIABLE, DATE_NONE, endTurnModes, ERA_CLAN, ERA_SL, ERA_SW, explosive, extinctDate, flags, hittable, instantModeSwitch, internalName, introDate, lookupHash, modes, name, POINT_MULTIPLIER_CLAN_FF, POINT_MULTIPLIER_UNKNOWN, RATING_A, RATING_B, RATING_C, RATING_D, RATING_E, RATING_F, RATING_X, ratingNames, reintroDate, spreadable, structureCosts, structureNames, subType, T_ARMOR_COMMERCIAL, T_ARMOR_FERRO_CARBIDE, T_ARMOR_FERRO_FIBROUS, T_ARMOR_FERRO_FIBROUS_PROTO, T_ARMOR_FERRO_IMP, T_ARMOR_FERRO_LAMELLOR, T_ARMOR_HARDENED, T_ARMOR_HEAVY_FERRO, T_ARMOR_HEAVY_INDUSTRIAL, T_ARMOR_INDUSTRIAL, T_ARMOR_LAMELLOR_FERRO_CARBIDE, T_ARMOR_LIGHT_FERRO, T_ARMOR_PATCHWORK, T_ARMOR_REACTIVE, T_ARMOR_REFLECTIVE, T_ARMOR_STANDARD, T_ARMOR_STEALTH, T_ARMOR_UNKNOWN, T_STRUCTURE_COMPOSITE, T_STRUCTURE_ENDO_COMPOSITE, T_STRUCTURE_ENDO_PROTOTYPE, T_STRUCTURE_ENDO_STEEL, T_STRUCTURE_INDUSTRIAL, T_STRUCTURE_REINFORCED, T_STRUCTURE_STANDARD, T_STRUCTURE_UNKNOWN, techLevel, techRating, toHitModifier, tonnage, TONNAGE_VARIABLE
 
Constructor Summary
WeaponType()
           
 
Method Summary
 int getAmmoType()
           
 int getAtClass()
           
 int[] getATRanges()
           
 EquipmentType getBayType()
           
 double getBV(Entity entity)
           
 double getCost(Entity entity, boolean isArmored)
           
 int getDamage()
           
 int getDamage(int range)
           
 int getExplosionDamage()
           
 double getExtAV()
           
 int getExtremeRange()
           
 int getFireTN()
           
 int getHeat()
           
 double getLongAV()
           
 int getLongRange()
           
 int getMaxRange()
           
 double getMedAV()
           
 int getMediumRange()
           
 int getMinimumRange()
           
 int getRackSize()
           
 int[] getRanges(Mounted weapon)
           
 int getRoundExtAV()
           
 int getRoundLongAV()
           
 int getRoundMedAV()
           
 int getRoundShortAV()
           
 double getShortAV()
           
 int getShortRange()
           
 int getWExtremeRange()
           
 int getWLongRange()
           
 int getWMediumRange()
           
 int[] getWRanges()
           
 int getWShortRange()
           
static void initializeTypes()
          Add all the types of weapons we can create to the list
 boolean isCapital()
           
 boolean isSubCapital()
           
 void setAmmoType(int inAT)
           
 void setDamage(int inD)
           
 void setMinimumRange(int inMR)
           
 void setName(java.lang.String inN)
           
 void setRackSize(int inRS)
           
 void setRanges(int sho, int med, int lon, int ext)
           
 void setWaterRanges(int sho, int med, int lon, int ext)
           
 
Methods inherited from class megamek.common.EquipmentType
addEndTurnMode, addLookupName, addSubType, addType, equals, get, getAllTypes, getArmorCost, getArmorPointMultiplier, getArmorPointMultiplier, getArmorPointMultiplier, getArmorType, getArmorTypeName, getAvailability, getAvailabilityName, getCriticals, getDesc, getExtinctionDate, getFlags, getInternalName, getIntroductionDate, getMode, getModes, getModesCount, getName, getNames, getRatingName, getReintruductionDate, getStructureCost, getStructureType, getStructureTypeName, getTechLevel, getTechRating, getTechRatingName, getToHitModifier, getTonnage, hasFlag, hasInstantModeSwitch, hasModes, hasSubType, isAvailableIn, isExplosive, isHittable, isNextTurnModeSwitch, isSpreadable, resolveVariableCost, setFlags, setInstantModeSwitch, setInternalName, setModes, setSubType, setTonnage, toString, writeEquipmentDatabase, writeEquipmentExtendedDatabase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DAMAGE_MISSILE

public static final int DAMAGE_MISSILE
See Also:
Constant Field Values

DAMAGE_VARIABLE

public static final int DAMAGE_VARIABLE
See Also:
Constant Field Values

DAMAGE_SPECIAL

public static final int DAMAGE_SPECIAL
See Also:
Constant Field Values

DAMAGE_ARTILLERY

public static final int DAMAGE_ARTILLERY
See Also:
Constant Field Values

WEAPON_NA

public static final int WEAPON_NA
See Also:
Constant Field Values

F_DIRECT_FIRE

public static final java.math.BigInteger F_DIRECT_FIRE

F_FLAMER

public static final java.math.BigInteger F_FLAMER

F_LASER

public static final java.math.BigInteger F_LASER

F_PPC

public static final java.math.BigInteger F_PPC

F_AUTO_TARGET

public static final java.math.BigInteger F_AUTO_TARGET

F_NO_FIRES

public static final java.math.BigInteger F_NO_FIRES

F_SOLO_ATTACK

public static final java.math.BigInteger F_SOLO_ATTACK

F_SPLITABLE

public static final java.math.BigInteger F_SPLITABLE

F_MG

public static final java.math.BigInteger F_MG

F_INFERNO

public static final java.math.BigInteger F_INFERNO

F_INFANTRY

public static final java.math.BigInteger F_INFANTRY

F_MISSILE_HITS

public static final java.math.BigInteger F_MISSILE_HITS

F_ONESHOT

public static final java.math.BigInteger F_ONESHOT

F_ARTILLERY

public static final java.math.BigInteger F_ARTILLERY

F_BALLISTIC

public static final java.math.BigInteger F_BALLISTIC

F_ENERGY

public static final java.math.BigInteger F_ENERGY

F_MISSILE

public static final java.math.BigInteger F_MISSILE

F_PLASMA

public static final java.math.BigInteger F_PLASMA

F_INCENDIARY_NEEDLES

public static final java.math.BigInteger F_INCENDIARY_NEEDLES

F_PROTOTYPE

public static final java.math.BigInteger F_PROTOTYPE

F_HEATASDICE

public static final java.math.BigInteger F_HEATASDICE

F_AMS

public static final java.math.BigInteger F_AMS

F_INFANTRY_ONLY

public static final java.math.BigInteger F_INFANTRY_ONLY

F_TAG

public static final java.math.BigInteger F_TAG

F_C3M

public static final java.math.BigInteger F_C3M

F_PLASMA_MFUK

public static final java.math.BigInteger F_PLASMA_MFUK

F_EXTINGUISHER

public static final java.math.BigInteger F_EXTINGUISHER

F_PULSE

public static final java.math.BigInteger F_PULSE

F_BURST_FIRE

public static final java.math.BigInteger F_BURST_FIRE

F_MGA

public static final java.math.BigInteger F_MGA

F_NO_AIM

public static final java.math.BigInteger F_NO_AIM

F_BOMBAST_LASER

public static final java.math.BigInteger F_BOMBAST_LASER

F_CRUISE_MISSILE

public static final java.math.BigInteger F_CRUISE_MISSILE

F_B_POD

public static final java.math.BigInteger F_B_POD

F_TASER

public static final java.math.BigInteger F_TASER

F_ANTI_SHIP

public static final java.math.BigInteger F_ANTI_SHIP

F_SPACE_BOMB

public static final java.math.BigInteger F_SPACE_BOMB

F_M_POD

public static final java.math.BigInteger F_M_POD

F_DIVE_BOMB

public static final java.math.BigInteger F_DIVE_BOMB

F_ALT_BOMB

public static final java.math.BigInteger F_ALT_BOMB

F_BA_WEAPON

public static final java.math.BigInteger F_BA_WEAPON

F_MECH_WEAPON

public static final java.math.BigInteger F_MECH_WEAPON

F_AERO_WEAPON

public static final java.math.BigInteger F_AERO_WEAPON

F_PROTO_WEAPON

public static final java.math.BigInteger F_PROTO_WEAPON

F_TANK_WEAPON

public static final java.math.BigInteger F_TANK_WEAPON

F_INFANTRY_ATTACK

public static final java.math.BigInteger F_INFANTRY_ATTACK

F_INF_BURST

public static final java.math.BigInteger F_INF_BURST

F_INF_AA

public static final java.math.BigInteger F_INF_AA

F_INF_NONPENETRATING

public static final java.math.BigInteger F_INF_NONPENETRATING

F_INF_POINT_BLANK

public static final java.math.BigInteger F_INF_POINT_BLANK

F_INF_SUPPORT

public static final java.math.BigInteger F_INF_SUPPORT

F_INF_ENCUMBER

public static final java.math.BigInteger F_INF_ENCUMBER

F_INF_ARCHAIC

public static final java.math.BigInteger F_INF_ARCHAIC

RANGE_SHORT

public static final int RANGE_SHORT
See Also:
Constant Field Values

RANGE_MED

public static final int RANGE_MED
See Also:
Constant Field Values

RANGE_LONG

public static final int RANGE_LONG
See Also:
Constant Field Values

RANGE_EXT

public static final int RANGE_EXT
See Also:
Constant Field Values

CLASS_NONE

public static final int CLASS_NONE
See Also:
Constant Field Values

CLASS_LASER

public static final int CLASS_LASER
See Also:
Constant Field Values

CLASS_POINT_DEFENSE

public static final int CLASS_POINT_DEFENSE
See Also:
Constant Field Values

CLASS_PPC

public static final int CLASS_PPC
See Also:
Constant Field Values

CLASS_PULSE_LASER

public static final int CLASS_PULSE_LASER
See Also:
Constant Field Values

CLASS_ARTILLERY

public static final int CLASS_ARTILLERY
See Also:
Constant Field Values

CLASS_PLASMA

public static final int CLASS_PLASMA
See Also:
Constant Field Values

CLASS_AC

public static final int CLASS_AC
See Also:
Constant Field Values

CLASS_LBX_AC

public static final int CLASS_LBX_AC
See Also:
Constant Field Values

CLASS_LRM

public static final int CLASS_LRM
See Also:
Constant Field Values

CLASS_SRM

public static final int CLASS_SRM
See Also:
Constant Field Values

CLASS_MRM

public static final int CLASS_MRM
See Also:
Constant Field Values

CLASS_MML

public static final int CLASS_MML
See Also:
Constant Field Values

CLASS_ATM

public static final int CLASS_ATM
See Also:
Constant Field Values

CLASS_ROCKET_LAUNCHER

public static final int CLASS_ROCKET_LAUNCHER
See Also:
Constant Field Values

CLASS_CAPITAL_LASER

public static final int CLASS_CAPITAL_LASER
See Also:
Constant Field Values

CLASS_CAPITAL_PPC

public static final int CLASS_CAPITAL_PPC
See Also:
Constant Field Values

CLASS_CAPITAL_AC

public static final int CLASS_CAPITAL_AC
See Also:
Constant Field Values

CLASS_CAPITAL_GAUSS

public static final int CLASS_CAPITAL_GAUSS
See Also:
Constant Field Values

CLASS_CAPITAL_MISSILE

public static final int CLASS_CAPITAL_MISSILE
See Also:
Constant Field Values

CLASS_AR10

public static final int CLASS_AR10
See Also:
Constant Field Values

CLASS_SCREEN

public static final int CLASS_SCREEN
See Also:
Constant Field Values

CLASS_SUB_CAPITAL_CANNON

public static final int CLASS_SUB_CAPITAL_CANNON
See Also:
Constant Field Values

NUM_CLASSES

public static final int NUM_CLASSES
See Also:
Constant Field Values

classNames

public static java.lang.String[] classNames

heat

protected int heat

damage

protected int damage

damageShort

protected int damageShort

damageMedium

protected int damageMedium

damageLong

protected int damageLong

explosionDamage

protected int explosionDamage

rackSize

public int rackSize

ammoType

public int ammoType

minimumRange

public int minimumRange

shortRange

public int shortRange

mediumRange

public int mediumRange

longRange

public int longRange

extremeRange

public int extremeRange

waterShortRange

public int waterShortRange

waterMediumRange

public int waterMediumRange

waterLongRange

public int waterLongRange

waterExtremeRange

public int waterExtremeRange

shortAV

public double shortAV

medAV

public double medAV

longAV

public double longAV

extAV

public double extAV

maxRange

public int maxRange

capital

public boolean capital

subCapital

public boolean subCapital

atClass

public int atClass
Constructor Detail

WeaponType

public WeaponType()
Method Detail

setDamage

public void setDamage(int inD)

setName

public void setName(java.lang.String inN)

setMinimumRange

public void setMinimumRange(int inMR)

setRanges

public void setRanges(int sho,
                      int med,
                      int lon,
                      int ext)

setWaterRanges

public void setWaterRanges(int sho,
                           int med,
                           int lon,
                           int ext)

setAmmoType

public void setAmmoType(int inAT)

setRackSize

public void setRackSize(int inRS)

getHeat

public int getHeat()

getFireTN

public int getFireTN()

getDamage

public int getDamage(int range)

getDamage

public int getDamage()

getRackSize

public int getRackSize()

getAmmoType

public int getAmmoType()

getRanges

public int[] getRanges(Mounted weapon)

getMinimumRange

public int getMinimumRange()

getShortRange

public int getShortRange()

getMediumRange

public int getMediumRange()

getLongRange

public int getLongRange()

getExtremeRange

public int getExtremeRange()

getWRanges

public int[] getWRanges()

getWShortRange

public int getWShortRange()

getWMediumRange

public int getWMediumRange()

getWLongRange

public int getWLongRange()

getWExtremeRange

public int getWExtremeRange()

getMaxRange

public int getMaxRange()

getATRanges

public int[] getATRanges()

getShortAV

public double getShortAV()

getRoundShortAV

public int getRoundShortAV()

getMedAV

public double getMedAV()

getRoundMedAV

public int getRoundMedAV()

getLongAV

public double getLongAV()

getRoundLongAV

public int getRoundLongAV()

getExtAV

public double getExtAV()

getRoundExtAV

public int getRoundExtAV()

isCapital

public boolean isCapital()

isSubCapital

public boolean isSubCapital()

getAtClass

public int getAtClass()

getBayType

public EquipmentType getBayType()

initializeTypes

public static void initializeTypes()
Add all the types of weapons we can create to the list


getExplosionDamage

public int getExplosionDamage()

getCost

public double getCost(Entity entity,
                      boolean isArmored)
Overrides:
getCost in class EquipmentType
Returns:
The C-Bill cost of the piece of equipment.

getBV

public double getBV(Entity entity)
Overrides:
getBV in class EquipmentType