if ((damageAtRange >= 3000) && (myHex.containsTerrain(Terrains.WATER))) {
int numCleared = damageAtRange / 3000;
int oldLevel = myHex.terrainLevel(Terrains.WATER);
myHex.removeTerrain(Terrains.WATER);
if (oldLevel > numCleared) {
myHex.addTerrain(new Terrain(Terrains.WATER, oldLevel - numCleared));
}
}
// ANY non-water hex that takes 200 becomes rough.
if ((damageAtRange >= 200) && (!myHex.containsTerrain(Terrains.WATER))) {
myHex.removeAllTerrains();
myHex.clearExits();
myHex.addTerrain(new Terrain(Terrains.ROUGH, 1));
} else if ((damageAtRange >= 20) && ((myHex.containsTerrain(Terrains.WOODS)) || (myHex.containsTerrain(Terrains.JUNGLE)))) {
// Each 20 clears woods by 1 level.
int numCleared = damageAtRange / 20;
int terrainType = (myHex.containsTerrain(Terrains.WOODS) ? Terrains.WOODS : Terrains.JUNGLE);
int oldLevel = myHex.terrainLevel(terrainType);
myHex.removeTerrain(terrainType);
if (oldLevel > numCleared) {
myHex.addTerrain(new Terrain(terrainType, oldLevel - numCleared));
}
}
sendChangedHex(myHexCoords);
}