Package megamek.common.weapons.handlers
Class StreakHandler
java.lang.Object
megamek.common.weapons.handlers.WeaponHandler
megamek.common.weapons.handlers.AmmoWeaponHandler
megamek.common.weapons.handlers.MissileWeaponHandler
megamek.common.weapons.handlers.StreakHandler
- All Implemented Interfaces:
Serializable
,AttackHandler
- Direct Known Subclasses:
StreakLRMHandler
- See Also:
-
Field Summary
Fields inherited from class megamek.common.weapons.handlers.AmmoWeaponHandler
ammo
Fields 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, weaponType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addHeat()
protected boolean
protected int
Calculate the damage per hit.protected int
Calculate the number of hitsprotected int
Calculate the clustering of the hitsprotected boolean
handleSpecialMiss
(Entity entityTarget, boolean bldgDamagedOnMiss, Building bldg, Vector<Report> vPhaseReport) protected void
reportMiss
(Vector<Report> vPhaseReport) protected void
useAmmo()
Methods inherited from class megamek.common.weapons.handlers.MissileWeaponHandler
calcAttackValue, getAeroSanityAMSHitsMod, getAMSHitsMod, handle, isAdvancedAMS, isNemesisConfusable, isThunderBolt, setAMSBayReportingFlag, setPDBayReportingFlag, usesClusterTable
Methods inherited from class megamek.common.weapons.handlers.AmmoWeaponHandler
checkAmmo, doAmmoFeedProblemCheck, doChecks, explodeRoundInBarrel, getNumberWeapons
Methods inherited from class megamek.common.weapons.handlers.WeaponHandler
absorbBuildingDamage, addGlancingBlowReports, 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, restore, setAnnouncedEntityFiring, setDone, setGlancingBlowFlags, setParentBayHandler, setStrafing, setStrafingFirstShot, specialResolution, unitGainsPartialCoverFromWater, unitStickingOutOfBuilding
-
Constructor Details
-
StreakHandler
public StreakHandler(ToHitData t, WeaponAttackAction w, Game g, TWGameManager m) throws EntityLoadingException - Throws:
EntityLoadingException
-
-
Method Details
-
calcDamagePerHit
protected int calcDamagePerHit()Description copied from class:WeaponHandler
Calculate the damage per hit.- Overrides:
calcDamagePerHit
in classMissileWeaponHandler
- Returns:
- an
int
representing the damage dealt per hit.
-
calculateNumCluster
protected int calculateNumCluster()Description copied from class:WeaponHandler
Calculate the clustering of the hits- Overrides:
calculateNumCluster
in classMissileWeaponHandler
- Returns:
- a
int
value saying how much hits are in each cluster of damage.
-
calcHits
Description copied from class:WeaponHandler
Calculate the number of hits- Overrides:
calcHits
in classMissileWeaponHandler
- Parameters:
vPhaseReport
- - theVector
containing the phase report.- Returns:
- an
int
containing the number of hits.
-
useAmmo
protected void useAmmo()- Overrides:
useAmmo
in classAmmoWeaponHandler
-
reportMiss
- Overrides:
reportMiss
in classWeaponHandler
-
addHeat
protected void addHeat()- Overrides:
addHeat
in classWeaponHandler
-
allShotsHit
protected boolean allShotsHit()- Overrides:
allShotsHit
in classWeaponHandler
-
handleSpecialMiss
protected boolean handleSpecialMiss(Entity entityTarget, boolean bldgDamagedOnMiss, Building bldg, Vector<Report> vPhaseReport) - Overrides:
handleSpecialMiss
in classMissileWeaponHandler
- Returns:
- a
boolean
value indicating whether this attack needs further calculating, like a missed shot hitting a building, or an AMS only shooting down some missiles.
-