protected static void postProcessFlood(IHex[] hexSet,int modifier){
  int n;
  IHex field;
  ITerrainFactory f=Terrains.getTerrainFactory();
  for (n=0; n < hexSet.length; n++) {
    field=hexSet[n];
    int elev=field.getLevel() - modifier;
    if ((elev == 0) && !(field.containsTerrain(Terrains.WATER)) && !(field.containsTerrain(Terrains.PAVEMENT))) {
      field.addTerrain(f.createTerrain(Terrains.SWAMP,1));
    }
 else     if (elev < 0) {
      if (elev < -4) {
        elev=-4;
      }
      field.removeAllTerrains();
      field.addTerrain(f.createTerrain(Terrains.WATER,-elev));
      field.setLevel(modifier);
    }
  }
}

protected static void postProcessFlood ( IHex [ ] hexSet , int modifier ) { int n ; IHex field ; ITerrainFactory f = Terrains . getTerrainFactory ( ) ; for ( n = 0 ; n < hexSet . length ; n ++ ) { field = hexSet [ n ] ; int elev = field . getLevel ( ) - modifier ; if ( ( elev == 0 ) && ! ( field . containsTerrain ( Terrains . WATER ) ) && ! ( field . containsTerrain ( Terrains . PAVEMENT ) ) ) { field . addTerrain ( f . createTerrain ( Terrains . SWAMP , 1 ) ) ; } else if ( elev < 0 ) { if ( elev < - 4 ) { elev = - 4 ; } field . removeAllTerrains ( ) ; field . addTerrain ( f . createTerrain ( Terrains . WATER , - elev ) ) ; field . setLevel ( modifier ) ; } } }
flood negative hex levels shoreline / salt marshes effect works best with more elevation
