}
}
private void resolveWeather() {
ITerrainFactory tf = Terrains.getTerrainFactory();
IBoard board = game.getBoard();
int width = board.getWidth();
int height = board.getHeight();
PlanetaryConditions conditions = game.getPlanetaryConditions();
boolean lightSnow = false;
boolean deepSnow = false;
boolean ice = false;
if(!conditions.isTerrainAffected())
return;
debugTime("resolve weather 1", true);
//first we need to increment the conditions
if(conditions.getWeather() == PlanetaryConditions.WE_MOD_SNOW && game.getBoard().onGround()) {
modSnowTurn = modSnowTurn + 1;
if(modSnowTurn == 9) {
lightSnow = true;
}
if(modSnowTurn == 19) {
deepSnow = true;
ice = true;
}
}
if(conditions.getWeather() == PlanetaryConditions.WE_HEAVY_SNOW && game.getBoard().onGround()) {
heavySnowTurn = heavySnowTurn + 1;
if(heavySnowTurn == 4) {
lightSnow = true;
}
if(heavySnowTurn == 14) {
deepSnow = true;
}
if(heavySnowTurn == 19) {
ice = true;
}
}
if(conditions.getWeather() == PlanetaryConditions.WE_SLEET && game.getBoard().onGround()) {
sleetTurn = sleetTurn + 1;
if(sleetTurn == 14) {
ice = true;
}
}
if(conditions.getWeather() == PlanetaryConditions.WE_ICE_STORM && game.getBoard().onGround()) {
iceTurn = iceTurn + 1;
if(iceTurn == 14) {
ice = true;
}
}
if(lightSnow) {
Report r = new Report(5505, Report.PUBLIC);
vPhaseReport.addElement(r);
}
if(deepSnow) {
Report r = new Report(5510, Report.PUBLIC);
vPhaseReport.addElement(r);
}
if(ice) {
Report r = new Report(5515, Report.PUBLIC);
vPhaseReport.addElement(r);
}
// Cycle through all hexes, checking for the appropriate weather changes
for (int currentXCoord = 0; currentXCoord < width; currentXCoord++ ) {
for (int currentYCoord = 0; currentYCoord < height; currentYCoord++) {
Coords currentCoords = new Coords(currentXCoord, currentYCoord);
IHex currentHex = board.getHex(currentXCoord, currentYCoord);
//check for fires and potentially put them out
if (currentHex.containsTerrain(Terrains.FIRE)) {
//only standard fires get put out
if(currentHex.terrainLevel(Terrains.FIRE) == 1) {