Package megamek.common.weapons.handlers
Class BayWeaponHandler
java.lang.Object
megamek.common.weapons.handlers.WeaponHandler
megamek.common.weapons.handlers.BayWeaponHandler
- All Implemented Interfaces:
Serializable,AttackHandler
- Direct Known Subclasses:
AmmoBayWeaponHandler,CapitalLaserBayOrbitalBombardmentHandler
- See Also:
-
Field Summary
FieldsFields 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
ConstructorsModifierConstructorDescriptionprotectedBayWeaponHandler(ToHitData t, WeaponAttackAction w, Game g, TWGameManager m) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddHeat()protected intCalculate the attack value based on rangebooleanSigh, 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 handlerbooleanhandleAeroSanity(GamePhase phase, Vector<Report> vPhaseReport) protected intCalculate the starting armor value of a flight of Capital Missiles Used for Aero Sanity.Methods inherited from class megamek.common.weapons.handlers.WeaponHandler
absorbBuildingDamage, addGlancingBlowReports, allShotsHit, announcedEntityFiring, applyGlancingBlowModifier, applyGlancingBlowModifier, calcAeroDamage, calcCapMissileAMSMod, 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, isThunderBolt, reportMiss, reportMiss, restore, setAMSBayReportingFlag, setAnnouncedEntityFiring, setDone, setGlancingBlowFlags, setParentBayHandler, setPDBayReportingFlag, 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
-
Field Details
-
ammo
-
-
Constructor Details
-
BayWeaponHandler
protected BayWeaponHandler() -
BayWeaponHandler
public BayWeaponHandler(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- Overrides:
calcAttackValuein classWeaponHandler- Returns:
- an
intrepresenting the attack value at that range.
-
addHeat
protected void addHeat()- Overrides:
addHeatin classWeaponHandler
-
handle
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:
handlein interfaceAttackHandler- Overrides:
handlein classWeaponHandler- 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
-
initializeCapMissileArmor
protected int initializeCapMissileArmor()Calculate the starting armor value of a flight of Capital Missiles Used for Aero Sanity. This is done in calcAttackValue() otherwise -
handleAeroSanity
-