Class BaseFormationConverter<T extends SBFFormation>
java.lang.Object
megamek.common.strategicBattleSystems.BaseFormationConverter<T>
- Direct Known Subclasses:
EntityAsFormation,EntityAsUnit,LowestForceAsUnit,SBFFormationConverter
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBaseFormationConverter(Force force, IGame game, T formation) BaseFormationConverter(Force force, IGame game, T formation, CalculationReport report) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCalculates the SBF Formation stats for the SBF Units it must already contain.static booleancanConvertToSbfFormation(Force force, IGame game) Returns true if the given force can be converted to an SBF Formation.abstract Tconvert()Returns an SBF Formation formed from the given force.
-
Field Details
-
force
-
game
-
report
-
formation
-
-
Constructor Details
-
BaseFormationConverter
-
BaseFormationConverter
-
-
Method Details
-
canConvertToSbfFormation
Returns true if the given force can be converted to an SBF Formation. -
convert
Returns an SBF Formation formed from the given force. When the force cannot be converted to an SBF Formation according to the rules, returns null. The given force must be approximately company-shaped to work, i.e. it has to contain some subForces with some entities in each sub force but no further subForces. -
calcSbfFormationStats
protected void calcSbfFormationStats()Calculates the SBF Formation stats for the SBF Units it must already contain.
-