|
|||||||||
| 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.Mech
public abstract class Mech
You know what mechs are, silly.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class megamek.common.Entity |
|---|
Entity.EntityFluff |
| Field Summary | |
|---|---|
static int |
ACTUATOR_FOOT
|
static int |
ACTUATOR_HAND
|
static int |
ACTUATOR_HIP
|
static int |
ACTUATOR_LOWER_ARM
|
static int |
ACTUATOR_LOWER_LEG
|
static int |
ACTUATOR_SHOULDER
|
static int |
ACTUATOR_UPPER_ARM
|
static int |
ACTUATOR_UPPER_LEG
|
static int |
COCKPIT_AIMED_SHOT
|
static int |
COCKPIT_COMMAND_CONSOLE
|
static int |
COCKPIT_DUAL
|
static int |
COCKPIT_INDUSTRIAL
|
static int |
COCKPIT_OFF
|
static int |
COCKPIT_ON
|
static int |
COCKPIT_PRIMITIVE
|
static int |
COCKPIT_PRIMITIVE_INDUSTRIAL
|
static java.lang.String[] |
COCKPIT_SHORT_STRING
|
static int |
COCKPIT_SMALL
|
static int |
COCKPIT_STANDARD
|
static java.lang.String[] |
COCKPIT_STRING
|
static int |
COCKPIT_TORSO_MOUNTED
|
static int |
COCKPIT_UNKNOWN
|
static java.lang.String |
FULL_HEAD_EJECT_STRING
|
static int |
GYRO_COMPACT
|
static int |
GYRO_HEAVY_DUTY
|
static java.lang.String[] |
GYRO_SHORT_STRING
|
static int |
GYRO_STANDARD
|
static java.lang.String[] |
GYRO_STRING
|
static int |
GYRO_UNKNOWN
|
static int |
GYRO_XL
|
static int |
HAS_FALSE
|
static int |
HAS_TRUE
|
static int |
HAS_UNKNOWN
|
static int |
JUMP_BOOSTER
|
static int |
JUMP_DISPOSABLE
|
static int |
JUMP_IMPROVED
|
static int |
JUMP_NONE
|
static int |
JUMP_STANDARD
|
static int |
JUMP_UNKNOWN
|
static int |
LOC_CT
|
static int |
LOC_HEAD
|
static int |
LOC_LARM
|
static int |
LOC_LLEG
|
static int |
LOC_LT
|
static int |
LOC_RARM
|
static int |
LOC_RLEG
|
static int |
LOC_RT
|
static int |
NUM_MECH_LOCATIONS
|
static int |
SYSTEM_COCKPIT
|
static int |
SYSTEM_ENGINE
|
static int |
SYSTEM_GYRO
|
static int |
SYSTEM_LIFE_SUPPORT
|
static int |
SYSTEM_SENSORS
|
static java.lang.String[] |
systemNames
|
| 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 | |
|---|---|
Mech()
Construct a new, blank, mech. |
|
Mech(int inGyroType,
int inCockpitType)
|
|
| Method Summary | |
|---|---|
void |
addClanCase()
Adds clan CASE in every location |
boolean |
addCockpit()
Add the critical slots necessary for a standard cockpit. |
boolean |
addCommandConsole()
Dual Cockpits need to be implemented everywhere except here. |
boolean |
addCompactGyro()
Add the critical slots necessary for a compact gyro. |
void |
addCoolantFailureAmount(int amount)
|
boolean |
addDualCockpit()
Dual Cockpits need to be implemented everywhere except here. |
boolean |
addEngineCrits()
Add the critical slots necessary for the mek's engine. |
void |
addEngineSinks(int totalSinks,
boolean dblSinks)
Adds heat sinks to the engine. |
void |
addEngineSinks(int totalSinks,
boolean dblSinks,
boolean clan)
Adds heat sinks to the engine. |
void |
addEngineSinks(int totalSinks,
java.lang.String sinkName)
base for adding engine sinks. |
void |
addEngineSinks(java.lang.String sinkName,
int toAllocate)
add heat sinks into the engine |
PilotingRollData |
addEntityBonuses(PilotingRollData roll)
Add in any piloting skill mods |
void |
addEquipment(Mounted mounted,
int loc,
boolean rearMounted)
Mounts the specified weapon in the specified location. |
boolean |
addGyro()
Add the critical slots necessary for a standard gyro. |
boolean |
addHeavyDutyGyro()
Add the critical slots necessary for a heavy-duty gyro. |
boolean |
addIndustrialCockpit()
Add the critical slots necessary for an industrial cockpit. |
boolean |
addIndustrialPrimitiveCockpit()
Add the critical slots necessary for an industrial primitive cockpit. |
boolean |
addPrimitiveCockpit()
Add the critical slots necessary for an industrial cockpit. |
boolean |
addSmallCockpit()
Add the critical slots necessary for a small cockpit. |
boolean |
addTorsoMountedCockpit()
Add the critical slots necessary for a torso-mounted cockpit. |
boolean |
addXLGyro()
Add the critical slots necessary for an extra-light gyro. |
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 mech. |
protected int |
calculateWalk()
Used to set this Mech's original walk mp |
boolean |
canAssaultDrop()
|
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 |
abstract boolean |
cannotStandUpFromHullDown()
|
boolean |
checkForMASCFailure(MovePath md,
java.util.Vector<Report> vDesc,
java.util.HashMap<java.lang.Integer,CriticalSlot> vCriticals)
This function cheks for masc failure. |
void |
checkUnstall(java.util.Vector<Report> vPhaseReport)
check for unstalling of this Entity's engine (only used for ICE industrial Mechs) |
void |
clearCockpitCrits()
Remove all cockpit critical slots from the mek. |
void |
clearEngineCrits()
Remove all engine critical slots from the mek. |
void |
clearGyroCrits()
Remove all gyro critical slots from the mek. |
int |
clipSecondaryFacing(int dir)
Return the nearest valid direction to torso twist in |
int |
countBadLegs()
Count the number of destroyed or breached legs on the mech |
int |
countLegActuatorCrits(int loc)
Count non-hip leg actuator crits |
int |
damageCowl(int amount)
Damage the cowl. |
void |
destroyLocation(int loc)
Marks all equipment in a location on this entity as destroyed. |
java.util.Vector<Report> |
doCheckEngineStallRoll(java.util.Vector<Report> vPhaseReport)
possibly do a ICE-Engine stall PSR, only industrialmechs will actually do such a roll |
boolean |
doomedInAtmosphere()
|
boolean |
doomedInSpace()
|
boolean |
doomedInVacuum()
|
boolean |
doomedOnGround()
|
int |
getActiveSinks()
|
int |
getActiveSinksNextRound()
|
protected double |
getActuatorCost()
|
protected abstract double |
getArmActuatorCost()
|
int |
getArmor(int loc,
boolean rear)
Returns the amount of armor in the location specified. |
double |
getArmoredComponentBV()
|
int |
getBARRating()
Return the BAR-rating of this Entity's armor |
int |
getBattleForceArmorPoints()
|
long |
getBattleForceJumpPoints()
|
long |
getBattleForceMovementPoints()
|
int |
getBattleForcePoints()
Start of Battle Force Conversion Methods |
int |
getBattleForceSize()
|
java.lang.String |
getBattleForceSpecialAbilites()
|
int |
getBattleForceStandardWeaponsDamage(int range,
int ammoType,
boolean ignoreHeat,
boolean ignoreSpecialAbility)
|
int |
getBattleForceStructurePoints()
this will be unit specific |
static java.lang.String |
getCockpitDisplayString(int inType)
|
int |
getCockpitStatus()
|
int |
getCockpitStatusNextRound()
|
int |
getCockpitType()
|
static int |
getCockpitTypeForString(java.lang.String inType)
|
java.lang.String |
getCockpitTypeString()
|
static java.lang.String |
getCockpitTypeString(int inCockpitType)
|
int |
getCoolantFailureAmount()
|
double |
getCost(boolean ignoreAmmo)
|
double |
getCost(java.lang.StringBuffer detail,
boolean ignoreAmmo)
Calculate the C-bill cost of the mech. |
int |
getCowlArmor()
|
int |
getDependentLocation(int loc)
Gets the location that is destroyed recursively |
int |
getElevation()
Returns the elevation of this entity. |
int |
getEngineCritHeat()
Returns extra heat generated by engine crits |
int |
getGrappled()
|
int |
getGrappleSide()
|
static java.lang.String |
getGyroDisplayString(int inType)
|
double |
getGyroMultiplier()
|
int |
getGyroType()
Only Mechs have Gyros but this helps keep the code a bit cleaner. |
static int |
getGyroTypeForString(java.lang.String inType)
|
static java.lang.String |
getGyroTypeShortString(int inGyroType)
|
java.lang.String |
getGyroTypeString()
|
static java.lang.String |
getGyroTypeString(int inGyroType)
|
int |
getHeatCapacity()
Returns the about of heat that the entity can sink each turn. |
int |
getHeatCapacity(boolean includePartialWing)
|
int |
getHeatCapacityWithWater()
Returns the about of heat that the entity can sink each turn, factoring for water. |
int |
getHQIniBonus()
|
static int |
getInnerLocation(int location)
Returns the location that transferred damage or crits will go to from a given location. |
int |
getJumpHeat(int movedMP)
get the heat generated by this Entity when jumping for a certain amount of MP |
int |
getJumpMP()
This mech's jumping MP modified for missing jump jets and gravity |
int |
getJumpMP(boolean gravity)
This mech's jumping MP modified for missing jump jets and possibly gravity |
int |
getJumpMPWithTerrain()
Returns this mech's jumping MP, modified for missing & underwater jets and gravity. |
int |
getJumpType()
Returns the type of jump jet system the mech has. |
protected abstract double |
getLegActuatorCost()
|
int |
getLevelsFallen()
how many levels did this mech fall this turn? |
Mounted |
getMASC()
get non-supercharger MASC mounted on this mech |
int |
getMASCTarget()
|
int |
getMASCTurns()
Get the number of turns MASC has been used continuously. |
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. |
java.lang.String |
getMtf()
Get an '.mtf' file representation of the mech. |
int |
getNumberOfSinks()
|
int |
getOArmor(int loc,
boolean rear)
Returns the original amount of armor in the location specified. |
int |
getOriginalRunMPwithoutMASC()
|
int |
getOriginalSprintMPwithoutMASC()
|
int |
getPartialWingJumpBonus(Mounted mount)
Gives the bonus to Jump MP conferred by a mech partial wing. |
int |
getRunHeat()
Depends on engine type |
int |
getRunMP(boolean gravity,
boolean ignoreheat)
|
java.lang.String |
getRunMPasString()
Returns this entity's running/flank mp as a string. |
int |
getRunMPwithoutMASC(boolean gravity,
boolean ignoreheat)
Returns run MP without considering MASC, optionally figuring in gravity and possibly ignoring heat |
int |
getRunningGravityLimit()
get the gravity limit for ground movement |
int |
getSprintHeat()
Depends on engine type |
int |
getSprintMP()
Returns this entity's running/flank mp modified for heat and gravity. |
int |
getSprintMP(boolean gravity,
boolean ignoreheat)
|
java.lang.String |
getSprintMPasString()
Returns this entity's Sprint mp as a string. |
int |
getSprintMPwithoutMASC()
Returns sprint MP without considering MASC |
int |
getSprintMPwithoutMASC(boolean gravity,
boolean ignoreheat)
Returns sprint MP without considering MASC, optionally figuring in gravity and possibly ignoring heat |
int |
getStandingHeat()
get the heat generated by this Entity when standing still |
TargetRoll |
getStealthModifier(int range,
Entity ae)
Determine the stealth modifier for firing at this unit from the given range. |
Mounted |
getSuperCharger()
get a supercharger mounted on this mech |
java.lang.String |
getSystemName(int index)
|
int |
getTotalCommGearTons()
|
HitData |
getTransferLocation(HitData hit)
Gets the location that excess damage transfers to |
int |
getWalkHeat()
get the heat generated by this Entity when walking/cruising |
int |
getWeaponArc(int wn)
Returns the Compute.ARC that the weapon fires into. |
boolean |
hasActiveEiCockpit()
|
boolean |
hasArmedMASC()
Checks if a mech has an armed MASC system. |
boolean |
hasArmedMASCAndSuperCharger()
checks if a mech has both a normal armed MASC system and a armed super- charger. |
boolean |
hasArmoredCockpit()
|
boolean |
hasArmoredEngine()
|
boolean |
hasArmoredGyro()
|
boolean |
hasCASEII(int location)
Only Meks have CASE II so all other entites return false. |
boolean |
hasChameleonShield()
does this mech have a chameleon light polarization shield? |
boolean |
hasCompositeStructure()
does this mech have composite internal structure? |
boolean |
hasCowl()
|
boolean |
hasDoubleHeatSinks()
|
boolean |
hasEiCockpit()
|
boolean |
hasExtendedRetractableBlade()
Does this mech have an extended retractable blade in working condition? |
boolean |
hasFullHeadEject()
|
boolean |
hasHarJelIn(int loc)
Does this mech have an undamaged HarJel system in this location? |
boolean |
hasHipCrit()
Returns true if the entity has a hip crit. |
boolean |
hasIndustrialTSM()
does this mech have industrial TSM= |
boolean |
hasJumpBoosters()
does this mech have working jump boosters? |
boolean |
hasLaserHeatSinks()
|
boolean |
hasMASC()
does this mech mount MASC? |
boolean |
hasMASCAndSuperCharger()
checks if a mech has both a normal MASC system and a supercharger, regardless of arming status |
boolean |
hasModularArmor()
|
boolean |
hasModularArmor(int loc)
|
boolean |
hasNullSig()
does this mech have a null-sig-system? |
boolean |
hasRearArmor(int loc)
Does this location have rear armor? |
boolean |
hasReinforcedStructure()
does this mech have reinforced internal structure? |
boolean |
hasRetractedBlade(int loc)
Does the entity have a retracted blade in the given location? |
boolean |
hasTracks()
does this mech have tracks? |
boolean |
hasTSM()
does this mech have TSM? |
boolean |
hasVoidSig()
does this mech have a void-sig-system? |
int |
heatSinks()
Returns the number of heat sinks, functional or not. |
int |
height()
Return the height of this mech above the terrain. |
void |
initializeRearArmor(int val,
int loc)
Initializes the rear armor on the mech. |
boolean |
isArm(int loc)
Is the passed in location an arm? |
boolean |
isAutoEject()
|
boolean |
isCarefulStand()
|
boolean |
isChameleonShieldActive()
Does the mech have a functioning Chameleon Light Polarization Field? |
boolean |
isCheckForCrit()
should this mech check for a critical hit at the end of turn due to being an industrial mech and having been the target of a succesfull physical attack or for falling |
boolean |
isEligibleForMovement()
Pretty much anybody's eligible for movement. |
boolean |
isGrappleAttacker()
|
boolean |
isHexProhibited(IHex hex)
Returns true if the specified hex contains some sort of prohibited terrain. |
boolean |
isIndustrial()
Is this an Industrial Mech? |
boolean |
isJustMovedIntoIndustrialKillingWater()
did this mech just moved into water that would kill it because we lack environmental sealing? |
boolean |
isMASCUsed()
Determine if MASC has been used this turn. |
boolean |
isNuclearHardened()
Checks if the unit is hardened agaist nuclear strikes. |
boolean |
isNullSigActive()
Does the mech have a functioning null signature system? |
boolean |
isPrimitive()
Is this a primitive Mech? |
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 |
isShutDown()
|
boolean |
isStalled()
Is this Entity's ICE Engine stalled? |
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 |
isSystemIntact(int system)
This function returns true iff the system is in perfect condition. |
boolean |
isValidSecondaryFacing(int dir)
Can this mech torso twist in the given direction? |
boolean |
isVoidSigActive()
Does the mech have a functioning void signature system? |
static int |
leastRestrictiveLoc(int location1,
int location2)
find the least restrictive location of the two locations passed in |
boolean |
legHasHipCrit(int loc)
Return true is the location is a leg and has a hip crit |
boolean |
locationIsLeg(int loc)
Returns true if the location in question is a leg |
boolean |
locationIsTorso(int loc)
Returns true if the location in question is a torso location |
int |
locations()
Returns the number of locations in the entity |
static int |
mostRestrictiveLoc(int location1,
int location2)
Returns the location with the most restrictive firing arc for a weapon. |
void |
newRound(int roundNumber)
Start a new round |
boolean |
removePartialCoverHits(int location,
int cover,
int side)
|
void |
resetSinks()
|
static int |
restrictScore(int location)
Helper function designed to give relative restrictiveness of locations. |
HitData |
rollHitLocation(int table,
int side)
Rolls up a hit location |
HitData |
rollHitLocation(int table,
int side,
int aimedLocation,
int aimingMode)
Rolls the to-hit number |
void |
setActiveSinksNextRound(int sinks)
|
void |
setArmor(int val,
int loc,
boolean rear)
Sets the amount of armor in the location specified. |
void |
setAutoEject(boolean autoEject)
|
void |
setCheckForCrit(boolean check)
|
void |
setCockpitStatus(int state)
|
void |
setCockpitType(int type)
|
void |
setEngine(Engine e)
set this mech's Engine |
void |
setFullHeadEject(boolean fullHeadEject)
|
void |
setGameOptions()
|
void |
setGrappled(int id,
boolean attacker)
|
void |
setGrappleSide(int side)
|
void |
setGyroType(int type)
|
abstract void |
setInternal(int head,
int ct,
int t,
int arm,
int leg)
Sets the internal structure for the mech. |
void |
setJustMovedIntoIndustrialKillingWater(boolean moved)
set if this mech just moved into water that would kill it because of the lack of environmental sealing |
void |
setLevelsFallen(int levels)
|
void |
setMASCTurns(int turns)
Set the number of turns MASC has been used continuously. |
void |
setMASCUsed(boolean used)
Set whether MASC has been used. |
void |
setOmni(boolean omni)
OmniMechs have handles for Battle Armor squads to latch onto. |
void |
setStalled(boolean stalled)
Set if this Mech's ICE Engine is stalled or not should only be used for industrial mechs carrying an ICE engine |
int |
shieldAbsorptionDamage(int damage,
int location,
boolean rear)
|
boolean |
shouldDieAtEndOfTurnBecauseOfWater()
should this mech die at the end of turn because it's an IndustrialMech without environmental sealing that moved into water last round and stayed there? |
protected HitData |
tac(int table,
int side,
int location,
boolean rear)
Called when a thru-armor-crit is rolled. |
int |
torsoJumpJets()
Returns the number of (working) jump jets mounted in the torsos. |
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 NUM_MECH_LOCATIONS
public static final int SYSTEM_LIFE_SUPPORT
public static final int SYSTEM_SENSORS
public static final int SYSTEM_COCKPIT
public static final int SYSTEM_ENGINE
public static final int SYSTEM_GYRO
public static final int ACTUATOR_SHOULDER
public static final int ACTUATOR_UPPER_ARM
public static final int ACTUATOR_LOWER_ARM
public static final int ACTUATOR_HAND
public static final int ACTUATOR_HIP
public static final int ACTUATOR_UPPER_LEG
public static final int ACTUATOR_LOWER_LEG
public static final int ACTUATOR_FOOT
public static final java.lang.String[] systemNames
public static final int LOC_HEAD
public static final int LOC_CT
public static final int LOC_RT
public static final int LOC_LT
public static final int LOC_RARM
public static final int LOC_LARM
public static final int LOC_RLEG
public static final int LOC_LLEG
public static final int COCKPIT_OFF
public static final int COCKPIT_ON
public static final int COCKPIT_AIMED_SHOT
public static final int GYRO_UNKNOWN
public static final int GYRO_STANDARD
public static final int GYRO_XL
public static final int GYRO_COMPACT
public static final int GYRO_HEAVY_DUTY
public static final java.lang.String[] GYRO_STRING
public static final java.lang.String[] GYRO_SHORT_STRING
public static final int COCKPIT_UNKNOWN
public static final int COCKPIT_STANDARD
public static final int COCKPIT_INDUSTRIAL
public static final int COCKPIT_PRIMITIVE
public static final int COCKPIT_PRIMITIVE_INDUSTRIAL
public static final int COCKPIT_SMALL
public static final int COCKPIT_COMMAND_CONSOLE
public static final int COCKPIT_TORSO_MOUNTED
public static final int COCKPIT_DUAL
public static final java.lang.String[] COCKPIT_STRING
public static final java.lang.String[] COCKPIT_SHORT_STRING
public static final java.lang.String FULL_HEAD_EJECT_STRING
public static final int JUMP_UNKNOWN
public static final int JUMP_NONE
public static final int JUMP_STANDARD
public static final int JUMP_IMPROVED
public static final int JUMP_BOOSTER
public static final int JUMP_DISPOSABLE
public static final int HAS_FALSE
public static final int HAS_UNKNOWN
public static final int HAS_TRUE
| Constructor Detail |
|---|
public Mech()
public Mech(int inGyroType,
int inCockpitType)
| Method Detail |
|---|
public abstract boolean cannotStandUpFromHullDown()
public int getCowlArmor()
public boolean hasCowl()
public int damageCowl(int amount)
amount -
public static int getInnerLocation(int location)
public static int mostRestrictiveLoc(int location1,
int location2)
public static int leastRestrictiveLoc(int location1,
int location2)
location1 - location2 -
public static int restrictScore(int location)
public int getMASCTurns()
int number of turns MASC has been used.public void setMASCTurns(int turns)
turns - The int number of turns MASC has been used.public boolean isMASCUsed()
true if MASC has been used.public void setMASCUsed(boolean used)
used - The boolean whether MASC has been used.public int getMASCTarget()
public boolean checkForMASCFailure(MovePath md,
java.util.Vector<Report> vDesc,
java.util.HashMap<java.lang.Integer,CriticalSlot> vCriticals)
md - the movement path.vDesc - the description off the masc failure. used as output.vCriticals - contains tuple of intiger and critical slot. used as output.
public void setOmni(boolean omni)
Entity#setOmni(boolean)
setOmni in class Entitypublic int locations()
locations in class Entitypublic void newRound(int roundNumber)
Entity
newRound in interface RoundUpdatednewRound in class EntityroundNumber - the int number of the new roundpublic boolean locationIsTorso(int loc)
public boolean locationIsLeg(int loc)
locationIsLeg in class Entityloc - the location to check.public int countBadLegs()
public boolean hasHipCrit()
hasHipCrit in class Entitypublic boolean legHasHipCrit(int loc)
public boolean isSystemIntact(int system)
system - the system to check
public int countLegActuatorCrits(int loc)
public boolean hasCompositeStructure()
public boolean hasReinforcedStructure()
public boolean hasMASC()
public boolean hasMASCAndSuperCharger()
public boolean hasJumpBoosters()
public Mounted getMASC()
public Mounted getSuperCharger()
public boolean hasArmedMASC()
public boolean hasArmedMASCAndSuperCharger()
public boolean hasExtendedRetractableBlade()
public boolean hasRetractedBlade(int loc)
public boolean hasTSM()
public boolean hasIndustrialTSM()
public boolean hasNullSig()
public boolean hasVoidSig()
public boolean hasTracks()
public boolean hasChameleonShield()
public int getStandingHeat()
Entity
getStandingHeat in class Entitypublic void setEngine(Engine e)
Engine
e - the Engine to setprotected int calculateWalk()
public int getWalkHeat()
Entity
getWalkHeat in class Entity
public int getRunMP(boolean gravity,
boolean ignoreheat)
getRunMP in class Entity
public int getRunMPwithoutMASC(boolean gravity,
boolean ignoreheat)
Entity
getRunMPwithoutMASC in class Entitypublic int getOriginalRunMPwithoutMASC()
public java.lang.String getRunMPasString()
getRunMPasString in class Entitypublic int getRunHeat()
getRunHeat in class Entitypublic int getSprintMP()
Entity
getSprintMP in class Entity
public int getSprintMP(boolean gravity,
boolean ignoreheat)
getSprintMP in class Entitypublic int getSprintMPwithoutMASC()
Entity
getSprintMPwithoutMASC in class Entity
public int getSprintMPwithoutMASC(boolean gravity,
boolean ignoreheat)
Entity
getSprintMPwithoutMASC in class Entitypublic int getOriginalSprintMPwithoutMASC()
public java.lang.String getSprintMPasString()
getSprintMPasString in class Entitypublic int getRunningGravityLimit()
Entity
getRunningGravityLimit in class Entitypublic int getSprintHeat()
getSprintHeat in class Entitypublic int getJumpMP()
getJumpMP in class Entitypublic int getJumpMP(boolean gravity)
getJumpMP in class Entitypublic int getPartialWingJumpBonus(Mounted mount)
mount - The mounted location of the Wing
public int getJumpType()
getJumpType in class Entitypublic int getJumpHeat(int movedMP)
Entity
getJumpHeat in class EntitymovedMP - the number of movement points spentpublic int getJumpMPWithTerrain()
getJumpMPWithTerrain in class Entitypublic int torsoJumpJets()
public int getElevation()
getElevation in interface TargetablegetElevation in class Entitypublic int height()
height in class Entity
public void addEngineSinks(int totalSinks,
boolean dblSinks)
public void addEngineSinks(int totalSinks,
boolean dblSinks,
boolean clan)
public void addEngineSinks(int totalSinks,
java.lang.String sinkName)
totalSinks - the amount of heatsinks to add to the enginesinkName - the String determining the type of heatsink to
add. must be a lookupname of a heatsinktype
public void addEngineSinks(java.lang.String sinkName,
int toAllocate)
sinkName - the String determining the type of heatsink to
add. must be a lookupname of a heatsinktypetoAllocate - Number of hs to add to the Engine.public int getEngineCritHeat()
getEngineCritHeat in class Entitypublic int heatSinks()
public int getHeatCapacity()
getHeatCapacity in class Entitypublic int getHeatCapacity(boolean includePartialWing)
public int getHeatCapacityWithWater()
getHeatCapacityWithWater in class Entitypublic java.lang.String getMovementString(EntityMovementType mtype)
getMovementString in class Entitypublic java.lang.String getMovementAbbr(EntityMovementType mtype)
getMovementAbbr in class Entitypublic boolean canChangeSecondaryFacing()
Entity
canChangeSecondaryFacing in class Entitypublic boolean isValidSecondaryFacing(int dir)
isValidSecondaryFacing in class Entitypublic int clipSecondaryFacing(int dir)
clipSecondaryFacing in class Entitypublic boolean hasRearArmor(int loc)
Entity
hasRearArmor in class Entity
public int getArmor(int loc,
boolean rear)
getArmor in class Entity
public int getOArmor(int loc,
boolean rear)
getOArmor in class Entityloc - the location to check.rear - if true inspect the rear armor, else check the front.
public void setArmor(int val,
int loc,
boolean rear)
setArmor in class Entityval - the value of the armor (eg how many armor points)loc - the location of the armorrear - true iff the armor is rear mounted.
public void initializeRearArmor(int val,
int loc)
public int getWeaponArc(int wn)
getWeaponArc in class Entitypublic boolean isSecondaryArcWeapon(int weaponId)
isSecondaryArcWeapon in class Entity
public HitData rollHitLocation(int table,
int side)
Entity
rollHitLocation in class Entity
public HitData rollHitLocation(int table,
int side,
int aimedLocation,
int aimingMode)
Entity
rollHitLocation in class Entity
protected HitData tac(int table,
int side,
int location,
boolean rear)
public HitData getTransferLocation(HitData hit)
getTransferLocation in class Entitypublic int getDependentLocation(int loc)
getDependentLocation in class Entity
public abstract void setInternal(int head,
int ct,
int t,
int arm,
int leg)
head - headct - center torsot - right/left torsoarm - right/left armleg - right/left legpublic void autoSetInternal()
autoSetInternal in class Entitypublic void addClanCase()
public void addEquipment(Mounted mounted,
int loc,
boolean rearMounted)
throws LocationFullException
addEquipment in class EntityLocationFullExceptionpublic 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 double getCost(boolean ignoreAmmo)
getCost in class Entity
public double getCost(java.lang.StringBuffer detail,
boolean ignoreAmmo)
detail - buffer to append the detailed cost report to
protected double getActuatorCost()
protected abstract double getArmActuatorCost()
protected abstract double getLegActuatorCost()
public java.util.Vector<Report> victoryReport()
Entity
victoryReport in class Entitypublic PilotingRollData addEntityBonuses(PilotingRollData roll)
addEntityBonuses in class Entitypublic int getMaxElevationChange()
Entity
getMaxElevationChange in class Entitypublic int getMaxElevationDown()
Entity
getMaxElevationDown in class Entitypublic 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.public boolean isNullSigActive()
isNullSigActive in class Entitytrue if this unit has a null signature system that
is currently active, false if there is no stealth
system or if it is inactive.public boolean isVoidSigActive()
isVoidSigActive in class Entitytrue if this unit has a void signature system that
is currently active, false if there is no stealth
system or if it is inactive.public boolean isChameleonShieldActive()
isChameleonShieldActive in class Entitytrue if this unit has a void signature system that
is currently active, false if there is no stealth
system or if it is inactive.
public TargetRoll getStealthModifier(int range,
Entity ae)
range is not one of the
Entity class range constants, an
IllegalArgumentException will be thrown.
Sub-classes are encouraged to override this method.
getStealthModifier in class Entityrange - - an int value that must match one of the
Compute class range constants.ae - - entity making the attack
TargetRoll value that contains the stealth
modifier for the given range.public 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 boolean canCharge()
Entity
canCharge in class Entitypublic boolean canDFA()
Entity
canDFA in class Entitypublic int getNumberOfSinks()
public boolean hasDoubleHeatSinks()
public boolean hasLaserHeatSinks()
public void setActiveSinksNextRound(int sinks)
public int getActiveSinks()
public void resetSinks()
public int getActiveSinksNextRound()
public boolean isAutoEject()
public void setAutoEject(boolean autoEject)
autoEject - The autoEject to set.
public boolean removePartialCoverHits(int location,
int cover,
int side)
removePartialCoverHits 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 hasEiCockpit()
hasEiCockpit in class Entitypublic boolean hasActiveEiCockpit()
hasActiveEiCockpit in class Entitypublic int getCockpitStatus()
public int getCockpitStatusNextRound()
public void setCockpitStatus(int state)
public int getGyroType()
Entity
getGyroType in class Entity-1public int getCockpitType()
public void setGyroType(int type)
public void setCockpitType(int type)
public java.lang.String getGyroTypeString()
public java.lang.String getCockpitTypeString()
public static java.lang.String getGyroTypeString(int inGyroType)
public static java.lang.String getGyroTypeShortString(int inGyroType)
public static java.lang.String getCockpitTypeString(int inCockpitType)
public static int getGyroTypeForString(java.lang.String inType)
public static int getCockpitTypeForString(java.lang.String inType)
public java.lang.String getSystemName(int index)
public static java.lang.String getGyroDisplayString(int inType)
public static java.lang.String getCockpitDisplayString(int inType)
public boolean canAssaultDrop()
canAssaultDrop in class Entitypublic boolean isHexProhibited(IHex hex)
Entity
isHexProhibited in class Entitypublic java.lang.String getMtf()
public boolean addCockpit()
public boolean addIndustrialCockpit()
public boolean addPrimitiveCockpit()
public boolean addIndustrialPrimitiveCockpit()
public boolean addSmallCockpit()
public boolean addCommandConsole()
public boolean addDualCockpit()
public boolean addTorsoMountedCockpit()
public boolean addGyro()
public boolean addCompactGyro()
public boolean addXLGyro()
public boolean addHeavyDutyGyro()
public boolean addEngineCrits()
public void clearEngineCrits()
public void clearCockpitCrits()
public void clearGyroCrits()
public int shieldAbsorptionDamage(int damage,
int location,
boolean rear)
public boolean hasHarJelIn(int loc)
loc - the int location to check
boolean value indicating a present HarJel system
public void setGrappled(int id,
boolean attacker)
setGrappled in class Entitypublic boolean isGrappleAttacker()
isGrappleAttacker in class Entitypublic int getGrappled()
getGrappled in class Entitypublic boolean isEligibleForMovement()
Entity
isEligibleForMovement in class Entitypublic boolean isNuclearHardened()
Entity
isNuclearHardened in class Entitypublic void destroyLocation(int loc)
Entity
destroyLocation in class Entityloc - The location that is destroyed.public boolean hasCASEII(int location)
Entity
hasCASEII in class Entitypublic void setGameOptions()
setGameOptions in class Entitypublic void setGrappleSide(int side)
setGrappleSide in class Entitypublic int getGrappleSide()
getGrappleSide in class Entitypublic boolean isCarefulStand()
isCarefulStand in class Entitypublic boolean hasModularArmor()
hasModularArmor in class Entitypublic boolean hasModularArmor(int loc)
hasModularArmor in class Entitypublic int getCoolantFailureAmount()
getCoolantFailureAmount in class Entitypublic void addCoolantFailureAmount(int amount)
addCoolantFailureAmount in class Entitypublic int getTotalCommGearTons()
getTotalCommGearTons in class Entitypublic int getHQIniBonus()
getHQIniBonus in class Entitypublic int getBARRating()
Entity
getBARRating in class Entitypublic boolean isIndustrial()
public void setJustMovedIntoIndustrialKillingWater(boolean moved)
moved - public boolean isJustMovedIntoIndustrialKillingWater()
public boolean shouldDieAtEndOfTurnBecauseOfWater()
public void setStalled(boolean stalled)
stalled - public boolean isStalled()
Entity
isStalled in class Entitypublic boolean isShutDown()
isShutDown in class Entitypublic java.util.Vector<Report> doCheckEngineStallRoll(java.util.Vector<Report> vPhaseReport)
Entity
doCheckEngineStallRoll in class EntityvPhaseReport - the Vector containing the phase reports
public void checkUnstall(java.util.Vector<Report> vPhaseReport)
Entity
checkUnstall in class EntityvPhaseReport - the Vector containing the phase reportspublic boolean isPrimitive()
public boolean hasArmoredCockpit()
public boolean hasArmoredGyro()
public boolean hasArmoredEngine()
hasArmoredEngine in class Entitypublic boolean isCheckForCrit()
public int getLevelsFallen()
public void setLevelsFallen(int levels)
public void setCheckForCrit(boolean check)
public boolean isArm(int loc)
loc -
public double getArmoredComponentBV()
public double getGyroMultiplier()
public void setFullHeadEject(boolean fullHeadEject)
public boolean hasFullHeadEject()
public int getBattleForcePoints()
getBattleForcePoints in class Entitypublic long getBattleForceMovementPoints()
getBattleForceMovementPoints in class Entitypublic long getBattleForceJumpPoints()
getBattleForceJumpPoints in class Entitypublic int getBattleForceArmorPoints()
getBattleForceArmorPoints in class Entitypublic int getBattleForceStructurePoints()
Entity
getBattleForceStructurePoints in class Entity
public int getBattleForceStandardWeaponsDamage(int range,
int ammoType,
boolean ignoreHeat,
boolean ignoreSpecialAbility)
getBattleForceStandardWeaponsDamage in class EntityignoreHeat - if set to true then heat modifier is not used on damageignoreSpecialAbility - calculate special attacks into total damage if set to true
public java.lang.String getBattleForceSpecialAbilites()
getBattleForceSpecialAbilites in class Entitypublic int getBattleForceSize()
getBattleForceSize in class Entity
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||