/*--------------------------------------*/
/* Dark Shallows                        */
/*--------------------------------------*/
#const PLAYER_TERRAIN 4

/*--------------------------------------*/
/* Define Relics Constants              */
/*--------------------------------------*/
#const RI_MONASTERY 210
#const MONASTERY_F 30
#const MONASTERY_C 31
#const MONASTERY_I 32
#const ENABLE_TECH 7
#const ADD_ATTRIBUTE 4
#const ATTR_DISABLE 0
#const ATTR_HITPOINTS 0

/*--------------------------------------*/
/* Define ResourceAmount Constants      */
/*--------------------------------------*/
#const AMOUNT_FOOD 0
#const AMOUNT_WOOD 1
#const AMOUNT_STONE 2
#const AMOUNT_GOLD 3

<PLAYER_SETUP>
	random_placement
	ai_info_map_type SALT_MARSH 0 0 0
	terrain_state 0 0 0 1

	start_random
		percent_chance 5
			#define WEATHER_CLOUDY
			weather_type 0 16 33 0
		percent_chance 45
			#define WEATHER_TSTORM
			weather_type -3 16 0 0
		percent_chance 50
			#define WEATHER_SUNNY
	end_random

	if CAPTURE_RELICS
		guard_state MONASTERY AMOUNT_GOLD 0 1
		effect_amount ENABLE_TECH RI_MONASTERY ATTR_DISABLE 210
		effect_amount ADD_ATTRIBUTE MONASTERY ATTR_HITPOINTS 10000
		effect_amount ADD_ATTRIBUTE MONASTERY_F ATTR_HITPOINTS 10000
		effect_amount ADD_ATTRIBUTE MONASTERY_C ATTR_HITPOINTS 10000
		effect_amount ADD_ATTRIBUTE MONASTERY_I ATTR_HITPOINTS 10000
	endif

<LAND_GENERATION>
	base_terrain PLAYER_TERRAIN
	
	create_land
	{
		terrain_type DESERT
		base_elevation 0
		land_position 50 50

		if TINY_MAP
			base_size 6
			border_fuzziness 16
			left_border 46
			right_border 46
			top_border 46
			bottom_border 46
		elseif SMALL_MAP
			base_size 8
			border_fuzziness 12
			left_border 44
			right_border 44
			top_border 44
			bottom_border 44
		elseif MEDIUM_MAP
			base_size 12
			border_fuzziness 14
			left_border 42
			right_border 42
			top_border 42
			bottom_border 42
		elseif LARGE_MAP
			base_size 14
			border_fuzziness 16
			left_border 42
			right_border 42
			top_border 42
			bottom_border 42
		elseif HUGE_MAP
			base_size 14
			border_fuzziness 16
			left_border 42
			right_border 42
			top_border 42
			bottom_border 42
		else //GIGANTIC_MAP
			base_size 16
			border_fuzziness 18
			left_border 40
			right_border 40
			top_border 40
			bottom_border 40
		endif
	}
	create_player_lands
	{
		terrain_type PLAYER_TERRAIN
		base_size 13
		number_of_tiles 1024
		clumping_factor 20
		other_zone_avoidance_distance 15
		set_zone_by_team
	}


<TERRAIN_GENERATION>
	create_terrain WATER
	{
		base_terrain DESERT
		land_percent 100
		number_of_clumps 1000
		clumping_factor 100
		set_flat_terrain_only
		if TINY_MAP
			spacing_to_other_terrain_types 3
		else
			spacing_to_other_terrain_types 4
		endif
	}

	create_terrain MED_WATER
	{
		base_terrain PLAYER_TERRAIN
		number_of_tiles	1000
		number_of_clumps 20
		clumping_factor 100
		set_flat_terrain_only
		set_avoid_player_start_areas
		set_scale_by_groups
	}
	create_terrain DEEP_WATER
	{
		base_terrain MED_WATER
		number_of_tiles	800
		number_of_clumps 20
		clumping_factor 100
		set_scale_by_groups
	}
	create_terrain MED_WATER
	{
		base_terrain WATER
		land_percent 3
		number_of_clumps 10
		clumping_factor 5
		set_scale_by_groups
		set_avoid_player_start_areas
		spacing_to_other_terrain_types 1
	}

	create_terrain PALM_DESERT
	{
		base_terrain DESERT
		if TINY_MAP
			number_of_tiles	24
			number_of_clumps 10
		else
			number_of_tiles	36
			number_of_clumps 8
		endif

		if TINY_MAP
			clumping_factor 40
		elseif SMALL_MAP
			clumping_factor 20
		elseif MEDIUM_MAP
			clumping_factor 30
		elseif LARGE_MAP
			clumping_factor 20
		else   
			clumping_factor 10
		endif
		spacing_to_other_terrain_types 1
		set_scale_by_groups
	}
	create_terrain PALM_DESERT
	{
		base_terrain PLAYER_TERRAIN
		land_percent 15
		number_of_clumps 15
		clumping_factor 60
		set_scale_by_groups
		set_avoid_player_start_areas
		spacing_to_other_terrain_types 4
	}

<ELEVATION_GENERATION>

<OBJECTS_GENERATION>
	create_object TOWN_CENTER
	{
		set_place_for_every_player
		group_placement_radius 18
		min_distance_to_players 0
		max_distance_to_players 0
	}

	create_object VILLAGER
	{
		set_place_for_every_player
		min_distance_to_players 6
		max_distance_to_players 6
	}

	create_object SCOUT
	{
		number_of_objects 1
		set_place_for_every_player
		min_distance_to_players 7
		max_distance_to_players 9
	}

	create_object GALLEY
	{
		number_of_objects 1
		set_place_for_every_player
		min_distance_to_players 7
		max_distance_to_players 9
	}

	if REGICIDE
		create_object VILLAGER
		{
			number_of_objects 7
			set_place_for_every_player
			min_distance_to_players 6
			max_distance_to_players 6
		}

		create_object KING
		{
			set_place_for_every_player
			min_distance_to_players 6
			max_distance_to_players 6
		}

		create_object CASTLE
		{
			set_place_for_every_player
			min_distance_to_players 10
			max_distance_to_players 10
		}
	endif

	create_object FORAGE
	{
		number_of_objects 6
		number_of_groups 2
		group_placement_radius 2
		set_tight_grouping
		set_gaia_object_only
		set_place_for_every_player
		min_distance_to_players 6
		max_distance_to_players 7
		temp_min_distance_group_placement 8
		min_distance_group_placement 5
	}

	create_object GOLD
	{
		number_of_objects 7
		group_placement_radius 2
		set_tight_grouping
		set_gaia_object_only
		set_place_for_every_player
		min_distance_to_players 9
		max_distance_to_players 12
		min_distance_group_placement 5
	}
	create_object GOLD
	{
		number_of_objects 4
		group_placement_radius 2
		set_tight_grouping
		set_gaia_object_only
		set_place_for_every_player
		min_distance_to_players 9
		max_distance_to_players 12
		min_distance_group_placement 4
	}
	create_object GOLD
	{
		number_of_objects 3
		number_of_groups 3
		group_placement_radius 2
		set_tight_grouping
		set_gaia_object_only
		set_scaling_to_map_size
		min_distance_to_players 20
		temp_min_distance_group_placement 20
		min_distance_group_placement 5
	}

	create_object STONE
	{
		number_of_objects 5
		group_placement_radius 2
		set_tight_grouping
		set_gaia_object_only
		set_place_for_every_player
		min_distance_to_players 9
		max_distance_to_players 12
		min_distance_group_placement 4
	}
	create_object STONE
	{
		number_of_objects 4
		number_of_groups 2
		group_placement_radius 2
		set_tight_grouping
		set_gaia_object_only
		set_scaling_to_map_size
		min_distance_to_players 20
		temp_min_distance_group_placement 20
		min_distance_group_placement 5
	}

	create_object TURKEY
	{
		number_of_objects 4
		set_loose_grouping
		set_gaia_object_only
		set_place_for_every_player
		min_distance_to_players 10
		max_distance_to_players 12
		min_distance_group_placement 2
	}
	create_object TURKEY
	{
		number_of_objects 2
		number_of_groups 2
		set_loose_grouping
		set_gaia_object_only
		set_place_for_every_player
		min_distance_to_players 16
		max_distance_to_players 24
		temp_min_distance_group_placement 4
	}

	create_object RELIC
	{
		number_of_objects 1
		set_gaia_object_only
		terrain_to_place_on	DESERT
	}

	if CAPTURE_RELICS
		create_object MONASTERY
		{
			number_of_objects 1
			set_place_for_every_player
			min_distance_to_players 6
			max_distance_to_players 10
		}
	else
		create_object RELIC
		{
			number_of_objects 4
			set_gaia_object_only
			min_distance_to_players 20
			min_distance_group_placement 15
			terrain_to_place_on	BEACH
		}
	endif

	create_object FLOWER_BED
	{
		number_of_objects 10
		group_placement_radius 1
		set_loose_grouping
		set_gaia_object_only
		set_place_for_every_player
		min_distance_to_players 0
		max_distance_to_players 0
	}

	create_object PALM_FOREST_TREE
	{
		number_of_objects 5
		set_gaia_object_only
		set_place_for_every_player
		min_distance_to_players 4
		max_distance_to_players 6
		min_distance_group_placement 2
	}

	create_object JAVELINA
	{
		number_of_objects 2
		set_gaia_object_only
		set_place_for_every_player
		min_distance_to_players 12
		max_distance_to_players 16
		min_distance_group_placement 8
	}
	create_object JAVELINA
	{
		number_of_objects 2
		number_of_groups 2
		group_placement_radius 4
		set_loose_grouping	
		set_gaia_object_only
		set_place_for_every_player
		min_distance_to_players 16
		max_distance_to_players 24
		min_distance_group_placement 12
	}

	create_object JAGUAR
	{
		number_of_objects 2
		set_gaia_object_only
		set_place_for_every_player
		min_distance_to_players 30
		max_distance_to_players 40
		temp_min_distance_group_placement 20
	}
	
	create_object SHORE_FISH
	{
		number_of_objects 30
		set_gaia_object_only
		temp_min_distance_group_placement 2
		terrain_to_place_on	WATER
	}
	create_object SNAPPER
	{
		number_of_objects 20
		set_gaia_object_only
		temp_min_distance_group_placement 3
		terrain_to_place_on	DEEP_WATER
	}
	create_object DORADO
	{
		number_of_objects 20
		set_gaia_object_only
		set_scaling_to_map_size
		temp_min_distance_group_placement 3
		terrain_to_place_on	DEEP_WATER
	}

	create_object MACAW
	{
		number_of_objects 4
		set_gaia_object_only
		set_scaling_to_map_size
	}


	create_object SKELETON
	{
		number_of_objects 2
		set_gaia_object_only
		terrain_to_place_on	BEACH
	}

	create_object ROCK
	{
		number_of_objects 6
		set_gaia_object_only
		set_scaling_to_map_size
		temp_min_distance_group_placement 10
		terrain_to_place_on	BEACH
	}
	create_object ROCK
	{
		number_of_objects 3
		set_gaia_object_only
		set_scaling_to_map_size
		temp_min_distance_group_placement 10
		terrain_to_place_on	DESERT
	}

	create_object FLOWER_BED
	{
		number_of_objects 8
		set_gaia_object_only
		temp_min_distance_group_placement 7
		terrain_to_place_on	DESERT
	}

	create_object PALM_FOREST_TREE
	{
		number_of_objects 12
		number_of_groups 100
		group_placement_radius 3
		set_tight_grouping
		set_gaia_object_only
		set_scaling_to_map_size
		set_place_for_every_player
		min_distance_to_players 15
		min_distance_group_placement 7
		terrain_to_place_on	PLAYER_TERRAIN
	}
