Class CLIATMHandler

All Implemented Interfaces:
Serializable, AttackHandler

public class CLIATMHandler extends ATMHandler
See Also:
  • Constructor Details

  • Method Details

    • calcDamagePerHit

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

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

      protected int calcAttackValue()
      Calculate the attack value based on range
      Overrides:
      calcAttackValue in class ATMHandler
      Returns:
      an int representing the attack value at that range.
    • calcMissileHits

      protected int calcMissileHits(Vector<Report> vPhaseReport)
    • specialResolution

      protected boolean specialResolution(Vector<Report> vPhaseReport, Entity entityTarget)
      Description copied from class: WeaponHandler
      special resolution, like minefields and arty
      Overrides:
      specialResolution in class ATMHandler
      Parameters:
      vPhaseReport - - a Vector containing the phase report
      entityTarget - - the Entity targeted, or null, if no Entity targeted
      Returns:
      true when done with processing, false when not
    • allShotsHit

      protected boolean allShotsHit()
      Overrides:
      allShotsHit in class WeaponHandler
    • addHeat

      protected void addHeat()
      Overrides:
      addHeat in class WeaponHandler
    • useAmmo

      protected void useAmmo()
      Overrides:
      useAmmo in class AmmoWeaponHandler
    • reportMiss

      protected void reportMiss(Vector<Report> vPhaseReport)
      Overrides:
      reportMiss in class WeaponHandler
    • handleSpecialMiss

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