Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/maps/random/african_plains.js
Show First 20 Lines • Show All 170 Lines • ▼ Show 20 Lines | |||||
log("Creating water holes..."); | log("Creating water holes..."); | ||||
placer = new ChainPlacer(1, floor(scaleByMapSize(3, 5)), floor(scaleByMapSize(60, 100)), 5); | placer = new ChainPlacer(1, floor(scaleByMapSize(3, 5)), floor(scaleByMapSize(60, 100)), 5); | ||||
var terrainPainter = new LayeredPainter( | var terrainPainter = new LayeredPainter( | ||||
[tShore, tWater], // terrains | [tShore, tWater], // terrains | ||||
[1] // widths | [1] // widths | ||||
); | ); | ||||
var elevationPainter = new SmoothElevationPainter(ELEVATION_SET, -5, 7); | var elevationPainter = new SmoothElevationPainter(ELEVATION_SET, -5, 7); | ||||
createAreas( | createAreasDeprecated( | ||||
placer, | placer, | ||||
[terrainPainter, elevationPainter, paintClass(clWater)], | [terrainPainter, elevationPainter, paintClass(clWater)], | ||||
avoidClasses(clPlayer, 22, clWater, 8, clHill, 2), | avoidClasses(clPlayer, 22, clWater, 8, clHill, 2), | ||||
scaleByMapSize(2, 5) | scaleByMapSize(2, 5) | ||||
); | ); | ||||
RMS.SetProgress(45); | RMS.SetProgress(45); | ||||
paintTerrainBasedOnHeight(3, floor(scaleByMapSize(20, 40)), 0, tCliff); | paintTerrainBasedOnHeight(3, floor(scaleByMapSize(20, 40)), 0, tCliff); | ||||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | |||||
); | ); | ||||
RMS.SetProgress(75); | RMS.SetProgress(75); | ||||
log("Creating giraffes..."); | log("Creating giraffes..."); | ||||
group = new SimpleGroup( | group = new SimpleGroup( | ||||
[new SimpleObject(oGiraffe, 2,4, 0,4), new SimpleObject(oGiraffe2, 0,2, 0,4)], | [new SimpleObject(oGiraffe, 2,4, 0,4), new SimpleObject(oGiraffe2, 0,2, 0,4)], | ||||
true, clFood | true, clFood | ||||
); | ); | ||||
createObjectGroups(group, 0, | createObjectGroupsDeprecated(group, 0, | ||||
avoidClasses(clWater, 3, clPlayer, 20, clFood, 11, clHill, 4), | avoidClasses(clWater, 3, clPlayer, 20, clFood, 11, clHill, 4), | ||||
scaleByMapSize(4,12), 50 | scaleByMapSize(4,12), 50 | ||||
); | ); | ||||
log("Creating elephants..."); | log("Creating elephants..."); | ||||
group = new SimpleGroup( | group = new SimpleGroup( | ||||
[new SimpleObject(oElephant, 2,4, 0,4), new SimpleObject(oElephant2, 0,2, 0,4)], | [new SimpleObject(oElephant, 2,4, 0,4), new SimpleObject(oElephant2, 0,2, 0,4)], | ||||
true, clFood | true, clFood | ||||
); | ); | ||||
createObjectGroups(group, 0, | createObjectGroupsDeprecated(group, 0, | ||||
avoidClasses(clWater, 3, clPlayer, 20, clFood, 11, clHill, 4), | avoidClasses(clWater, 3, clPlayer, 20, clFood, 11, clHill, 4), | ||||
scaleByMapSize(4,12), 50 | scaleByMapSize(4,12), 50 | ||||
); | ); | ||||
log("Creating lions..."); | log("Creating lions..."); | ||||
group = new SimpleGroup( | group = new SimpleGroup( | ||||
[new SimpleObject(oLion, 0,1, 0,4), new SimpleObject(oLioness, 2,3, 0,4)], | [new SimpleObject(oLion, 0,1, 0,4), new SimpleObject(oLioness, 2,3, 0,4)], | ||||
true, clFood | true, clFood | ||||
); | ); | ||||
createObjectGroups(group, 0, | createObjectGroupsDeprecated(group, 0, | ||||
avoidClasses(clWater, 3, clPlayer, 20, clFood, 11, clHill, 4), | avoidClasses(clWater, 3, clPlayer, 20, clFood, 11, clHill, 4), | ||||
scaleByMapSize(4,12), 50 | scaleByMapSize(4,12), 50 | ||||
); | ); | ||||
createFood( | createFood( | ||||
[ | [ | ||||
[new SimpleObject(oHawk, 1,1, 0,3)], | [new SimpleObject(oHawk, 1,1, 0,3)], | ||||
[new SimpleObject(oGazelle, 3,5, 0,3)], | [new SimpleObject(oGazelle, 3,5, 0,3)], | ||||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator