Package megamek.common.weapons.handlers
Class MissileBayWeaponHandler
java.lang.Object
megamek.common.weapons.handlers.WeaponHandler
megamek.common.weapons.handlers.BayWeaponHandler
megamek.common.weapons.handlers.AmmoBayWeaponHandler
megamek.common.weapons.handlers.MissileBayWeaponHandler
- All Implemented Interfaces:
Serializable,AttackHandler
- See Also:
-
Field Summary
Fields inherited from class megamek.common.weapons.handlers.BayWeaponHandler
ammoFields inherited from class megamek.common.weapons.handlers.WeaponHandler
advancedPD, ammoType, amsBayEngaged, amsBayEngagedCap, amsBayEngagedMissile, amsEngaged, announcedEntityFiring, apdsEngaged, attackingEntity, attackValue, 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, numWeapons, numWeaponsHit, originalAV, parentBayHandler, pdBayEngaged, pdBayEngagedCap, pdBayEngagedMissile, pdOverheated, roll, secondShot, sSalvoType, subjectId, target, throughFront, toHit, typeName, underWater, weapon, weaponAttackAction, weaponEntity, weaponType -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected intCalculate the attack value based on range This needs to do additional work for Weapon Bays with ammo.protected intCalculates 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)booleanSigh, 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 intCalculate the starting armor value of a flight of thunderbolts Used for Aero Sanity.protected booleanSets whether this weapon is considered a single, large missile for AMS resolutionprotected voidSets the appropriate AMS Bay reporting flag depending on what type of missile this isprotected voidSets the appropriate PD Bay reporting flag depending on what type of missile this isprotected doubleupdateAVForAmmo(double current_av, AmmoType ammoType, WeaponType bayWType, int range, int wId) Methods inherited from class megamek.common.weapons.handlers.BayWeaponHandler
addHeat, handleAeroSanityMethods inherited from class megamek.common.weapons.handlers.WeaponHandler
absorbBuildingDamage, addGlancingBlowReports, allShotsHit, announcedEntityFiring, applyGlancingBlowModifier, applyGlancingBlowModifier, calcAeroDamage, calcCounterAV, calcDamagePerHit, calcHits, calculateNumCluster, calculateNumClusterAero, canEngageCapitalMissile, cares, checkLI, checkPDConditions, checkTerrain, doAmmoFeedProblemCheck, doChecks, getAttacker, getAttackerId, getBracketingMultiplier, getCapMisMod, getCapMissileAMSMod, getClusterModifiers, getCounterAV, getFireTNRoll, getLargeCraftHeat, getNumberWeapons, getParentBayHandler, getSalvoBonus, getTotalGlancingBlowFactor, getWeaponAttackAction, 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, usesClusterTableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface megamek.common.weapons.handlers.AttackHandler
getBuildingDamageAdjustment, producesReportThisPhase
-
Constructor Details
-
MissileBayWeaponHandler
Deprecated, for removal: This API element is subject to removal in a future version. -
MissileBayWeaponHandler
public MissileBayWeaponHandler(ToHitData t, WeaponAttackAction w, Game g, TWGameManager m) throws EntityLoadingException - Throws:
EntityLoadingException
-
-
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:
calcAttackValuein classAmmoBayWeaponHandler- Returns:
- an
intrepresenting 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:
setAMSBayReportingFlagin classWeaponHandler
-
setPDBayReportingFlag
protected void setPDBayReportingFlag()Sets the appropriate PD Bay reporting flag depending on what type of missile this is- Overrides:
setPDBayReportingFlagin classWeaponHandler
-
isThunderBolt
protected boolean isThunderBolt()Description copied from class:WeaponHandlerSets whether this weapon is considered a single, large missile for AMS resolution- Overrides:
isThunderBoltin 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:
initializeCapMissileArmorin classBayWeaponHandler
-
calcCapMissileAMSMod
protected int calcCapMissileAMSMod()Description copied from class:WeaponHandlerCalculates 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:
calcCapMissileAMSModin classWeaponHandler
-
updateAVForAmmo
protected double updateAVForAmmo(double current_av, AmmoType ammoType, WeaponType bayWType, int range, int wId) - Overrides:
updateAVForAmmoin classAmmoBayWeaponHandler
-
handle
Description copied from class:BayWeaponHandlerSigh, 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:
handlein interfaceAttackHandler- Overrides:
handlein classBayWeaponHandler- Parameters:
phase- The present game phasevPhaseReport- The reports list to add new reports to- Returns:
- a
booleanvalue indicating whether this should be kept or not
-