Package megamek.common
Class BulldozerMovePath
java.lang.Object
megamek.common.moves.MovePath
megamek.common.BulldozerMovePath
- All Implemented Interfaces:
Serializable,Cloneable
An extension of the MovePath class that stores information about terrain that needs to be destroyed in order to move
along the specified route.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classComparator implementation useful in comparing two bulldozer move paths by how many MP it'll take to accomplish that path, including time wasted leveling any obstaclesNested classes/interfaces inherited from class megamek.common.moves.MovePath
MovePath.MovePathComparator -
Field Summary
FieldsFields inherited from class megamek.common.moves.MovePath
DEFAULT_PATHFINDER_TIME_LIMIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddStep(MoveStepType type) Override of the MovePath.addStep method that records the leveling and other extra costs associated with this bulldozer move path.static intcalculateLevelingCost(Coords finalCoords, Entity entity) Worker function that calculates the "MP cost" of moving into the given set of coords if we were to stand still for the number of turns required to reduce the terrain there to a form through which the current unit can moveclone()Clones this path, will contain a new clone of the steps so that the clone is independent of the original.intAny additional costs of this move paths, such as stepping into water or other factors that would increase the number of turns to complete it without increasing the actual MP used.The coordinates which need to be leveled for this path to be performed by its unitintAn estimation of how many MP we would "waste" blowing down obstacles.booleanWhether this path will require terrain reduction to fully accomplishvoidRemoves the last step from the path and updates its internal data structures accordinglyvoidtoString()Methods inherited from class megamek.common.moves.MovePath
addManeuver, addStep, addStep, addStep, addStep, addStep, addStep, addStep, addStep, addStep, addStep, addStep, addStep, addSteps, automaticWiGELanding, canShift, clear, clipToPossible, compile, compile, contains, containsLateralShift, containsVTOLBomb, copyFields, countMp, equals, findPathTo, findSimplePathTo, fliesOffBoard, getAdjustedFacing, getCachedEntityState, getCoordsSet, getDirection, getDistanceTravelled, getDroppedUnits, getEndStepCount, getEntity, getFinalAltitude, getFinalBoardId, getFinalClimbMode, getFinalConversionMode, getFinalCoords, getFinalElevation, getFinalFacing, getFinalHullDown, getFinalNDown, getFinalProne, getFinalVectors, getFinalVelocity, getFinalVelocityLeft, getFlightPathHex, getGame, getHexesMoved, getJumpMaxElevationChange, getJumpPathHighestPoint, getKey, getLastStep, getLastStepMovementType, getMaxElevation, getMaxMP, getMpUsed, getNextMoves, getSecondFinalPosition, getSecondLastStep, getStartCoords, getStep, getSteps, getStepVector, getWaypoint, hasActiveMASC, hasActiveSupercharger, hashCode, hasWaypoint, isAirborne, isAllUnderwater, isCareful, isChangingMode, isEndStep, isJumping, isMoveLegal, isOnAtmosphericGroundMap, isValidPositionForBrace, isValidPositionForBrace, landsWiGEVehicleWhereItCrashes, lateralShiftForTurn, length, nextForwardStepOffBoard, printAllSteps, replaceSteps, rotatePathfinder, setCareful, setEntity, setFlightPathHex, setGame, setStrafingStep, setVTOLBombStep, shouldMechanicalJumpCauseFallDamage, willCrushBuildings
-
Field Details
-
CANNOT_LEVEL
public static final int CANNOT_LEVEL- See Also:
-
-
Constructor Details
-
BulldozerMovePath
-
-
Method Details
-
getAdditionalCost
public int getAdditionalCost()Any additional costs of this move paths, such as stepping into water or other factors that would increase the number of turns to complete it without increasing the actual MP used. -
getLevelingCost
public int getLevelingCost()An estimation of how many MP we would "waste" blowing down obstacles. -
addStep
Override of the MovePath.addStep method that records the leveling and other extra costs associated with this bulldozer move path. The cost computation itself lives inMovePathTerrainCost. -
removeLastStep
public void removeLastStep()Removes the last step from the path and updates its internal data structures accordingly- Overrides:
removeLastStepin classMovePath
-
clone
Clones this path, will contain a new clone of the steps so that the clone is independent of the original. -
calculateLevelingCost
Worker function that calculates the "MP cost" of moving into the given set of coords if we were to stand still for the number of turns required to reduce the terrain there to a form through which the current unit can move -
needsLeveling
public boolean needsLeveling()Whether this path will require terrain reduction to fully accomplish -
getCoordsToLevel
The coordinates which need to be leveled for this path to be performed by its unit -
getDestination
-
setDestination
-
toString
-