megamek.common.weapons
Class AmmoWeaponHandler

java.lang.Object
  extended by megamek.common.weapons.WeaponHandler
      extended by megamek.common.weapons.AmmoWeaponHandler
All Implemented Interfaces:
java.io.Serializable, AttackHandler
Direct Known Subclasses:
ACAPHandler, ACFlakHandler, ACFlechetteHandler, ACIncendiaryHandler, ACTracerHandler, ACWeaponHandler, APGaussWeaponHandler, AR10Handler, ArtilleryCannonWeaponHandler, ArtilleryWeaponIndirectFireHandler, BarracudaHandler, BATaserHandler, BPodHandler, CapitalMissileHandler, ChemicalLaserHandler, GRHandler, HAGWeaponHandler, KillerWhaleHandler, KrakenHandler, LBXHandler, MantaRayHandler, MekMortarHandler, MGHandler, MicroBombHandler, MineLauncherHandler, MissileWeaponHandler, NailRivetGunHandler, PiranhaHandler, PlasmaCannonHandler, PlasmaRifleHandler, PrototypeGaussHandler, SantaAnnaHandler, ScreenLauncherHandler, StingrayHandler, SwordfishHandler, TeleMissileHandler, UltraWeaponHandler, VehicleFlamerCoolHandler, VehicleFlamerHandler, VehicleFlamerHeatHandler, WhiteSharkHandler

public class AmmoWeaponHandler
extends WeaponHandler

Author:
Andrew Hunter
See Also:
Serialized Form

Field Summary
(package private)  Mounted ammo
           
 
Fields inherited from class megamek.common.weapons.WeaponHandler
ae, announcedEntityFiring, attackValue, bDirect, bGlancing, bMissed, bSalvo, damageType, game, generalDamageType, insertedAttacks, missed, nDamPerHit, nRange, nukeS2S, nweapons, roll, server, subjectId, target, throughFront, toHit, underWater, waa, weapon, wtype
 
Constructor Summary
protected AmmoWeaponHandler()
           
  AmmoWeaponHandler(ToHitData t, WeaponAttackAction w, IGame g, Server s)
           
 
Method Summary
protected  void checkAmmo()
           
protected  int getNumberWeapons()
          For ammo weapons, this number can be less than the full number if the amount of ammo is not high enough
protected  void useAmmo()
           
 
Methods inherited from class megamek.common.weapons.WeaponHandler
addHeat, allShotsHit, announcedEntityFiring, calcAttackValue, calcDamagePerHit, calcHits, calcnCluster, canDoDirectBlowDamage, cares, checkTerrain, doChecks, getAttackerId, getBracketingMultiplier, getCapMisMod, getWaa, handle, handleBuildingDamage, handleClearDamage, handleEntityDamage, handleIgnitionDamage, handleSpecialMiss, insertAttacks, reportMiss, setAnnouncedEntityFiring, setDone, specialResolution, usesClusterTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ammo

Mounted ammo
Constructor Detail

AmmoWeaponHandler

protected AmmoWeaponHandler()

AmmoWeaponHandler

public AmmoWeaponHandler(ToHitData t,
                         WeaponAttackAction w,
                         IGame g,
                         Server s)
Parameters:
t -
w -
g -
Method Detail

useAmmo

protected void useAmmo()
Overrides:
useAmmo in class WeaponHandler

checkAmmo

protected void checkAmmo()

getNumberWeapons

protected int getNumberWeapons()
For ammo weapons, this number can be less than the full number if the amount of ammo is not high enough

Overrides:
getNumberWeapons in class WeaponHandler
Returns:
the number of weapons of this type firing (for squadron weapon groups)