# namespace = GME_Pilgrimage_Events

#Pilgrimage IN GME
#country_event = {
#	id = GME_Pilgrimage_Events.1
#	title = GME_Pilgrimage_Events.1.T
#	desc = GME_Pilgrimage_Events.1.D
#	picture = RELIGIOUS_CONVERSION_eventPicture

#	fire_only_once = yes
#	major = yes
#	trigger = {
#		ai = no
#		NOT = { has_global_flag = gme_pilgrimages_enabled }
#	}

#	mean_time_to_happen = {
#		months = 1
#	}

#	option = {
#		name = GME_Pilgrimage_Events.1.OPT1
#		ai_chance = {
#			factor = 100
#		}

#		custom_tooltip = GME_PILGRIMAGES_TT
#		set_global_flag = gme_pilgrimages_enabled
#		hidden_effect = {
#			1933 = {
#				owner = {
#					country_event = {
#						id = GME_Pilgrimage_Events.100
#						days = 365
#					}
#				}
#			}
#			#125 = {
#			#	owner = {
#			#		country_event = {
#			#			id = GME_Pilgrimage_Events.200
#			#			days = 365
#			#		}
#			#	}
#			#}
#		}
#	}

#	option = {
#		name = GME_Pilgrimage_Events.1.OPT2
#		ai_chance = {
#			factor = 0
#		}

#		custom_tooltip = GME_PILGRIMAGES_DISABLE_TT
#		clr_global_flag = gme_pilgrimages_enabled
#	}
#}

#Pilgrimage to Basilica di San Nicola
#country_event = {
#	id = GME_Pilgrimage_Events.100
#	title = GME_Pilgrimage_Events.100.T
#	desc = GME_Pilgrimage_Events.100.D
#	picture = RELIGIOUS_CONVERSION_eventPicture

#	trigger = {
#		has_global_flag = gme_pilgrimages_enabled
#		owns = 1933
#		1933 = {
#			OR = {
#				NOT = { has_province_flag = gme_pilgrimage_started }
#				had_province_flag = {
#					flag = gme_pilgrimage_started
#					days = 9125
#				}
#			}
#			OR = {
#				has_great_project = {
#					type = gme_basilica_san_nicola
#					tier = 1
#				}
#				has_great_project = {
#					type = gme_basilica_san_nicola
#					tier = 2
#				}
#				has_great_project = {
#					type = gme_basilica_san_nicola
#					tier = 3
#				}
#				AND = {
#					base_tax = 10
#					has_tax_building_trigger = yes
#				}
#			}
#		}
#	}

#	goto = 1933

#	mean_time_to_happen = {
#		years = 10
#	}

#	immediate = {
#		1933 = { set_province_flag = gme_pilgrimage_started }
#	}

#	option = {
#		name = GME_Pilgrimage_Events.100.OPT1
#		ai_chance = {
#			factor = 100
#		}

#		custom_tooltip = GME_PILGRIMAGE_TT
#		hidden_effect = {
#			country_event = {
#				id = GME_Pilgrimage_Events.199
#				days = 1095
#			}
#		}
#	}
#}

#Orthodox Scholar
#country_event = {
#	id = GME_Pilgrimage_Events.101
#	title = GME_Pilgrimage_Events.101.T
#	desc = GME_Pilgrimage_Events.101.D
#	picture = PILGRIMAGE_eventPicture

#	trigger = {
#		1933 = {
#			owned_by = ROOT
#			has_province_flag = gme_pilgrimage_started
#			NOT = { has_province_flag = gme_pilgrimage_bari_scholar }
#		}
#	}

#	mean_time_to_happen = {
#		months = 6
#	}

#	goto = 1933

#	immediate = {
#		hidden_effect = { 
#			1933 = { set_province_flag = gme_pilgrimage_bari_scholar }
#		}
#	}

#	option = {
#		name = GME_Pilgrimage_Events.101.OPT1
#		ai_chance = {
#			factor = 50
#		}

#		define_advisor = {
#			type = theologian
#			skill = 1
#			religion = orthodox
#			cost_multiplier = 0.5
#		}
#		add_patriarch_authority = 0.1
#	}

#	option = {
#		name = GME_Pilgrimage_Events.101.OPT2
#		ai_chance = {
#			factor = 50
#			modifier = {
#				factor = 0
#				NOT = { religion = catholic }
#			}
#		}

#		add_papal_influence = 15
#	}
#}

#Orthodox Community
#country_event = {
#	id = GME_Pilgrimage_Events.102
#	title = GME_Pilgrimage_Events.102.T
#	desc = GME_Pilgrimage_Events.102.D
#	picture = RELIGIOUS_CONVERSION_eventPicture

#	trigger = {
#		1933 = {
#			owned_by = ROOT
#			has_province_flag = gme_pilgrimage_started
#			NOT = { religion = orthodox }
#			NOT = { has_province_flag = gme_pilgrimage_bari_orthodox }
#			NOT = { has_province_flag = gme_pilgrimage_bari_catholic }
#		}
#	}

#	mean_time_to_happen = {
#		months = 6
#	}

#	goto = 1933

#	immediate = {
#		hidden_effect = { 
#			1933 = { set_province_flag = gme_pilgrimage_bari_orthodox }
#		}
#	}

#	option = {
#		name = GME_Pilgrimage_Events.102.OPT1
#		ai_chance = {
#			factor = 50
#		}

#		1933 = {
#			if = {
#				limit = {
#					owner = { ADM = 6 }
#				}
#				add_base_tax = 2
#			}
#			else = { add_base_tax = 1 }
#			if = {
#				limit = {
#					owner = { DIP = 6 }
#				}
#				add_base_production = 2
#			}
#			else = { add_base_production = 1 }
#			if = {
#				limit = {
#					owner = { MIL = 6 }
#				}
#				add_base_manpower = 2
#			}
#			else = { add_base_manpower = 1 }
#			change_religion = orthodox
#			add_devastation = 15
#		}
#	}

#	option = {
#		name = GME_Pilgrimage_Events.102.OPT2
#		ai_chance = {
#			factor = 50
#			modifier = {
#				factor = 0
#				NOT = { religion = catholic }
#			}
#		}

#		add_stability_or_adm_power = yes
#		add_papal_influence = 25
#	}
#}

#Catholic Community
#country_event = {
#	id = GME_Pilgrimage_Events.103
#	title = GME_Pilgrimage_Events.103.T
#	desc = GME_Pilgrimage_Events.103.D
#	picture = RELIGIOUS_CONVERSION_eventPicture

#	trigger = {
#		1933 = {
#			owned_by = ROOT
#			has_province_flag = gme_pilgrimage_started
#			NOT = { religion = catholic }
#			NOT = { has_province_flag = gme_pilgrimage_bari_orthodox }
#			NOT = { has_province_flag = gme_pilgrimage_bari_catholic }
#		}
#	}

#	mean_time_to_happen = {
#		months = 6
#	}

#	goto = 1933

#	immediate = {
#		hidden_effect = { 
#			1933 = { set_province_flag = gme_pilgrimage_bari_catholic }
#		}
#	}

#	option = {
#		name = GME_Pilgrimage_Events.103.OPT1
#		ai_chance = {
#			factor = 50
#		}

#		1933 = {
#			if = {
#				limit = {
#					owner = { ADM = 6 }
#				}
#				add_base_tax = 2
#			}
#			else = { add_base_tax = 1 }
#			if = {
#				limit = {
#					owner = { DIP = 6 }
#				}
#				add_base_production = 2
#			}
#			else = { add_base_production = 1 }
#			if = {
#				limit = {
#					owner = { MIL = 6 }
#				}
#				add_base_manpower = 2
#			}
#			else = { add_base_manpower = 1 }
#			random_list = {
#				66 = { change_religion = catholic }
#				33 = { }
#			}
#			add_devastation = 15
#		}
#	}

#	option = {
#		name = GME_Pilgrimage_Events.103.OPT2
#		ai_chance = {
#			factor = 50
#			modifier = {
#				factor = 0
#				NOT = { religion = orthodox }
#			}
#		}

#		add_stability_or_adm_power = yes
#		add_patriarch_authority = 0.03
#	}
#}

#Processione
#country_event = {
#	id = GME_Pilgrimage_Events.104
#	title = GME_Pilgrimage_Events.104.T
#	desc = GME_Pilgrimage_Events.104.D
#	picture = PILGRIMAGE_eventPicture

#	trigger = {
#		1933 = {
#			owned_by = ROOT
#			has_province_flag = gme_pilgrimage_started
#			NOT = { has_province_flag = gme_pilgrimage_bari_processione }
#		}
#	}

#	mean_time_to_happen = {
#		months = 18
#	}

#	goto = 1933

#	immediate = {
#		hidden_effect = { 
#			1933 = { set_province_flag = gme_pilgrimage_bari_processione }
#		}
#	}

#	option = {
#		name = GME_Pilgrimage_Events.104.OPT1
#		ai_chance = {
#			factor = 50
#		}

#		if = {
#			limit = { religion = catholic }
#			1933 = {
#				add_province_modifier = {
#					name = gme_benedizione_san_nicola_catholic
#					duration = 1095
#				}
#			}
#		}
#		else_if = {
#			limit = { religion = orthodox }
#			1933 = {
#				add_province_modifier = {
#					name = gme_benedizione_san_nicola_orthodox
#					duration = 1095
#				}
#			}
#		}
#		1933 = {
#			area = {
#				add_province_modifier = {
#					name = gme_benedizione_san_nicola
#					duration = 1095
#				}
#			}
#		}
#	}
#}

#Pilgrimage Finished
#country_event = {
#	id = GME_Pilgrimage_Events.199
#	title = GME_Pilgrimage_Events.199.T
#	desc = GME_Pilgrimage_Events.199.D
#	picture = RELIGIOUS_CONVERSION_eventPicture

#	is_triggered_only = yes

#	goto = 1933

#	option = {
#		name = GME_Pilgrimage_Events.199.OPT1
#		ai_chance = {
#			factor = 100
#		}

#		1933 = {
#			clr_province_flag = gme_pilgrimage_started
#			clr_province_flag = gme_pilgrimage_bari_orthodox
#			clr_province_flag = gme_pilgrimage_bari_catholic
#			clr_province_flag = gme_pilgrimage_bari_scholar
#			clr_province_flag = gme_pilgrimage_bari_processione
#		}
#	}
#}

#Pilgrimage to Duomo di Palermo
#country_event = {
#	id = GME_Pilgrimage_Events.200
#	title = GME_Pilgrimage_Events.200.T
#	desc = GME_Pilgrimage_Events.200.D
#	picture = RELIGIOUS_CONVERSION_eventPicture

#	trigger = {
#		always = no
#		has_global_flag = gme_pilgrimages_enabled
#		owns = 125
#		125 = {
#			OR = {
#				NOT = { has_province_flag = gme_pilgrimage_started }
#				had_province_flag = {
#					flag = gme_pilgrimage_started
#					days = 9125
#				}
#			}
#			OR = {
#				has_great_project = {
#					type = gme_duomo_palermo
#					tier = 1
#				}
#				has_great_project = {
#					type = gme_duomo_palermo
#					tier = 2
#				}
#				has_great_project = {
#					type = gme_duomo_palermo
#					tier = 3
#				}
#				AND = {
#					base_tax = 10
#					has_tax_building_trigger = yes
#				}
#			}
#		}
#	}

#	goto = 125

#	mean_time_to_happen = {
#		years = 10
#	}

#	immediate = {
#		125 = { set_province_flag = gme_pilgrimage_started }
#	}

#	option = {
#		name = GME_Pilgrimage_Events.100.OPT1
#		ai_chance = {
#			factor = 100
#		}

#		custom_tooltip = GME_PILGRIMAGE_TT
#		hidden_effect = {
#			country_event = {
#				id = GME_Pilgrimage_Events.299
#				days = 1095
#			}
#		}
#	}
#}


#Pilgrimage Finished
#country_event = {
#	id = GME_Pilgrimage_Events.299
#	title = GME_Pilgrimage_Events.299.T
#	desc = GME_Pilgrimage_Events.299.D
#	picture = RELIGIOUS_CONVERSION_eventPicture

#	is_triggered_only = yes
#	goto = 125

#	option = {
#		name = GME_Pilgrimage_Events.299.OPT1
#		ai_chance = {
#			factor = 100
#		}

#		125 = {
#			clr_province_flag = gme_pilgrimage_started
#			clr_province_flag = gme_pilgrimage_bari_orthodox
#			clr_province_flag = gme_pilgrimage_bari_catholic
#			clr_province_flag = gme_pilgrimage_bari_scholar
#			clr_province_flag = gme_pilgrimage_bari_processione
#		}
#	}
#}