tr_est_liberty_adopt = {
	unlocks_agenda = agenda_est_liberty
	modifier = {
		planet_jobs_worker_produces_mult = 0.05
	}
	
	tradition_swap = {
		name = tr_est_liberty_adopt_slavery
		inherit_icon = yes
		inherit_name = yes
		trigger = {
			has_policy_flag = slavery_allowed
			NOT = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
			}
		}	
		modifier = {
			pop_slave_bonus_workforce_mult = 0.05
			pop_cat_slave_happiness = 0.1
		}
		weight = {factor = 1 }
	}
	tradition_swap = {
		name = tr_est_liberty_adopt_slavery_xenophobe
		inherit_icon = yes
		inherit_name = yes
		trigger = {
			OR = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
			}
			has_policy_flag = slavery_allowed
		}	
		modifier = {
			planet_jobs_worker_produces_mult = 0.05
			pop_cat_worker_happiness = 0.1
		}
		weight = {factor = 1 }
	}		
}

tr_est_liberty_finish = {
	modifier = {
#		planet_jobs_specialist_upkeep_mult #(Ben_D): Depricated by Paradox
		planet_jobs_specialist_produces_mult = 0.05 #(Ben_D): Added
		ascension_perks_add = 1
	}
}


tr_est_liberty_1 = {
	modifier = {
		country_base_influence_produces_add = 1.0
	}
	
	tradition_swap = {
		custom_tooltip = tr_est_liberty_1_slavery_desc
	
		name = tr_est_liberty_1_slavery
		inherit_icon = yes
		trigger = {
			has_policy_flag = slavery_allowed
		}	
		modifier = {
			pop_cat_slave_happiness = 0.20			
		}
		weight = { factor = 1 }
	}

	ai_weight = { factor = 5000 }
}

tr_est_liberty_2 = {
	custom_tooltip = tr_est_liberty_2_desc

	possible = {
		has_tradition = tr_est_liberty_1
	}
	
	triggered_modifier = {
		potential = {
			NOT ={
				any_pop_faction = {
					has_modifier = suppressed_faction
				}
			}
		}
		faction_approval = 0.05
	}

	ai_weight = { factor = 5000 }
}

tr_est_liberty_3 = {
	custom_tooltip = tr_est_liberty_3_desc

	tradition_swap = {
		name = tr_est_liberty_3_slavery
		inherit_icon = yes
		trigger = {
			has_policy_flag = slavery_allowed
			NOR = {
				has_valid_civic = civic_fanatic_purifiers
				has_valid_civic = civic_inwards_perfection
			}
		}	
		modifier = {
			country_claim_influence_cost_mult = -0.2
		}
		weight = { factor = 1 }
	}

	ai_weight = { factor = 5000 }
}

tr_est_liberty_4 = {
	possible = {
		has_tradition = tr_est_liberty_1
		has_tradition = tr_est_liberty_3
	}

	modifier = {
		leaders_cost_mult = -0.15
		country_leader_pool_size = 2
	}

	ai_weight = { factor = 5000 }
}

tr_est_liberty_5 = {
	custom_tooltip = tr_est_liberty_5_desc

	on_enabled = {
		if = {
			limit = {
				any_war = {
					any_war_participant = {
						is_war_leader = yes
						is_at_war_with = prevprev
						Or = {
							has_policy_flag = purge_allowed
							has_policy_flag = purge_displacement_only
							has_policy_flag = slavery_allowed
							has_valid_civic = civic_fanatic_purifiers
						}							
					}
				}							
			}
			if = {
				limit = {
					Not = {
						has_modifier = mod_est_liberty_5
					}
				}
				add_modifier = {
					modifier = "mod_est_liberty_5"
					days = -1
				}
			}			
		}	
	}

	
	tradition_swap = {
		name = tr_est_liberty_5_less_nice
		trigger = {
			OR = {
				has_policy_flag = purge_allowed
				has_policy_flag = purge_displacement_only
				has_policy_flag = slavery_allowed
				has_valid_civic = civic_fanatic_purifiers
				has_valid_civic = civic_inwards_perfection
			}				
		}	
		modifier = {
			pop_government_ethic_attraction = 0.20
			country_war_exhaustion_mult = -0.25
		}
		weight = {factor = 1 }
	}

	ai_weight = { factor = 5000 }
}