Class TWRulesAmmo

java.lang.Object
megamek.common.rules.RulesAmmo
megamek.common.rules.totalwarfare.TWRulesAmmo

public class TWRulesAmmo extends RulesAmmo
  • Constructor Details

    • TWRulesAmmo

      public TWRulesAmmo()
  • Method Details

    • armorPiercingMod

      public int armorPiercingMod(AmmoType inType)
      Return the modifier for armor piercing based on size.
      Specified by:
      armorPiercingMod in class RulesAmmo
      Parameters:
      inType - the ammo type to check
      Returns:
      the armor piercing modifier
    • armorPiercingAttackMod

      public void armorPiercingAttackMod(AmmoType.AmmoTypeEnum ammoType, ToHitData toHit, boolean AP)
      Armor Piercing attack modifiers.
      Specified by:
      armorPiercingAttackMod in class RulesAmmo
      Parameters:
      ammoType - the type of ammunition
      toHit - the to-hit data to modify
      AP - true if armor piercing is in effect
    • narcHomingTarget

      public void narcHomingTarget(ToHitData toHit)
      Do nothing. Not in TW.
      Specified by:
      narcHomingTarget in class RulesAmmo
      Parameters:
      toHit - the to-hit data
    • getAXMissileModifier

      public int getAXMissileModifier()
      Acid (AX) missiles are -2 on the cluster roll.
      Specified by:
      getAXMissileModifier in class RulesAmmo
      Returns:
      the AX missile cluster modifier
    • getAXMissileDamage

      public int getAXMissileDamage(int armor, TWDamageManager.ModsInfo mods, int damage)
      They only ignore damage reduction, no bonus.
      Specified by:
      getAXMissileDamage in class RulesAmmo
      Parameters:
      armor - the armor value
      mods - the modifications info
      damage - 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:
      getSemiGuidedAdjustment in class RulesAmmo
      Parameters:
      modifierValue - the modifier value
      movementMod - true if this is a movement modifier
      terrainMod - 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:
      semiGuidedIgnoresCover in class RulesAmmo
      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:
      getSemiGuidedNMissiles in class RulesAmmo
      Parameters:
      taggedTarget - true if the target is tagged
      indirect - true if the attack is indirect
      Returns:
      the modification to the number of missiles for semi-guided