Class CoreRulesWeapons

java.lang.Object
megamek.common.rules.RulesWeapons
megamek.common.rules.core.CoreRulesWeapons

public class CoreRulesWeapons extends RulesWeapons
  • Constructor Details

    • CoreRulesWeapons

      public CoreRulesWeapons()
  • Method Details

    • getRACUnjamRestriction

      public boolean getRACUnjamRestriction()
      Does a RAC unjamming cause issues? RAC unjamming does not limit other actions outside of movement Core p.183
      Specified by:
      getRACUnjamRestriction in class RulesWeapons
      Returns:
      true if RAC unjamming has restrictions
    • getATMClusterSize

      public int getATMClusterSize()
      What size do ATMs cluster in. ATM cluster size Core p.186
      Specified by:
      getATMClusterSize in class RulesWeapons
      Returns:
      the ATM cluster size
    • canUACsJam

      public boolean canUACsJam()
      Can ultra autocannons jam? UACs cannot jam Core p.183
      Specified by:
      canUACsJam in class RulesWeapons
      Returns:
      true if ultra autocannons can jam
    • setACHit

      public void setACHit(CriticalSlot cs, Mounted<?> mounted, Vector<Report> reports, int entityId)
      What happens when an AC is hit. ACs can get hit one time. Core p.183
      Specified by:
      setACHit in class RulesWeapons
      Parameters:
      cs - the critical slot being hit
      mounted - the mounted weapon
      reports - vector of reports describing the hit
      entityId - the ID of the entity being hit
    • getELRMMinimumRackSize

      public int getELRMMinimumRackSize(int rackSize)
      Do ELRMs reduce rack size under minimums? ELRMS under minimum do not reduce missiles that hit. Core p.186
      Specified by:
      getELRMMinimumRackSize in class RulesWeapons
      Parameters:
      rackSize - the rack size
      Returns:
      the minimum ELRM rack size
    • getMRMModifier

      public int getMRMModifier(int modifier)
      What is the modifier on MRMs. MRMs have no additional modifier Core p.186
      Specified by:
      getMRMModifier in class RulesWeapons
      Parameters:
      modifier - the base modifier
      Returns:
      the MRM modifier
    • getMRMClusterModifier

      public int getMRMClusterModifier(boolean apollo)
      What is the cluster modifier for MRMs. MRMs are -1 on the cluster hit Core p.186. With apollo they are 0. Core p.197
      Specified by:
      getMRMClusterModifier in class RulesWeapons
      Parameters:
      apollo - true if Apollo fire control is used
      Returns:
      the MRM cluster modifier
    • getApolloToHit

      public int getApolloToHit()
      Does Apollo change to-hit number. Apollo does not change the to-hit Core p.197
      Specified by:
      getApolloToHit in class RulesWeapons
      Returns:
      the Apollo to-hit modifier
    • flamerHeatAndDamage

      public boolean flamerHeatAndDamage(boolean bmmFlamers)
      Do flamers do damage and heat. Flamers do heat and damage Core p.183
      Specified by:
      flamerHeatAndDamage in class RulesWeapons
      Parameters:
      bmmFlamers - true if using alternate flamer rules
      Returns:
      true if flamers do both damage and heat
    • checkPPCCapacitor

      @Nullable public Report checkPPCCapacitor(int roll, Entity attackingEntity, WeaponMounted weapon)
      PPC Capacitor check. PPC Capacitors don't break on roll. Core p.188
      Specified by:
      checkPPCCapacitor in class RulesWeapons
      Parameters:
      roll - the dice roll result
      attackingEntity - the entity firing the PPC
      weapon - the PPC weapon being fired
      Returns:
      a report of the capacitor check result
    • getMGABonus

      public int getMGABonus()
      Increase the number of hits for MGA. MGA gives +2 to cluster roll. Core p.185
      Specified by:
      getMGABonus in class RulesWeapons
      Returns:
      the MGA bonus
    • canHGRTriggerPSR

      public boolean canHGRTriggerPSR(int mpUsed, int weightClass)
      Does the HGR trigger a PSR? HGR does not cause PSRs
      Specified by:
      canHGRTriggerPSR in class RulesWeapons
      Parameters:
      mpUsed - the movement points used
      weightClass - the weight class of the unit
      Returns:
      true if HGR can trigger a piloting skill roll
    • getApolloSaturationMode

      public boolean getApolloSaturationMode()
      Does Apollo have saturation mode? Returns True. we have Saturation Mode
      Overrides:
      getApolloSaturationMode in class RulesWeapons
      Returns:
      default of false. This is only in core and newer.