Package megamek.common.equipment
Class MiscMounted
- All Implemented Interfaces:
Serializable,PhaseUpdated,RoundUpdated
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class megamek.common.equipment.Mounted
EQUIP_OFF_DIAGNOSTIC_LOGGER, MODE_NONE, MODE_OFF, MODE_ON, switchedReason -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintintgetCurrentDamageCapacity(Entity entity, int location) Rules say every time a shield is critted it loses 5 points from its Damage Capacity.intgetDamageAbsorption(Entity entity, int location) Rules state that every time the shield takes a crit its damage absorption for each attack is reduced by 1.intintget the EMP mine weight thresholdintintget the vibrabomb sensitivitybooleanbooleanisTurret()voidsetDamageTaken(int damage) voidsetEmpSetting(int empSetting) set the EMP mine weight thresholdvoidsetMineType(int mineType) set the type of mine this should bevoidsetVibraSetting(int vibraSetting) set the vibrabomb sensitivityvoidtakeDamage(int damage) Methods inherited from class megamek.common.equipment.Mounted
adaptToGameOptions, allLocations, bayComponentsToString, canFire, canFire, canInstantSwitch, countQuirks, createMounted, curMode, directionalMountDebug, equipmentIndex, getArmorValue, getBaMountLoc, getBaseShotsLeft, getCalledShot, getChargeState, getCost, getCrossLinkedBy, getCurrentHeat, getDesc, getDirectionalMountFacing, getEntity, getEquipmentNum, getExplosionDamage, getFacing, getFoundCrits, getHittableShotsLeft, getLinked, getLinkedBy, getLocation, getMissingTrooperString, getMode, getModesCount, getName, getNumCriticalSlots, getNumShots, getNWeapons, getOriginalShots, getQuirkList, getQuirks, getSecondLocation, getShortName, getSize, getSwitchedReason, getTonnage, getTonnage, getType, getUsableShotsLeft, hasChargedCapacitor, hasChargedOrChargingCapacitor, hasDirectional360TorsoMount, hasDirectionalTorsoMount, hasModes, hasModeType, hasQuirk, hasUsableShotsLeft, is, isAmmoUsable, isAMSused, isAnyMissingTroopers, isAPMMounted, isArmored, isAutocannonHit, isBodyMounted, isBombMounted, isBreached, isCrippled, isDestroyed, isDirectionalMountAlreadyFlipped, isDirectionalMountLocked, isDirectionalMountRear, isDumping, isDWPMounted, isFired, isGroundBomb, isHit, isHomingAmmoInHomingMode, isHotLoaded, isInBearingsOnlyMode, isInoperable, isInternalBomb, isInWaypointLaunchMode, isJammed, isMekTurretMounted, isMissing, isMissingForTrooper, isModeSwitchable, isModeTurnedOff, isModeTurnedOffNextRound, isOmniPodMounted, isOneShot, isOneShotAmmo, isOperable, isPendingDump, isPintleTurretMounted, isRapidFire, isReady, isReady, isRearMounted, isRepairable, isSplit, isSplitable, isSponsonTurretMounted, isSquadSupportWeapon, isTSEMPDowntime, isUsedThisRound, isWeaponGroup, jammedThisPhase, modeNextRound, newPhase, newRound, pendingMode, relevantToTargetingComputer, resetJam, restore, setAMSused, setAPMMounted, setArmored, setArmorValue, setAutocannonHit, setBaMountLoc, setBombMounted, setBreached, setByShot, setChargeState, setCrossLinked, setDestroyed, setDirectionalMountFacing, setDirectionalMountLocked, setDirectionalMountRear, setDumping, setDWPMounted, setFacing, setFired, setFoundCrits, setHit, setHotLoad, setInternalBomb, setJammed, setLinked, setLocation, setLocation, setMekTurretMounted, setMissing, setMissingForTrooper, setMode, setMode, setModeImmediately, setModesForMapType, setModeSwitchable, setNWeapons, setOmniPodMounted, setOriginalShots, setPendingDump, setPintleTurretMounted, setQuirks, setRapidFire, setRepairable, setSecondLocation, setSecondLocation, setShotsLeft, setSize, setSplit, setSponsonTurretMounted, setSquadSupportWeapon, setSwitchedReason, setTSEMPDowntime, setType, setUsedThisRound, setWeaponGroup, switchChargeLevel, switchMode, toString, usedInPhase
-
Field Details
-
MINE_NONE
public static final int MINE_NONE- See Also:
-
MINE_CONVENTIONAL
public static final int MINE_CONVENTIONAL- See Also:
-
MINE_VIBRABOMB
public static final int MINE_VIBRABOMB- See Also:
-
MINE_ACTIVE
public static final int MINE_ACTIVE- See Also:
-
MINE_INFERNO
public static final int MINE_INFERNO- See Also:
-
MINE_EMP
public static final int MINE_EMP- See Also:
-
MINE_COMMAND_DETONATED
public static final int MINE_COMMAND_DETONATED- See Also:
-
-
Constructor Details
-
MiscMounted
-
-
Method Details
-
getBridgeLayerState
- Returns:
- the carried folding-bridge state for a Bridge-Layer (AVLB) mount, or
nullif this equipment is not a bridgelayer
-
isBridgeLayer
public boolean isBridgeLayer()- Returns:
trueif this equipment is a Bridge-Layer (AVLB) variant
-
getBaseDamageAbsorptionRate
public int getBaseDamageAbsorptionRate() -
getBaseDamageCapacity
public int getBaseDamageCapacity() -
getDamageAbsorption
Rules state that every time the shield takes a crit its damage absorption for each attack is reduced by 1. Also for every Arm actuator critted damage absorption is reduced by 1 and finally if the shoulder is hit the damage absorption is reduced by 2 making it possible to kill a shield before its gone through its full damage capacity.- Parameters:
entity- Entity mounted the shieldlocation- The shield location index- Returns:
- The shield's damage absorption value
-
getCurrentDamageCapacity
Rules say every time a shield is critted it loses 5 points from its Damage Capacity. basically count down from the top then subtract the amount of damage its already take. The damage capacity is used to determine if the shield is still viable.- Parameters:
entity- The entity the shield is mounted onlocation- The shield's location index- Returns:
- damage capacity(no less than 0)
-
getDamageTaken
public int getDamageTaken() -
setDamageTaken
public void setDamageTaken(int damage) -
takeDamage
public void takeDamage(int damage) -
getMineType
public int getMineType()- Returns:
- the type of mine this mounted is, or
-1if it isn't a mine
-
setMineType
public void setMineType(int mineType) set the type of mine this should be- Parameters:
mineType- The mine type index
-
setVibraSetting
public void setVibraSetting(int vibraSetting) set the vibrabomb sensitivity- Parameters:
vibraSetting- theintsensitivity to set
-
getVibraSetting
public int getVibraSetting()get the vibrabomb sensitivity- Returns:
- the
intvibrabomb sensitivity this mine is set to.
-
setEmpSetting
public void setEmpSetting(int empSetting) set the EMP mine weight threshold- Parameters:
empSetting- theintweight threshold (in tons) to set
-
getEmpSetting
public int getEmpSetting()get the EMP mine weight threshold- Returns:
- the
intweight threshold (in tons) this mine is set to.
-
getBaseDesc
- Overrides:
getBaseDescin classMounted<MiscType>
-
isTurret
public boolean isTurret()
-