namespace = et

# Chalcedonism to Hellenic provinces
province_event = {

	id = et.1
	title = "et.EVTNAME1"
	desc = "et.EVTDESC1"
	picture = RELIGIOUS_CONVERSION_eventPicture
	
	trigger = {
		NOT = { religion = chalcedonism }
		owner = { religion = hellenism }
		religion = hellenism
		NOT = { is_year = 800 }
	}
	mean_time_to_happen = {
		months = 1800

		modifier = {
			factor = 0.6
			is_religion_enabled = coptic
		}
		modifier = {
			factor = 3
			NOT = { is_religion_enabled = arianism }
		}
		modifier = {
			factor = 2
			NOT = { is_religion_enabled = nestorian }
		}
		modifier = {
			factor = 10
			is_year = 600
		}
	}
	
	option = {
		name = "et.EVTOPTA1"
		change_religion = chalcedonism
		add_province_modifier = {
			name = "religious_zeal_at_conv"
			duration = 3650
		}
	}
}

# Chalcedonism to neighbouring province
province_event = {

	id = et.2
	title = "et.EVTNAME2"
	desc = "et.EVTDESC2"
	picture = RELIGIOUS_CONVERSION_eventPicture
	
	trigger = {
		NOT = { religion = chalcedonism }
		any_neighbor_province = { religion = chalcedonism }
		NOT = { is_year = 867 }
	}
	mean_time_to_happen = {
	
		months = 1600

		modifier = {
			factor = 0.8
			OR = { 
				owner = { religion = animism }
				owner = { religion = shamanism }
			}
		}
		modifier = {
			factor = 2
			OR = {
				owner = { religion = zoroastrian }
				owner = { religion = arianism }
			}
		}
		modifier = {
			factor = 3
			owner = { religion_group = muslim }
		}
		modifier = {
			factor = 6
			OR = { 
				owner = { religion_group = dharmic }
				owner = { religion_group = eastern }
			}
		}
		modifier = {
			factor = 0.8
			OR = { 
				religion = hellenism
				religion = shamanism
			}
		}
		modifier = {
			factor = 2
			OR = {
				religion = zoroastrian
				religion = arianism
			}
		}
		modifier = {
			factor = 3
			religion_group = muslim
		}
		modifier = {
			factor = 6
			OR = { 
				religion_group = dharmic
				religion_group = eastern
			}
		}
		modifier = {
			factor = 0.6
			is_religion_enabled = coptic
		}
		modifier = {
			factor = 3
			NOT = { is_religion_enabled = arianism }
		}
		modifier = {
			factor = 2
			NOT = { is_religion_enabled = nestorian }
		}
	}
	
	option = {
		name = "et.EVTOPTA2"
		change_religion = chalcedonism
		add_province_modifier = {
			name = "religious_zeal_at_conv"
			duration = 3650
		}
	}
}

# Christianity in Christian country
province_event = {

	id = et.3
	title = "et.EVTNAME3"
	desc = "et.EVTDESC3"
	picture = RELIGIOUS_CONVERSION_eventPicture
	
	trigger = {
		NOT = { religion = chalcedonism }
		owner = { religion = chalcedonism }
		NOT = { is_year = 867 }
	}
	mean_time_to_happen = {
		months = 1200
		
		modifier = {
			factor = 0.7
			religion = hellenism
		}
		modifier = {
			factor = 0.8
			religion = shamanism
		}
		modifier = {
			factor = 2
			religion = zoroastrian
		}
		modifier = {
			factor = 2
			religion = sunni
		}
		modifier = {
			factor = 2
			religion = shiite
		}
		modifier = {
			factor = 0.6
			is_religion_enabled = coptic
		}
		modifier = {
			factor = 3
			NOT = { is_religion_enabled = arianism }
		}
		modifier = {
			factor = 2
			NOT = { is_religion_enabled = nestorian }
		}
	}
	
	option = {
		name = "et.EVTOPTA3"
		change_religion = chalcedonism
	}
}

# Schism start, PAP exists
country_event = {
	
	id = et.4
	title = "et.EVTNAME4"
	desc = "et.EVTDESC4"
	picture = RELIGION_eventPicture

	fire_only_once = yes

	trigger = {
		tag = PAP
		NOT = { is_religion_enabled = orthodox }
		religion = chalcedonism
		is_year = 840
		#NOT = { has_opinion = { who = { owns = 151 } value = 50 }}
		#NOT = { is_subject_of = { who = { owns = 151 }}}
		151 = { religion = chalcedonism }
	}

	mean_time_to_happen = {
		months = 1200

		modifier = {
			factor = 0.5
			is_year = 900
		}
		modifier = {
			factor = 0.5
			is_year = 1000
		}
		modifier = {
			factor = 0.5
			is_year = 1100
		}
	}

	option = {
		name = "et.EVTOPTA4"
		change_religion = catholic
		every_owned_province = {
			limit = { religion = chalcedonism }
			change_religion = catholic
		}
		hidden_effect = {
			every_country = {
				limit = { religion = chalcedonism }
				country_event = {
					id = et.6
					days = 1
				}
			}
			enable_religion = orthodox
		}
	}
}

# Schism start, PAP doesn't exist
country_event = {
	
	id = et.5
	title = "et.EVTNAME5"
	desc = "et.EVTDESC5"
	picture = RELIGION_eventPicture

	fire_only_once = yes

	trigger = {
		NOT = { exists = PAP }
		NOT = { is_religion_enabled = orthodox }
		religion = chalcedonism
		is_year = 840
		owns = 118
		NOT = { owns = 151 }
		118 = { religion = chalcedonism }
		151 = { religion = chalcedonism }
	}

	mean_time_to_happen = {
		months = 1200

		modifier = {
			factor = 0.5
			is_year = 900
		}
		modifier = {
			factor = 0.5
			is_year = 1000
		}
		modifier = {
			factor = 0.5
			is_year = 1100
		}
	}

	option = {
		name = "et.EVTOPTA5"
		hidden_effect = {
			every_country = {
				limit = { religion = chalcedonism }
				country_event = {
					id = et.6
					days = 1
				}
			}
		}
		enable_religion = orthodox
	}
}

# The Schism
country_event = {
	
	id = et.6
	title = "et.EVTNAME6"
	desc = "et.EVTDESC6"
	picture = RELIGION_eventPicture

	is_triggered_only = yes

	option = {
		name = "et.EVTOPTA6" # Side with Rome
		ai_chance = { 
			factor = 50
			modifier = { 
				factor = 0
				NOT = { technology_group = western }
				NOT = { owns = 118 }
			}
			modifier = { 
				factor = 0
				owns = 151
			}
		}
		change_religion = catholic
		every_owned_province = {
			limit = { religion = chalcedonism }
			change_religion = catholic
		}
	}
	option = {
		name = "et.EVTOPTB6" # Side with Constantinople
		ai_chance = { 
			factor = 50
			modifier = { 
				factor = 0
				technology_group = western
				NOT = { owns = 151 }
			}
			modifier = { 
				factor = 0
				owns = 118
			}
		}
		change_religion = orthodox
		every_owned_province = {
			limit = { religion = chalcedonism }
			change_religion = orthodox
		}
	}
}

# The Schism Mended
country_event = {
	
	id = et.10
	title = "et.EVTNAME10"
	desc = "et.EVTDESC10"
	picture = RELIGION_eventPicture

	is_triggered_only = yes

	option = {
		name = "et.EVTOPTA10" # Become Orthodox
		ai_chance = { 
			factor = 50
		}
		change_religion = orthodox
		every_owned_province = {
			limit = { religion = catholic }
			change_religion = orthodox
		}
	}
	option = {
		name = "et.EVTOPTB10" # Remain Catholic
		ai_chance = { 
			factor = 50
		}
	}
}

#Arianism Spreads
province_event = {

	id = et.11
	title = "et.EVTNAME11"
	desc = "et.EVTDESC11"
	picture = RELIGIOUS_CONVERSION_eventPicture
	
	trigger = {
		is_religion_enabled = arianism
		NOT = { religion = arianism }
		NOT = { is_year = 550 }
		OR = {
			any_neighbor_province = { religion = arianism }
			owner = { any_owned_province = { religion = arianism }}
			owner = { religion = hellenism }
		}
	}
	mean_time_to_happen = {
		months = 3200

		modifier = {
			factor = 0.8
			is_year = 400
		}
		modifier = {
			factor = 0.4
			OR = {
				owner = { religion = germanic }
				owner = { religion = animism }
				owner = { religion = arianism }
			}
		}
		modifier = {
			factor = 0.6
			OR = {
				religion = germanic
				religion = druidism
			}
		}
		modifier = {
			factor = 6
			OR = {
				religion = buddhism
				religion = hinduism
				religion = jainism
				religion = confucianism
				religion = zoroastrian
			}
		}
		modifier = {
			factor = 4
			religion = chalcedonism
		}
		modifier = {
			factor = 4
			owner = { religion = chalcedonism }
		}
		modifier = {
			factor = 0.4
			any_neighbor_province = { religion = arianism }
		}
	}
	
	option = {
		name = "et.EVTOPTA11"
		change_religion = arianism
		add_province_modifier = {
			name = "religious_zeal_at_conv"
			duration = 3650
		}
	}
}

#First Council of Nicaea
province_event = {

	id = et.47
	title = "et.EVTNAME47"
	desc = "et.EVTDESC47"
	picture = RELIGION_eventPicture

	major = yes
	fire_only_once = yes
	
	trigger = {
		NOT = { is_religion_enabled = arianism }
		is_year = 320
		religion = chalcedonism
		owner = { religion = chalcedonism }
		OR = {
			region = anatolia
			region = greece_region
			region = italian_region
		}
	}

	mean_time_to_happen = {
		months = 120
	}
	
	option = {
		name = "et.EVTOPTA47"
		enable_religion = arianism
		owner = {
			random_owned_province = {
				change_religion = arianism
			}
		}
	}
}

#Council of Ephesus
province_event = {

	id = et.48
	title = "et.EVTNAME48"
	desc = "et.EVTDESC48"
	picture = RELIGION_eventPicture

	major = yes
	fire_only_once = yes
	
	trigger = {
		NOT = { is_religion_enabled = nestorian }
		is_year = 420
		religion = chalcedonism
		owner = { religion = chalcedonism }
		OR = {
			region = anatolia
			region = greece_region
			region = italian_region
		}
	}

	mean_time_to_happen = {
		months = 120
	}
	
	option = {
		name = "et.EVTOPTA48"
		enable_religion = nestorian
		every_country = {
			limit = {
				religion = chalcedonism
				capital_scope = { continent = asia }
			}
			change_religion = nestorian
		}
		every_province = {
			limit = {
				religion = chalcedonism
				owner = { capital_scope = { continent = asia } }
			}
			change_religion = nestorian
		}
	}
}

#Council of Chalcedon
province_event = {

	id = et.49
	title = "et.EVTNAME49"
	desc = "et.EVTDESC49"
	picture = RELIGION_eventPicture

	major = yes
	fire_only_once = yes
	
	trigger = {
		NOT = { is_religion_enabled = coptic }
		is_year = 450
		religion = chalcedonism
		owner = { religion = chalcedonism }
		OR = {
			region = anatolia
			region = greece_region
			region = italian_region
		}
	}

	mean_time_to_happen = {
		months = 120
	}
	
	option = {
		name = "et.EVTOPTA48"
		enable_religion = coptic
		every_province = {
			limit = {
				religion = chalcedonism
				continent = africa
				NOT = { region = tripoli_region }
				NOT = { region = tunisian_region }
				NOT = { region = algerian_region }
				NOT = { region = moroccan_region }
			}
			change_religion = coptic
		}
		every_country = {
			limit = {
				religion = chalcedonism
				capital_scope = { religion = coptic }
			}
			change_religion = coptic
		}
	}
}

#Nestorianism Spreads
province_event = {

	id = et.50
	title = "et.EVTNAME50"
	desc = "et.EVTDESC50"
	picture = RELIGIOUS_CONVERSION_eventPicture
	
	trigger = {
		continent = asia
		is_religion_enabled = nestorian
		NOT = { religion = nestorian }
		is_year = 600
		NOT = { is_year = 1000 }
		OR = {
			religion = tengri_pagan_reformed
			religion = zoroastrian
		}
		OR = {
			owner = { religion = tengri_pagan_reformed }
			owner = { religion = zoroastrian }
			owner = { religion = nestorian }
		}
	}
	mean_time_to_happen = {
		months = 5000

		modifier = {
			factor = 2
			religion = zoroastrianism
		}

		modifier = {
			factor = 0.6
			any_neighbor_province = { religion = nestorian }
		}
	}
	
	option = {
		name = "et.EVTOPTA50"
		change_religion = nestorian
		add_province_modifier = {
			name = "religious_zeal_at_conv"
			duration = 3650
		}
	}
}

#Catholic to Chalcedonian provinces
province_event = {

	id = et.51
	title = "et.EVTNAME51"
	desc = "et.EVTDESC51"
	picture = POPE_PREACHING_eventPicture
	
	trigger = {
		religion = chalcedonism
		is_religion_enabled = catholic
	}
	mean_time_to_happen = {
		months = 100

		modifier = {
			factor = 0.1
			any_neighbor_province = { religion = catholic }
		}

	}
	
	option = {
		name = "et.EVTOPTA51"
		change_religion = catholic
	}
}

#Orthodox to Chalcedonian provinces
province_event = {

	id = et.52
	title = "et.EVTNAME52"
	desc = "et.EVTDESC52"
	picture = ORTHODOX_eventPicture
	
	trigger = {
		religion = chalcedonism
		is_religion_enabled = orthodox
	}
	mean_time_to_happen = {
		months = 100

		modifier = {
			factor = 0.1
			any_neighbor_province = { religion = orthodox }
		}

	}
	
	option = {
		name = "et.EVTOPTA52"
		change_religion = orthodox
	}
}