megamek.common
Class GunEmplacement

java.lang.Object
  extended by megamek.common.TurnOrdered
      extended by megamek.common.Entity
          extended by megamek.common.Tank
              extended by megamek.common.GunEmplacement
All Implemented Interfaces:
java.io.Serializable, RoundUpdated, Targetable, Transporter

public class GunEmplacement
extends Tank
implements java.io.Serializable

A building with weapons fitted and, optionally, a turret. Taharqa: I am completely re-writing this entity to bring it up to code with TacOps rules GunEmplacements will not simply be the weapon loadouts that can be attached to buildings. They will not be targetable in game, but will be destroyed if their building hex is reduced.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class megamek.common.Entity
Entity.EntityFluff
 
Field Summary
static java.lang.String[] HIT_LOCATION_NAMES
           
static int LOC_GUNS
           
 
Fields inherited from class megamek.common.Tank
CRIT_AMMO, CRIT_CARGO, CRIT_COMMANDER, CRIT_CREW_KILLED, CRIT_CREW_STUNNED, CRIT_DRIVER, CRIT_ENGINE, CRIT_FUEL_TANK, CRIT_NONE, CRIT_SENSOR, CRIT_STABILIZER, CRIT_TURRET_DESTROYED, CRIT_TURRET_JAM, CRIT_TURRET_LOCK, CRIT_WEAPON_DESTROYED, CRIT_WEAPON_JAM, engineHit, LOC_BODY, LOC_FRONT, LOC_LEFT, LOC_REAR, LOC_RIGHT, LOC_TURRET, m_bHasNoTurret, m_bTurretEverJammed, m_bTurretJammed, m_bTurretLocked, movementDamage
 
Fields inherited from class megamek.common.Entity
_isEMId, altitude, ammoList, armorTechLevel, armorType, armsFlipped, aTracker, battleForceDebugString, BATTLEFORCEEXTREMERANGE, BATTLEFORCELONGRANGE, BATTLEFORCEMEDIUMRANGE, battleForceMinRangeModifier, BATTLEFORCESHORTRANGE, battleForceToHitModifier, bombList, bvText, c3CompanyMasterIndex, c3Master, c3NetIdString, canUnstickByJumping, carcass, chassis, crew, crits, damageThisPhase, damageThisRound, DEBUGBATTLEFORCE, delta_distance, designValid, destroyed, displacementAttack, displayName, dodging, done, doomed, duplicateMarker, elevation, endColumn, endRow, endTable, engine, engineHitsThisRound, equipmentList, externalId, facing, failedEquipmentList, findingClub, fluff, game, gotPavementBonus, GRAPPLE_BOTH, GRAPPLE_LEFT, GRAPPLE_RIGHT, hasSpotlight, heat, heatBuildup, heatFromExternal, heatSinkCoolantFailureFactor, hitThisRoundByAntiTSM, hullDown, id, illuminated, iNarcPods, infernos, inReverse, isCarefulStanding, isHidden, jumpMP, killerId, lastTarget, layingMines, LOC_DESTROYED, LOC_NONE, m_lNarcedBy, m_lPendingNarc, MAX_C3_NODES, miscList, mixedTech, model, moved, movementMode, mpUsed, mpUsedLastRound, narcPods, nl, NONE, omni, owner, ownerId, pendingINarcPods, pendingNarcPods, position, prone, reckless, rolledForEngineExplosion, sec_facing, secondaryPositions, shortName, shutDown, shutdownByBATaser, shutDownThisPhase, source, spotlightIsActive, spotting, startColumn, startRow, startTable, structureType, stuckInSwamp, taggedBy, taserFeedBackRounds, taserInterference, taserInterferenceRounds, taserShutdownRounds, techLevel, tmTracker, totalWeaponList, unjammingRAC, usedSearchlight, vectors, walkMP, weaponBayList, weaponGroupList, weaponList, weight, year
 
Fields inherited from interface megamek.common.Targetable
TYPE_BLDG_IGNITE, TYPE_BUILDING, TYPE_ENTITY, TYPE_FLARE_DELIVER, TYPE_FUEL_TANK, TYPE_FUEL_TANK_IGNITE, TYPE_HEX_AERO_BOMB, TYPE_HEX_ARTILLERY, TYPE_HEX_BOMB, TYPE_HEX_CLEAR, TYPE_HEX_EXTINGUISH, TYPE_HEX_IGNITE, TYPE_HEX_SCREEN, TYPE_INARC_POD, TYPE_MINEFIELD_CLEAR, TYPE_MINEFIELD_DELIVER, TYPE_SEARCHLIGHT
 
Constructor Summary
GunEmplacement()
           
 
Method Summary
 PilotingRollData addEntityBonuses(PilotingRollData prd)
          Add in any piloting skill mods
protected  void addEquipment(Mounted mounted, int loc, boolean rearMounted)
           
 void autoSetInternal()
          Set the internal structure to the appropriate value for the mech's weight class
 int calculateBattleValue()
          Calculates the battle value of this emplacement
 int calculateBattleValue(boolean ignoreC3, boolean ignorePilot)
          Calculates the battle value of this emplacement
 boolean canCharge()
          Whether this type of unit can perform charges
 boolean canDFA()
          Whether this type of unit can perform DFA attacks
 boolean canFlee()
          Returns whether an entity can flee from its current position.
 boolean canFlipArms()
          Returns true if the entity can flip its arms
 boolean canGoDown()
           
 boolean canGoDown(int assumed, Coords coords)
          is it possible to go down, or are we landed/just above the water/treeline?
 boolean doomedInAtmosphere()
           
 boolean doomedInSpace()
           
 boolean doomedInVacuum()
           
 boolean doomedOnGround()
           
 double getCost(boolean ignoreAmmo)
           
 int getDependentLocation(int loc)
          Gets the location that is destroyed recursively
 int getEngineCritHeat()
          Returns extra heat generated by engine crits
 int getHeatCapacity()
          Returns the amount of heat that the entity can sink each turn.
 int getHeatCapacityWithWater()
          Returns the amount of heat that the entity can sink each turn, factoring in whether the entity is standing in water.
 java.lang.String[] getLocationAbbrs()
           
 java.lang.String[] getLocationNames()
           
 int getMaxElevationChange()
          The maximum elevation change the entity can cross
 java.lang.String getMovementAbbr(EntityMovementType mtype)
          Returns the name of the type of movement used.
 java.lang.String getMovementString(EntityMovementType mtype)
          Returns the name of the type of movement used.
 int[] getNoOfSlots()
           
 int getRunMPwithoutMASC(boolean gravity, boolean ignoreheat)
          Tanks don't have MASC
 int getTotalCommGearTons()
           
 HitData getTransferLocation(HitData hit)
          Gets the location that excess damage transfers to
 int getWalkMP(boolean gravity, boolean ignoreheat)
          Returns this entity's walking/cruising mp, factored for heat, extreme temperatures, and gravity.
 int getWeaponArc(int weaponId)
          Returns the Compute.ARC that the weapon fires into.
 boolean hasRearArmor(int loc)
          Does this location have rear armor?
 boolean isEligibleForMovement()
          Pretty much anybody's eligible for movement.
 boolean isHexProhibited(IHex hex)
          Tanks have all sorts of prohibited terrain.
 boolean isImmobile()
          Is this entity shut down or is the crew unconscious?
 boolean isNuclearHardened()
          Checks if the unit is hardened agaist nuclear strikes.
 boolean isRepairable()
          Determine if the unit can be repaired, or only harvested for spares.
 boolean isSecondaryArcWeapon(int weaponId)
          Returns true if this weapon fires into the secondary facing arc.
 boolean isTargetable()
          Returns true if this entity is targetable for attacks
 boolean isTurret()
           
 int locations()
          Returns the number of locations in the entity
 HitData rollHitLocation(int table, int side)
          Rolls up a hit location
 HitData rollHitLocation(int table, int side, int aimedLocation, int aimingMode)
          Rolls up a hit location
 int sideTable(Coords src)
           
 java.util.Vector<Report> victoryReport()
          Generates a vector containing reports on all useful information about this entity.
 
Methods inherited from class megamek.common.Tank
addJammedWeapon, addMovementDamage, applyDamage, canChangeSecondaryFacing, canGoHullDown, canSpot, clipSecondaryFacing, engineHit, extinguishAll, extinguishLocation, getArmorType, getCriticalEffect, getForwardArc, getHQIniBonus, getJammedWeapons, getMaxElevationDown, getRearArc, getSensorHits, getStructureType, getStunnedTurns, getSuspensionFactor, hasArmoredEngine, hasModularArmor, hasModularArmor, hasMovementDamage, hasNoTurret, immobilize, isCommanderHit, isCommanderHitPS, isCrewHitPS, isDriverHit, isDriverHitPS, isInfernoFire, isLocationBurning, isMovementHit, isMovementHitPending, isOnFire, isStabiliserHit, isStealthActive, isStealthOn, isTurretEverJammed, isTurretJammed, isTurretLocked, isValidSecondaryFacing, jamTurret, lockTurret, newRound, resetMovementDamage, restore, setArmorType, setCommanderHit, setCommanderHitPS, setCrewHitPS, setDriverHit, setDriverHitPS, setEngine, setFacing, setHasNoTurret, setOmni, setOnFire, setSecondaryFacing, setSensorHits, setStabiliserHit, setStructureType, setStunnedTurns, stunCrew, unjamTurret, unlockTurret
 
Methods inherited from class megamek.common.Entity
absHeight, addBomb, addBomb, addConditionBonuses, addCoolantFailureAmount, addCritical, addCritical, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addFailedEquipment, addKill, addPassedThrough, addPilotingModifierForTerrain, addPilotingModifierForTerrain, addPilotingModifierForTerrain, addTargetedBySwarm, addTransporter, addWeaponGroup, applyGravityEffectsOnMP, applySantaAnna, armorStringFor, assignAMS, attachINarcPod, attachNarcPod, baTaserShutdown, C3MasterIs, calcElevation, calcElevation, calculateFreeC3MNodes, calculateFreeC3Nodes, canAssaultDrop, canAssist, canGoUp, canLayMine, canLoad, canLoad, canRam, canTransferCriticals, canUnjamRAC, canUnstickByJumping, checkBogDown, checkDislodgeSwarmers, checkGetUp, checkLandingInHeavyWoods, checkLandingOnIce, checkLandingWithDamage, checkMovedTooFast, checkMovementInBuilding, checkRecklessMove, checkRubbleMove, checkRunningWithDamage, checkSideSlip, checkSkid, checkSprintingWithMASC, checkSprintingWithSupercharger, checkUnstall, checkWaterMove, checkWaterMove, chooseSide, clearQuirks, climbMode, countQuirks, countQuirks, countWorkingMisc, damageBayDoor, damageDockCollar, damageDoorRecovery, decodeTransporters, deployOffBoard, destroy, destroyLocation, destroyRetractableBlade, doCheckEngineStallRoll, elevationOccupied, encodeTransporters, entityIsBiped, entityIsQuad, equals, extendBlade, findTargetedDisplacement, fixElevation, generateDisplayName, generateShortName, getActiveSensor, getActiveUMUCount, getActiveVibrobladeHeat, getAllUMUCount, getAltitude, getAmmo, getArmor, getArmor, getArmor, getArmorRemainingPercent, getArmorString, getArmorString, getArmorTechLevel, getArmorWeight, getArmsFlipped, getBadCriticals, getBAPRange, getBARRating, getBasePilotingRoll, getBasePilotingRoll, getBattleForceArmorPoints, getBattleForceDamageThresholdString, getBattleForceJumpPoints, getBattleForceMovement, getBattleForceMovementPoints, getBattleForceOverHeatValue, getBattleForcePoints, getBattleForceSize, getBattleForceSpecialAbilites, getBattleForceStandardWeaponsDamage, getBattleForceStandardWeaponsDamage, getBattleForceStandardWeaponsDamage, getBattleForceStandardWeaponsDamage, getBattleForceStructurePoints, getBattleForceTotalHeatGeneration, getBayByAmmo, getBayLoadedUnits, getBlueShieldRounds, getBombLoadout, getBombs, getBombs, getBVText, getC3Master, getC3MasterId, getC3NetId, getC3Top, getCargoMpReduction, getChassis, getClubs, getCoolantFailureAmount, getCrew, getCritical, getDamageReductionFromModularArmor, getDeployRound, getDisplacementAttack, getDisplayName, getDocks, getDroppableUnits, getECCMStrength, getECMRange, getECMStrength, getElevation, getEmptyCriticals, getEngine, getEquipment, getEquipment, getEquipmentNum, getEquipmentType, getEvasionBonus, getExteriorUnitAt, getExternalId, getExternalUnits, getExtraCommGearTons, getExtremeRangeModifier, getFacing, getFailedEquipment, getFighterBays, getFighterLaunchRate, getFirstBay, getFirstWeapon, getFluff, getGame, getGaveKillCredit, getGhostTargetOverride, getGhostTargetRoll, getGhostTargetRollMoS, getGoodCriticals, getGoodCriticals, getGrappled, getGrappleSide, getGyroType, getHeading, getHeatFiringModifier, getHeatInArc, getHeatMPReduction, getHeight, getHitCriticals, getHittableCriticals, getId, getINarcPodsAttached, getInternal, getInternal, getInternalRemainingPercent, getInternalString, getJumpHeat, getJumpMP, getJumpMP, getJumpMPWithTerrain, getJumpType, getKillNumber, getKills, getLastTarget, getLaunchableFighters, getLaunchableSmallCraft, getLoadedBay, getLoadedFighters, getLoadedSmallCraft, getLoadedUnits, getLocationAbbr, getLocationAbbr, getLocationFromAbbr, getLocationName, getLocationName, getLocationStatus, getLongRangeModifier, getMDIniBonus, getMediumRangeModifier, getMisc, getModel, getMovementBeforeSkidPSRModifier, getMovementMode, getMovementModeAsBattleForceString, getMovementModeAsString, getNextSensor, getNextWeapon, getNumberOf, getNumberOfCriticals, getNumberOfCriticals, getNumberOfCriticals, getNumberOfCriticals, getNumberOfShields, getOArmor, getOArmor, getOArmor, getOffBoardDirection, getOffBoardDistance, getOInternal, getOInternal, getOriginalJumpMP, getOriginalRunMP, getOriginalSprintMP, getOriginalWalkMP, getOwner, getOwnerId, getPassedThrough, getPickedUpMechWarriors, getPosition, getPriorPosition, getQuirkIniBonus, getQuirkList, getQuirks, getRecoveryTurn, getRemovalCondition, getRetreatedDirection, getRunHeat, getRunMP, getRunMP, getRunMPasString, getRunMPwithoutMASC, getRunningGravityLimit, getSecondaryFacing, getSecondaryPositions, getSensorCheck, getSensorDesc, getSensors, getShortName, getShortNameRaw, getShortRangeModifier, getSmallCraftBays, getSmallCraftLaunchRate, getSource, getSpotTargetId, getSprintHeat, getSprintMP, getSprintMP, getSprintMPasString, getSprintMPwithoutMASC, getSprintMPwithoutMASC, getStandingHeat, getStartingPos, getStealthModifier, getSwarmAttackerId, getSwarmTargetId, getTaggedBy, getTargetedBySwarm, getTargetId, getTargetType, getTaserFeedBackRounds, getTaserInterference, getTaserInterferenceRounds, getTaserShutdownRounds, getTechLevel, getTMTracker, getTotalAmmoOfType, getTotalArmor, getTotalInternal, getTotalMunitionsOfType, getTotalOArmor, getTotalOInternal, getTotalWeaponList, getTransferLocation, getTransportBays, getTransportId, getTransports, getTroopCarryingSpace, getTrooperAtLocation, getUnitNumber, getUnusedString, getVector, getVectors, getVelocity, getVibroClaws, getWalkHeat, getWalkMP, getWeaponBayList, getWeaponGroupList, getWeaponList, getWeapons, getWeaponsAndEquipmentCost, getWeaponsAndEquipmentCost, getWeight, getWeightClass, getWeightClassName, getYear, hasActiveAngelECCM, hasActiveAngelECM, hasActiveBlueShield, hasActiveECCM, hasActiveECM, hasActiveECM, hasActiveEiCockpit, hasActiveShield, hasActiveShield, hasAimModeTargComp, hasArcFired, hasArmoredChassis, hasBAP, hasBAP, hasBARArmor, hasBattleArmorHandles, hasC3, hasC3i, hasC3M, hasC3MM, hasC3S, hasCASEII, hasCASEII, hasDisplacementAttack, hasEiCockpit, hasEnvironmentalSealing, hasFunctionalArmAES, hasFunctionalLegAES, hasGhostTargets, hasHipCrit, hasINarcPodsAttached, hasInfernoAmmo, hasLegActuatorCrit, hasLinkedMGA, hasNoDefenseShield, hasPassiveShield, hasPassiveShield, hasShield, hasSpotlight, hasStealth, hasSystem, hasTAG, hasTargComp, hasUMU, hasVibroblades, hasWorkingMisc, hasWorkingMisc, hasWorkingMisc, hasWorkingMisc, hasWorkingSystem, hasWorkingWeapon, hasWorkingWeapon, hasWorkingWeapon, hasWorkingWeapon, height, hitAllCriticals, illuminateTarget, initializeArmor, initializeInternal, isActive, isActive, isAirborne, isAirborneVTOL, isAssaultDropInProgress, isAttackingThisTurn, isBATaserShutdown, isBoardProhibited, isCanon, isCapitalFighter, isCapitalScale, isCaptured, isCarcass, isCarefulStand, isChameleonShieldActive, isCharging, isClan, isClanArmor, isClearingMinefield, isCommander, isDeployed, isDesignValid, isDestroyed, isDone, isDoomed, isDropping, isElevationValid, isEligibleFor, isEligibleForFiring, isEligibleForOffboard, isEligibleForPhysical, isEligibleForTargetingPhase, isEnemyOf, isEvading, isFighter, isFindingClub, isGrappleAttacker, isHidden, isHullDown, isIlluminated, isINarcedBy, isINarcedWith, isLargeCraft, isLayingMines, isLoadableThisTurn, isLocationBad, isLocationDoomed, isMakingDfa, isMilitary, isMixedTech, isNarcedBy, isNOE, isNullSigActive, isOffBoard, isOmni, isOnSameSheet, isPartOfFighterSquadron, isProne, isPushing, isRamming, isReckless, isSalvage, isSeenByEnemy, isSelectableThisTurn, isShutDown, isShutDownThisPhase, isSpotting, isStalled, isStuck, isSufferingEMI, isSurfaceNaval, isSystemRepairable, isTargetOfDisplacementAttack, isUnjammingRAC, isUnloadedThisTurn, isUsingManAce, isUsingSpotlight, isVisibleToEnemy, isVoidSigActive, isWeaponBlockedAt, itemOppositeTech, load, load, loadAllWeapons, loadedUnitsHaveActiveECM, loadWeapon, loadWeapon, loadWeaponWithSameAmmo, loadWeaponWithSameAmmo, locationHasCase, locationIsLeg, needsRollToStand, onSameC3NetworkAs, onSameC3NetworkAs, passedThrough, passedThroughPrevious, passedWithin, pickUp, printDebugToFile, recover, refreshLocations, reloadEmptyWeapons, removeAllINarcPods, removeAllTransporters, removeCriticals, removeINarcPod, removeMisc, removePartialCoverHits, resetBayDoors, resetFiringArcs, rollMovementInBuilding, setAltitude, setArcFired, setArmor, setArmor, setArmor, setArmorTechLevel, setArmorType, setArmsFlipped, setAssaultDropInProgress, setBATaserShutdown, setC3Master, setC3Master, setC3NetId, setCanon, setCanUnstickByJumping, setCaptured, setCarcass, setCarefulStand, setChassis, setClearingMinefield, setClimbMode, setCommander, setCrew, setCritical, setDeployed, setDeployRound, setDesignValid, setDestroyed, setDisplacementAttack, setDone, setDoomed, setElevation, setEMI, setEvading, setExternalId, setFindingClub, setGame, setGameOptions, setGrappled, setGrappleSide, setHidden, setHullDown, setId, setIlluminated, setInternal, setInternal, setLandedAssaultDrop, setLastTarget, setLayingMines, setLocationStatus, setMixedTech, setModel, setMovementMode, setNextSensor, setOffBoard, setOriginalJumpMP, setOriginalWalkMP, setOwner, setPassedThrough, setPosition, setProne, setQuirks, setRamming, setRapidFire, setReckless, setRecoveryTurn, setRemovalCondition, setRetreatedDirection, setSalvage, setSeenByEnemy, setShutDown, setShutDownThisPhase, setSource, setSpotlight, setSpotlightState, setSpotTargetId, setSpotting, setStartingPos, setStructureType, setStuck, setSwarmAttackerId, setSwarmTargetId, setTaggedBy, setTaserFeedback, setTaserInterference, setTaserShutdownRounds, setTechLevel, setTransportId, setUnitNumber, setUnjammingRAC, setUnloaded, setUsedSearchlight, setVectors, setVisibleToEnemy, setWeaponHit, setWeight, setYear, shouldDeploy, sideTable, sideTable, statusToString, statusToString, statusToString, toString, unload, updateBays, usedSearchlight, usedTag, usesWeaponBays, weaponFiredFrom, whichBay
 
Methods inherited from class megamek.common.TurnOrdered
clearInitiative, generateTurnOrder, getAeroTurns, getDropshipTurns, getEvenTurns, getInitiative, getJumpshipTurns, getMultiTurns, getNormalTurns, getOtherTurns, getSmallCraftTurns, getSpaceStationTurns, getWarshipTurns, incrementAeroTurns, incrementDropshipTurns, incrementEvenTurns, incrementJumpshipTurns, incrementMultiTurns, incrementOtherTurns, incrementSmallCraftTurns, incrementSpaceStationTurns, incrementWarshipTurns, resetAeroTurns, resetDropshipTurns, resetEvenTurns, resetJumpshipTurns, resetMultiTurns, resetOtherTurns, resetSmallCraftTurns, resetSpaceStationTurns, resetWarshipTurns, rollInitAndResolveTies, rollInitiative
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOC_GUNS

public static final int LOC_GUNS
See Also:
Constant Field Values

HIT_LOCATION_NAMES

public static final java.lang.String[] HIT_LOCATION_NAMES
Constructor Detail

GunEmplacement

public GunEmplacement()
Method Detail

isTurret

public boolean isTurret()

isImmobile

public boolean isImmobile()
Description copied from class: Entity
Is this entity shut down or is the crew unconscious?

Specified by:
isImmobile in interface Targetable
Overrides:
isImmobile in class Tank
Returns:
true if the target is immobile (-4 to hit)

isEligibleForMovement

public boolean isEligibleForMovement()
Description copied from class: Entity
Pretty much anybody's eligible for movement. If the game option is toggled on, inactive and immobile entities are not eligible. OffBoard units are always ineligible

Overrides:
isEligibleForMovement in class Entity
Returns:
whether or not the entity is allowed to move

getMovementString

public java.lang.String getMovementString(EntityMovementType mtype)
Description copied from class: Tank
Returns the name of the type of movement used. This is tank-specific.

Overrides:
getMovementString in class Tank

getMovementAbbr

public java.lang.String getMovementAbbr(EntityMovementType mtype)
Description copied from class: Tank
Returns the name of the type of movement used. This is tank-specific.

Overrides:
getMovementAbbr in class Tank

isHexProhibited

public boolean isHexProhibited(IHex hex)
Description copied from class: Tank
Tanks have all sorts of prohibited terrain.

Overrides:
isHexProhibited in class Tank

getWalkMP

public int getWalkMP(boolean gravity,
                     boolean ignoreheat)
Description copied from class: Tank
Returns this entity's walking/cruising mp, factored for heat, extreme temperatures, and gravity.

Overrides:
getWalkMP in class Tank
Parameters:
gravity - Should the movement be factored for gravity
ignoreheat - Should heat be ignored?

getLocationAbbrs

public java.lang.String[] getLocationAbbrs()
Overrides:
getLocationAbbrs in class Tank

getLocationNames

public java.lang.String[] getLocationNames()
Overrides:
getLocationNames in class Tank

locations

public int locations()
Description copied from class: Tank
Returns the number of locations in the entity

Overrides:
locations in class Tank

hasRearArmor

public boolean hasRearArmor(int loc)
Description copied from class: Entity
Does this location have rear armor?

Overrides:
hasRearArmor in class Tank

getWeaponArc

public int getWeaponArc(int weaponId)
Description copied from class: Tank
Returns the Compute.ARC that the weapon fires into.

Overrides:
getWeaponArc in class Tank

isSecondaryArcWeapon

public boolean isSecondaryArcWeapon(int weaponId)
Description copied from class: Tank
Returns true if this weapon fires into the secondary facing arc. If false, assume it fires into the primary.

Overrides:
isSecondaryArcWeapon in class Tank

sideTable

public int sideTable(Coords src)
Specified by:
sideTable in interface Targetable
Overrides:
sideTable in class Entity
Returns:
side hit from location

rollHitLocation

public HitData rollHitLocation(int table,
                               int side,
                               int aimedLocation,
                               int aimingMode)
Description copied from class: Tank
Rolls up a hit location

Overrides:
rollHitLocation in class Tank

rollHitLocation

public HitData rollHitLocation(int table,
                               int side)
Description copied from class: Entity
Rolls up a hit location

Overrides:
rollHitLocation in class Tank

getTransferLocation

public HitData getTransferLocation(HitData hit)
Gets the location that excess damage transfers to

Overrides:
getTransferLocation in class Tank

getDependentLocation

public int getDependentLocation(int loc)
Gets the location that is destroyed recursively

Overrides:
getDependentLocation in class Tank

calculateBattleValue

public int calculateBattleValue()
Calculates the battle value of this emplacement

Overrides:
calculateBattleValue in class Tank

calculateBattleValue

public int calculateBattleValue(boolean ignoreC3,
                                boolean ignorePilot)
Calculates the battle value of this emplacement

Overrides:
calculateBattleValue in class Tank
Parameters:
ignoreC3 - if the contribution of the C3 computer should be ignored when calculating BV.
ignorePilot - if the extra BV due to piloting skill should be ignore, needed for c3 bv

addEntityBonuses

public PilotingRollData addEntityBonuses(PilotingRollData prd)
Description copied from class: Entity
Add in any piloting skill mods

Overrides:
addEntityBonuses in class Tank

victoryReport

public java.util.Vector<Report> victoryReport()
Description copied from class: Entity
Generates a vector containing reports on all useful information about this entity.

Overrides:
victoryReport in class Tank

getNoOfSlots

public int[] getNoOfSlots()
Overrides:
getNoOfSlots in class Tank

getRunMPwithoutMASC

public int getRunMPwithoutMASC(boolean gravity,
                               boolean ignoreheat)
Description copied from class: Tank
Tanks don't have MASC

Overrides:
getRunMPwithoutMASC in class Tank

getHeatCapacity

public int getHeatCapacity()
Description copied from class: Entity
Returns the amount of heat that the entity can sink each turn.

Overrides:
getHeatCapacity in class Tank

getHeatCapacityWithWater

public int getHeatCapacityWithWater()
Description copied from class: Entity
Returns the amount of heat that the entity can sink each turn, factoring in whether the entity is standing in water.

Overrides:
getHeatCapacityWithWater in class Tank

getEngineCritHeat

public int getEngineCritHeat()
Description copied from class: Entity
Returns extra heat generated by engine crits

Overrides:
getEngineCritHeat in class Tank

autoSetInternal

public void autoSetInternal()
Description copied from class: Entity
Set the internal structure to the appropriate value for the mech's weight class

Overrides:
autoSetInternal in class Tank

getMaxElevationChange

public int getMaxElevationChange()
Description copied from class: Entity
The maximum elevation change the entity can cross

Overrides:
getMaxElevationChange in class Tank

isRepairable

public boolean isRepairable()
Description copied from class: Tank
Determine if the unit can be repaired, or only harvested for spares.

Overrides:
isRepairable in class Tank
Returns:
A boolean that is true if the unit can be repaired (given enough time and parts); if this value is false, the unit is only a source of spares.
See Also:
Entity.isSalvage()

isTargetable

public boolean isTargetable()
Description copied from class: Entity
Returns true if this entity is targetable for attacks

Overrides:
isTargetable in class Entity

canCharge

public boolean canCharge()
Description copied from class: Entity
Whether this type of unit can perform charges

Overrides:
canCharge in class Tank

canDFA

public boolean canDFA()
Description copied from class: Entity
Whether this type of unit can perform DFA attacks

Overrides:
canDFA in class Tank

canFlee

public boolean canFlee()
Description copied from class: Entity
Returns whether an entity can flee from its current position. Currently returns true if the entity is on the edge of the board.

Overrides:
canFlee in class Entity

canFlipArms

public boolean canFlipArms()
Description copied from class: Entity
Returns true if the entity can flip its arms

Overrides:
canFlipArms in class Entity

canGoDown

public boolean canGoDown()
Overrides:
canGoDown in class Entity

canGoDown

public boolean canGoDown(int assumed,
                         Coords coords)
Description copied from class: Entity
is it possible to go down, or are we landed/just above the water/treeline? assuming passed elevation.

Overrides:
canGoDown in class Entity

getCost

public double getCost(boolean ignoreAmmo)
Overrides:
getCost in class Tank

doomedInVacuum

public boolean doomedInVacuum()
Overrides:
doomedInVacuum in class Tank

doomedOnGround

public boolean doomedOnGround()
Overrides:
doomedOnGround in class Tank

doomedInAtmosphere

public boolean doomedInAtmosphere()
Overrides:
doomedInAtmosphere in class Tank

doomedInSpace

public boolean doomedInSpace()
Overrides:
doomedInSpace in class Tank

isNuclearHardened

public boolean isNuclearHardened()
Description copied from class: Entity
Checks if the unit is hardened agaist nuclear strikes.

Overrides:
isNuclearHardened in class Tank
Returns:
true if this is a hardened unit.

addEquipment

protected void addEquipment(Mounted mounted,
                            int loc,
                            boolean rearMounted)
                     throws LocationFullException
Overrides:
addEquipment in class Tank
Throws:
LocationFullException

getTotalCommGearTons

public int getTotalCommGearTons()
Overrides:
getTotalCommGearTons in class Tank
Returns:
the total tonnage of communications gear in this entity