Package megamek.common.weapons.infantry
Class InfantryDisposableWeaponHandler
java.lang.Object
megamek.common.weapons.handlers.WeaponHandler
megamek.common.weapons.infantry.InfantryWeaponHandler
megamek.common.weapons.infantry.InfantryDisposableWeaponHandler
- All Implemented Interfaces:
Serializable,AttackHandler
Resolves a Disposable Infantry Weapon attack (TO:AuE p.116, Corrected Sixth Printing). Conventional infantry and
battle armor may make a single once-per-scenario attack with their one-shot Disposable Weapons instead of the
platoon's standard weapon attack.
The damage formula differs from a standard infantry weapon attack: the total damage equals three times the disposable weapon's per-trooper damage value, multiplied by the number of troopers who hit on the Cluster Hits Table, rounded normally. None of the standard conventional-infantry range-0 bonuses (TSM, prosthetic enhancements, extraneous limbs, tail or beast-mount damage) and none of the primary-weapon damage caps apply: these are fired weapons resolved strictly by the formula.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe per-trooper damage of a Disposable Weapon attack is multiplied by this value before being scaled by the number of troopers who hit (TO:AuE p.116, Corrected Sixth Printing).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, weaponEntity, weaponType -
Constructor Summary
ConstructorsConstructorDescriptionInfantryDisposableWeaponHandler(ToHitData toHitData, WeaponAttackAction weaponAttackAction, Game game, TWGameManager twGameManager) -
Method Summary
Methods inherited from class megamek.common.weapons.infantry.InfantryWeaponHandler
calcAttackValue, calcDamagePerHit, calculateBaseDamage, calculateNumCluster, calculateNumClusterAero, initHitMethods inherited from class megamek.common.weapons.handlers.WeaponHandler
absorbBuildingDamage, addGlancingBlowReports, addHeat, allShotsHit, announcedEntityFiring, applyGlancingBlowModifier, applyGlancingBlowModifier, calcAeroDamage, calcCapMissileAMSMod, calcCounterAV, canEngageCapitalMissile, cares, checkLI, checkPDConditions, checkTerrain, doAmmoFeedProblemCheck, doChecks, getAttacker, getAttackerId, getBracketingMultiplier, getCapMisMod, getCapMissileAMSMod, getClusterModifiers, getCounterAV, getFireTNRoll, getLargeCraftHeat, getNumberWeapons, getParentBayHandler, getSalvoBonus, getTotalGlancingBlowFactor, getWeaponAttackAction, handle, handleArtilleryDriftMarker, handleBuildingDamage, handleClearDamage, handleClearDamage, handleEntityDamage, handleIgnitionDamage, handlePartialCoverHit, handleSpecialMiss, insertAttacks, isLowProfileGlancingBlow, isStrafing, isStrafingFirstShot, isThunderBolt, reportMiss, reportMiss, restore, setAMSBayReportingFlag, setAnnouncedEntityFiring, setDone, setGlancingBlowFlags, setParentBayHandler, setPDBayReportingFlag, setStrafing, setStrafingFirstShot, specialResolution, unitGainsPartialCoverFromWater, unitStickingOutOfBuilding, 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
-
DISPOSABLE_DAMAGE_MULTIPLIER
public static final double DISPOSABLE_DAMAGE_MULTIPLIERThe per-trooper damage of a Disposable Weapon attack is multiplied by this value before being scaled by the number of troopers who hit (TO:AuE p.116, Corrected Sixth Printing).- See Also:
-
-
Constructor Details
-
InfantryDisposableWeaponHandler
public InfantryDisposableWeaponHandler(ToHitData toHitData, WeaponAttackAction weaponAttackAction, Game game, TWGameManager twGameManager) throws EntityLoadingException - Throws:
EntityLoadingException
-
-
Method Details
-
calcHits
Description copied from class:WeaponHandlerCalculate the number of hits- Overrides:
calcHitsin classInfantryWeaponHandler- Parameters:
phaseReportVector- - theVectorcontaining the phase report.- Returns:
- an
intcontaining the number of hits.
-
useAmmo
public void useAmmo()A Disposable Weapon is expended for the rest of the scenario once it is fired. Mark the firing weapon as fired soMounted.canFire()blocks any further use this game.- Overrides:
useAmmoin classInfantryWeaponHandler
-