Package megamek.common.weapons.handlers
Class AmmoWeaponHandler
java.lang.Object
megamek.common.weapons.handlers.WeaponHandler
megamek.common.weapons.handlers.AmmoWeaponHandler
- All Implemented Interfaces:
- Serializable,- AttackHandler
- Direct Known Subclasses:
- ACFlechetteHandler,- ACWeaponHandler,- AR10Handler,- ArtilleryCannonWeaponHandler,- ArtilleryWeaponIndirectFireHandler,- BarracudaHandler,- BATaserHandler,- BPodHandler,- CapitalMissileHandler,- ChemicalLaserHandler,- FluidGunCoolHandler,- GRHandler,- HAGWeaponHandler,- KillerWhaleHandler,- LBXHandler,- MantaRayHandler,- MekMortarAirburstHandler,- MekMortarAntiPersonnelHandler,- MekMortarFlareHandler,- MekMortarHandler,- MekMortarSmokeHandler,- MekTaserHandler,- MGHandler,- MicroBombHandler,- MissileMineClearanceHandler,- MissileWeaponHandler,- NailRivetGunHandler,- PiranhaHandler,- PlasmaCannonHandler,- PlasmaRifleHandler,- PopUpMineLauncherHandler,- RifleWeaponHandler,- ScreenLauncherHandler,- StingrayHandler,- SwordfishHandler,- UltraWeaponHandler,- VehicleFlamerCoolHandler,- VehicleFlamerHandler,- VGLWeaponHandler,- WhiteSharkHandler
- See Also:
- 
Field SummaryFieldsFields inherited from class megamek.common.weapons.handlers.WeaponHandleradvancedPD, 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 SummaryConstructorsConstructorDescriptionAmmoWeaponHandler(ToHitData t, WeaponAttackAction w, Game g, TWGameManager m) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidprotected booleandoAmmoFeedProblemCheck(Vector<Report> vPhaseReport) Carry out an 'ammo feed problems' check on the weapon.protected booleanprotected voidexplodeRoundInBarrel(Vector<Report> vPhaseReport) Worker function that explodes a round in the barrel of the attack's weaponprotected intFor ammo weapons, this number can be less than the full number if the amount of ammo is not high enough.protected voiduseAmmo()Methods inherited from class megamek.common.weapons.handlers.WeaponHandlerabsorbBuildingDamage, addGlancingBlowReports, addHeat, allShotsHit, announcedEntityFiring, applyGlancingBlowModifier, applyGlancingBlowModifier, calcAeroDamage, calcAttackValue, calcCapMissileAMSMod, calcCounterAV, calcDamagePerHit, calcHits, calculateNumCluster, calculateNumClusterAero, canEngageCapitalMissile, cares, checkLI, checkPDConditions, checkTerrain, getAttacker, getAttackerId, getBracketingMultiplier, getCapMisMod, getCapMissileAMSMod, getClusterModifiers, getCounterAV, getFireTNRoll, getLargeCraftHeat, getParentBayHandler, getSalvoBonus, getTotalGlancingBlowFactor, getWeaponAttackAction, handle, 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, usesClusterTable
- 
Field Details- 
ammo
 
- 
- 
Constructor Details- 
AmmoWeaponHandlerpublic AmmoWeaponHandler(ToHitData t, WeaponAttackAction w, Game g, TWGameManager m) throws EntityLoadingException - Throws:
- EntityLoadingException
 
 
- 
- 
Method Details- 
useAmmoprotected void useAmmo()- Overrides:
- useAmmoin class- WeaponHandler
 
- 
checkAmmoprotected void checkAmmo()
- 
getNumberWeaponsprotected int getNumberWeapons()For ammo weapons, this number can be less than the full number if the amount of ammo is not high enough.- Overrides:
- getNumberWeaponsin class- WeaponHandler
- Returns:
- the number of weapons of this type firing (for squadron weapon groups)
 
- 
doChecks- Overrides:
- doChecksin class- WeaponHandler
- Parameters:
- vPhaseReport- - A- Vectorcontaining the phase report.
- Returns:
- a booleanvalue indicating whether the attack misses because of a failed check.
 
- 
doAmmoFeedProblemCheckCarry out an 'ammo feed problems' check on the weapon. Return true if it blew up.- Overrides:
- doAmmoFeedProblemCheckin class- WeaponHandler
 
- 
explodeRoundInBarrelWorker function that explodes a round in the barrel of the attack's weapon
 
-