tr_est_proselytism_adopt = {
	modifier = {
		pop_ethics_shift_speed_mult = 1.0
	}
}

tr_est_proselytism_finish = {
	modifier = {	
		job_est_inquisitor_per_pop = 0.02857
		ascension_perks_add = 1
	}
}


tr_est_proselytism_1 = {
	custom_tooltip = tr_est_proselytism_1_desc

	on_enabled = {
		every_neighbor_country = {
			limit = {
				Not = {
					has_ethic = ethic_gestalt_consciousness
					has_country_flag = flag_est_got_mod_proselytism_1
				}
			}
			if = {
				limit = {
					prev = {
						has_ethic = ethic_authoritarian
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_authoritarian
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_authoritarian"
						days = -1
					}
				}
			}
			if = {
				limit = {
					prev = {
						has_ethic = ethic_fanatic_authoritarian
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_authoritarian_fanatic
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_authoritarian_fanatic"
						days = -1
					}
				}
			}				
			if = {
				limit = {
					prev = {
						has_ethic = ethic_egalitarian
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_egalitarian
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_egalitarian"
						days = -1
					}
				}
			}
			if = {
				limit = {
					prev = {
						has_ethic = ethic_fanatic_egalitarian
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_egalitarian_fanatic
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_egalitarian_fanatic"
						days = -1
					}
				}
			}			
			if = {
				limit = {
					prev = {
						has_ethic = ethic_xenophobe
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_xenophobe
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_xenophobe"
						days = -1
					}
				}
			}
			if = {
				limit = {
					prev = {
						has_ethic = ethic_fanatic_xenophobe
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_xenophobe_fanatic
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_xenophobe_fanatic"
						days = -1
					}
				}
			}				
			if = {
				limit = {
					prev = {
						has_ethic = ethic_xenophile
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_xenophile
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_xenophile"
						days = -1
					}
				}
			}
			if = {
				limit = {
					prev = {
						has_ethic = ethic_fanatic_xenophile
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_xenophile_fanatic
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_xenophile_fanatic"
						days = -1
					}
				}
			}				
			if = {
				limit = {
					prev = {
						has_ethic = ethic_militarist
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_militarist
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_militarist"
						days = -1
					}
				}
			}
			if = {
				limit = {
					prev = {
						has_ethic = ethic_fanatic_militarist
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_militarist_fanatic
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_militarist_fanatic"
						days = -1
					}
				}
			}				
			if = {
				limit = {
					prev = {
						has_ethic = ethic_pacifist
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_pacifist
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_pacifist"
						days = -1
					}
				}
			}
			if = {
				limit = {
					prev = {
						has_ethic = ethic_fanatic_pacifist
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_pacifist_fanatic
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_pacifist_fanatic"
						days = -1
					}
				}
			}				
			if = {
				limit = {
					prev = {
						has_ethic = ethic_materialist
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_materialist
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_materialist"
						days = -1
					}
				}
			}
			if = {
				limit = {
					prev = {
						has_ethic = ethic_fanatic_materialist
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_materialist_fanatic
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_materialist_fanatic"
						days = -1
					}
				}
			}
			if = {
				limit = {
					prev = {
						has_ethic = ethic_spiritualist
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_spiritualist
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_spiritualist"
						days = -1
					}
				}
			}
			if = {
				limit = {
					prev = {
						has_ethic = ethic_fanatic_spiritualist
					}
				}
				if = {
					limit = {
						Not = {
							has_modifier = mod_est_proselytism_1_spiritualist_fanatic
						}
					}
					add_modifier = {
						modifier = "mod_est_proselytism_1_spiritualist_fanatic"
						days = -1
					}
				}
			}
		}
	}

	modifier = {
		pop_government_ethic_attraction = 0.05
	}

	tradition_swap = {
		name = tr_est_proselytism_1_passive_AI
		inherit_icon = yes
		inherit_name = yes
		trigger = { est_AI_no_passive_aggressive_traditons = yes }	
		modifier = {
			pop_government_ethic_attraction = 0.20
		}
		weight = { factor = 1 }
	}

	ai_weight = { factor = 5000 }
}

tr_est_proselytism_2 = {
	custom_tooltip = tr_est_proselytism_2_desc

	on_enabled = {
		if = {
			limit = {
				any_war = {
					any_war_participant = {
						is_war_leader = yes
						is_at_war_with = root
						opposing_ethics_divergence = {
							steps > 1
							who = root
						}					
					}
				}							
			}
			add_modifier = {
				modifier = "mod_est_proselytism_2"
				days = -1
			}	
		}
	}	

	ai_weight = { factor = 5000 }
}

tr_est_proselytism_3 = {
	custom_tooltip = tr_est_proselytism_3_desc

	possible = {
		has_tradition = tr_est_proselytism_1
		has_tradition = tr_est_proselytism_2
	}

	on_enabled = {
		every_owned_pop = {
			limit = {
				has_modifier = pop_recently_conquered
			}
			remove_modifier = "pop_recently_conquered"
		}
	}

	ai_weight = { factor = 5000 }
}

tr_est_proselytism_4 = {
	custom_tooltip = tr_est_proselytism_4_desc

	possible = { has_tradition = tr_est_proselytism_3 }

	modifier = {
		country_edict_fund_add = 20
	}
	
	tradition_swap = {
		inherit_icon = yes
		inherit_name = yes
		name = tr_est_proselytism_4_alt
		trigger = {
			OR = {
				is_overlord = no
				est_AI_no_passive_aggressive_traditons = yes
			}
		}	
		modifier = {
			country_edict_fund_add = 20
			planet_crime_mult = -0.15
		}
		weight = { factor = 1 }
	}

	ai_weight = { factor = 5000 }
}

tr_est_proselytism_5 = {
	custom_tooltip = tr_est_proselytism_5_desc

	possible = { has_tradition = tr_est_proselytism_3 }

	ai_weight = { factor = 5000 }
}