﻿add_namespace = vatican_events
add_namespace = vatican_news_events

country_event = { ##### Annexation event option (Used on italy)
	id = vatican_events.1
	title = vatican_events.1.t
	desc = vatican_events.1.d
	picture = GFX_report_event_nbn	

	is_triggered_only = yes

	option = { 
		name = vatican_events.1.o1
	    	ai_chance = {
			factor = 100
		}

		HLS = { country_event = vatican_events.2 }
	}

	option = { 
		name = vatican_events.1.o2
	    	ai_chance = {
			factor = 0
		}
		HLS = { country_event = vatican_events.3 }

	}

}

country_event = { ##### Agree to be annexed
	id = vatican_events.2
	title = vatican_events.2.t
	desc = vatican_events.2.d
	picture = GFX_report_event_nbn	

	is_triggered_only = yes

	option = {
	    name = vatican_events.2.o1
	    annex_country = { target = FROM transfer_troops = yes }
	}

}

country_event = { ##### Disagree to be annexed
	id = vatican_events.3
	title = vatican_events.3.t
	desc = vatican_events.3.d
	picture = GFX_report_event_nbn	

	is_triggered_only = yes

	option = {
	    name = vatican_events.3.o1
	    create_wargoal = {
			type = annex_everything
			target = FROM
		}
		add_opinion_modifier = {
			target = FROM
			modifier = refused_to_be_annexed
		}
	}

}

country_event = {	##### Recipient of the Crusade national focus
	id = vatican_events.4
	title = vatican_events.4.t
	desc = vatican_events.4.d
	picture = GFX_report_event_nbn	

	is_triggered_only = yes

	option = { 
		name = vatican_events.4.o1
	    	ai_chance = {
			factor = 100
		}

		HLS = { country_event = vatican_events.5 }
	}

}

country_event = {	##### Call a crusade or just leave it as our war? (Got through the focus tree)
	id = vatican_events.5
	title = vatican_events.5.t
	desc = vatican_events.5.d
	picture = GFX_report_event_nbn	

	is_triggered_only = yes

	option = {
	    name = vatican_events.5.o1
	    create_wargoal = {
			type = holywar_wargoal
			target = FROM
		}
	}

	option = {
		name = vatican_events.5.o2
		hidden_effect = {
			FROM = { 
				add_ideas = idea_HLS_global_crusade_target
				country_event = vatican_events.8
			} 
		}
		create_wargoal = {
			type = holywar_wargoal
			target = FROM
		}
		custom_effect_tooltip = vatican_holy_war_event_tooltip		
				#every_country = {
		#	limit = {
		#		AND = {
		#			not = { has_government = islamist }
		#			OR = { ##### All european countries 
		#				is_in_faction_with = HLS
		#				tag = FRA
		#				tag = POR
		#				tag = SPR
		#				tag = ENG
		#				tag = IRE
		#				tag = SWI
		#				tag = ITA
		#				tag = HOL
		#				tag = LUX
		#				tag = BEL
		#				tag = AND
		#				tag = LIC
		#				tag = TUR
		#				tag = GER
		#				tag = AUS
		#				tag = SAM
		#				tag = NOR
		#				tag = DEN
		#				tag = SWE
		#				tag = FIN
		#				tag = SLV
		#				tag = CRO
		#				tag = BOS
		#				tag = CZE
		#				tag = SLO
		#				tag = POL
		#				tag = EST
		#				tag = LAT
		#				tag = LIT
		#				tag = HUN
		#				tag = SER
		#				tag = ALB
		#				tag = MAC
		#				tag = BUL
		#				tag = GRE
		#				tag = ROM
		#				tag = MDV
		#				tag = TRA
		#			}
		#		}	
		#	}	
		#	country_event = { days = 1 id = vatican_events.11 }
		#}
		hidden_effect = {
			FROM = { country_event = { days = 1 id = vatican_events.12 } }
		}	
	}
}

country_event = { ##### When being declared war on as islamic country by Vatican City it triggers the call a crusade event
	id = vatican_events.6	

	is_triggered_only = no
	hidden = yes

	trigger = {
		AND = {
			has_war_with = HLS 
			has_government = islamist
			NOT = { has_idea = idea_HLS_global_crusade_target }
			NOT = { has_idea = idea_HLS_holy_war }
			HLS = { NOT = { has_government = islamist } }
		}
	}
	
	mean_time_to_happen = { days = 1 }

	immediate = {
	    	HLS = { country_event = vatican_events.7 }
	}

	option = {
		name = vatican_events.6.o1
	    	HLS = { country_event = vatican_events.7 }
	}
}

country_event = {   ##### Call a crusade or keep it as our own war? (When using a holy war declaration)
	id = vatican_events.7
	title = vatican_events.7.t
	desc = vatican_events.7.d
	picture = GFX_report_event_nbn	

	is_triggered_only = yes


	option = {
		name = vatican_events.7.o1
		ai_chance = {
			factor = 30
		}

		hidden_effect = { FROM = { add_ideas = idea_HLS_holy_war } }
	}

	option = {
	    	name = vatican_events.7.o2
		ai_chance = {
			factor = 45
		}

		hidden_effect = {
			FROM = { 
				add_ideas = idea_HLS_global_crusade_target
				country_event = vatican_events.8
			} 
		}
		create_wargoal = {
			type = holywar_wargoal
			target = FROM
		}
		custom_effect_tooltip = vatican_holy_war_event_tooltip
		#every_country = {
		#	limit = {
		#		AND = {
		#			not = { has_government = islamist }
		#			OR = { ##### All european countries 
		#				is_in_faction_with = HLS
		#				tag = FRA
		#				tag = POR
		#				tag = SPR
		#				tag = ENG
		#				tag = IRE
		#				tag = SWI
		#				tag = ITA
		#				tag = HOL
		#				tag = LUX
		#				tag = BEL
		#				tag = AND
		#				tag = LIC
		#				tag = TUR
		#				tag = GER
		#				tag = AUS
		#				tag = SAM
		#				tag = NOR
		#				tag = DEN
		#				tag = SWE
		#				tag = FIN
		#				tag = SLV
		#				tag = CRO
		#				tag = BOS
		#				tag = CZE
		#				tag = SLO
		#				tag = POL
		#				tag = EST
		#				tag = LAT
		#				tag = LIT
		#				tag = HUN
		#				tag = SER
		#				tag = ALB
		#				tag = MAC
		#				tag = BUL
		#				tag = GRE
		#				tag = ROM
		#				tag = MDV
		#				tag = TRA
		#			}
		#		}	
		#	}	
		#	country_event = { days = 1 id = vatican_events.11 }
		#}
		hidden_effect = {
			FROM = { country_event = { days = 1 id = vatican_events.12 } }
		}
		add_political_power = -100
	}
}

country_event = { #Calls the 1st news event so that the correct country name is used in the event
	id = vatican_events.8	

	is_triggered_only = yes
	hidden = yes

	immediate = {
	    	news_event = vatican_news_events.1
	}

}

country_event = { ##### Gets rid of the "Holy war against the vatican" national spirit when the war is over
	id = vatican_events.9	

	is_triggered_only = no
	hidden = yes

	trigger = {
		AND = {
			OR = {
				has_idea = idea_HLS_global_crusade_target 
				has_idea = idea_HLS_holy_war 
			}
			has_war = no
		}
	}

	mean_time_to_happen = { days = 1 }

	immediate = {
	    	remove_ideas = idea_HLS_global_crusade_target
		remove_ideas = idea_HLS_holy_war
	}
	
	option = {
		name = vatican_events.9.o1
		remove_ideas = idea_HLS_global_crusade_target
		remove_ideas = idea_HLS_holy_war
	}

}

country_event = {  ##### Focus tree to 'aid our brethren'
	id = vatican_events.10
	title = vatican_events.10.t
	desc = vatican_events.10.d
	picture = GFX_report_event_nbn	

	is_triggered_only = yes
	hidden = no


	mean_time_to_happen = {
		days = 1	
	}

	option = {
		name = vatican_events.10.o1
	    	ai_chance = {
			factor = 70
		}
		FROM = { add_to_faction = ROOT }
		add_opinion_modifier = { 
			target = FROM 
			modifier = agreed_to_our_aid
		}
		FROM = {
			 add_opinion_modifier = { 
				target = ROOT 
				modifier = agreed_to_our_aid
			}
		}
	}
	
	option = {
		name = vatican_events.10.o2
	    	ai_chance = {
			factor = 30
		}
		add_opinion_modifier = {
			target = FROM 
			modifier = disagreed_to_our_aid
		}
		FROM = { 
			add_opinion_modifier = { 
				target = ROOT 
				modifier = disagreed_to_our_aid
			} 
		}
	}

}


country_event = {   ##### When a war is recognised as a Crusade this event is given to all european countries or ones in Vatican city's faction, allowing them to join the war, provide support to the Vatican city or refuse to participate at all
	id = vatican_events.11
	title = vatican_events.11.t
	desc = vatican_events.11.d
	picture = GFX_report_event_nbn	

	is_triggered_only = yes


	option = { ##### Agree to join in the crusades
		name = vatican_events.11.o1
		ai_chance = {
			factor = 30
		}
		create_wargoal = {
			type = crusade_wargoal
			target = FROM
		}
		send_equipment = { target = HLS type = infantry_equipment amount = 300 }
		add_political_power = 50
	}

	option = { ##### Disagree to join the crusades, but still send help
	    	name = vatican_events.11.o2
		ai_chance = {
			factor = 45
		}
		send_equipment = { target = HLS type = infantry_equipment amount = 300 }
		add_manpower = -750
		HLS = { add_manpower = 750 }
		add_political_power = 25
	}

	option = { ##### Disagree to join the crusades entirely
	    	name = vatican_events.11.o3
		ai_chance = {
			factor = 25
		}
		add_political_power = -20
		add_stability = -0.01
	}
}

country_event = {   ##### Some stupid workaround to get the crusade event to work properly
	id = vatican_events.12
	title = vatican_events.12.t
	desc = vatican_events.12.d
	picture = GFX_report_event_nbn	

	is_triggered_only = yes

	option = { 
		name = vatican_events.12.o1
		hidden_effect = {
			every_country = {
				limit = {
					AND = {
						not = { tag = HLS }
						not = { has_government = islamist }
						OR = { ##### All european countries 
							is_in_faction_with = HLS
							tag = FRA
							tag = POR
							tag = SPR
							tag = ENG
							tag = IRE
							tag = SWI
							tag = ITA
							tag = HOL
							tag = LUX
							tag = BEL
							tag = AND
							tag = LIC
							tag = TUR
							tag = GER
							tag = AUS
							tag = SAM
							tag = NOR
							tag = DEN
							tag = SWE
							tag = FIN
							tag = SLV
							tag = CRO
							tag = BOS
							tag = CZE
							tag = SLO
							tag = POL
							tag = EST
							tag = LAT
							tag = LIT
							tag = HUN
							tag = SER
							tag = ALB
							tag = MAC
							tag = BUL
							tag = GRE
							tag = ROM
							tag = MDV
							tag = TRA
						}
					}	
				}	
				country_event = { days = 1 id = vatican_events.11 }
			}
		}
	}

}

country_event = { ##### Asking for more swiss guard
	id = vatican_events.13
	title = vatican_events.13.t
	desc = vatican_events.13.d
	picture = GFX_report_event_nbn	

	is_triggered_only = yes

	option = { #### accepted
		name = vatican_events.13.o1
	    	ai_chance = {
			factor = 80
		}
		
		add_manpower = -100
		add_political_power = 50
		HLS = { country_event = vatican_events.14 }
	}

	option = { #### refused
		name = vatican_events.13.o2
	    	ai_chance = {
			factor = 20
		}

		add_political_power = -20
		HLS = { country_event = vatican_events.15 }
	}

}

country_event = { ##### Accepting the request for more swiss guard
	id = vatican_events.14
	title = vatican_events.14.t
	desc = vatican_events.14.d
	picture = GFX_report_event_nbn	

	is_triggered_only = yes

	option = { 
		name = vatican_events.14.o1
	    	ai_chance = {
			factor = 100
		}

		custom_effect_tooltip = HLS_swiss_guard_tooltip
		hidden_effect = { 
			load_oob = HLS_swiss_guard_oob 
			add_manpower = 25 
		}
	}


}

country_event = { ##### refusing the request for more swiss guard
	id = vatican_events.15
	title = vatican_events.15.t
	desc = vatican_events.15.d
	picture = GFX_report_event_nbn	

	is_triggered_only = yes

	option = { 
		name = vatican_events.15.o1
	    	ai_chance = {
			factor = 100
		}
	}
}


####### News events below

news_event = { ##### Calling a crusade
	id = vatican_news_events.1
	title = vatican_news_events.1.t
	#picture = GFX_news_event_nuke # Image displayed alongside the text.
	major = yes

	is_triggered_only = yes # Optional : if set to "yes" the event will only occur by command

	desc = { 
		text = vatican_news_events.1.d1
		trigger = { NOT = { has_government = islamist } }
	}

	desc = {
		text = vatican_news_events.1.d2
		trigger = { has_government = islamist }
	}
	
	option = { 
		name = vatican_news_events.1.o1
		trigger = { NOT = { has_government = islamist } }
	}

	option = { 
		name = vatican_news_events.1.o2
		trigger = { has_government = islamist }
	}
}

news_event = { ##### Accepting Islam
	id = vatican_news_events.2
	title = vatican_news_events.2.t
	#picture = GFX_news_event_nuke # Image displayed alongside the text.
	major = yes

	is_triggered_only = yes # Optional : if set to "yes" the event will only occur by command

	desc = { 
		text = vatican_news_events.2.d1
		trigger = { NOT = { has_government = islamist } }
	}

	option = { 
		name = vatican_news_events.2.o1
		trigger = { NOT = { has_government = islamist } }
	}

	option = { 
		name = vatican_news_events.2.o2
		trigger = { has_government = islamist }
	}
}

news_event = { ##### condemming islam
	id = vatican_news_events.3
	title = vatican_news_events.3.t
	#picture = GFX_news_event_nuke # Image displayed alongside the text.
	major = yes

	is_triggered_only = yes # Optional : if set to "yes" the event will only occur by command

	desc = { 
		text = vatican_news_events.3.d1
		trigger = { NOT = { has_government = islamist } }
	}

	desc = {
		text = vatican_news_events.3.d2
		trigger = { has_government = islamist }
	}
	
	option = { 
		name = vatican_news_events.3.o1
		trigger = { NOT = { has_government = islamist } }
	}

	option = { 
		name = vatican_news_events.3.o2
		trigger = { has_government = islamist }
	}
}

news_event = { ##### renaming istanbul to constantinople
	id = vatican_news_events.4
	title = vatican_news_events.4.t
	#picture = GFX_news_event_nuke # Image displayed alongside the text.
	major = yes

	is_triggered_only = yes # Optional : if set to "yes" the event will only occur by command

	desc = { 
		text = vatican_news_events.4.d1
		trigger = { NOT = { has_government = islamist } }
	}

	desc = {
		text = vatican_news_events.4.d2
		trigger = { 
			OR = {
				has_government = islamist
				tag = TUR
			}
		}
				
	}
	
	option = { 
		name = vatican_news_events.4.o1
		trigger = { NOT = { has_government = islamist } }
	}

	option = { 
		name = vatican_news_events.4.o2
		trigger = { 
			OR = {
				has_government = islamist
				tag = TUR
			}
		}
	}
}










