|
|||||||||
| 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.Infantry
megamek.common.BattleArmor
public class BattleArmor
This class represents a squad or point of battle armor equiped infantry, sometimes referred to as "Elementals". Much of the behaviour of a battle armor unit is identical to that of an infantry platoon, and is rather different than that of a Mek or Tank.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class megamek.common.Entity |
|---|
Entity.EntityFluff |
| Field Summary | |
|---|---|
static java.lang.String |
ADVANCED_STEALTH
The internal name for Advanced Stealth equipment. |
static int |
BA_MAX_MEN
/** The maximum number of men in a battle armor squad. |
static int |
CHASSIS_TYPE_BIPED
|
static int |
CHASSIS_TYPE_QUAD
|
static java.lang.String |
DISPOSABLE_NARC_AMMO
Internal name of the disposable NARC ammo pack. |
static java.lang.String |
DISPOSABLE_SRM2_AMMO
Internal name of the Inner disposable SRM2 ammo pack. |
static java.lang.String |
EXPERT_STEALTH
The internal name for Expert Stealth equipment. |
static int |
LOC_SQUAD
The location for infantry equipment. |
static int |
LOC_TROOPER_1
|
static int |
LOC_TROOPER_2
|
static int |
LOC_TROOPER_3
|
static int |
LOC_TROOPER_4
|
static int |
LOC_TROOPER_5
|
static int |
LOC_TROOPER_6
|
static int |
MANIPULATOR_ARMORED_GLOVE
|
static int |
MANIPULATOR_BASIC
|
static int |
MANIPULATOR_BASIC_MINE_CLEARANCE
|
static int |
MANIPULATOR_BATTLE
|
static int |
MANIPULATOR_BATTLE_MAGNET
|
static int |
MANIPULATOR_BATTLE_VIBRO
|
static int |
MANIPULATOR_CARGO_LIFTER
|
static int |
MANIPULATOR_HEAVY_BATTLE
|
static int |
MANIPULATOR_HEAVY_BATTLE_VIBRO
|
static int |
MANIPULATOR_INDUSTRIAL_DRILL
|
static int |
MANIPULATOR_NONE
|
static int |
MANIPULATOR_SALVAGE_ARM
|
static java.lang.String[] |
MANIPULATOR_TYPE_STRINGS
|
static java.lang.String |
MIMETIC_CAMO
The internal name for Mimetic Camo equipment. |
static java.lang.String |
MINE_LAUNCHER
The internal name for the Mine Launcher weapon. |
static java.lang.String |
SIMPLE_CAMO
The internal name for Simple Camo equipment. |
static java.lang.String |
SINGLE_HEX_ECM
The internal name for Single-Hex ECM equipment. |
static java.lang.String |
STEALTH
The internal name for Stealth equipment. |
| Fields inherited from class megamek.common.Infantry |
|---|
DUG_IN_COMPLETE, DUG_IN_FORTIFYING1, DUG_IN_FORTIFYING2, DUG_IN_NONE, DUG_IN_WORKING, INF_PLT_CLAN_MAX_MEN, INF_PLT_FOOT_MAX_MEN, INF_PLT_JUMP_MAX_MEN, INF_PLT_MAX_MEN, LEG_ATTACK, LOC_FIELD_GUNS, LOC_INFANTRY, squadn, STOP_SWARM, SWARM_MEK, turnsLayingExplosives |
| 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 | |
|---|---|
BattleArmor()
Generate a new, blank, battle armor unit. |
|
| Method Summary | |
|---|---|
protected void |
addEquipment(Mounted mounted,
int loc,
boolean rearMounted)
Mounts the specified equipment in the specified location. |
void |
applyDamage()
Update the unit to reflect damages taken in this phase. |
void |
autoSetInternal()
Set the troopers in the unit to the appropriate values. |
int |
calculateBattleValue(boolean ignoreC3,
boolean ignorePilot)
Calculates the battle value of this platoon. |
int |
calculateBattleValue(boolean ignoreC3,
boolean ignorePilot,
boolean singleTrooper)
Calculates the battle value of this platoon. |
boolean |
canAssaultDrop()
|
boolean |
canDoMechanizedBA()
can this BattleArmor ride as Mechanized BA? |
boolean |
canTransferCriticals(int loc)
Returns true if this location should transfer criticals to the next location inwards. |
int |
getArmor(int loc,
boolean rear)
Battle Armor units have no armor on their squad location. |
java.lang.String |
getBLK()
|
int |
getChassisType()
|
double |
getCost(boolean ignoreAmmo)
|
int |
getInternal(int loc)
Battle Armor units have no internals on their squad location. |
int |
getJumpMP(boolean gravity)
return this entity's current jump MP, possibly affected by gravity |
int |
getJumpMP(boolean gravity,
boolean ignoreBurden)
get this BA's jump MP, possibly ignoring gravity and burden |
java.lang.String[] |
getLocationAbbrs()
|
java.lang.String[] |
getLocationNames()
|
int |
getLongStealthMod()
Public interface to the BattleArmors long range stealth modifier |
int |
getMediumStealthMod()
Public interface to the BattleArmors medium range stealth modifier |
java.lang.String |
getMovementAbbr(EntityMovementType mtype)
Returns the abbreviation of the type of movement used. |
java.lang.String |
getMovementString(EntityMovementType mtype)
Returns the name of the type of movement used. |
protected int[] |
getNoOfSlots()
Battle Armor units have as many critical slots as they need to hold their equipment. |
int |
getNumberActiverTroopers()
|
int |
getOArmor(int loc,
boolean rear)
Battle Armor units have no armor on their squad location. |
int |
getOInternal(int loc)
Battle Armor units have no internals on their squad location. |
int |
getOriginalJumpMP()
Returns this entity's original jumping mp. |
int |
getRandomTrooper()
|
int |
getRunMP(boolean gravity,
boolean ignoreheat)
Returns this entity's running mp, factored for extreme temperatures and gravity. |
int |
getShootingStrength()
Get the number of men in the unit (before damage is applied). |
int |
getShortStealthMod()
Public interface to the BattleArmors short range stealth modifier |
TargetRoll |
getStealthModifier(int range,
Entity ae)
Determine the stealth modifier for firing at this unit from the given range. |
java.lang.String |
getStealthName()
Returns the name of the stealth Armor used by the BA. |
HitData |
getTransferLocation(HitData hit)
Battle Armor units don't transfer damage. |
HitData |
getTrooperAtLocation(HitData hit,
Entity transport)
For level 3 rules, each trooper occupies a specific location precondition: hit is a location covered by BA |
int |
getTroopers()
|
float |
getTrooperWeight()
|
int |
getVibroClaws()
Return how many BA vibroclaws this Entity is equipped with |
int |
getWalkMP()
Returns this entity's walking/cruising mp, factored for heat and gravity. |
int |
getWalkMP(boolean gravity,
boolean ignoreheat)
Returns this entity's walking mp, factored for extreme temperatures and gravity. |
float |
getWeight()
|
int |
getWeightClass()
|
boolean |
hasActiveProbe()
return if the BA has any kind of active probe |
boolean |
hasEiCockpit()
|
boolean |
hasHittableCriticals(int loc)
Trooper's equipment dies when they do. |
boolean |
hasImprovedSensors()
return if this BA has improved sensors |
boolean |
isAttacksDuringSwarmResolved()
have all attacks this BA made while swarming a unit already been resolved this turn? |
boolean |
isBurdened()
Determines if the battle armor unit is burdened with un-jettisoned equipment. |
boolean |
isFireResistant()
return if this BA has fire resistant armor |
boolean |
isNuclearHardened()
Checks if the unit is hardened agaist nuclear strikes. |
protected boolean |
isPlatoon()
Battle Armor units use default behavior for armor and internals. |
boolean |
isStealthActive()
Determine if this unit has an active stealth system. |
boolean |
isTrooperActive(int trooperNum)
|
boolean |
loadWeapon(Mounted mounted,
Mounted mountedAmmo)
Tries to load the specified weapon with the specified ammo. |
boolean |
loadWeaponWithSameAmmo(Mounted mounted,
Mounted mountedAmmo)
Tries to load the specified weapon with the specified ammo. |
int |
locations()
Returns the number of locations in this unit. |
void |
newRound(int roundNumber)
Prepare the entity for a new round of action. |
HitData |
rollHitLocation(int table,
int side)
Rolls up a hit location |
HitData |
rollHitLocation(int table,
int side,
int aimedLocation,
int aimingMode)
Battle Armor units can only get hit in undestroyed troopers. |
void |
setAttacksDuringSwarmResolved(boolean resolved)
set wether or not all attacks this BA made while swarming a unit have already been resolved |
void |
setChassisType(int inCT)
|
void |
setCost(int inC)
|
void |
setInternal(int value)
Set the troopers in the unit to the given values. |
void |
setTroopers(int troopers)
|
void |
setTrooperWeight(float trooperWeight)
|
void |
setWeightClass(int inWC)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MANIPULATOR_NONE
public static final int MANIPULATOR_ARMORED_GLOVE
public static final int MANIPULATOR_BASIC
public static final int MANIPULATOR_BASIC_MINE_CLEARANCE
public static final int MANIPULATOR_BATTLE
public static final int MANIPULATOR_BATTLE_MAGNET
public static final int MANIPULATOR_BATTLE_VIBRO
public static final int MANIPULATOR_HEAVY_BATTLE
public static final int MANIPULATOR_HEAVY_BATTLE_VIBRO
public static final int MANIPULATOR_SALVAGE_ARM
public static final int MANIPULATOR_CARGO_LIFTER
public static final int MANIPULATOR_INDUSTRIAL_DRILL
public static final java.lang.String[] MANIPULATOR_TYPE_STRINGS
public static final int CHASSIS_TYPE_BIPED
public static final int CHASSIS_TYPE_QUAD
public static final java.lang.String DISPOSABLE_SRM2_AMMO
public static final java.lang.String DISPOSABLE_NARC_AMMO
public static final java.lang.String MINE_LAUNCHER
public static final java.lang.String STEALTH
public static final java.lang.String ADVANCED_STEALTH
public static final java.lang.String EXPERT_STEALTH
public static final java.lang.String MIMETIC_CAMO
public static final java.lang.String SIMPLE_CAMO
public static final java.lang.String SINGLE_HEX_ECM
public static final int BA_MAX_MEN
public static final int LOC_SQUAD
public static final int LOC_TROOPER_1
public static final int LOC_TROOPER_2
public static final int LOC_TROOPER_3
public static final int LOC_TROOPER_4
public static final int LOC_TROOPER_5
public static final int LOC_TROOPER_6
| Constructor Detail |
|---|
public BattleArmor()
| Method Detail |
|---|
public java.lang.String[] getLocationAbbrs()
getLocationAbbrs in class Infantrypublic java.lang.String[] getLocationNames()
getLocationNames in class Infantrypublic int locations()
locations in class Infantrypublic int getOriginalJumpMP()
getOriginalJumpMP in class Entitypublic int getWalkMP()
Entity
getWalkMP in class Entity
public int getWalkMP(boolean gravity,
boolean ignoreheat)
getWalkMP in class Infantrygravity - Should the movement be factored for gravityignoreheat - Should heat be ignored?
public int getRunMP(boolean gravity,
boolean ignoreheat)
getRunMP in class Infantrypublic int getJumpMP(boolean gravity)
Entity
getJumpMP in class Infantry
public int getJumpMP(boolean gravity,
boolean ignoreBurden)
gravity - ignoreBurden -
public java.lang.String getMovementString(EntityMovementType mtype)
getMovementString in class Infantrypublic java.lang.String getMovementAbbr(EntityMovementType mtype)
getMovementAbbr in class Infantry
public HitData rollHitLocation(int table,
int side,
int aimedLocation,
int aimingMode)
rollHitLocation in class Infantry
public HitData rollHitLocation(int table,
int side)
Entity
rollHitLocation in class Infantry
public HitData getTrooperAtLocation(HitData hit,
Entity transport)
getTrooperAtLocation in class Entitypublic HitData getTransferLocation(HitData hit)
getTransferLocation in class Infantryprotected boolean isPlatoon()
isPlatoon in class InfantryInfantry.isPlatoon()
public int getArmor(int loc,
boolean rear)
getArmor in class EntityEntity.getArmor( int, boolean )
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.Entity.getOArmor( int, boolean )public int getInternal(int loc)
getInternal in class InfantryInfantry.getInternal( int )public int getOInternal(int loc)
getOInternal in class InfantryInfantry.getOInternal( int )public void autoSetInternal()
autoSetInternal in class Infantrypublic void setInternal(int value)
protected void addEquipment(Mounted mounted,
int loc,
boolean rearMounted)
throws LocationFullException
addEquipment in class EntityLocationFullExceptionprotected int[] getNoOfSlots()
getNoOfSlots in class Infantrypublic boolean hasHittableCriticals(int loc)
hasHittableCriticals in class Infantry
public int calculateBattleValue(boolean ignoreC3,
boolean ignorePilot)
calculateBattleValue in class InfantryignoreC3 - 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
public int calculateBattleValue(boolean ignoreC3,
boolean ignorePilot,
boolean singleTrooper)
ignoreC3 - ignore C3 linkageignorePilot - ignore the skill of the pilotsingleTrooper - calculate just the BV of a single trooper
public void newRound(int roundNumber)
newRound in interface RoundUpdatednewRound in class InfantryroundNumber - the int number of the new roundpublic void applyDamage()
applyDamage in class Infantrypublic int getShootingStrength()
getShootingStrength in class InfantryInfantry.getShootingStrength()public void setCost(int inC)
public boolean isBurdened()
true if the unit hasn't jettisoned its equipment
yet, false if it has.public java.lang.String getStealthName()
public int getShortStealthMod()
public int getMediumStealthMod()
public int getLongStealthMod()
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 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 Infantryrange - - an int value that must match one of the
Compute class range constants.ae - - the entity making the attack.
TargetRoll value that contains the stealth
modifier for the given range.public double getCost(boolean ignoreAmmo)
getCost in class Infantrypublic boolean hasEiCockpit()
hasEiCockpit in class Entitypublic void setWeightClass(int inWC)
public float getTrooperWeight()
public void setTrooperWeight(float trooperWeight)
public int getWeightClass()
getWeightClass in class Entitypublic int getTroopers()
public void setTroopers(int troopers)
public void setChassisType(int inCT)
public int getChassisType()
public boolean canAssaultDrop()
canAssaultDrop in class Infantrypublic boolean isNuclearHardened()
Entity
isNuclearHardened in class Infantrypublic boolean isTrooperActive(int trooperNum)
public int getNumberActiverTroopers()
public int getRandomTrooper()
public boolean loadWeapon(Mounted mounted,
Mounted mountedAmmo)
Entity
loadWeapon in class Infantry
public boolean loadWeaponWithSameAmmo(Mounted mounted,
Mounted mountedAmmo)
Entity
loadWeaponWithSameAmmo in class Infantrypublic final java.lang.String getBLK()
public int getVibroClaws()
EntityEntity is equipped with
getVibroClaws in class Entitypublic boolean isFireResistant()
public boolean hasImprovedSensors()
public boolean hasActiveProbe()
public boolean canTransferCriticals(int loc)
Entity
canTransferCriticals in class Entitypublic boolean isAttacksDuringSwarmResolved()
public void setAttacksDuringSwarmResolved(boolean resolved)
resolved - - a booleanpublic boolean canDoMechanizedBA()
public float getWeight()
getWeight in class Infantry
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||