Class ASLocationMapper

java.lang.Object
megamek.common.alphaStrike.conversion.ASLocationMapper

public class ASLocationMapper extends Object
This class provides AlphaStrike conversion utilities for converting all sorts of locations of TW units to the damage conversion location index. Not useful for anything outside AlphaStrike conversion.
  • Method Details

    • damageLocationMultiplier

      public static double damageLocationMultiplier(Entity en, int loc, Mounted<?> mount)
    • damageLocationMultiplierForSpecials

      public static double damageLocationMultiplierForSpecials(Entity en, int loc, Mounted<?> mount)
      Returns the value multiplier for the given Mounted of the given entity in the AS conversion location loc. The AS conversion location is an ASSpecialAbilityCollection assembling the specials for the unit, a TUR ability, REAR and the arcs of large units, not the mounted's location on the entity. This multiplier is only correct for weapon-based special abilities like MHQ, C3M, NARC or ART-x abilities.
      Parameters:
      en - The entity
      loc - The conversion location index, see locations[] in ASDamageConverter
      mount - the weapon
      Returns:
      The value multiplier, 1 meaning "counts for this location", 0 meaning "doesn't count"
    • locationName

      public static String locationName(Entity en, int index)