Class CoreRulesArmor

java.lang.Object
megamek.common.rules.RulesArmor
megamek.common.rules.core.CoreRulesArmor

public class CoreRulesArmor extends RulesArmor
  • Constructor Details

    • CoreRulesArmor

      public CoreRulesArmor()
  • Method Details

    • allowHeatWeapon

      public boolean allowHeatWeapon(boolean heat_weapon)
      Allow heat weapons for heat armor. Core rules heat armor halves heat weapon damage. This allows for weapons to be marked for heat. Core rules p.202
      Specified by:
      allowHeatWeapon in class RulesArmor
      Parameters:
      heat_weapon - true if the weapon is a heat weapon
      Returns:
      true if heat weapons are allowed
    • allowArmorPiercing

      public boolean allowArmorPiercing(TWDamageManager.ModsInfo mods)
      Does armor allow armor piercing. Hardened and ABA armor prevent AP. Core p.201
      Specified by:
      allowArmorPiercing in class RulesArmor
      Parameters:
      mods - the modifications info
      Returns:
      true if armor piercing is allowed
    • impactArmorMod

      public int impactArmorMod()
      Impact resistant armor. Impact armor does not reduce anything. Core p.201
      Specified by:
      impactArmorMod in class RulesArmor
      Returns:
      the impact armor modifier
    • impactArmorBreach

      public int impactArmorBreach()
      Impact Resistant Armor breach. Impact Resistant Armor breach. Does not apply in Core. p.201
      Specified by:
      impactArmorBreach in class RulesArmor
      Returns:
      the breach value modifier
    • checkLancePenetration

      public boolean checkLancePenetration(int armorType)
      Does a lance penetrate the armor. Does a lance penetrate on hit? Not if it is ABA, but all others yes. Core p.201
      Specified by:
      checkLancePenetration in class RulesArmor
      Parameters:
      armorType - the type of armor
      Returns:
      true if a lance penetrates the armor
    • reduceHeatDamageByArmor

      public int reduceHeatDamageByArmor(int armorType, int heatDamage)
      Does the armor reduce heat? Does armor reduce heat? Core p.202
      Specified by:
      reduceHeatDamageByArmor in class RulesArmor
      Parameters:
      armorType - the type of armor
      heatDamage - the amount of heat damage
      Returns:
      the reduced heat damage amount
    • reflectiveAP

      public boolean reflectiveAP(boolean reflectiveArmor)
      Does reflective armor cause modifiers for AP? Reflective armor does not have a modifier on AP rounds
      Specified by:
      reflectiveAP in class RulesArmor
      Parameters:
      reflectiveArmor - true if the armor is reflective
      Returns:
      true if reflective armor affects AP modifiers
    • blockTAC

      public boolean blockTAC(int armorType)
      Block TAC (Targeting Auto-Correlator). ABA armor stops TACs from generating a crit. Core p.201
      Specified by:
      blockTAC in class RulesArmor
      Parameters:
      armorType - the type of armor
      Returns:
      true if TAC is blocked
    • reduceImpactDamage

      public int reduceImpactDamage(int entityId, HitData hit, int damage, Vector<Report> reportVec, HitDamageType damageType)
      How does impact armor reduce damage. Impact armor reduces damage from falls, collisions, and buildings by half. 1/3 for physical
      Specified by:
      reduceImpactDamage in class RulesArmor
      Parameters:
      entityId - the entity ID
      hit - the hit data
      damage - the damage amount
      reportVec - vector of reports describing the damage reduction
      damageType - the type of damage
      Returns:
      the reduced damage amount
    • reflectiveArmorReduction

      public int reflectiveArmorReduction(int damage)
      Reflective armor reduction Reflective armor reduces damage by half, rounded up. Core p.202
      Specified by:
      reflectiveArmorReduction in class RulesArmor
      Parameters:
      damage - the damage to be reduced
      Returns:
      the reduced damage amount
    • reactiveArmorReduction

      public int reactiveArmorReduction(int damage)
      Reactive armor reduction Reactive armor reduces damage by half, rounded up. Core p.202
      Specified by:
      reactiveArmorReduction in class RulesArmor
      Parameters:
      damage - the damage to be reduced
      Returns:
      the reduced damage amount
    • ballisticReinforcedArmorReduction

      public int ballisticReinforcedArmorReduction(int damage)
      Ballistic reinforced armor reduction Ballistic reinforced armor reduces damage by half, rounded up. Core p.202
      Specified by:
      ballisticReinforcedArmorReduction in class RulesArmor
      Parameters:
      damage - the damage to be reduced
      Returns:
      the reduced damage amount