Package megamek.common.weapons
Class MissileBayWeaponHandler
java.lang.Object
megamek.common.weapons.WeaponHandler
megamek.common.weapons.BayWeaponHandler
megamek.common.weapons.AmmoBayWeaponHandler
megamek.common.weapons.MissileBayWeaponHandler
- All Implemented Interfaces:
Serializable
,AttackHandler
- See Also:
-
Field Summary
Fields inherited from class megamek.common.weapons.WeaponHandler
advancedPD, ae, amsBayEngaged, amsBayEngagedCap, amsBayEngagedMissile, amsEngaged, announcedEntityFiring, apdsEngaged, attackValue, atype, bDirect, bGlancing, bLowProfileGlancing, bMissed, bSalvo, calcDmgPerHitReport, CapMissileAMSMod, CapMissileArmor, CapMissileMissed, CounterAV, damageType, firstHit, game, gameManager, generalDamageType, hit, insertedAttacks, isJammed, isStrafing, isStrafingFirstShot, missed, nDamPerHit, nRange, nSalvoBonus, nukeS2S, numRapidFireHits, nweapons, nweaponsHit, originalAV, parentBayHandler, pdBayEngaged, pdBayEngagedCap, pdBayEngagedMissile, pdOverheated, roll, secondShot, sSalvoType, subjectId, target, throughFront, toHit, typeName, underWater, waa, weapon, wtype
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionprotected int
Calculate the attack value based on range This needs to do additional work for Weapon Bays with ammo.protected int
Calculates the to-hit penalty inflicted on a capital missile attack by point defense fire this should return 0 unless this is a capital missile attack (otherwise, reporting and to-hit get screwed up)boolean
Sigh, according to the ruling linked below, when weapon bays are fired at ground targets, they should make one to-hit roll, but the AV of each weapon should be applied separately as damage - that needs a special handlerprotected int
Calculate the starting armor value of a flight of thunderbolts Used for Aero Sanity.protected boolean
isTbolt()
Sets whether or not this weapon is considered a single, large missile for AMS resolutionprotected void
Sets the appropriate AMS Bay reporting flag depending on what type of missile this isprotected void
Sets the appropriate PD Bay reporting flag depending on what type of missile this isprotected double
updateAVforAmmo
(double current_av, AmmoType atype, WeaponType bayWType, int range, int wId) Methods inherited from class megamek.common.weapons.BayWeaponHandler
addHeat, handleAeroSanity
Methods inherited from class megamek.common.weapons.WeaponHandler
absorbBuildingDamage, addGlancingBlowReports, allShotsHit, announcedEntityFiring, applyGlancingBlowModifier, applyGlancingBlowModifier, calcAeroDamage, calcCounterAV, calcDamagePerHit, calcHits, calcnCluster, calcnClusterAero, canEngageCapitalMissile, cares, checkLI, checkPDConditions, checkTerrain, doAmmoFeedProblemCheck, doChecks, getAttacker, getAttackerId, getBracketingMultiplier, getCapMisMod, getCapMissileAMSMod, getClusterModifiers, getCounterAV, getFireTNRoll, getLargeCraftHeat, getNumberWeapons, getParentBayHandler, getSalvoBonus, getTotalGlancingBlowFactor, getWaa, handleArtilleryDriftMarker, handleBuildingDamage, handleClearDamage, handleClearDamage, handleEntityDamage, handleIgnitionDamage, handlePartialCoverHit, handleSpecialMiss, initHit, insertAttacks, isLowProfileGlancingBlow, isStrafing, isStrafingFirstShot, reportMiss, reportMiss, restore, setAnnouncedEntityFiring, setDone, setGlancingBlowFlags, setParentBayHandler, setStrafing, setStrafingFirstShot, specialResolution, unitGainsPartialCoverFromWater, unitStickingOutOfBuilding, useAmmo, usesClusterTable
-
Constructor Details
-
MissileBayWeaponHandler
protected MissileBayWeaponHandler() -
MissileBayWeaponHandler
- Parameters:
t
-w
-g
-m
-
-
-
Method Details
-
calcAttackValue
protected int calcAttackValue()Calculate the attack value based on range This needs to do additional work for Weapon Bays with ammo. I need to use the ammo within this function because I may run out of ammo while going through the loop Sine this function is called in the WeaponHandler constructor it should be ok to use the ammo here- Overrides:
calcAttackValue
in classAmmoBayWeaponHandler
- Returns:
- an
int
representing the attack value at that range.
-
setAMSBayReportingFlag
protected void setAMSBayReportingFlag()Sets the appropriate AMS Bay reporting flag depending on what type of missile this is- Overrides:
setAMSBayReportingFlag
in classWeaponHandler
-
setPDBayReportingFlag
protected void setPDBayReportingFlag()Sets the appropriate PD Bay reporting flag depending on what type of missile this is- Overrides:
setPDBayReportingFlag
in classWeaponHandler
-
isTbolt
protected boolean isTbolt()Description copied from class:WeaponHandler
Sets whether or not this weapon is considered a single, large missile for AMS resolution- Overrides:
isTbolt
in classWeaponHandler
-
initializeCapMissileArmor
protected int initializeCapMissileArmor()Calculate the starting armor value of a flight of thunderbolts Used for Aero Sanity. This is done in calcAttackValue() otherwise- Overrides:
initializeCapMissileArmor
in classBayWeaponHandler
-
calcCapMissileAMSMod
protected int calcCapMissileAMSMod()Description copied from class:WeaponHandler
Calculates the to-hit penalty inflicted on a capital missile attack by point defense fire this should return 0 unless this is a capital missile attack (otherwise, reporting and to-hit get screwed up)- Overrides:
calcCapMissileAMSMod
in classWeaponHandler
-
updateAVforAmmo
protected double updateAVforAmmo(double current_av, AmmoType atype, WeaponType bayWType, int range, int wId) - Overrides:
updateAVforAmmo
in classAmmoBayWeaponHandler
-
handle
Description copied from class:BayWeaponHandler
Sigh, according to the ruling linked below, when weapon bays are fired at ground targets, they should make one to-hit roll, but the AV of each weapon should be applied separately as damage - that needs a special handler- Specified by:
handle
in interfaceAttackHandler
- Overrides:
handle
in classBayWeaponHandler
- Returns:
- a
boolean
value indicating whether this should be kept or not
-