Package megamek.server
Class FireProcessor
java.lang.Object
megamek.server.DynamicTerrainProcessor
megamek.server.FireProcessor
-
Field Summary
Fields inherited from class megamek.server.DynamicTerrainProcessor
gameManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionburnDownWoods(Coords coords, Board board) booleancheckSmokeDissipation(SmokeCloud cloud, Wind windStr) Checks for the given SmokeCloud if it dissipates, either by a level or entirely and returns true if it does.voiddoEndPhaseChanges(Vector<Report> vPhaseReport) Process terrain changes in the end phasedriftAddSmoke(Coords source, Board board, WindDirection windDirection, Wind windStrength) Override for the main driftAddSmoke to allow for 0 direction changesdriftAddSmoke(Coords src, Board board, WindDirection windDir, Wind windStr, int directionChanges) Smoke cannot climb more than 4 hexes if the next hex is more than 4 in elevation then the smoke will try to go right.voiddriftSmokeReport(SmokeCloud cloud, boolean dissipated) voidspreadFire(Board board, int x, int y, WindDirection windDir, Wind windStr) Spreads the fire around the specified coordinates.voidspreadFire(Board board, Coords origin, Coords coords, TargetRoll roll, int height) Spreads the fire, and reports the spread, to the specified hex, if possible, if the hex isn't already on fire, and the fire roll is made.
-
Constructor Details
-
FireProcessor
-
-
Method Details
-
doEndPhaseChanges
Description copied from class:DynamicTerrainProcessorProcess terrain changes in the end phase- Specified by:
doEndPhaseChangesin classDynamicTerrainProcessor- Parameters:
vPhaseReport- reports for the server to send out
-
burnDownWoods
-
spreadFire
Spreads the fire around the specified coordinates. -
spreadFire
Spreads the fire, and reports the spread, to the specified hex, if possible, if the hex isn't already on fire, and the fire roll is made.- Parameters:
origin- the origin coordinatescoords- the coordinates to check to see if the fire spreads to themroll- the target number for roll for fire to spreadheight- the height of the origin hex
-
driftAddSmoke
@Nullable public Coords driftAddSmoke(Coords source, Board board, WindDirection windDirection, Wind windStrength) Override for the main driftAddSmoke to allow for 0 direction changes- Parameters:
source- the source coordinateswindDirection- the wind's directionwindStrength- the wind's strength- Returns:
- the coordinates where the smoke has drifted to, or null if it dissipates while on the board.
-
driftAddSmoke
@Nullable public Coords driftAddSmoke(Coords src, Board board, WindDirection windDir, Wind windStr, int directionChanges) Smoke cannot climb more than 4 hexes if the next hex is more than 4 in elevation then the smoke will try to go right. If it cannot go right it'll try to go left. If it cannot go left it'll stay put.- Parameters:
src- the source coordinateswindDir- the wind's directionwindStr- the wind's strengthdirectionChanges- How many times the smoke has tried to change directions to get around an obstacle.- Returns:
- the coordinates where the smoke has drifted to, or null if it dissipates while on the board.
-
checkSmokeDissipation
Checks for the given SmokeCloud if it dissipates, either by a level or entirely and returns true if it does. This checks both dissipation by wind and by duration.- Parameters:
cloud- The Smoke cloud to testwindStr- The current wind strength- Returns:
- True when the smoke cloud dissipates by a level or entirely
-
driftSmokeReport
-