megamek.server
Class FireProcessor

java.lang.Object
  extended by megamek.server.DynamicTerrainProcessor
      extended by megamek.server.FireProcessor

public class FireProcessor
extends DynamicTerrainProcessor


Field Summary
(package private)  java.util.Vector<Report> vPhaseReport
           
 
Fields inherited from class megamek.server.DynamicTerrainProcessor
server
 
Constructor Summary
FireProcessor(Server server)
           
 
Method Summary
 void burnDownWoods(Coords coords)
           
(package private)  void doEndPhaseChanges(java.util.Vector<Report> vPhaseReport)
          Process terrain changes in the end phase
 Coords driftAddSmoke(Coords coords, int windDir, int windStr)
          Override for the main driftAddSmoke to allow for 0 direction changes
 Coords driftAddSmoke(Coords src, int windDir, int windStr, int directionChanges)
          Smoke cannot climb more then 4 hexes if the next hex is more then 4 in elevation then The smoke will try to go right.
 boolean driftSmokeDissipate(SmokeCloud cloud, int roll, int windStr)
          Diisipates Smoke clouds instead of indivdiual smoke hexes
 void driftSmokeReport(SmokeCloud cloud, boolean dis)
           
 void spreadFire(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.
 void spreadFire(int x, int y, int windDir, int windStr)
          Spreads the fire around the specified coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vPhaseReport

java.util.Vector<Report> vPhaseReport
Constructor Detail

FireProcessor

public FireProcessor(Server server)
Method Detail

doEndPhaseChanges

void doEndPhaseChanges(java.util.Vector<Report> vPhaseReport)
Description copied from class: DynamicTerrainProcessor
Process terrain changes in the end phase

Specified by:
doEndPhaseChanges in class DynamicTerrainProcessor
Parameters:
vPhaseReport - reports for the server to send out

burnDownWoods

public void burnDownWoods(Coords coords)

spreadFire

public void spreadFire(int x,
                       int y,
                       int windDir,
                       int windStr)
Spreads the fire around the specified coordinates.


spreadFire

public void spreadFire(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.


driftAddSmoke

public Coords driftAddSmoke(Coords coords,
                            int windDir,
                            int windStr)
Override for the main driftAddSmoke to allow for 0 direction changes

Parameters:
x -
y -
windDir -
windStr -
Returns:

driftAddSmoke

public Coords driftAddSmoke(Coords src,
                            int windDir,
                            int windStr,
                            int directionChanges)
Smoke cannot climb more then 4 hexes if the next hex is more then 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:
x -
y -
windDir -
windStr -
directionChanges - How many times the smoke has tried to change directions to get around an obsticle.
Returns:

driftSmokeDissipate

public boolean driftSmokeDissipate(SmokeCloud cloud,
                                   int roll,
                                   int windStr)
Diisipates Smoke clouds instead of indivdiual smoke hexes

Parameters:
cloud -
roll -
windStr -
Returns:

driftSmokeReport

public void driftSmokeReport(SmokeCloud cloud,
                             boolean dis)