Class MissileWeaponHandler

All Implemented Interfaces:
Serializable, AttackHandler
Direct Known Subclasses:
ADAMissileWeaponHandler, ATMHandler, LRMHandler, LRMScatterableHandler, MRMHandler, NarcExplosiveHandler, NarcHandler, RLHandler, SRMHandler, StreakHandler, ThunderboltScatterableHandler, ThunderBoltWeaponHandler

public class MissileWeaponHandler extends AmmoWeaponHandler
See Also:
  • Field Details

    • multiAMS

      protected boolean multiAMS
  • Constructor Details

  • Method Details

    • calcHits

      protected int calcHits(Vector<Report> vPhaseReport)
      Description copied from class: WeaponHandler
      Calculate the number of hits
      Overrides:
      calcHits in class WeaponHandler
      Parameters:
      vPhaseReport - - the Vector containing the phase report.
      Returns:
      an int containing the number of hits.
    • calculateNumCluster

      protected int calculateNumCluster()
      Description copied from class: WeaponHandler
      Calculate the clustering of the hits
      Overrides:
      calculateNumCluster in class WeaponHandler
      Returns:
      a int value saying how much hits are in each cluster of damage.
    • calcDamagePerHit

      protected int calcDamagePerHit()
      Description copied from class: WeaponHandler
      Calculate the damage per hit.
      Overrides:
      calcDamagePerHit in class WeaponHandler
      Returns:
      an int representing the damage dealt per hit.
    • calcAttackValue

      protected int calcAttackValue()
      Calculate the attack value based on range
      Overrides:
      calcAttackValue in class WeaponHandler
      Returns:
      an int representing 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:
      setAMSBayReportingFlag in class WeaponHandler
    • setPDBayReportingFlag

      protected void setPDBayReportingFlag()
      Sets the appropriate PD Bay reporting flag depending on what type of missile this is
      Overrides:
      setPDBayReportingFlag in class WeaponHandler
    • handleSpecialMiss

      protected boolean handleSpecialMiss(Entity entityTarget, boolean bldgDamagedOnMiss, IBuilding bldg, Vector<Report> vPhaseReport)
      Overrides:
      handleSpecialMiss in class WeaponHandler
      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.
    • getAeroSanityAMSHitsMod

      protected double getAeroSanityAMSHitsMod()
    • getAMSHitsMod

      protected int getAMSHitsMod(Vector<Report> vPhaseReport)
    • handle

      public boolean handle(GamePhase phase, Vector<Report> vPhaseReport)
      Description copied from class: WeaponHandler
      handle this weapons firing
      Specified by:
      handle in interface AttackHandler
      Overrides:
      handle in class WeaponHandler
      Parameters:
      phase - The present game phase
      vPhaseReport - The reports list to add new reports to
      Returns:
      a boolean value indicating whether this should be kept or not
    • isNemesisConfusable

      protected boolean isNemesisConfusable()
    • usesClusterTable

      protected boolean usesClusterTable()
      Description copied from class: WeaponHandler
      Does this attack use the cluster hit table? necessary to determine how Aero damage should be applied
      Overrides:
      usesClusterTable in class WeaponHandler
    • isAdvancedAMS

      protected boolean isAdvancedAMS()
    • isThunderBolt

      protected boolean isThunderBolt()
      Description copied from class: WeaponHandler
      Sets whether this weapon is considered a single, large missile for AMS resolution
      Overrides:
      isThunderBolt in class WeaponHandler