forked from 0ad/0ad
[Maps] Add water level support to Flood
In addition to the existing "Shallow" water level two water levels are added: - Deep: Only ships can reach other islands - Rising: The water level changes from Shallow to Deep to a level where the home islands are flooded. Accepted By: @real_tabasco_sauce Comments By: @marder, @vladislavbelov Differential Revision: https://code.wildfiregames.com/D5139 This was SVN commit r27992.
This commit is contained in:
parent
ba61b93f94
commit
28e3b3fd62
@ -14,6 +14,7 @@ var g_GameSettingsLayout = [
|
||||
"TeamPlacement",
|
||||
"Landscape",
|
||||
"Biome",
|
||||
"WaterLevel",
|
||||
"SeaLevelRiseTime",
|
||||
"Daytime",
|
||||
"TriggerDifficulty",
|
||||
|
@ -48,7 +48,8 @@ const pForest1 = [tForestFloor2 + TERRAIN_SEPARATOR + oTree1, tForestFloor2 + TE
|
||||
const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TERRAIN_SEPARATOR + oTree5, tForestFloor1];
|
||||
|
||||
const heightSeaGround = -2;
|
||||
const heightLand = 2;
|
||||
const heightLand = 6;
|
||||
const heightStartingIslands = 2;
|
||||
const shoreRadius = 6;
|
||||
|
||||
var g_Map = new RandomMap(heightSeaGround, tWater);
|
||||
@ -75,7 +76,7 @@ for (let i = 0; i < numPlayers; ++i)
|
||||
new ClumpPlacer(diskArea(1.4 * defaultPlayerBaseRadius()), 0.8, 0.1, Infinity, playerPosition[i]),
|
||||
[
|
||||
new LayeredPainter([tShore, tMainTerrain], [shoreRadius]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, shoreRadius),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightStartingIslands, shoreRadius),
|
||||
new TileClassPainter(clHill)
|
||||
]);
|
||||
|
||||
@ -223,7 +224,7 @@ for (let size of [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8,
|
||||
numb * scaleByMapSize(15, 45));
|
||||
|
||||
g_Map.log("Painting shorelines");
|
||||
paintTerrainBasedOnHeight(1, heightLand, 0, tMainTerrain);
|
||||
paintTerrainBasedOnHeight(1, heightStartingIslands, 0, tMainTerrain);
|
||||
paintTerrainBasedOnHeight(heightSeaGround, 1, 3, tTier1Terrain);
|
||||
|
||||
g_Map.log("Creating grass patches");
|
||||
|
@ -2,7 +2,7 @@
|
||||
"settings" : {
|
||||
"Name" : "Flood",
|
||||
"Script" : "flood.js",
|
||||
"Description" : "A great flood has moved across the valley enabling ships and troops to battle in chest deep waters.",
|
||||
"Description" : "[color=\"red\"]IMPORTANT NOTE: AI PLAYERS DON'T WORK WITH RISING WATER[/color]\n\nA great flood moves across the valley. At some point you have to evacuate your units and use ships to reach the mainland and the other players.",
|
||||
"SupportedBiomes": [
|
||||
"generic/temperate",
|
||||
"generic/arctic",
|
||||
@ -12,8 +12,26 @@
|
||||
"generic/india",
|
||||
"generic/autumn"
|
||||
],
|
||||
"Keywords": [],
|
||||
"TriggerScripts": [
|
||||
"random/flood_triggers.js"
|
||||
],
|
||||
"Keywords": ["trigger"],
|
||||
"Preview" : "flood.png",
|
||||
"CircularMap" : true
|
||||
"CircularMap" : true,
|
||||
"WaterLevels":[
|
||||
{
|
||||
"Name": "Rising",
|
||||
"Description": "The water rises. The homeislands will become uninhabitable.",
|
||||
"Default": true
|
||||
},
|
||||
{
|
||||
"Name": "Shallow",
|
||||
"Description": "The water doesn't rise. Ships and troops can battle in chest deep waters."
|
||||
},
|
||||
{
|
||||
"Name": "Deep",
|
||||
"Description": "The water doesn't rise. You have to use ships to travel to the mainland."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user