Package megamek.common.weapons.handlers
Class MissileWeaponHandler
java.lang.Object
megamek.common.weapons.handlers.WeaponHandler
megamek.common.weapons.handlers.AmmoWeaponHandler
megamek.common.weapons.handlers.MissileWeaponHandler
- All Implemented Interfaces:
Serializable,AttackHandler
- Direct Known Subclasses:
ADAMissileWeaponHandler,ATMHandler,LRMHandler,LRMScatterableHandler,MRMHandler,NarcExplosiveHandler,NarcHandler,RLHandler,SRMHandler,StreakHandler,ThunderboltScatterableHandler,ThunderBoltWeaponHandler
- See Also:
-
Field Summary
FieldsFields inherited from class megamek.common.weapons.handlers.AmmoWeaponHandler
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
ConstructorsConstructorDescriptionMissileWeaponHandler(ToHitData t, WeaponAttackAction w, Game g, TWGameManager m) -
Method Summary
Modifier and TypeMethodDescriptionprotected intCalculate the attack value based on rangeprotected intCalculate the damage per hit.protected intCalculate the number of hitsprotected intCalculate the clustering of the hitsprotected doubleprotected intgetAMSHitsMod(Vector<Report> vPhaseReport) booleanhandle this weapons firingprotected booleanhandleSpecialMiss(Entity entityTarget, boolean bldgDamagedOnMiss, IBuilding bldg, Vector<Report> vPhaseReport) protected booleanprotected booleanprotected 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 booleanDoes this attack use the cluster hit table? necessary to determine how Aero damage should be appliedMethods inherited from class megamek.common.weapons.handlers.AmmoWeaponHandler
checkAmmo, doAmmoFeedProblemCheck, doChecks, explodeRoundInBarrel, getNumberWeapons, useAmmoMethods inherited from class megamek.common.weapons.handlers.WeaponHandler
absorbBuildingDamage, addGlancingBlowReports, addHeat, allShotsHit, announcedEntityFiring, applyGlancingBlowModifier, applyGlancingBlowModifier, calcAeroDamage, calcCapMissileAMSMod, calcCounterAV, calculateNumClusterAero, canEngageCapitalMissile, cares, checkLI, checkPDConditions, checkTerrain, getAttacker, getAttackerId, getBracketingMultiplier, getCapMisMod, getCapMissileAMSMod, getClusterModifiers, getCounterAV, getFireTNRoll, getLargeCraftHeat, getParentBayHandler, getSalvoBonus, getTotalGlancingBlowFactor, getWeaponAttackAction, handleArtilleryDriftMarker, handleBuildingDamage, handleClearDamage, handleClearDamage, handleEntityDamage, handleIgnitionDamage, handlePartialCoverHit, initHit, insertAttacks, isLowProfileGlancingBlow, isStrafing, isStrafingFirstShot, reportMiss, reportMiss, restore, setAnnouncedEntityFiring, setDone, setGlancingBlowFlags, setParentBayHandler, setStrafing, setStrafingFirstShot, specialResolution, unitGainsPartialCoverFromWater, unitStickingOutOfBuildingMethods 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
-
multiAMS
protected boolean multiAMS
-
-
Constructor Details
-
MissileWeaponHandler
public MissileWeaponHandler(ToHitData t, WeaponAttackAction w, Game g, TWGameManager m) throws EntityLoadingException - Throws:
EntityLoadingException
-
-
Method Details
-
calcHits
Description copied from class:WeaponHandlerCalculate the number of hits- Overrides:
calcHitsin classWeaponHandler- Parameters:
vPhaseReport- - theVectorcontaining the phase report.- Returns:
- an
intcontaining the number of hits.
-
calculateNumCluster
protected int calculateNumCluster()Description copied from class:WeaponHandlerCalculate the clustering of the hits- Overrides:
calculateNumClusterin classWeaponHandler- Returns:
- a
intvalue saying how much hits are in each cluster of damage.
-
calcDamagePerHit
protected int calcDamagePerHit()Description copied from class:WeaponHandlerCalculate the damage per hit.- Overrides:
calcDamagePerHitin classWeaponHandler- Returns:
- an
intrepresenting the damage dealt per hit.
-
calcAttackValue
protected int calcAttackValue()Calculate the attack value based on range- Overrides:
calcAttackValuein classWeaponHandler- 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
-
handleSpecialMiss
protected boolean handleSpecialMiss(Entity entityTarget, boolean bldgDamagedOnMiss, IBuilding bldg, Vector<Report> vPhaseReport) - Overrides:
handleSpecialMissin classWeaponHandler- Returns:
- a
booleanvalue indicating whether this attack needs further calculating, like a missed shot hitting a building, or an AMS only shooting down some missiles.
-
getAeroSanityAMSHitsMod
protected double getAeroSanityAMSHitsMod() -
getAMSHitsMod
-
handle
Description copied from class:WeaponHandlerhandle this weapons firing- 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
-
isNemesisConfusable
protected boolean isNemesisConfusable() -
usesClusterTable
protected boolean usesClusterTable()Description copied from class:WeaponHandlerDoes this attack use the cluster hit table? necessary to determine how Aero damage should be applied- Overrides:
usesClusterTablein classWeaponHandler
-
isAdvancedAMS
protected boolean isAdvancedAMS() -
isThunderBolt
protected boolean isThunderBolt()Description copied from class:WeaponHandlerSets whether this weapon is considered a single, large missile for AMS resolution- Overrides:
isThunderBoltin classWeaponHandler
-