namespace = GE_Italian_Reforms_Events

#Mantua Knightly Orders reform modifier
country_event = {
	id = GE_Italian_Reforms_Events.1
	title = GE_Italian_Reforms_Events.1.T
	desc = GE_Italian_Reforms_Events.1.D
	picture = GOOD_WITH_MONARCH_eventPicture
	
	is_triggered_only = yes

	hidden = yes

	immediate = {
		if = {
			limit = {
				NOT = { has_government_attribute = enables_ordine_cordone_giallo }
			}
			remove_country_modifier = GE_Mantua_Knightly_Orders_1
			remove_country_modifier = GE_Mantua_Knightly_Orders_2
			remove_country_modifier = GE_Mantua_Knightly_Orders_3
			remove_country_modifier = GE_Mantua_Knightly_Orders_4
		}
		else_if = {
			limit = {
				NOT = {
					has_global_modifier_value = { which = tolerance_own value = 4 }
				}
			}
			remove_country_modifier = GE_Mantua_Knightly_Orders_1
			remove_country_modifier = GE_Mantua_Knightly_Orders_2
			remove_country_modifier = GE_Mantua_Knightly_Orders_3
			remove_country_modifier = GE_Mantua_Knightly_Orders_4
		}
		else_if = {
			limit = {
				NOT = {
					has_global_modifier_value = { which = tolerance_own value = 6 }
				}
			}
			add_country_modifier = {
				name = GE_Mantua_Knightly_Orders_1
				duration = -1
			}
			remove_country_modifier = GE_Mantua_Knightly_Orders_2
			remove_country_modifier = GE_Mantua_Knightly_Orders_3
			remove_country_modifier = GE_Mantua_Knightly_Orders_4
		}
		else_if = {
			limit = {
				NOT = {
					has_global_modifier_value = { which = tolerance_own value = 8 }
				}
			}
			add_country_modifier = {
				name = GE_Mantua_Knightly_Orders_2
				duration = -1
			}
			remove_country_modifier = GE_Mantua_Knightly_Orders_1
			remove_country_modifier = GE_Mantua_Knightly_Orders_3
			remove_country_modifier = GE_Mantua_Knightly_Orders_4
		}
		else_if = {
			limit = {
				NOT = {
					has_global_modifier_value = { which = tolerance_own value = 10 }
				}
			}
			add_country_modifier = {
				name = GE_Mantua_Knightly_Orders_3
				duration = -1
			}
			remove_country_modifier = GE_Mantua_Knightly_Orders_1
			remove_country_modifier = GE_Mantua_Knightly_Orders_2
			remove_country_modifier = GE_Mantua_Knightly_Orders_4
		}
		else_if = {
			limit = {
				has_global_modifier_value = {
					which = tolerance_own
					value = 10
				}
			}
			add_country_modifier = {
				name = GE_Mantua_Knightly_Orders_4
				duration = -1
			}
			remove_country_modifier = GE_Mantua_Knightly_Orders_1
			remove_country_modifier = GE_Mantua_Knightly_Orders_2
			remove_country_modifier = GE_Mantua_Knightly_Orders_3
		}
	}

	option = {
		name = GE_Italian_Reforms_Events.1.OPT1
	}
}

#Genoa Ianuensis
country_event = {
	id = GE_Italian_Reforms_Events.2
	title = GE_Italian_Reforms_Events.2.T
	desc = GE_Italian_Reforms_Events.2.D
	picture = WESTERNISATION_eventPicture
	
	is_triggered_only = yes

	hidden = yes

	immediate = {
		if = {
			limit = {
				OR = {
					NOT = { has_government_attribute = enables_ianuensis_ergo_mercator }
					AND = {
						NOT = { trade_efficiency = 0.30 }
						OR = {
							has_country_modifier = GE_Genoese_Merchants_Explorers_1
							has_country_modifier = GE_Genoese_Merchants_Explorers_2
							has_country_modifier = GE_Genoese_Merchants_Explorers_3
							has_country_modifier = GE_Genoese_Merchants_Explorers_4
							has_country_modifier = GE_Genoese_Merchants_Explorers_5
						}
					}
				}
			}
			remove_country_modifier = GE_Genoese_Merchants_Explorers_1
			remove_country_modifier = GE_Genoese_Merchants_Explorers_2
			remove_country_modifier = GE_Genoese_Merchants_Explorers_3
			remove_country_modifier = GE_Genoese_Merchants_Explorers_4
			remove_country_modifier = GE_Genoese_Merchants_Explorers_5
		}
		else_if = {
			limit = {
				trade_efficiency = 0.70
			}
			add_country_modifier = {
				name = GE_Genoese_Merchants_Explorers_5
				duration = -1
			}
			remove_country_modifier = GE_Genoese_Merchants_Explorers_1
			remove_country_modifier = GE_Genoese_Merchants_Explorers_2
			remove_country_modifier = GE_Genoese_Merchants_Explorers_3
			remove_country_modifier = GE_Genoese_Merchants_Explorers_4
		}
		else_if = {
			limit = {
				trade_efficiency = 0.60
			}
			add_country_modifier = {
				name = GE_Genoese_Merchants_Explorers_4
				duration = -1
			}
			remove_country_modifier = GE_Genoese_Merchants_Explorers_1
			remove_country_modifier = GE_Genoese_Merchants_Explorers_2
			remove_country_modifier = GE_Genoese_Merchants_Explorers_3
			remove_country_modifier = GE_Genoese_Merchants_Explorers_5
		}
		else_if = {
			limit = {
				trade_efficiency = 0.50
			}
			add_country_modifier = {
				name = GE_Genoese_Merchants_Explorers_3
				duration = -1
			}
			remove_country_modifier = GE_Genoese_Merchants_Explorers_1
			remove_country_modifier = GE_Genoese_Merchants_Explorers_2
			remove_country_modifier = GE_Genoese_Merchants_Explorers_4
			remove_country_modifier = GE_Genoese_Merchants_Explorers_5
		}
		else_if = {
			limit = {
				trade_efficiency = 0.40
			}
			add_country_modifier = {
				name = GE_Genoese_Merchants_Explorers_2
				duration = -1
			}
			remove_country_modifier = GE_Genoese_Merchants_Explorers_1
			remove_country_modifier = GE_Genoese_Merchants_Explorers_3
			remove_country_modifier = GE_Genoese_Merchants_Explorers_4
			remove_country_modifier = GE_Genoese_Merchants_Explorers_5
		}
		else = {
			add_country_modifier = {
				name = GE_Genoese_Merchants_Explorers_1
				duration = -1
			}
			remove_country_modifier = GE_Genoese_Merchants_Explorers_2
			remove_country_modifier = GE_Genoese_Merchants_Explorers_3
			remove_country_modifier = GE_Genoese_Merchants_Explorers_4
			remove_country_modifier = GE_Genoese_Merchants_Explorers_5
		}
	}

	option = {
		name = GE_Italian_Reforms_Events.2.OPT1
	}
}

#Mary of the Purity
country_event = {
	id = GE_Italian_Reforms_Events.3
	title = GE_Italian_Reforms_Events.3.t
	desc = GE_Italian_Reforms_Events.3.d
	picture = WESTERNISATION_eventPicture
	
	is_triggered_only = yes

	hidden = yes

	immediate = {
		if = {
			limit = {
				NOT = { has_government_attribute = enables_mary_of_the_purity }
			}
			remove_country_modifier = GE_Mary_Of_The_Purity_1
			remove_country_modifier = GE_Mary_Of_The_Purity_2
			remove_country_modifier = GE_Mary_Of_The_Purity_3
			remove_country_modifier = GE_Mary_Of_The_Purity_4
		}
		else = {
			if = {
				limit = {
					has_global_modifier_value = { which = tolerance_own value = 9 }
				}
				add_country_modifier = {
					name = GE_Mary_Of_The_Purity_4
					duration = -1
					hidden = yes
				}
				remove_country_modifier = GE_Mary_Of_The_Purity_1
				remove_country_modifier = GE_Mary_Of_The_Purity_2
				remove_country_modifier = GE_Mary_Of_The_Purity_3
			}
			else_if = {
				limit = {
					has_global_modifier_value = { which = tolerance_own value = 8 }
				}
				add_country_modifier = {
					name = GE_Mary_Of_The_Purity_3
					duration = -1
					hidden = yes
				}
				remove_country_modifier = GE_Mary_Of_The_Purity_1
				remove_country_modifier = GE_Mary_Of_The_Purity_2
				remove_country_modifier = GE_Mary_Of_The_Purity_4
			}
			else_if = {
				limit = {
					has_global_modifier_value = { which = tolerance_own value = 7 }
				}
				add_country_modifier = {
					name = GE_Mary_Of_The_Purity_2
					duration = -1
					hidden = yes
				}
				remove_country_modifier = GE_Mary_Of_The_Purity_1
				remove_country_modifier = GE_Mary_Of_The_Purity_3
				remove_country_modifier = GE_Mary_Of_The_Purity_4
			}
			else_if = {
				limit = {
					has_global_modifier_value = { which = tolerance_own value = 6 }
				}
				add_country_modifier = {
					name = GE_Mary_Of_The_Purity_1
					duration = -1
					hidden = yes
				}
				remove_country_modifier = GE_Mary_Of_The_Purity_2
				remove_country_modifier = GE_Mary_Of_The_Purity_3
				remove_country_modifier = GE_Mary_Of_The_Purity_4
			}
			else = {
				remove_country_modifier = GE_Mary_Of_The_Purity_1
				remove_country_modifier = GE_Mary_Of_The_Purity_2
				remove_country_modifier = GE_Mary_Of_The_Purity_3
				remove_country_modifier = GE_Mary_Of_The_Purity_4
			}
		}
	}

	option = {
		name = GE_Italian_Reforms_Events.3.a
	}
}