namespace = subjects_expanded_persian_satrapy_events

country_event = {
	id = subjects_expanded_persian_satrapy_events.1
	title = subjects_expanded_persian_satrapy_events.EVTNAME1
	desc = subjects_expanded_persian_satrapy_events.EVTDESC1
	picture = DIPLOMACY_eventPicture

	hidden = yes
	is_triggered_only = yes

	trigger = {
		is_subject_of_type = persian_satrapy
		is_revolutionary = no
		NOT = { has_reform = presidential_despot_reform }
	}

	immediate = {
		hidden_effect = {
			if = {
				limit = {
					government = monarchy
				}
				set_country_flag = persian_satrapy_was_monarchy
			}
			else_if = {
				limit = {
					government = republic
				}
				set_country_flag = persian_satrapy_was_republic
			}
			else_if = {
				limit = {
					government = theocracy
				}
				set_country_flag = persian_satrapy_was_monarchy
			}
			if = {
				limit = {
					NOT = { has_reform = presidential_despot_reform }
					is_revolutionary = no
				}
				change_government = republic
				add_government_reform = presidential_despot_reform
			}
		}
	}

	option = {
		name = subjects_expanded_persian_satrapy_events1.EVTOPT1

		ai_chance = { factor = 100 }
	}
}

country_event = {
	id = subjects_expanded_persian_satrapy_events.2
	title = subjects_expanded_persian_satrapy_events.EVTNAME2
	desc = subjects_expanded_persian_satrapy_events.EVTDESC2
	picture = DIPLOMACY_eventPicture

	hidden = yes
	is_triggered_only = yes

	trigger = {
		NOT = { is_subject_of_type = persian_satrapy }
		has_reform = presidential_despot_reform
		OR = {
			has_country_flag = persian_satrapy_was_monarchy
			has_country_flag = persian_satrapy_was_republic
			has_country_flag = persian_satrapy_was_monarchy
		}
	}

	immediate = {
		hidden_effect = {
			remove_government_reform = presidential_despot_reform
			if = {
				limit = {
					has_country_flag = persian_satrapy_was_monarchy
				}
				clr_country_flag = persian_satrapy_was_monarchy
				change_government = monarchy
			}
			if = {
				limit = {
					has_country_flag = persian_satrapy_was_republic
				}
				clr_country_flag = persian_satrapy_was_republic
				change_government = republic
			}
			if = {
				limit = {
					has_country_flag = persian_satrapy_was_monarchy
				}
				clr_country_flag = persian_satrapy_was_monarchy
				change_government = theocracy
			}
		}
	}

	option = {
		name = subjects_expanded_persian_satrapy_events2.EVTOPT1

		ai_chance = { factor = 100 }
	}
}

country_event = {
	id = subjects_expanded_persian_satrapy_events.3
	title = subjects_expanded_persian_satrapy_events.EVTNAME3
	desc = subjects_expanded_persian_satrapy_events.EVTDESC3
	picture = BATTLE_eventPicture

	is_triggered_only = yes

	option = {
		name = subjects_expanded_persian_satrapy_events3.EVTOPT1

		ai_chance = { factor = 100 }

		tooltip = {
			add_country_modifier = {
				name = persian_satrapy_sword_hunt_modifier
				duration = 3650
			}
		}
	}
}

country_event = {
	id = subjects_expanded_persian_satrapy_events.4
	title = subjects_expanded_persian_satrapy_events.EVTNAME4
	desc = subjects_expanded_persian_satrapy_events.EVTDESC4
	picture = BAD_WITH_MONARCH_eventPicture

	is_triggered_only = yes

	trigger = {
		has_subject_of_type = persian_satrapy
		NOT = { can_be_overlord = persian_satrapy }
		NOT = { has_country_flag = vassalizing_invalid_persian_satrapties }
	}

	immediate = {
		hidden_effect = {
			set_country_flag = vassalizing_invalid_persian_satrapties
		}
	}

	option = {
		name = subjects_expanded_persian_satrapy_events4.EVTOPT1

		ai_chance = { factor = 100 }

		add_prestige = -25
		every_subject_country = {
			limit = {
				is_subject_of_type = persian_satrapy
			}
			hidden_effect = {
				grant_independence = yes
			}
			ROOT = {
				vassalize = PREV
			}
			add_liberty_desire = 50
		}
		clr_country_flag = vassalizing_invalid_persian_satrapties
	}
}