question: 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 ) ; } } }
target:  Flood negative hex levels Shoreline / salt marshes effect Works best with more elevation