Package megamek.common.equipment
Class WeaponType
java.lang.Object
megamek.common.equipment.EquipmentType
megamek.common.equipment.WeaponType
- All Implemented Interfaces:
ITechnology
- Direct Known Subclasses:
Weapon
A type of mek or vehicle weapon. There is only one instance of this weapon for all weapons of this type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int[]protected AmmoType.AmmoTypeEnumprotected intprotected intUsed for the BA vs BA damage rules on TO pg 109.static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected booleanstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected intstatic final intstatic final intstatic final intstatic final intprotected intprotected intprotected intprotected intprotected doubleprotected intstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagMissile weapon that can be linked to an Artemis fire control systemstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagThis flag is used by mortar-type weapons that allow indirect fire without a spotter and/or with LOS.static final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagstatic final WeaponTypeFlagprotected intprotected intintprotected doubleprotected intprotected intprotected doubleprotected intprotected intprotected intprotected intstatic final intstatic final intstatic final intstatic final intstatic final WeaponTypeFlagprotected doubleprotected intprotected booleanprotected intprotected intprotected intprotected intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class megamek.common.equipment.EquipmentType
allTypes, bv, BV_VARIABLE, cost, COST_VARIABLE, CRITICAL_SLOTS_VARIABLE, criticalSlots, endTurnModes, explosive, flags, hittable, instantModeSwitch, internalName, lookupHash, modes, name, namesVector, omniFixedOnly, rulesRefs, shortName, sortingName, spreadable, structureAbbreviations, structureCosts, structureNames, svSlots, T_ARMOR_AEROSPACE, T_ARMOR_ALUM, T_ARMOR_ANTI_PENETRATIVE_ABLATION, T_ARMOR_BA_FIRE_RESIST, T_ARMOR_BA_MIMETIC, T_ARMOR_BA_REACTIVE, T_ARMOR_BA_REFLECTIVE, T_ARMOR_BA_STANDARD, T_ARMOR_BA_STANDARD_ADVANCED, T_ARMOR_BA_STANDARD_PROTOTYPE, T_ARMOR_BA_STEALTH, T_ARMOR_BA_STEALTH_BASIC, T_ARMOR_BA_STEALTH_IMP, T_ARMOR_BA_STEALTH_PROTOTYPE, T_ARMOR_BALLISTIC_REINFORCED, T_ARMOR_COMMERCIAL, T_ARMOR_EDP, T_ARMOR_FERRO_ALUM_PROTO, T_ARMOR_FERRO_FIBROUS, T_ARMOR_FERRO_FIBROUS_PROTO, T_ARMOR_FERRO_LAMELLOR, T_ARMOR_HARDENED, T_ARMOR_HEAT_DISSIPATING, T_ARMOR_HEAVY_ALUM, T_ARMOR_HEAVY_FERRO, T_ARMOR_HEAVY_INDUSTRIAL, T_ARMOR_IMPACT_RESISTANT, T_ARMOR_INDUSTRIAL, T_ARMOR_LC_FERRO_CARBIDE, T_ARMOR_LC_FERRO_IMP, T_ARMOR_LC_LAMELLOR_FERRO_CARBIDE, T_ARMOR_LIGHT_ALUM, T_ARMOR_LIGHT_FERRO, T_ARMOR_PATCHWORK, T_ARMOR_PRIMITIVE, T_ARMOR_PRIMITIVE_AERO, T_ARMOR_PRIMITIVE_FIGHTER, T_ARMOR_REACTIVE, T_ARMOR_REFLECTIVE, T_ARMOR_STANDARD, T_ARMOR_STANDARD_PROTOMEK, T_ARMOR_STEALTH, T_ARMOR_STEALTH_VEHICLE, T_ARMOR_SV_BAR_10, T_ARMOR_SV_BAR_2, T_ARMOR_SV_BAR_3, T_ARMOR_SV_BAR_4, T_ARMOR_SV_BAR_5, T_ARMOR_SV_BAR_6, T_ARMOR_SV_BAR_7, T_ARMOR_SV_BAR_8, T_ARMOR_SV_BAR_9, 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, TA_NONE, TA_STANDARD_STRUCTURE, tankSlots, techAdvancement, toHitModifier, tonnage, TONNAGE_VARIABLE, VARIABLE, YAML_VERSIONFields inherited from interface megamek.common.interfaces.ITechnology
DATE_ES, DATE_NONE, DATE_PS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds equipment flags to the YAML data map.doubleadjustBattleForceDamageForMinRange(double damage) booleanintReturns the weapon's heat for AlphaStrike conversion.intgetAlphaStrikeHeatDamage(int rangeBand) Returns the weapon's AlphaStrike heat damage for AlphaStrike conversion.intint[]intintdoublegetBattleForceDamage(int range) Damage calculation for BattleForce and AlphaStrikedoublegetBattleForceDamage(int range, int baSquadSize) BattleForce-scale damage for BattleArmor, using cluster hits table based on squad size.doublegetBattleForceDamage(int range, Mounted<?> fcs) Damage calculation for BattleForce and AlphaStrike for missile weapons that may have advanced fire controlgetBayType(boolean capitalOnly) getBV()doubleintintgetDamage(int range) intdoublegetExtAV()intintintgetHeat()This does not include heat generated by stealth armor, as that depends on whether it is installed as patchwork and does not appear in the equipment list of all unit types.intReturns the adjustement of heat used for BV calculationintdoubleintintintgetMaxRange(WeaponMounted weapon) intgetMaxRange(WeaponMounted weapon, AmmoMounted ammo) doublegetMedAV()intintintintint[]int[]intintintintdoubleintintintintint[]intConstructs a map containing the YAML-serializable data for this equipment type.protected StringReturns the YAML type name for this equipment type.booleanhasFlag(EquipmentFlag flag) Returns true when this EquipmentType has the given flag.booleanReturns true if this weapon type can be used for Total War LRM-type indirect fire.static voidAdd all the types of weapons we can create to the listbooleanReturns true if this weapon type contributes to the AlphaStrike IF ability.booleanReturns true if this weapon type contributes to the AlphaStrike PNT ability.booleanbooleanbooleanbooleanvoidvoidsetDamage(int inD) voidsetLongRange(int inSM) voidsetMediumRange(int inMR) voidsetMinimumRange(int inMR) voidvoidsetRackSize(int inRS) voidsetShortRange(int inSM) toString()Methods inherited from class megamek.common.equipment.EquipmentType
addEndTurnMode, addLookupName, addLookupName, addMode, addType, allTypes, clearLookupNames, clearModes, equals, get, get, getAllStructureCodeName, getAllTypes, getArmorFromName, getArmorType, getArmorTypeName, getArmorTypeName, getBaseAvailability, getBaseBV, getBaseCost, getBaseCriticalSlots, getBaseTonnage, getBV, getCommonDate, getCost, getDesc, getDesc, getEquipDateAsString, getExtinctionDate, getExtinctionDate, getExtinctionDate, getFlags, getInternalName, getIntroductionDate, getIntroductionDate, getIntroductionDate, getLookupCollisions, getMode, getModes, getModesCount, getModesCount, getName, getName, getNames, getNumCriticalSlots, getNumCriticalSlots, getProductionDate, getProductionDate, getPrototypeDate, getPrototypeDate, getRawCost, getReintroductionDate, getReintroductionDate, getReintroductionDate, getRulesRefs, getShortName, getShortName, getSortingName, getStaticTechLevel, getStructureCost, getStructureFromName, getStructureTechAdvancement, getStructureType, getStructureTypeAbbrev, getStructureTypeName, getStructureTypeName, getSupportVeeSlots, getTankSlots, getTechAdvancement, getTechBase, getTechLevel, getTechLevel, getTechLevels, getTechRating, getToHitModifier, getToHitModifierAtRange, getTonnage, getTonnage, getTonnage, getTonnage, hasAnyFlag, hasAnyFlag, hasFlag, hashCode, hasHitModifiersByRange, hasInstantModeSwitch, hasModes, hasModeType, is, isAnyOf, isArmorType, isC3Equipment, isClan, isEligibleForBeingArmored, isExplosive, isExplosive, isHittable, isIntroLevel, isMixedTech, isNextTurnModeSwitch, isOmniFixedOnly, isSpreadable, isStructureType, isUnofficial, isVariableBV, isVariableCost, isVariableCriticalSlots, isVariableSize, isVariableTonnage, matchesName, removeMode, setFlags, setInstantModeSwitch, setInternalName, setModes, variableMaxSize, variableStepSizeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.interfaces.ITechnology
calcEraAvailability, calcEraAvailability, calcYearAvailability, calcYearAvailability, calcYearAvailability, findMinimumRulesLevel, findMinimumRulesLevel, getAdvancedRange, getAdvancedRange, getCodeFromIOAbbr, getCodeFromMMAbbr, getCommonDate, getEraAvailabilityName, getEraAvailabilityName, getExperimentalRange, getExperimentalRange, getExtinctionRange, getExtinctionRange, getFullRatingName, getFullRatingName, getProductionDate, getPrototypeDate, getSimpleLevel, getSimpleLevel, getSimpleLevel, getStandardRange, getStandardRange, getTechRatingName, isAvailableIn, isAvailableIn, isAvailableIn, isExtinct, isExtinct, isExtinct, isLegal, isLegal
-
Field Details
-
DAMAGE_BY_CLUSTER_TABLE
public static final int DAMAGE_BY_CLUSTER_TABLE- See Also:
-
DAMAGE_VARIABLE
public static final int DAMAGE_VARIABLE- See Also:
-
DAMAGE_SPECIAL
public static final int DAMAGE_SPECIAL- See Also:
-
DAMAGE_ARTILLERY
public static final int DAMAGE_ARTILLERY- See Also:
-
WEAPON_NA
public static final int WEAPON_NA- See Also:
-
F_DIRECT_FIRE
-
F_INDIRECT_FIRE
-
F_FLAMER
-
F_LASER
-
F_PPC
-
F_AUTO_TARGET
-
F_NO_FIRES
-
F_SOLO_ATTACK
-
F_VGL
-
F_MG
-
F_INFERNO
-
F_INFANTRY
-
F_MISSILE_HITS
-
F_ONE_SHOT
-
F_ARTILLERY
-
F_BALLISTIC
-
F_ENERGY
-
F_MISSILE
-
F_PLASMA
-
F_INCENDIARY_NEEDLES
-
F_AC
-
F_SRM
-
F_LRM
-
F_HAG
-
F_MML
-
F_MRM
-
F_ATM
-
F_NARC
-
F_GAUSS
-
F_HVAC
-
F_PROTOTYPE
-
F_HEAT_AS_DICE
-
F_AMS
-
F_INFANTRY_ONLY
-
F_TAG
-
F_C3M
-
F_PLASMA_MFUK
-
F_EXTINGUISHER
-
F_PULSE
-
F_VSP
-
F_BURST_FIRE
-
F_MGA
-
F_NO_AIM
-
F_BOMBAST_LASER
-
F_CRUISE_MISSILE
-
F_B_POD
-
F_TASER
-
F_ANTI_SHIP
-
F_SPACE_BOMB
-
F_M_POD
-
F_DIVE_BOMB
-
F_ALT_BOMB
-
F_BA_WEAPON
-
F_MEK_WEAPON
-
F_AERO_WEAPON
-
F_PROTO_WEAPON
-
F_TANK_WEAPON
-
F_INFANTRY_ATTACK
-
F_INF_BURST
-
F_INF_AA
-
F_INF_NONPENETRATING
-
F_INF_POINT_BLANK
-
F_INF_SUPPORT
-
F_INF_ENCUMBER
-
F_INF_ARCHAIC
-
F_INF_DISPOSABLE
-
F_INF_CLIMBING_CLAWS
-
F_C3MBS
-
F_MASS_DRIVER
-
F_CWS
-
F_MEK_MORTAR
-
F_BOMB_WEAPON
-
F_BA_INDIVIDUAL
-
F_PD_BAY
-
F_AMS_BAY
-
F_LARGE_MISSILE
-
F_HYPER
-
F_DOUBLE_ONE_SHOT
-
F_ER_FLAMER
-
F_ARTEMIS_COMPATIBLE
Missile weapon that can be linked to an Artemis fire control system -
F_PPC_CAPACITOR_COMPATIBLE
-
S_IMPROVED
-
F_MORTAR_TYPE_INDIRECT
This flag is used by mortar-type weapons that allow indirect fire without a spotter and/or with LOS. -
F_TSEMP
-
F_REPEATING
-
RANGE_SHORT
public static final int RANGE_SHORT- See Also:
-
RANGE_MED
public static final int RANGE_MED- See Also:
-
RANGE_LONG
public static final int RANGE_LONG- See Also:
-
RANGE_EXT
public static final int RANGE_EXT- See Also:
-
AIRBORNE_WEAPON_RANGES
public static final int[] AIRBORNE_WEAPON_RANGES -
CLASS_NONE
public static final int CLASS_NONE- See Also:
-
CLASS_LASER
public static final int CLASS_LASER- See Also:
-
CLASS_POINT_DEFENSE
public static final int CLASS_POINT_DEFENSE- See Also:
-
CLASS_PPC
public static final int CLASS_PPC- See Also:
-
CLASS_PULSE_LASER
public static final int CLASS_PULSE_LASER- See Also:
-
CLASS_ARTILLERY
public static final int CLASS_ARTILLERY- See Also:
-
CLASS_PLASMA
public static final int CLASS_PLASMA- See Also:
-
CLASS_AC
public static final int CLASS_AC- See Also:
-
CLASS_LBX_AC
public static final int CLASS_LBX_AC- See Also:
-
CLASS_LRM
public static final int CLASS_LRM- See Also:
-
CLASS_SRM
public static final int CLASS_SRM- See Also:
-
CLASS_MRM
public static final int CLASS_MRM- See Also:
-
CLASS_MML
public static final int CLASS_MML- See Also:
-
CLASS_ATM
public static final int CLASS_ATM- See Also:
-
CLASS_ROCKET_LAUNCHER
public static final int CLASS_ROCKET_LAUNCHER- See Also:
-
CLASS_CAPITAL_LASER
public static final int CLASS_CAPITAL_LASER- See Also:
-
CLASS_CAPITAL_PPC
public static final int CLASS_CAPITAL_PPC- See Also:
-
CLASS_CAPITAL_AC
public static final int CLASS_CAPITAL_AC- See Also:
-
CLASS_CAPITAL_GAUSS
public static final int CLASS_CAPITAL_GAUSS- See Also:
-
CLASS_CAPITAL_MISSILE
public static final int CLASS_CAPITAL_MISSILE- See Also:
-
CLASS_AR10
public static final int CLASS_AR10- See Also:
-
CLASS_SCREEN
public static final int CLASS_SCREEN- See Also:
-
CLASS_SUB_CAPITAL_CANNON
public static final int CLASS_SUB_CAPITAL_CANNON- See Also:
-
CLASS_CAPITAL_MD
public static final int CLASS_CAPITAL_MD- See Also:
-
CLASS_AMS
public static final int CLASS_AMS- See Also:
-
CLASS_TELE_MISSILE
public static final int CLASS_TELE_MISSILE- See Also:
-
CLASS_GAUSS
public static final int CLASS_GAUSS- See Also:
-
CLASS_THUNDERBOLT
public static final int CLASS_THUNDERBOLT- See Also:
-
CLASS_MORTAR
public static final int CLASS_MORTAR- See Also:
-
WEAPON_DIRECT_FIRE
public static final int WEAPON_DIRECT_FIRE- See Also:
-
WEAPON_CLUSTER_BALLISTIC
public static final int WEAPON_CLUSTER_BALLISTIC- See Also:
-
WEAPON_PULSE
public static final int WEAPON_PULSE- See Also:
-
WEAPON_CLUSTER_MISSILE
public static final int WEAPON_CLUSTER_MISSILE- See Also:
-
WEAPON_CLUSTER_MISSILE_1D6
public static final int WEAPON_CLUSTER_MISSILE_1D6- See Also:
-
WEAPON_CLUSTER_MISSILE_2D6
public static final int WEAPON_CLUSTER_MISSILE_2D6- See Also:
-
WEAPON_CLUSTER_MISSILE_3D6
public static final int WEAPON_CLUSTER_MISSILE_3D6- See Also:
-
WEAPON_BURST_HALF_D6
public static final int WEAPON_BURST_HALF_D6- See Also:
-
WEAPON_BURST_1D6
public static final int WEAPON_BURST_1D6- See Also:
-
WEAPON_BURST_2D6
public static final int WEAPON_BURST_2D6- See Also:
-
WEAPON_BURST_3D6
public static final int WEAPON_BURST_3D6- See Also:
-
WEAPON_BURST_4D6
public static final int WEAPON_BURST_4D6- See Also:
-
WEAPON_BURST_5D6
public static final int WEAPON_BURST_5D6- See Also:
-
WEAPON_BURST_6D6
public static final int WEAPON_BURST_6D6- See Also:
-
WEAPON_BURST_7D6
public static final int WEAPON_BURST_7D6- See Also:
-
WEAPON_PLASMA
public static final int WEAPON_PLASMA- See Also:
-
BF_CLASS_STANDARD
public static final int BF_CLASS_STANDARD- See Also:
-
BF_CLASS_LRM
public static final int BF_CLASS_LRM- See Also:
-
BF_CLASS_SRM
public static final int BF_CLASS_SRM- See Also:
-
BF_CLASS_MML
public static final int BF_CLASS_MML- See Also:
-
BF_CLASS_TORPEDO
public static final int BF_CLASS_TORPEDO- See Also:
-
BF_CLASS_AC
public static final int BF_CLASS_AC- See Also:
-
BF_CLASS_FLAK
public static final int BF_CLASS_FLAK- See Also:
-
BF_CLASS_IATM
public static final int BF_CLASS_IATM- See Also:
-
BF_CLASS_REL
public static final int BF_CLASS_REL- See Also:
-
BF_CLASS_CAPITAL
public static final int BF_CLASS_CAPITAL- See Also:
-
BF_CLASS_SUBCAPITAL
public static final int BF_CLASS_SUBCAPITAL- See Also:
-
BF_CLASS_CAPITAL_MISSILE
public static final int BF_CLASS_CAPITAL_MISSILE- See Also:
-
heat
protected int heat -
heatAdjustmentForBvCalculation
protected int heatAdjustmentForBvCalculation -
damage
protected int damage -
damageShort
protected int damageShort -
damageMedium
protected int damageMedium -
damageLong
protected int damageLong -
explosionDamage
protected int explosionDamage -
rackSize
protected int rackSize -
ammoType
-
minimumRange
protected int minimumRange -
shortRange
protected int shortRange -
mediumRange
protected int mediumRange -
longRange
protected int longRange -
extremeRange
protected int extremeRange -
waterShortRange
protected int waterShortRange -
waterMediumRange
protected int waterMediumRange -
waterLongRange
protected int waterLongRange -
waterExtremeRange
protected int waterExtremeRange -
infDamageClass
public int infDamageClass -
baDamageClass
protected int baDamageClassUsed for the BA vs BA damage rules on TO pg 109. Determines how much damage a weapon will inflict on BA, where the default WEAPON_DIRECT_FIRE indicates normal weapon damage. -
shortAV
protected double shortAV -
medAV
protected double medAV -
longAV
protected double longAV -
extAV
protected double extAV -
missileArmor
protected int missileArmor -
maxRange
protected int maxRange -
capital
protected boolean capital -
subCapital
protected boolean subCapital -
atClass
protected int atClass
-
-
Constructor Details
-
WeaponType
public WeaponType()
-
-
Method Details
-
setDamage
public void setDamage(int inD) -
setName
-
setMinimumRange
public void setMinimumRange(int inMR) -
setShortRange
public void setShortRange(int inSM) -
setMediumRange
public void setMediumRange(int inMR) -
setLongRange
public void setLongRange(int inSM) -
setAmmoType
-
setRackSize
public void setRackSize(int inRS) -
getHeat
public int getHeat()Description copied from class:EquipmentTypeThis does not include heat generated by stealth armor, as that depends on whether it is installed as patchwork and does not appear in the equipment list of all unit types.- Overrides:
getHeatin classEquipmentType- Returns:
- The amount of heat generated by the equipment
-
getHeatAdjustmentForBvCalculation
public int getHeatAdjustmentForBvCalculation()Returns the adjustement of heat used for BV calculation -
hasFlag
Description copied from class:EquipmentTypeReturns true when this EquipmentType has the given flag. NOTE: Even though EquipmentFlags are enums, checking e.g. a WeaponType if it has a MiscTypeFlag may return an incorrect true result, as the actual test is made using EquipmentBitSet, i.e. a number comparison.Example: EquipmentType.get("BAArmoredGlove").hasFlag(WeaponType.F_VGL) returns true, as WeaponType.F_VGL has the same ordinal as MiscType.F_ARMORED_GLOVE. Therefore, always make sure to test only MiscTypes against MiscTypeFlags, WeaponTypes against WeaponTypeFlags and AmmoTypes against AmmoTypeFlags. This method will log a warning if the rule is not followed.
- Overrides:
hasFlagin classEquipmentType- Parameters:
flag- The EquipmentFlag to check- Returns:
- True when this EquipmentType has the given flag
- See Also:
-
getFireTN
public int getFireTN() -
getDamage
public int getDamage(int range) -
getDamage
public int getDamage() -
getRackSize
public int getRackSize() -
getAmmoType
-
getRanges
-
getRanges
-
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
-
getMaxRange
public int getMaxRange() -
getMaxRange
-
getInfantryDamageClass
public int getInfantryDamageClass() -
getBADamageClass
public int getBADamageClass() -
getATRanges
public int[] getATRanges() -
getMissileArmor
public int getMissileArmor() -
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
- Returns:
- The type of weapon bay this weapon goes in
-
getBV
- Returns:
- BV of the weapon
-
getBayType
- Parameters:
capitalOnly- If true, this will return the equivalent capital bay for subcapital weapons.- Returns:
- The type of weapon bay this weapon goes in
-
getBattleForceDamage
public double getBattleForceDamage(int range) Damage calculation for BattleForce and AlphaStrike- Parameters:
range- The range in hexes- Returns:
- Damage in BattleForce scale
-
getBattleForceDamage
Damage calculation for BattleForce and AlphaStrike for missile weapons that may have advanced fire control- Parameters:
range- - the range in hexesfcs- - linked Artemis or Apollo FCS (null for none)- Returns:
- - damage in BattleForce scale
-
adjustBattleForceDamageForMinRange
public double adjustBattleForceDamageForMinRange(double damage) -
getBattleForceDamage
public double getBattleForceDamage(int range, int baSquadSize) BattleForce-scale damage for BattleArmor, using cluster hits table based on squad size. AlphaStrike uses a different method.- Parameters:
range- - the range in hexesbaSquadSize- - the number of suits in the squad/point/level i- Returns:
- - damage in BattleForce scale
-
getBattleForceClass
public int getBattleForceClass()- Returns:
- The class of weapons for those that are tracked separately from standard damage (AlphaStrike)
-
getAlphaStrikeHeat
public int getAlphaStrikeHeat()Returns the weapon's heat for AlphaStrike conversion. Overridden where it differs from TW heat. -
getAlphaStrikeHeatDamage
public int getAlphaStrikeHeatDamage(int rangeBand) Returns the weapon's AlphaStrike heat damage for AlphaStrike conversion. ASC p.124. -
hasIndirectFire
public boolean hasIndirectFire()Returns true if this weapon type can be used for Total War LRM-type indirect fire. -
isAlphaStrikeIndirectFire
public boolean isAlphaStrikeIndirectFire()Returns true if this weapon type contributes to the AlphaStrike IF ability. This is identical to TW indirect fire for most but not all weapons (see e.g. IATMs) -
isAlphaStrikePointDefense
public boolean isAlphaStrikePointDefense()Returns true if this weapon type contributes to the AlphaStrike PNT ability. This is not identical to TW point defense, therefore implemented separately. -
initializeTypes
public static void initializeTypes()Add all the types of weapons we can create to the listWhen a weapon class extends another, the subclass must be listed first to avoid clobbering the name lookup when calling the constructor of the superclass.
-
getExplosionDamage
public int getExplosionDamage() -
getCost
- Overrides:
getCostin classEquipmentType- Returns:
- The C-Bill cost of the piece of equipment.
-
isSplittableOverCriticalSlots
public boolean isSplittableOverCriticalSlots() -
toString
- Overrides:
toStringin classEquipmentType
-
getYamlTypeName
Description copied from class:EquipmentTypeReturns the YAML type name for this equipment type. Subclasses should override this to return their specific type name.- Overrides:
getYamlTypeNamein classEquipmentType- Returns:
- The YAML type name (e.g., "weapon", "ammo", "misc", "armor")
-
addFlags
Description copied from class:EquipmentTypeAdds equipment flags to the YAML data map. Subclasses should override this to add type-specific flags.- Overrides:
addFlagsin classEquipmentType- Parameters:
data- The YAML data map to add flags to
-
getYamlData
Description copied from class:EquipmentTypeConstructs a map containing the YAML-serializable data for this equipment type. Subclasses should override this method to add type-specific data.- Overrides:
getYamlDatain classEquipmentType- Returns:
- A map containing the YAML-serializable data for this equipment type.
-
canBeMountedOnBaDwp
public boolean canBeMountedOnBaDwp()- Overrides:
canBeMountedOnBaDwpin classEquipmentType- Returns:
- True if this equipment type can be mounted on a BattleArmor Detachable Weapon Pack, TO:AUE p.99
-
relevantToTargetingComputer
public boolean relevantToTargetingComputer()- Overrides:
relevantToTargetingComputerin classEquipmentType- Returns:
- True if this equipment counts for the size and weight of a Targeting Computer, and benefits from it in the case of weapons. TM p.238, TO:AUE p.157
-