|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.common.TurnOrdered
megamek.common.Entity
megamek.common.Tank
megamek.common.GunEmplacement
public class GunEmplacement
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.
| 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 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 java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int LOC_GUNS
public static final java.lang.String[] HIT_LOCATION_NAMES
| Constructor Detail |
|---|
public GunEmplacement()
| Method Detail |
|---|
public boolean isTurret()
public boolean isImmobile()
Entity
isImmobile in interface TargetableisImmobile in class Tankpublic boolean isEligibleForMovement()
Entity
isEligibleForMovement in class Entitypublic java.lang.String getMovementString(EntityMovementType mtype)
Tank
getMovementString in class Tankpublic java.lang.String getMovementAbbr(EntityMovementType mtype)
Tank
getMovementAbbr in class Tankpublic boolean isHexProhibited(IHex hex)
Tank
isHexProhibited in class Tank
public int getWalkMP(boolean gravity,
boolean ignoreheat)
Tank
getWalkMP in class Tankgravity - Should the movement be factored for gravityignoreheat - Should heat be ignored?public java.lang.String[] getLocationAbbrs()
getLocationAbbrs in class Tankpublic java.lang.String[] getLocationNames()
getLocationNames in class Tankpublic int locations()
Tank
locations in class Tankpublic boolean hasRearArmor(int loc)
Entity
hasRearArmor in class Tankpublic int getWeaponArc(int weaponId)
Tank
getWeaponArc in class Tankpublic boolean isSecondaryArcWeapon(int weaponId)
Tank
isSecondaryArcWeapon in class Tankpublic int sideTable(Coords src)
sideTable in interface TargetablesideTable in class Entity
public HitData rollHitLocation(int table,
int side,
int aimedLocation,
int aimingMode)
Tank
rollHitLocation in class Tank
public HitData rollHitLocation(int table,
int side)
Entity
rollHitLocation in class Tankpublic HitData getTransferLocation(HitData hit)
getTransferLocation in class Tankpublic int getDependentLocation(int loc)
getDependentLocation in class Tankpublic int calculateBattleValue()
calculateBattleValue in class Tank
public int calculateBattleValue(boolean ignoreC3,
boolean ignorePilot)
calculateBattleValue in class TankignoreC3 - 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 bvpublic PilotingRollData addEntityBonuses(PilotingRollData prd)
Entity
addEntityBonuses in class Tankpublic java.util.Vector<Report> victoryReport()
Entity
victoryReport in class Tankpublic int[] getNoOfSlots()
getNoOfSlots in class Tank
public int getRunMPwithoutMASC(boolean gravity,
boolean ignoreheat)
Tank
getRunMPwithoutMASC in class Tankpublic int getHeatCapacity()
Entity
getHeatCapacity in class Tankpublic int getHeatCapacityWithWater()
Entity
getHeatCapacityWithWater in class Tankpublic int getEngineCritHeat()
Entity
getEngineCritHeat in class Tankpublic void autoSetInternal()
Entity
autoSetInternal in class Tankpublic int getMaxElevationChange()
Entity
getMaxElevationChange in class Tankpublic boolean isRepairable()
Tank
isRepairable in class Tankboolean 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.Entity.isSalvage()public boolean isTargetable()
Entity
isTargetable in class Entitypublic boolean canCharge()
Entity
canCharge in class Tankpublic boolean canDFA()
Entity
canDFA in class Tankpublic boolean canFlee()
Entity
canFlee in class Entitypublic boolean canFlipArms()
Entity
canFlipArms in class Entitypublic boolean canGoDown()
canGoDown in class Entity
public boolean canGoDown(int assumed,
Coords coords)
Entity
canGoDown in class Entitypublic double getCost(boolean ignoreAmmo)
getCost in class Tankpublic boolean doomedInVacuum()
doomedInVacuum in class Tankpublic boolean doomedOnGround()
doomedOnGround in class Tankpublic boolean doomedInAtmosphere()
doomedInAtmosphere in class Tankpublic boolean doomedInSpace()
doomedInSpace in class Tankpublic boolean isNuclearHardened()
Entity
isNuclearHardened in class Tank
protected void addEquipment(Mounted mounted,
int loc,
boolean rearMounted)
throws LocationFullException
addEquipment in class TankLocationFullExceptionpublic int getTotalCommGearTons()
getTotalCommGearTons in class Tank
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||