########################
###     Policies     ###
########################
### MOTHERLY HIVE

##############################
###Motherly Hive Personality
##############################
	
WL_lv_m_h_maternity_personality_policy = { 
	potential = {
		OR = {
			has_civic = civic_WL_lv_motherly_hive	
			has_origin = origin_WL_lv_motherly_hive
			has_country_flag = init_flag_motherly_hive
		}
	}

	option = {	
		name = "WL_lv_m_h_maternity_personality_policy_standard"
		
		policy_flags = {
			WL_lv_m_h_maternity_personality_policy_standard
		}
		
		on_enabled = {
			hidden_effect = {
			}
		}
		
		AI_weight = { factor = 10 }
	}
	
	option = {	
		name = "WL_lv_m_h_maternity_personality_policy_universal"
		
		modifier = {
			pop_happiness = -0.1
		}
		
		policy_flags = {
			WL_lv_m_h_maternity_personality_policy_universal
		}
		
		on_enabled = {
			hidden_effect = {
			}
		}
		
		AI_weight = { factor = 0 }
	}
}

##############################
###Population Special Controls
##############################

#TODO: count jobs, not sure how yet

WL_lv_motherly_non_hive_pop_limit = { 
	potential = {
		OR = {
			has_civic = civic_WL_lv_motherly_hive	
			has_origin = origin_WL_lv_motherly_hive
			has_country_flag = init_flag_motherly_hive
		}
	}
	
	option = {
		name = "WL_lv_m_non_hive_pop_0_limit_per_planet"
		
		potential = {
			any_owned_planet = {
				count_owned_pop_amount = {
					limit = {
						is_being_purged = no
						is_being_assimilated = no
#						has_job_type = WL_lv_hive_xeno_special_pop
					} 
					count > 24
				}
			}
		}
		
		modifier = {
			country_unity_produces_mult = -0.05
			pop_growth_speed = -0.10
		}
		
		policy_flags = {
			WL_lv_m_non_hive_pop_0_limit_per_planet
		}
		
		on_enabled = {
			hidden_effect = {
				owner = {
					set_country_flag = SYSTEM_non_hive_pop_0_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_200_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_100_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_50_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_25_limit_per_planet
				}
			}
		}
		
		AI_weight = { factor = 0 }
	}

	option = {	
		name = "WL_lv_m_non_hive_pop_25_limit_per_planet"
		
		modifier = {
			country_unity_produces_mult = -0.035
			pop_growth_speed = -0.05
		}
		
		policy_flags = {
			WL_lv_m_non_hive_pop_25_limit_per_planet
		}
		
		on_enabled = {
			hidden_effect = {
				owner = {
					set_country_flag = SYSTEM_non_hive_pop_25_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_200_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_100_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_50_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_0_limit_per_planet
				}
			}
		}
		
		AI_weight = { factor = 0 }
	}

	option = {	
		name = "WL_lv_m_non_hive_pop_50_limit_per_planet"
		
		modifier = {
			country_unity_produces_mult = -0.02
			pop_growth_speed = -0.02
		}
		
		policy_flags = {
			WL_lv_m_non_hive_pop_50_limit_per_planet
		}
		
		on_enabled = {
			hidden_effect = {
				owner = {
					set_country_flag = SYSTEM_non_hive_pop_50_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_200_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_100_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_25_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_0_limit_per_planet
				}
			}
		}
		
		AI_weight = { factor = 0 }
	}

	option = {	
		name = "WL_lv_m_non_hive_pop_100_limit_per_planet"
		
		modifier = {
			country_unity_produces_mult = -0.015
			pop_growth_speed = -0.015
		}
		
		policy_flags = {
			WL_lv_m_non_hive_pop_100_limit_per_planet
		}
		
		on_enabled = {
			hidden_effect = {
				owner = {
					set_country_flag = SYSTEM_non_hive_pop_100_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_200_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_50_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_25_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_0_limit_per_planet
				}
			}
		}
		
		AI_weight = { factor = 100 }
	}

	option = {	
		name = "WL_lv_m_non_hive_pop_200_limit_per_planet"
		
		modifier = {
			country_unity_produces_mult = -0.01
			pop_growth_speed = -0.01
		}
		
		policy_flags = {
			WL_lv_m_non_hive_pop_200_limit_per_planet
		}
		
		on_enabled = {
			hidden_effect = {
				owner = {
					set_country_flag = SYSTEM_non_hive_pop_200_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_100_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_50_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_25_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_0_limit_per_planet
				}
			}
		}
		
		AI_weight = { factor = 0 }
	}

	option = {	
		name = "WL_lv_m_non_hive_pop_no_limit_per_planet"
		
		policy_flags = {
			WL_lv_m_non_hive_pop_no_limit_per_planet
		}
		
		on_enabled = {
			hidden_effect = {
				owner = {
					remove_country_flag = SYSTEM_non_hive_pop_200_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_100_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_25_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_50_limit_per_planet
					remove_country_flag = SYSTEM_non_hive_pop_0_limit_per_planet
				}
			}
		}
		
		AI_weight = { factor = 0 }
	}
}

##############################
###Population Interactions Controls
##############################

WL_lv_livestock_interactions_policy = { 
	potential = {
		OR = {
			has_civic = civic_WL_lv_motherly_hive	
			has_origin = origin_WL_lv_motherly_hive
		}
	}
	option = {	
		name = "WL_lv_livestock_interactions_policy_default"
		
		modifier = {
			pop_happiness = 0.1
		}

		policy_flags = {
			WL_lv_livestock_interactions_policy_default
		}

		on_enabled = {
			hidden_effect = {
				owner = { remove_country_flag = SYSTEM_WL_lv_m_no_special_interactions }
			}
		}

		AI_weight = { factor = 10 }
	}

	option = {			
		name = "WL_lv_livestock_interactions_policy_prohibited"
		
		modifier = {
			pop_happiness = 0.05
		}

		policy_flags = {
			WL_lv_livestock_interactions_policy_prohibited
		}

		on_enabled = {
			hidden_effect = {
				owner = { set_country_flag = SYSTEM_WL_lv_m_no_special_interactions }
			}
		}
		AI_weight = { factor = 0 }
	}
}