|
|||||||||
| 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
public class Tank
You know what tanks are, silly.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class megamek.common.Entity |
|---|
Entity.EntityFluff |
| Field Summary | |
|---|---|
static int |
CRIT_AMMO
|
static int |
CRIT_CARGO
|
static int |
CRIT_COMMANDER
|
static int |
CRIT_CREW_KILLED
|
static int |
CRIT_CREW_STUNNED
|
static int |
CRIT_DRIVER
|
static int |
CRIT_ENGINE
|
static int |
CRIT_FUEL_TANK
|
static int |
CRIT_NONE
|
static int |
CRIT_SENSOR
|
static int |
CRIT_STABILIZER
|
static int |
CRIT_TURRET_DESTROYED
|
static int |
CRIT_TURRET_JAM
|
static int |
CRIT_TURRET_LOCK
|
static int |
CRIT_WEAPON_DESTROYED
|
static int |
CRIT_WEAPON_JAM
|
protected boolean |
engineHit
|
static int |
LOC_BODY
|
static int |
LOC_FRONT
|
static int |
LOC_LEFT
|
static int |
LOC_REAR
|
static int |
LOC_RIGHT
|
static int |
LOC_TURRET
|
protected boolean |
m_bHasNoTurret
|
protected boolean |
m_bTurretEverJammed
|
protected boolean |
m_bTurretJammed
|
protected boolean |
m_bTurretLocked
|
protected int |
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 | |
|---|---|
Tank()
|
|
| Method Summary | |
|---|---|
PilotingRollData |
addEntityBonuses(PilotingRollData prd)
Add in any piloting skill mods |
protected void |
addEquipment(Mounted mounted,
int loc,
boolean rearMounted)
|
void |
addJammedWeapon(Mounted weapon)
|
void |
addMovementDamage(int level)
adds minor, moderate or heavy movement system damage |
void |
applyDamage()
Applies any damage that the entity has suffered. |
void |
autoSetInternal()
Set the internal structure to the appropriate value for the mech's weight class |
int |
calculateBattleValue()
Calculates the battle value of this mech |
int |
calculateBattleValue(boolean ignoreC3,
boolean ignorePilot)
Calculates the battle value of this tank |
boolean |
canChangeSecondaryFacing()
Can this entity change secondary facing at all? |
boolean |
canCharge()
Whether this type of unit can perform charges |
boolean |
canDFA()
Whether this type of unit can perform DFA attacks |
boolean |
canGoHullDown()
|
boolean |
canSpot()
Tanks can't spot when stunned. |
int |
clipSecondaryFacing(int n)
Returns the closest valid secondary facing to the given direction. |
boolean |
doomedInAtmosphere()
|
boolean |
doomedInSpace()
|
boolean |
doomedInVacuum()
|
boolean |
doomedOnGround()
|
void |
engineHit()
apply the effects of an "engine hit" crit |
void |
extinguishAll()
extinguish all inferno fire on this Tank |
void |
extinguishLocation(int location)
|
int |
getArmorType()
|
double |
getCost(boolean ignoreAmmo)
|
int |
getCriticalEffect(int roll,
int loc)
get the type of critical caused by a critical roll, taking account of existing damage |
int |
getDependentLocation(int loc)
Gets the location that is destroyed recursively |
int |
getEngineCritHeat()
Returns extra heat generated by engine crits |
int |
getForwardArc()
see Entity.getForwardArc() |
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. |
int |
getHQIniBonus()
|
java.util.ArrayList<Mounted> |
getJammedWeapons()
|
java.lang.String[] |
getLocationAbbrs()
|
java.lang.String[] |
getLocationNames()
|
int |
getMaxElevationChange()
The maximum elevation change the entity can cross |
int |
getMaxElevationDown()
by default, entities can move as far down as they can move up |
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 |
getRearArc()
see Entity.getRearArc() |
int |
getRunMPwithoutMASC(boolean gravity,
boolean ignoreheat)
Tanks don't have MASC |
int |
getSensorHits()
|
int |
getStructureType()
|
int |
getStunnedTurns()
|
int |
getSuspensionFactor()
|
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 wn)
Returns the Compute.ARC that the weapon fires into. |
boolean |
hasArmoredEngine()
|
boolean |
hasModularArmor()
|
boolean |
hasModularArmor(int loc)
|
boolean |
hasMovementDamage()
|
boolean |
hasNoTurret()
|
boolean |
hasRearArmor(int loc)
Does this location have rear armor? |
void |
immobilize()
|
boolean |
isCommanderHit()
|
boolean |
isCommanderHitPS()
|
boolean |
isCrewHitPS()
|
boolean |
isDriverHit()
|
boolean |
isDriverHitPS()
|
boolean |
isHexProhibited(IHex hex)
Tanks have all sorts of prohibited terrain. |
boolean |
isImmobile()
Is this entity shut down or is the crew unconscious? |
boolean |
isInfernoFire()
|
boolean |
isLocationBurning(int location)
|
boolean |
isMovementHit()
|
boolean |
isMovementHitPending()
|
boolean |
isNuclearHardened()
Checks if the unit is hardened agaist nuclear strikes. |
boolean |
isOnFire()
|
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 |
isStabiliserHit(int loc)
|
boolean |
isStealthActive()
Determine if this unit has an active and working stealth system. |
boolean |
isStealthOn()
Determine if this unit has an active and working stealth system. |
boolean |
isTurretEverJammed()
|
boolean |
isTurretJammed()
|
boolean |
isTurretLocked()
|
boolean |
isValidSecondaryFacing(int n)
Can this entity torso/turret twist the given direction? |
void |
jamTurret()
|
int |
locations()
Returns the number of locations in the entity |
void |
lockTurret()
|
void |
newRound(int roundNumber)
Start a new round |
void |
resetMovementDamage()
|
void |
restore()
Restores the entity after serialization |
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 |
void |
setArmorType(int type)
|
void |
setCommanderHit(boolean hit)
|
void |
setCommanderHitPS(boolean hit)
|
void |
setCrewHitPS(boolean hit)
|
void |
setDriverHit(boolean hit)
|
void |
setDriverHitPS(boolean hit)
|
void |
setEngine(Engine e)
|
void |
setFacing(int facing)
Sets the primary facing. |
void |
setHasNoTurret(boolean b)
|
void |
setOmni(boolean omni)
OmniVehicles have handles for Battle Armor squads to latch onto. |
void |
setOnFire(boolean inferno)
|
void |
setSecondaryFacing(int sec_facing)
Sets the secondary facing. |
void |
setSensorHits(int hits)
|
void |
setStabiliserHit(int loc)
|
void |
setStructureType(int type)
|
void |
setStunnedTurns(int turns)
|
void |
stunCrew()
|
void |
unjamTurret()
|
void |
unlockTurret()
|
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 |
|---|
protected boolean m_bHasNoTurret
protected boolean m_bTurretLocked
protected boolean m_bTurretJammed
protected boolean m_bTurretEverJammed
protected int movementDamage
protected boolean engineHit
public static final int LOC_BODY
public static final int LOC_FRONT
public static final int LOC_RIGHT
public static final int LOC_LEFT
public static final int LOC_REAR
public static final int LOC_TURRET
public static final int CRIT_NONE
public static final int CRIT_DRIVER
public static final int CRIT_WEAPON_JAM
public static final int CRIT_WEAPON_DESTROYED
public static final int CRIT_STABILIZER
public static final int CRIT_SENSOR
public static final int CRIT_COMMANDER
public static final int CRIT_CREW_KILLED
public static final int CRIT_CREW_STUNNED
public static final int CRIT_CARGO
public static final int CRIT_ENGINE
public static final int CRIT_FUEL_TANK
public static final int CRIT_AMMO
public static final int CRIT_TURRET_JAM
public static final int CRIT_TURRET_LOCK
public static final int CRIT_TURRET_DESTROYED
| Constructor Detail |
|---|
public Tank()
| Method Detail |
|---|
public java.lang.String[] getLocationAbbrs()
getLocationAbbrs in class Entitypublic java.lang.String[] getLocationNames()
getLocationNames in class Entitypublic boolean hasNoTurret()
public void setHasNoTurret(boolean b)
public int getWalkMP(boolean gravity,
boolean ignoreheat)
getWalkMP in class Entitygravity - Should the movement be factored for gravityignoreheat - Should heat be ignored?public boolean isTurretLocked()
public boolean isTurretJammed()
public int locations()
locations in class Entitypublic boolean canChangeSecondaryFacing()
Entity
canChangeSecondaryFacing in class Entitypublic boolean isValidSecondaryFacing(int n)
Entity
isValidSecondaryFacing in class Entitypublic int clipSecondaryFacing(int n)
Entity
clipSecondaryFacing in class Entitypublic void setSecondaryFacing(int sec_facing)
Entity
setSecondaryFacing in class Entitypublic void setFacing(int facing)
Entity
setFacing in class Entitypublic boolean isStabiliserHit(int loc)
public void setStabiliserHit(int loc)
public int getSensorHits()
public void setSensorHits(int hits)
public boolean isDriverHit()
public void setDriverHit(boolean hit)
public boolean isCommanderHit()
public void setCommanderHit(boolean hit)
public boolean isDriverHitPS()
public void setDriverHitPS(boolean hit)
public boolean isCommanderHitPS()
public void setCommanderHitPS(boolean hit)
public boolean isCrewHitPS()
public void setCrewHitPS(boolean hit)
public boolean isMovementHit()
public boolean isMovementHitPending()
public void immobilize()
public boolean isImmobile()
Entity
isImmobile in interface TargetableisImmobile in class Entitypublic boolean isHexProhibited(IHex hex)
isHexProhibited in class Entitypublic void lockTurret()
public void jamTurret()
public void unjamTurret()
public boolean isTurretEverJammed()
public int getStunnedTurns()
public void setStunnedTurns(int turns)
public void stunCrew()
public void applyDamage()
Entity
applyDamage in class Entitypublic void newRound(int roundNumber)
Entity
newRound in interface RoundUpdatednewRound in class EntityroundNumber - the int number of the new roundpublic java.lang.String getMovementString(EntityMovementType mtype)
getMovementString in class Entitypublic java.lang.String getMovementAbbr(EntityMovementType mtype)
getMovementAbbr in class Entitypublic boolean hasRearArmor(int loc)
Entity
hasRearArmor in class Entitypublic int getWeaponArc(int wn)
getWeaponArc in class Entitypublic boolean isSecondaryArcWeapon(int weaponId)
isSecondaryArcWeapon in class Entity
public HitData rollHitLocation(int table,
int side,
int aimedLocation,
int aimingMode)
rollHitLocation in class Entity
public HitData rollHitLocation(int table,
int side)
Entity
rollHitLocation in class Entitypublic HitData getTransferLocation(HitData hit)
getTransferLocation in class Entitypublic int getDependentLocation(int loc)
getDependentLocation in class Entitypublic int calculateBattleValue()
calculateBattleValue in class Entity
public int calculateBattleValue(boolean ignoreC3,
boolean ignorePilot)
calculateBattleValue in class EntityignoreC3 - 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 Entitypublic java.util.Vector<Report> victoryReport()
Entity
victoryReport in class Entitypublic int[] getNoOfSlots()
getNoOfSlots in class Entity
public int getRunMPwithoutMASC(boolean gravity,
boolean ignoreheat)
getRunMPwithoutMASC in class Entitypublic int getHeatCapacity()
Entity
getHeatCapacity in class Entitypublic int getHeatCapacityWithWater()
Entity
getHeatCapacityWithWater in class Entitypublic int getEngineCritHeat()
Entity
getEngineCritHeat in class Entitypublic void autoSetInternal()
Entity
autoSetInternal in class Entitypublic int getMaxElevationChange()
Entity
getMaxElevationChange in class Entitypublic int getMaxElevationDown()
Entity
getMaxElevationDown in class Entitypublic boolean isRepairable()
isRepairable in class Entityboolean 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 void restore()
restore in class Entitypublic boolean canCharge()
Entity
canCharge in class Entitypublic boolean canDFA()
Entity
canDFA in class Entitypublic int getArmorType()
getArmorType in class Entitypublic void setArmorType(int type)
setArmorType in class Entitypublic int getStructureType()
getStructureType in class Entitypublic void setStructureType(int type)
setStructureType in class Entitypublic int getSuspensionFactor()
public double getCost(boolean ignoreAmmo)
getCost in class Entitypublic boolean doomedInVacuum()
doomedInVacuum in class Entitypublic boolean doomedOnGround()
doomedOnGround in class Entitypublic boolean doomedInAtmosphere()
doomedInAtmosphere in class Entitypublic boolean doomedInSpace()
doomedInSpace in class Entitypublic boolean canGoHullDown()
canGoHullDown in class Entitypublic void setOnFire(boolean inferno)
public boolean isOnFire()
public boolean isInfernoFire()
public boolean isLocationBurning(int location)
public void extinguishLocation(int location)
public void extinguishAll()
public void addMovementDamage(int level)
level - a int representing minor damage (1),
moderate damage (2), or heavy damage (3)public void setEngine(Engine e)
public boolean isNuclearHardened()
Entity
isNuclearHardened in class Entity
protected void addEquipment(Mounted mounted,
int loc,
boolean rearMounted)
throws LocationFullException
addEquipment in class EntityLocationFullException
public int getCriticalEffect(int roll,
int loc)
roll - the final dice rollloc - the hit location
public void setOmni(boolean omni)
Entity#setOmni(boolean)
setOmni in class Entitypublic boolean canSpot()
canSpot in class Entitypublic void addJammedWeapon(Mounted weapon)
public java.util.ArrayList<Mounted> getJammedWeapons()
public void engineHit()
public boolean hasModularArmor()
hasModularArmor in class Entitypublic boolean hasModularArmor(int loc)
hasModularArmor in class Entitypublic int getTotalCommGearTons()
getTotalCommGearTons in class Entitypublic int getHQIniBonus()
getHQIniBonus in class Entitypublic boolean hasArmoredEngine()
hasArmoredEngine in class Entitypublic int getForwardArc()
Entity.getForwardArc()
getForwardArc in class Entitypublic int getRearArc()
Entity.getRearArc()
getRearArc in class Entitypublic boolean hasMovementDamage()
public void resetMovementDamage()
public void unlockTurret()
public boolean isStealthActive()
isStealthActive in class Entitytrue if this unit has a stealth system that is
currently active, false if there is no stealth
system or if it is inactive.public boolean isStealthOn()
isStealthOn in class Entitytrue if this unit has a stealth system that is
currently active, false if there is no stealth
system or if it is inactive.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||