Class CapitalMissileHandler

All Implemented Interfaces:
Serializable, AttackHandler

public class CapitalMissileHandler extends AmmoWeaponHandler
See Also:
  • Constructor Details

  • Method Details

    • 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
    • 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.
    • calcDamagePerHit

      protected int calcDamagePerHit()
      Calculate the damage per hit.
      Overrides:
      calcDamagePerHit in class WeaponHandler
      Returns:
      an int representing the damage dealt per hit.
    • 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
    • getCapMisMod

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

      protected int getCritMod(AmmoType ammoType)
    • 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