set_leader_PER = {

	if = { limit = { has_country_flag = set_liberalism }

		if = { limit = { check_variable = { liberalism_leader = 0 } }
			add_to_variable = { liberalism_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Roozbeh Farahanipour"
				picture = "roozbeh_farahanipour.dds"
				ideology = liberalism
				traits = {
					western_liberalism
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { liberalism_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
		if = { limit = { check_variable = { liberalism_leader = 1 } NOT = { check_variable = { b = 1 } } }
			add_to_variable = { liberalism_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Shah Reza Pahlavi"
				picture = "Western_King_Reza_Pahlavi.dds"
				ideology = liberalism
				traits = {
					king
					western_liberalism
					inexperienced
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { liberalism_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
	}
	else_if = { limit = { has_country_flag = set_Communist-State }
		if = { limit = { check_variable = { Communist-State_leader = 0 } }
			add_to_variable = { Communist-State_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Ali Khavari"
				picture = "generic.dds"
				ideology = Communist-State
				traits = {
					emerging_Communist-State
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Communist-State_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
		if = { limit = { check_variable = { Communist-State_leader = 1 } NOT = { check_variable = { b = 1 } } }
			add_to_variable = { Communist-State_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Navid Shomali"
				picture = "navid_shomali.dds"
				ideology = Communist-State
				traits = {
					emerging_Communist-State
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Communist-State_leader = 1 } }
			set_temp_variable = { b = 1 }
		}
	}
	else_if = { limit = { has_country_flag = set_Mod_Vilayat_e_Faqih }
		if = { limit = { check_variable = { Mod_Vilayat_e_Faqih_leader = 0 } }
			add_to_variable = { Mod_Vilayat_e_Faqih_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Mohammad Khatami"
				picture = "Mohammad_Khatami.dds"
				ideology = Mod_Vilayat_e_Faqih
				traits = {
					emerging_Vilayat_e_Faqih
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Mod_Vilayat_e_Faqih_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
		if = { limit = { check_variable = { Mod_Vilayat_e_Faqih_leader = 1 } NOT = { check_variable = { b = 1 } } }
			add_to_variable = { Mod_Vilayat_e_Faqih_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Hassan Rouhani"
				picture = "Hassan_Rouhani.dds"
				ideology = Mod_Vilayat_e_Faqih
				traits = {
					emerging_Vilayat_e_Faqih
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Mod_Vilayat_e_Faqih_leader = 1 } }
			set_temp_variable = { b = 1 }
		}
		if = { limit = { check_variable = { Mod_Vilayat_e_Faqih_leader = 2 } NOT = { check_variable = { b = 1 } } }
			add_to_variable = { Mod_Vilayat_e_Faqih_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Mohammad Javad Zarif"
				picture = "Mohammad_Javad_Zarif.dds"
				ideology = Mod_Vilayat_e_Faqih
				traits = {
					scientist
					emerging_Mod_Vilayat_e_Faqih
					cautious
					stubborn
					political_dancer
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Mod_Vilayat_e_Faqih_leader = 1 } }
			set_temp_variable = { b = 1 }
		}
	}
	else_if = { limit = { has_country_flag = set_anarchist_communism }
		if = { limit = { check_variable = { anarchist_communism_leader = 0 } }
			add_to_variable = { anarchist_communism_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Maryam Rojavi"
				picture = "maryam_rojavi.dds"
				ideology = anarchist_communism
				traits = {
					emerging_anarchist_communism
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { anarchist_communism_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
	}
	else_if = { limit = { has_country_flag = set_Neutral_Communism }
		if = { limit = { check_variable = { Neutral_Communism_leader = 0 } }
			add_to_variable = { Neutral_Communism_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Mansoor Hekmat"
				picture = "generic.dds"
				ideology = Neutral_Communism
				traits = {
					neutrality_Neutral_Communism
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Neutral_Communism_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
		if = { limit = { check_variable = { Neutral_Communism_leader = 1 } NOT = { check_variable = { b = 1 } } }
			add_to_variable = { Neutral_Communism_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Hamid Taqvaee"
				picture = "hamid_taqvaee.dds"
				ideology = Neutral_Communism
				traits = {
					neutrality_Neutral_Communism
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Neutral_Communism_leader = 1 } }
			set_temp_variable = { b = 1 }
		}
	}
	else_if = { limit = { has_country_flag = set_Neutral_green }
		if = { limit = { check_variable = { Neutral_green_leader = 0 } }
			add_to_variable = { Neutral_green_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Kazem Moussavi"
				picture = "kazem_moussavi.dds"
				ideology = Neutral_green
				traits = {
					neutrality_Neutral_green
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Neutral_green_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
	}
	else_if = { limit = { has_country_flag = set_Nat_Autocracy }
		if = { limit = { check_variable = { Nat_Autocracy_leader = 0 } }
			add_to_variable = { Nat_Autocracy_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Maj. Gen. Yahya Rahim Safavi"
				picture = "Portrait_Yahya_Rahim_Safavi.dds"
				ideology = Nat_Autocracy
				traits = {
					nationalist_Nat_Autocracy
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Nat_Autocracy_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
		if = { limit = { check_variable = { Nat_Autocracy_leader = 1 } NOT = { check_variable = { b = 1 } } }
			add_to_variable = { Nat_Autocracy_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Maj. Gen. Mohammad Ali Jafari"
				picture = "Portrait_Mohammad_Ali_Jafari.dds"
				ideology = Nat_Autocracy
				traits = {
					nationalist_Nat_Autocracy
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Nat_Autocracy_leader = 1 } }
			set_temp_variable = { b = 1 }
		}
	}
	else_if = { limit = { has_country_flag = set_Monarchist }
		if = { limit = { check_variable = { Monarchist_leader = 0 } }
			add_to_variable = { Monarchist_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Reza II"
				picture = "Western_King_Reza_Pahlavi.dds"
				ideology = Monarchist
				traits = {
					nationalist_Monarchist
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Monarchist_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
	}
	else_if = { limit = { has_country_flag = set_Vilayat_e_Faqih }
		if = { limit = { check_variable = { Vilayat_e_Faqih_leader = 0 } }
			add_to_variable = { Vilayat_e_Faqih_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Mahmoud Ahmadinejad"
				picture = "ahmadinejad.dds"
				ideology = Vilayat_e_Faqih
				traits = {
					emerging_Vilayat_e_Faqih
					IRGC_Member
					likeable
					rash
					zealous
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Vilayat_e_Faqih_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
		if = { limit = { check_variable = { Vilayat_e_Faqih_leader = 1 } NOT = { check_variable = { b = 1 } } }
			add_to_variable = { Vilayat_e_Faqih_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Ayatollah Khamenei"
				picture = "Ayatollahi_Khamenei.dds"
				ideology = Vilayat_e_Faqih
				traits = {
					cleric
					emerging_Vilayat_e_Faqih
					geopolitical_thinker
					political_dancer
					stubborn
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Vilayat_e_Faqih_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
		if = { limit = { check_variable = { Vilayat_e_Faqih_leader = 2 } NOT = { check_variable = { b = 1 } } }
			add_to_variable = { Vilayat_e_Faqih_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Qasem Soleimani"
				picture = "IRCG_Gen_Qasem_Soleimani.dds"
				ideology = Vilayat_e_Faqih
				traits = {
					guerrilla_leader
					emerging_Vilayat_e_Faqih
					IRGC_Member
					geopolitical_thinker
					sly
					stubborn
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Vilayat_e_Faqih_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
		if = { limit = { check_variable = { Vilayat_e_Faqih_leader = 3 } NOT = { check_variable = { b = 1 } } }
			add_to_variable = { Vilayat_e_Faqih_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Ali Akbar Velayati"
				picture = "IRCG_cand_Ali_Akbar_Velayati.dds"
				ideology = Vilayat_e_Faqih
				traits = {
					doctor
					emerging_Vilayat_e_Faqih
					IRGC_Member
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Vilayat_e_Faqih_leader = 1 } }
			set_temp_variable = { b = 1 }
		}
		if = { limit = { check_variable = { Vilayat_e_Faqih_leader = 4 } NOT = { check_variable = { b = 1 } } }
			add_to_variable = { Vilayat_e_Faqih_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Mohammad Bagher Ghalibaf"
				picture = "Mohammad_Bagher_Ghalibaf.dds"
				ideology = Vilayat_e_Faqih
				traits = {
					guerrilla_leader
					emerging_Vilayat_e_Faqih
					IRGC_Member
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Vilayat_e_Faqih_leader = 1 } }
			set_temp_variable = { b = 1 }
		}
	}
	else_if = { limit = { has_country_flag = set_Western_Autocracy }
		if = { limit = { check_variable = { Western_Autocracy_leader = 0 } }
			add_to_variable = { Western_Autocracy_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Maryam Rajavi"
				picture = "Western_Maryam_Rajavi.dds"
				ideology = Western_Autocracy
				traits = {
					guerrilla_leader
					western_Western_Autocracy
					pro_american
					emotional
					deceitful
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Western_Autocracy_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
	}
	else_if = { limit = { has_country_flag = set_Neutral_conservatism }
		if = { limit = { check_variable = { Neutral_conservatism_leader = 0 } }
			add_to_variable = { Neutral_conservatism_leader = 1 }
			hidden_effect = { kill_country_leader = yes }

			create_country_leader = {
				name = "Mir-Hossein Mousavi"
				picture = "Neutral_Mir-Hossein_Mousavi.dds"
				ideology = Neutral_conservatism
				traits = {
					writer
					neutrality_Neutral_conservatism
					capable
					stubborn
					honest
				}
			}

			if = { limit = { has_country_flag = do_not_retire } subtract_from_variable = { Neutral_conservatism_leader = 1 } }
			if = { limit = { date < 2016.1.2 } set_temp_variable = { b = 1 } } #skip if 2017
		}
	}
}