Class MissileBayWeaponHandler

All Implemented Interfaces:
Serializable, AttackHandler

public class MissileBayWeaponHandler extends AmmoBayWeaponHandler
See Also:
  • Constructor Details

  • Method Details

    • calcAttackValue

      protected int calcAttackValue()
      Calculate the attack value based on range This needs to do additional work for Weapon Bays with ammo. I need to use the ammo within this function because I may run out of ammo while going through the loop Sine this function is called in the WeaponHandler constructor it should be ok to use the ammo here
      Overrides:
      calcAttackValue in class AmmoBayWeaponHandler
      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
    • isTbolt

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

      protected int initializeCapMissileArmor()
      Calculate the starting armor value of a flight of thunderbolts Used for Aero Sanity. This is done in calcAttackValue() otherwise
      Overrides:
      initializeCapMissileArmor in class BayWeaponHandler
    • calcCapMissileAMSMod

      protected int calcCapMissileAMSMod()
      Description copied from class: WeaponHandler
      Calculates the to-hit penalty inflicted on a capital missile attack by point defense fire this should return 0 unless this is a capital missile attack (otherwise, reporting and to-hit get screwed up)
      Overrides:
      calcCapMissileAMSMod in class WeaponHandler
    • updateAVforAmmo

      protected double updateAVforAmmo(double current_av, AmmoType atype, WeaponType bayWType, int range, int wId)
      Overrides:
      updateAVforAmmo in class AmmoBayWeaponHandler
    • handle

      public boolean handle(GamePhase phase, Vector<Report> vPhaseReport)
      Description copied from class: BayWeaponHandler
      Sigh, according to the ruling linked below, when weapon bays are fired at ground targets, they should make one to-hit roll, but the AV of each weapon should be applied separately as damage - that needs a special handler
      Specified by:
      handle in interface AttackHandler
      Overrides:
      handle in class BayWeaponHandler
      Returns:
      a boolean value indicating whether this should be kept or not