Class ModelRecord

java.lang.Object
megamek.client.ratgenerator.AbstractUnitRecord
megamek.client.ratgenerator.ModelRecord

public class ModelRecord extends AbstractUnitRecord
Specific unit variants; analyzes equipment to determine suitability for certain types of missions in addition to what is formally declared in the data files.
  • Field Details

  • Constructor Details

    • ModelRecord

      public ModelRecord(String chassis, String model)
    • ModelRecord

      public ModelRecord(MekSummary unitData)
  • Method Details

    • getModel

      public String getModel()
    • getWeightClass

      public int getWeightClass()
    • getMovementMode

      public EntityMovementMode getMovementMode()
    • isQuadMek

      public boolean isQuadMek()
    • isTripodMek

      public boolean isTripodMek()
    • isMixedISTech

      @Deprecated(since="0.51.0", forRemoval=true) public boolean isMixedISTech()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      true, if unit is base IS tech and mounts Clan tech equipment
    • isMixedOrClanTech

      public boolean isMixedOrClanTech()
      Returns:
      true, if unit is either base Clan tech, or is base IS tech and mounts Clan tech equipment
    • isPrimitive

      public boolean isPrimitive()
      Unit contains at least some primitive technology, without any advanced tech. Testing is not extensive, there may be units that are not properly flagged.
      Returns:
      true, if unit contains no advanced tech and at least some primitive tech
    • isRetroTech

      @Deprecated(since="0.51.0", forRemoval=true) public boolean isRetroTech()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Unit consists of at least some primitive technology and some advanced/Star League/Clan technology. Testing is not extensive, there may be units that are not properly flagged.
      Returns:
      true, if unit contains both primitive and advanced tech
    • isSL

      public boolean isSL()
      Unit has advanced IS-base technology
    • getRoles

      public Set<MissionRole> getRoles()
    • getDeployedWith

      public ArrayList<String> getDeployedWith()
    • getRequiredUnits

      public ArrayList<String> getRequiredUnits()
    • getExcludedFactions

      public ArrayList<String> getExcludedFactions()
    • getNetworkMask

      public int getNetworkMask()
    • setNetwork

      public void setNetwork(int network)
    • getFlak

      public double getFlak()
      Proportion of total weapons BV that is optimized against airborne targets
      Returns:
      between zero (none) and 1.0 (all weapons)
    • getArtilleryProportion

      @Deprecated(since="0.51.0", forRemoval=true) public double getArtilleryProportion()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Proportion of total weapons BV that is artillery
      Returns:
      between zero (none) and 1.0 (all weapons)
    • getLongRange

      public double getLongRange()
      Proportion of total weapons BV that is capable of attacking targets at longer ranges. Units with values of 0.75 or higher are mostly armed with weapons that can hit targets at 15+ hexes, have a minimum range, and potentially fire indirectly in ground combat; or reach long/extreme range in air or space combat. Complementary to getSRProportion() - where one is high and the other is low, the unit is specialized for that range bracket. If both values are similar the unit is well balanced between long and short ranged capabilities. TODO: rename for consistency and clarity
      Returns:
      between zero (none) and 1.0 (all weapons)
    • getSRProportion

      @Deprecated(since="0.51.0", forRemoval=true) public double getSRProportion()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Proportion of total weapons BV that is limited to attacking targets at close range. Units with values of 0.75 or higher are mostly armed with weapons that have a long range of less than 12 hexes and do not have a minimum range in ground combat, or are limited to short range in air/space combat. Complementary to getLongRange() - where one is high and the other is low, the unit is specialized for that range bracket. If both values are similar the unit is well balanced between long and short ranged capabilities.
      Returns:
      between zero (none) and 1.0 (all weapons)
    • getSpeed

      public int getSpeed()
    • getJump

      public boolean getJump()
    • getAmmoRequirement

      public double getAmmoRequirement()
      Proportion of total weapons BV that is dependent on ammunition
      Returns:
      between zero (none) and 1.0 (all weapons)
    • hasIncendiaryWeapon

      public boolean hasIncendiaryWeapon()
    • hasAPWeapons

      public boolean hasAPWeapons()
    • isUnarmed

      public boolean isUnarmed()
      Returns:
      true if unit has no BV invested in weapons
    • isRemoteDrone

      @Deprecated(since="0.51.0", forRemoval=true) public boolean isRemoteDrone()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Unit is a remotely operated drone
      Returns:
      true if unit has remote drone operation equipment
    • isRobotDrone

      @Deprecated(since="0.51.0", forRemoval=true) public boolean isRobotDrone()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Unit is an independently operating drone
      Returns:
      true if unit has robotic operations system
    • getMekSummary

      public MekSummary getMekSummary()
    • addRoles

      public void addRoles(String newRoles)
    • setRequiredUnits

      public void setRequiredUnits(String requiredUnitNames)
    • setExcludedFactions

      public void setExcludedFactions(String excludedFactions)
    • factionIsExcluded

      public boolean factionIsExcluded(FactionRecord checkFaction)
    • factionIsExcluded

      @Deprecated(since="0.51.0", forRemoval=true) public boolean factionIsExcluded(String faction, String subfaction)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getKey

      public String getKey()
      Overrides:
      getKey in class AbstractUnitRecord
    • canDoMechanizedBA

      public boolean canDoMechanizedBA()
    • setMechanizedBA

      public void setMechanizedBA(boolean flag)
    • hasMagClamp

      public boolean hasMagClamp()
    • setMagClamp

      public void setMagClamp(boolean flag)
    • getAntiMek

      @Deprecated(since="0.51.0", forRemoval=true) public boolean getAntiMek()
      Deprecated, for removal: This API element is subject to removal in a future version.