##########################################################################
# Empire Policies
#
# #####
#
# AI:
# Base AI-weight is 100, if unchanged
# AI will grab whatever policy-option has the highest weight
#
# #####
#
##########################################################################

esap_spiritualist_2_doctrine = {
	potential = {
		is_country_type = default
		has_ascension_perk = ap_esap_spiritualist_2
	}

	option = {
		name = "policy_option_esap_spiritualist_2_doctrine_engineering"

		modifier = {
			planet_bureaucrats_engineering_research_produces_add = 2.5
		}

		AI_weight = {
			factor = 1
		}
	}

	option = {
		name = "policy_option_esap_spiritualist_2_doctrine_physics"

		modifier = {
			planet_bureaucrats_physics_research_produces_add = 2.5
		}

		AI_weight = {
			factor = 1
		}
	}

	option = {
		name = "policy_option_esap_spiritualist_2_doctrine_society"

		modifier = {
			planet_bureaucrats_society_research_produces_add = 2.5
		}

		AI_weight = {
			factor = 1
		}
	}
}

esap_ct1_expansion_settlers = {
	potential = {
		has_ascension_perk = ap_esap_ct1_expansion
	}

	option = {
		name = "policy_option_esap_ct1_expansion_settlers_A"

		modifier = {
			colony_start_urban_districts_add = 1
			shipclass_colonizer_build_speed_mult = 0.50
			planet_colony_development_speed_mult = 0.25
			ship_colonizer_cost_mult = -0.25
			shipclass_colonizer_hull_mult = -0.50
			category_new_worlds_research_speed_mult = 0.10
		}

		on_disabled = {
			hidden_effect = {
				every_owned_fleet = {
					limit = { is_ship_class = shipclass_colonizer }
					destroy_fleet = this
				}
				every_owned_colony = {
					limit = { is_under_colonization = yes }
					destroy_colony = yes
				}
			}
		}

		AI_weight = {
			factor = 2
			
			modifier = {
				factor = 10
				AND = {
					is_ai = yes
					OR = {
						ai_colonize_plans = 4
						ai_colonize_plans > 4
					}
				}
			}
		}
	}

	option = {
		name = "policy_option_esap_ct1_expansion_settlers_B"

		modifier = {
			colony_start_urban_districts_add = 3
			shipclass_colonizer_build_speed_mult = 0.20
			planet_colony_development_speed_mult = 0.10
			ship_colonizer_cost_mult = 0.25
			shipclass_colonizer_hull_mult = 0.10
			category_new_worlds_research_speed_mult = 0.075
		}

		on_disabled = {
			hidden_effect = {
				every_owned_fleet = {
					limit = { is_ship_class = shipclass_colonizer }
					destroy_fleet = this
				}
				every_owned_colony = {
					limit = { is_under_colonization = yes }
					destroy_colony = yes
				}
			}
		}

		AI_weight = {
			factor = 1

			modifier = {
				factor = 20
				AND = {
					is_ai = yes
					ai_colonize_plans < 4
				}
			}
		}
	}

	option = {
		name = "policy_option_esap_ct1_expansion_settlers_C"

		modifier = {
			colony_start_urban_districts_add = 5
			shipclass_colonizer_build_speed_mult = -0.05
			planet_colony_development_speed_mult = -0.20
			ship_colonizer_cost_mult = 0.75
			shipclass_colonizer_hull_mult = 0.25
			category_new_worlds_research_speed_mult = 0.05
		}

		on_disabled = {
			hidden_effect = {
				every_owned_fleet = {
					limit = { is_ship_class = shipclass_colonizer }
					destroy_fleet = this
				}
				every_owned_colony = {
					limit = { is_under_colonization = yes }
					destroy_colony = yes
				}				
			}
		}

		AI_weight = {
			factor = 1
			modifier = {
				factor = 40
				AND = {
					is_ai = yes
					ai_colonize_plans < 3
				}
			}
		}
	}

	option = {
		name = "policy_option_esap_ct1_expansion_settlers_D"

		modifier = {
			colony_start_urban_districts_add = 8
			shipclass_colonizer_build_speed_mult = -0.20
			planet_colony_development_speed_mult = -0.40
			ship_colonizer_cost_mult = 2.50
			shipclass_colonizer_hull_mult = 0.75
			category_new_worlds_research_speed_mult = 0.025
		}

		on_disabled = {
			hidden_effect = {
				every_owned_fleet = {
					limit = { is_ship_class = shipclass_colonizer }
					destroy_fleet = this
				}
				every_owned_colony = {
					limit = { is_under_colonization = yes }
					destroy_colony = yes
				}				
			}
		}

		AI_weight = {
			factor = 1
			modifier = {
				factor = 80
				AND = {
					is_ai = yes
					ai_colonize_plans < 2
				}
			}
		}
	}
}