Package megamek.common.rules.core
Class CoreRulesArmor
java.lang.Object
megamek.common.rules.RulesArmor
megamek.common.rules.core.CoreRulesArmor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDoes armor allow armor piercing.booleanallowHeatWeapon(boolean heat_weapon) Allow heat weapons for heat armor.intballisticReinforcedArmorReduction(int damage) Ballistic reinforced armor reductionbooleanblockTAC(int armorType) Block TAC (Targeting Auto-Correlator).booleancheckLancePenetration(int armorType) Does a lance penetrate the armor.intImpact Resistant Armor breach.intImpact resistant armor.intreactiveArmorReduction(int damage) Reactive armor reductionintreduceHeatDamageByArmor(int armorType, int heatDamage) Does the armor reduce heat?intreduceImpactDamage(int entityId, HitData hit, int damage, Vector<Report> reportVec, HitDamageType damageType) How does impact armor reduce damage.booleanreflectiveAP(boolean reflectiveArmor) Does reflective armor cause modifiers for AP?intreflectiveArmorReduction(int damage) Reflective armor reduction
-
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:
allowHeatWeaponin classRulesArmor- Parameters:
heat_weapon- true if the weapon is a heat weapon- Returns:
- true if heat weapons are allowed
-
allowArmorPiercing
Does armor allow armor piercing. Hardened and ABA armor prevent AP. Core p.201- Specified by:
allowArmorPiercingin classRulesArmor- 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:
impactArmorModin classRulesArmor- 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:
impactArmorBreachin classRulesArmor- 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:
checkLancePenetrationin classRulesArmor- 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:
reduceHeatDamageByArmorin classRulesArmor- Parameters:
armorType- the type of armorheatDamage- 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:
reflectiveAPin classRulesArmor- 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:
blockTACin classRulesArmor- 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:
reduceImpactDamagein classRulesArmor- Parameters:
entityId- the entity IDhit- the hit datadamage- the damage amountreportVec- vector of reports describing the damage reductiondamageType- 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:
reflectiveArmorReductionin classRulesArmor- 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:
reactiveArmorReductionin classRulesArmor- 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:
ballisticReinforcedArmorReductionin classRulesArmor- Parameters:
damage- the damage to be reduced- Returns:
- the reduced damage amount
-