Class TWRulesAmmo
java.lang.Object
megamek.common.rules.RulesAmmo
megamek.common.rules.totalwarfare.TWRulesAmmo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidarmorPiercingAttackMod(AmmoType.AmmoTypeEnum ammoType, ToHitData toHit, boolean AP) Armor Piercing attack modifiers.intarmorPiercingMod(AmmoType inType) Return the modifier for armor piercing based on size.intgetAXMissileDamage(int armor, TWDamageManager.ModsInfo mods, int damage) They only ignore damage reduction, no bonus.intAcid (AX) missiles are -2 on the cluster roll.intgetSemiGuidedAdjustment(int modifierValue, boolean movementMod, boolean terrainMod) Semi-guided can eliminate movement modifiers.intgetSemiGuidedNMissiles(boolean taggedTarget, boolean indirect) Semi-guided does not modify number of missiles.voidnarcHomingTarget(ToHitData toHit) Do nothing.booleanSemi-guided when tag is present does not ignore cover.Methods inherited from class megamek.common.rules.RulesAmmo
armorPiercingAttackMod
-
Constructor Details
-
TWRulesAmmo
public TWRulesAmmo()
-
-
Method Details
-
armorPiercingMod
Return the modifier for armor piercing based on size.- Specified by:
armorPiercingModin classRulesAmmo- Parameters:
inType- the ammo type to check- Returns:
- the armor piercing modifier
-
armorPiercingAttackMod
Armor Piercing attack modifiers.- Specified by:
armorPiercingAttackModin classRulesAmmo- Parameters:
ammoType- the type of ammunitiontoHit- the to-hit data to modifyAP- true if armor piercing is in effect
-
narcHomingTarget
Do nothing. Not in TW.- Specified by:
narcHomingTargetin classRulesAmmo- Parameters:
toHit- the to-hit data
-
getAXMissileModifier
public int getAXMissileModifier()Acid (AX) missiles are -2 on the cluster roll.- Specified by:
getAXMissileModifierin classRulesAmmo- Returns:
- the AX missile cluster modifier
-
getAXMissileDamage
They only ignore damage reduction, no bonus.- Specified by:
getAXMissileDamagein classRulesAmmo- Parameters:
armor- the armor valuemods- the modifications infodamage- the damage amount- Returns:
- the adjusted damage for AX missiles
-
getSemiGuidedAdjustment
public int getSemiGuidedAdjustment(int modifierValue, boolean movementMod, boolean terrainMod) Semi-guided can eliminate movement modifiers.- Specified by:
getSemiGuidedAdjustmentin classRulesAmmo- Parameters:
modifierValue- the modifier valuemovementMod- true if this is a movement modifierterrainMod- true if this is a terrain modifier- Returns:
- the adjusted modifier for semi-guided ammunition
-
semiGuidedIgnoresCover
public boolean semiGuidedIgnoresCover()Semi-guided when tag is present does not ignore cover.- Specified by:
semiGuidedIgnoresCoverin classRulesAmmo- Returns:
- true if semi-guided ignores cover
-
getSemiGuidedNMissiles
public int getSemiGuidedNMissiles(boolean taggedTarget, boolean indirect) Semi-guided does not modify number of missiles.- Specified by:
getSemiGuidedNMissilesin classRulesAmmo- Parameters:
taggedTarget- true if the target is taggedindirect- true if the attack is indirect- Returns:
- the modification to the number of missiles for semi-guided
-