|
|||||||||
| 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.Aero
megamek.common.FighterSquadron
public class FighterSquadron
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class megamek.common.Entity |
|---|
Entity.EntityFluff |
| Field Summary | |
|---|---|
java.util.Vector<Aero> |
fighters
|
static int |
MAX_SIZE
|
| 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 | |
|---|---|
FighterSquadron()
|
|
FighterSquadron(java.lang.String name)
construct fighter squadron with a specific name |
|
| Method Summary | |
|---|---|
PilotingRollData |
addEntityBonuses(PilotingRollData prd)
Add in any piloting skill mods |
int |
calculateBattleValue()
Calculates the battle value of this entity |
int |
calculateBattleValue(boolean ignoreC3,
boolean ignorePilot)
Calculates the battle value of this mech. |
boolean |
canLoad(Entity unit,
boolean checkFalse)
Determines if this object can accept the given unit. |
int |
get0SI()
|
java.util.ArrayList<Mounted> |
getAmmo()
|
double |
getArmorRemainingPercent()
Returns the percent of the armor remaining |
double |
getAveWeight()
|
java.util.ArrayList<Mounted> |
getBombs()
|
int |
getCargoMpReduction()
|
int |
getClusterMods()
get modifications to the cluster hit table for critical hits |
double |
getCost(boolean ignoreAmmo)
There is a mistake in some of the AT2r costs for some reason they added ammo twice for a lot of the level 2 designs, leading to costs that are too high |
Entity |
getExteriorUnitAt(int loc,
boolean isRear)
If a unit is being transported on the outside of the transporter, it can suffer damage when the transporter is hit by an attack. |
Aero |
getFighter(int loc)
|
java.util.Vector<Aero> |
getFighters()
|
int |
getFuel()
|
int |
getHeatCapacity()
Returns the amount of heat that the entity can sink each turn. |
int |
getHeatSinks()
|
double |
getInternalRemainingPercent()
Returns the percent of the SI remaining |
java.util.Vector<Entity> |
getLoadedUnits()
Get a List of the units currently loaded into this payload. |
int |
getN0Fighters()
|
int |
getNFighters()
|
int |
getSI()
|
int |
getTotalArmor()
Returns the total amount of armor on the entity. |
int |
getTotalOArmor()
Returns the total amount of armor on the entity. |
java.lang.String |
getUnusedString()
Return a string that identifies the unused capacity of this transporter. |
int |
getWalkMP(boolean gravity,
boolean ignoreheat)
Returns this entity's safe thrust, factored for heat, extreme temperatures, gravity, and bomb load. |
float |
getWeight()
|
boolean |
hasActiveECM()
Does the mech have a functioning ECM unit? |
boolean |
hasTargComp()
Returns wether or not this entity has a Targeting Computer. |
boolean |
isCapitalFighter()
overrides the default Entity.isCapitalFighter() with true |
boolean |
isWeaponBlockedAt(int loc,
boolean isRear)
Determine if transported units prevent a weapon in the given location from firing. |
void |
load(Entity unit,
boolean checkFalse)
Load the given unit. |
boolean |
loadedUnitsHaveActiveECM()
Do units loaded onto this entity still have active ECM/ECCM/etc.? |
void |
newRound(int roundNumber)
Start a new round |
void |
resetHeatCapacity()
|
HitData |
rollHitLocation(int table,
int side)
Rolls up a hit location |
HitData |
rollHitLocation(int table,
int side,
int aimedLocation,
int aimingMode)
Fighter Squadron units can only get hit in undestroyed fighters. |
boolean |
unload(Entity unit)
Unload the given unit. |
void |
updateSkills()
update the skills for this squadron |
void |
updateWeaponGroups()
instead of trying to track the individual units weapons, just recompile the weapon groups for this squadron each round |
void |
useFuel(int fuel)
use the specified amount of fuel for this Aero. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int MAX_SIZE
public java.util.Vector<Aero> fighters
| Constructor Detail |
|---|
public FighterSquadron()
public FighterSquadron(java.lang.String name)
| Method Detail |
|---|
public double getCost(boolean ignoreAmmo)
Aero
getCost in class Aeropublic boolean isCapitalFighter()
Entity.isCapitalFighter() with true
isCapitalFighter in class Entitypublic int getN0Fighters()
public int getNFighters()
public int get0SI()
get0SI in class Aeropublic int getSI()
getSI in class Aeropublic Aero getFighter(int loc)
public java.util.Vector<Aero> getFighters()
public int getTotalArmor()
Entity
getTotalArmor in class Entitypublic int getTotalOArmor()
Entity
getTotalOArmor in class Entitypublic double getArmorRemainingPercent()
getArmorRemainingPercent in class Aero
public int getWalkMP(boolean gravity,
boolean ignoreheat)
Aero
getWalkMP in class Aerogravity - Should the movement be factored for gravityignoreheat - Should heat be ignored?public int getFuel()
getFuel in class Aeropublic double getInternalRemainingPercent()
Aero
getInternalRemainingPercent in class Aeropublic boolean hasTargComp()
Entity
hasTargComp in class Entitypublic boolean hasActiveECM()
Entity
hasActiveECM in class Entitypublic boolean loadedUnitsHaveActiveECM()
loadedUnitsHaveActiveECM in class Entitypublic PilotingRollData addEntityBonuses(PilotingRollData prd)
Entity
addEntityBonuses in class Aeropublic int getClusterMods()
Aero
getClusterMods in class Aero
public int calculateBattleValue(boolean ignoreC3,
boolean ignorePilot)
Entity
calculateBattleValue in class AeroignoreC3 - 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 int calculateBattleValue()
Entity
calculateBattleValue in class Aeropublic int getHeatSinks()
getHeatSinks in class Aeropublic int getHeatCapacity()
Entity
getHeatCapacity in class Aeropublic void resetHeatCapacity()
public float getWeight()
getWeight in class Entitypublic double getAveWeight()
public HitData rollHitLocation(int table,
int side,
int aimedLocation,
int aimingMode)
rollHitLocation in class Aero
public HitData rollHitLocation(int table,
int side)
Entity
rollHitLocation in class Aeropublic void newRound(int roundNumber)
Entity
newRound in interface RoundUpdatednewRound in class AeroroundNumber - the int number of the new roundpublic void updateWeaponGroups()
updateWeaponGroups in class Aeropublic void updateSkills()
public java.util.ArrayList<Mounted> getAmmo()
getAmmo in class Entitypublic void useFuel(int fuel)
Aero
useFuel in class Aeropublic java.util.ArrayList<Mounted> getBombs()
getBombs in class Entity
public boolean canLoad(Entity unit,
boolean checkFalse)
canLoad in class Aerounit - - the Entity to be loaded.
true if the unit can be loaded,
false otherwise.
public void load(Entity unit,
boolean checkFalse)
throws java.lang.IllegalArgumentException
load in class Entityunit - - the Entity to be loaded.
- - If the unit can't be loaded, an
IllegalArgumentException exception will be thrown.
java.lang.IllegalArgumentException - If the unit can't be loadedpublic boolean unload(Entity unit)
unload in interface Transporterunload in class Entityunit - - the Entity to be unloaded.
true if the unit was contained in this space,
false otherwise.public java.util.Vector<Entity> getLoadedUnits()
List of the units currently loaded into this payload.
getLoadedUnits in interface TransportergetLoadedUnits in class EntityList of loaded Entity units.
This list will never be null, but it may be empty.
The returned List is independant from the under-
lying data structure; modifying one does not affect the other.public java.lang.String getUnusedString()
getUnusedString in interface TransportergetUnusedString in class EntityString meant for a human.
public boolean isWeaponBlockedAt(int loc,
boolean isRear)
isWeaponBlockedAt in interface TransporterisWeaponBlockedAt in class Entityloc - - the int location attempting to fire.isRear - - a boolean value stating if the given
location is rear facing; if false, the location
is front facing.
true if a transported unit is in the way,
false if the weapon can fire.
public Entity getExteriorUnitAt(int loc,
boolean isRear)
getExteriorUnitAt in interface TransportergetExteriorUnitAt in class Entityloc - - the int location hit by attack.isRear - - a boolean value stating if the given
location is rear facing; if false, the location
is front facing.
Entity being transported on the outside
at that location. This value will be null
if no unit is transported on the outside at that location.public int getCargoMpReduction()
getCargoMpReduction in interface TransportergetCargoMpReduction in class Entity
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||