Class ARADEquipmentDetector

java.lang.Object
megamek.common.weapons.handlers.ARADEquipmentDetector

public class ARADEquipmentDetector extends Object
Utility class for detecting qualifying electronics for ARAD (Anti-Radiation) missiles.

ARAD missiles receive bonuses against targets using electronic systems and penalties against targets without electronics. This class centralizes all equipment detection logic used by ARAD weapon handlers.

Rules Reference: Tactical Operations: Advanced Units & Equipment, p.180 Forum Rulings: Consolidated in docs/issues/features/arad-implementation.md

Key Forum Rulings:

Since:
2025-01-16
  • Constructor Details

    • ARADEquipmentDetector

      public ARADEquipmentDetector()
  • Method Details

    • targetHasQualifyingElectronics

      public static boolean targetHasQualifyingElectronics(Entity target, int friendlyTeam)
      Determines if a target has qualifying electronics for ARAD missile bonuses.

      ARAD missiles receive:

      • Bonuses (-1 to-hit, +1 cluster) against targets with qualifying electronics
      • Penalties (+2 to-hit, -2 cluster) against targets without electronics

      Active Stealth Armor blocks ALL internal systems but NOT external Narc pods.

      Parameters:
      target - The entity being targeted
      friendlyTeam - Team ID of the attacking entity (for Narc pod ownership check)
      Returns:
      true if target has qualifying electronics, false otherwise
    • hasActiveStealthArmor

      public static boolean hasActiveStealthArmor(Entity target)
      Checks if target has active Stealth Armor.

      Active Stealth Armor makes a unit "completely non-emitting" by blocking all internal electronic systems. External Narc pods are NOT blocked.

      Reference: TO:AUE p.180, Xotl forum ruling: BT Forums Quote: "Active Stealth Armor makes a unit completely non-emitting"

      Parameters:
      target - The entity to check
      Returns:
      true if Stealth Armor is active
    • hasActiveProbe

      public static boolean hasActiveProbe(Entity target)
      Checks if target has an active Active Probe.
      Parameters:
      target - The entity to check
      Returns:
      true if entity has a functional Active Probe
    • hasArtemis

      public static boolean hasArtemis(Entity target)
      Checks if target has functional Artemis fire-control system.
      Parameters:
      target - The entity to check
      Returns:
      true if entity has functional Artemis IV or Artemis V
    • hasBlueShield

      public static boolean hasBlueShield(Entity target)
      Checks if target has active Blue Shield system.

      Blue Shield must be powered on (mode "On") to count as qualifying electronics. Powered-down Blue Shield does not emit detectable signals.

      Parameters:
      target - The entity to check
      Returns:
      true if entity has Blue Shield in "On" mode and functional
    • hasC3

      public static boolean hasC3(Entity target)
      Checks if target has functional C3 system.

      C3 systems qualify if they are powered on. Network status is IRRELEVANT - an isolated C3 computer still emits electronic signals.

      Note: C3 Master and C3 Company Master are weapons, not equipment, so we check Entity methods hasC3M() and hasC3MM() instead of equipment flags.

      Parameters:
      target - The entity to check
      Returns:
      true if entity has functional C3 (any type)
    • hasHeavyComms

      public static boolean hasHeavyComms(Entity target)
      Checks if target has heavy dedicated communications equipment.

      Only dedicated communications equipment >= 3.5 tons qualifies. Built-in cockpit communications (standard 1-ton equivalent) does NOT count.

      Reference: Welshman (Catalyst Freelancer) forum ruling: BT Forums Quote: "Built-in 1-ton communications do not count, only dedicated equipment >= 3.5 tons"

      Parameters:
      target - The entity to check
      Returns:
      true if entity has >= 3.5 tons of dedicated comms
    • hasECM

      public static boolean hasECM(Entity target)
      Checks if target has active ECM suite.

      ECM equipment qualifies regardless of mode (ECM/ECCM/Ghost Targets).

      Parameters:
      target - The entity to check
      Returns:
      true if entity has functional ECM
    • hasActiveTAG

      public static boolean hasActiveTAG(Entity target)
      Checks if target has been TAG'd earlier this turn.

      TAG fires during the OFFBOARD phase. ARAD checks TAG state during the FIRING phase, so TAG state is available when needed.

      Parameters:
      target - The entity to check
      Returns:
      true if target was TAG'd this turn
    • hasGhostTargets

      public static boolean hasGhostTargets(Entity target)
      Checks if target is generating Ghost Targets.

      Ghost Targets are generated by ECM equipment in specific modes.

      Parameters:
      target - The entity to check
      Returns:
      true if target is actively generating Ghost Targets
    • isNarcTagged

      public static boolean isNarcTagged(Entity target, int friendlyTeam)
      Checks if target has been tagged by friendly Narc or iNarc pods.

      Only FRIENDLY pods count:

      • Standard Narc Missile Beacons (friendly team)
      • iNarc Homing Pods (friendly team)
      • iNarc Nemesis Pods (friendly team only)

      EXCLUDED:

      • iNarc Haywire Pods (do not trigger ARAD)
      • Enemy Narc/iNarc pods (team ownership check fails)

      External Narc pods are NOT blocked by Stealth Armor.

      Reference: TO:AUE p.180, Xotl forum ruling: BT Forums Quote: "ARAD receives standard bonus when targeting Narc-tagged units, but does NOT receive additional Narc-specific bonuses (no stacking)"

      Friendly vs enemy Nemesis distinction confirmed by same forum ruling.

      Parameters:
      target - The entity to check
      friendlyTeam - Team ID of the attacking entity
      Returns:
      true if target has friendly Narc/iNarc pod