Class CapitalMissileBayHandler

All Implemented Interfaces:
Serializable, AttackHandler
Direct Known Subclasses:
TeleMissileHandler

public class CapitalMissileBayHandler extends AmmoBayWeaponHandler
See Also:
  • Constructor Details

  • Method Details

    • 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
      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
    • calcAttackValue

      protected int calcAttackValue()
      Description copied from class: AmmoBayWeaponHandler
      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.
    • 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
    • initializeCapMissileArmor

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

      protected int getCapMisMod()
      Overrides:
      getCapMisMod in class WeaponHandler
    • getCritMod

      protected int getCritMod(AmmoType ammoType)
    • updateAVForAmmo

      protected double updateAVForAmmo(double current_av, AmmoType ammoType, WeaponType bayWType, int range, int wId)
      Overrides:
      updateAVForAmmo in class AmmoBayWeaponHandler
    • insertAttacks

      protected void insertAttacks(GamePhase phase, Vector<Report> vPhaseReport)
      Insert any additional attacks that should occur before this attack
      Overrides:
      insertAttacks in class WeaponHandler
    • canEngageCapitalMissile

      protected boolean canEngageCapitalMissile(WeaponMounted counter)
      Checks to see if this point defense/AMS bay can engage a capital missile This should return true. Only when handling capital missile attacks can this be false.
      Overrides:
      canEngageCapitalMissile in class WeaponHandler
    • 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
    • handleAeroSanity

      public boolean handleAeroSanity(GamePhase phase, Vector<Report> vPhaseReport)
      Overrides:
      handleAeroSanity in class BayWeaponHandler