﻿add_namespace = djibouti

country_event = { #What do?
	id = djibouti.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event djibouti.1" }
	title = djibouti.1.t
	desc = djibouti.1.d
	picture = GFX_report_event_port_city
	is_triggered_only = yes

	option = { #Keep Germs
		name = djibouti.1.a
		DJI = { get_current_government_type = yes }
		GER = {
			puppet = DJI
			set_autonomy = {
				target = DJI
				autonomous_state = kr_colonial_government
			}
			GER = { country_event = djibouti.5 }
		}
		DJI = { restore_previous_government_type = yes }
		create_country_leader = {
			name = "Ludwig Bockholt"
			desc = "POLITICS_BOCKHOLT_DESC"
			picture = "gfx/leaders/MAF/Portrait_Mittelafrika_Ludwig_Bockholt.png"
			expire = "1.1.1"
			ideology = autocratic_colonial_govt_subtype
		}
		DJI = { add_ideas = Generic_Colonial_Nation_lesser }
		swap_ideas = {
			remove_idea = DJI_chaos_n_shit
			add_idea = DJI_new_german_rule
		}
		hidden_effect = {
			set_cosmetic_tag = DJI_GER
		}
		country_event = {
			id = djibouti.6
			days = 2
		}
		GER = {
			country_event = {
				id = djibouti.6
				days = 5
			}
		}
	}
	option = { #Natives
		name = djibouti.1.b
		set_politics = {
			ruling_party = social_conservative
			elections_allowed = yes
		}
		load_focus_tree = African_Generic_Democracy
		drop_cosmetic_tag = yes
		swap_ideas = {
			remove_idea = DJI_chaos_n_shit
			add_idea = DJI_new_nationhood
		}
		remove_ideas = DJI_Colonial_Nation
		country_event = {
			id = djibouti.7
			days = 2
		}
		country_event = {
			id = djibouti.2
			days = 14
		}
	}
	
	option = { #Russians
		name = djibouti.1.c
		country_event = {
			id = djibouti.3
			days = 3
		}
		DKB = {
			every_unit_leader = {
				limit = {
					has_id = 42021
				}
				set_nationality = DJI
			}
		}
		if = {
			limit = {
				RUS = {
					exists = yes
					NOT = {
						has_socialist_government = yes
					}
				}
			}
			DJI = { get_current_government_type = yes }
			RUS = {
				puppet = DJI
				set_autonomy = {
					target = DJI
					autonomous_state = kx_colored_puppet
				}
				RUS = { country_event = djibouti.5 }
			}
			DJI = { restore_previous_government_type = yes }
			DJI = { add_ideas = Generic_Colonial_Nation_lesser }
		}
		create_country_leader = {
			name = "Semyon Krasnov"
			desc = "POLITICS_SEMEN_KRASNOV_DESC"
			picture = "gfx/leaders/DKB/Portrait_DKB_Semyon_Krasnov.png"
			expire = "1.1.1"
			ideology = pataut_cossack_subtype
		}
		set_cosmetic_tag = DJI_RUS
		swap_ideas = {
			remove_idea = DJI_chaos_n_shit
			add_idea = DJI_new_sagallo
		}
		remove_ideas = DJI_Colonial_Nation
		set_party_name = {
			name = DJI_paternal_autocrat_party2
			long_name = DJI_paternal_autocrat_party2_long
			ideology = paternal_autocrat
		}
		country_event = {
			id = djibouti.8
			days = 2
		}
		RUS = {
			country_event = {
				id = djibouti.8
				days = 5
			}
		}
	}
	option = { #Frogs
		name = djibouti.1.e
		DJI = { get_current_government_type = yes }
		NFA = {
			puppet = DJI
			set_autonomy = {
				target = DJI
				autonomous_state = kr_colonial_government
			}
			NFA = { country_event = djibouti.5 }
		}
		DJI = { restore_previous_government_type = yes }
		DJI = { add_ideas = Generic_Colonial_Nation_lesser }
		swap_ideas = {
			remove_idea = DJI_chaos_n_shit
			add_idea = DJI_restored_french_rule
		}
		remove_ideas = DJI_Colonial_Nation
		set_cosmetic_tag = DJI_NFA
		set_politics = {
			ruling_party = authoritarian_democrat
			elections_allowed = yes
		}
		load_focus_tree = african_republic_authoritarian
		DJI = {
			create_country_leader = {
				name = "Pierre Nouailhetas"
				desc = "POLITICS_NOUILHETAS_DESC"
				picture = "gfx/leaders/DJI/Portrait_Djbouti_Pierre_Nouailhetas.png"
				expire = "1.1.1"
				ideology = colonial_govt_subtype
			}
		}
		country_event = {
			id = djibouti.9
			days = 2
		}
		NFA = {
			country_event = {
				id = djibouti.9
				days = 5
			}
		}
	}
}
country_event = { #Election
	id = djibouti.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event djibouti.2" }
	title = djibouti.2.t
	desc = djibouti.2.d
	picture = GFX_report_event_coast2
	is_triggered_only = yes

	option = { #Current Guy
		name = djibouti.2.a
		add_popularity = {
			ideology = social_conservative
			popularity = 0.2
		}
	}
	option = { #Natpop Dude
		name = djibouti.2.b
		set_politics = {
			ruling_party = national_populist
			elections_allowed = yes
		}
		add_popularity = {
			ideology = national_populist
			popularity = 0.2
		}
		hidden_effect = {
			country_event = {
				id = djibouti.4
				days = 3
			}
		}
	}
}
country_event = { #Tsar guy?
	id = djibouti.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event djibouti.3" }
	title = djibouti.3.t
	desc = djibouti.3.d
	picture = GFX_report_event_coast2
	is_triggered_only = yes

	option = { #Current Guy
		name = djibouti.3.a
	}
	
	option = { #Funny Andorra man
		name = djibouti.3.b
		load_focus_tree = African_Generic_Democracy
		set_politics = {
			ruling_party = market_liberal
			elections_allowed = yes
		}
		add_popularity = {
			ideology = market_liberal
			popularity = 0.2
		}
		create_country_leader = {
			name = "Boris I"
			desc = "POLITICS_BORIS_SKOSSYREFF_DESC"
			picture = "gfx/leaders/DJI/Portrait_Djbouti_Boris_Skossyreff.png"
			expire = "1.1.1"
			ideology = free_market_capitalist_subtype
		}
		set_party_name = {
			name = DJI_market_liberal_party2
			long_name = DJI_market_liberal_party2_long
			ideology = market_liberal
		}
	}
}
country_event = { #Forehead alien joins Somalia
	id = djibouti.4
	immediate = { log = "[GetDateText]: [Root.GetName]: event djibouti.2" }
	title = djibouti.4.t
	desc = djibouti.4.d
	picture = GFX_report_event_SOM_Haaji
	trigger = {
		DJI = {
			has_country_flag = DJI_collapse
		}
		SOM = {
			has_completed_focus = SOM_Somali_Allies
			has_country_leader = { ruling_only = yes name = "Haaji Mahammad Husseen" }
		}
	}
	is_triggered_only = yes
	option = {
		name = djibouti.4.a
		ai_chance = {
			factor = 100
		}
		hidden_effect = {
			SOM = {
				increase_ruling_party_popularity_by_2 = yes
			}
			SOM = {
				change_tag_from = DJI
			}
			SOM = {
				annex_country = {
					target = DJI
				}
			}
		}
	}
	option = {
		name = djibouti.4.b
		ai_chance = {
			factor = 0
		}
		add_popularity = {
			ideology = national_populist
			popularity = 0.1
		}
	}
}
country_event = { #New colony?
	id = djibouti.5
	immediate = { log = "[GetDateText]: [Root.GetName]: event djibouti.5" }
	title = djibouti.5.t
	desc = djibouti.5.d
	picture = GFX_report_event_willy
	is_triggered_only = yes

	option = { #Keep it
		name = djibouti.5.a
		ai_chance = {
			factor = 80
		}
		add_political_power = 20
	}
	option = { #Renounce it
		name = djibouti.5.b
		ai_chance = {
			factor = 20
		}
		set_autonomy = {
			target = DJI
			autonomous_state = autonomy_free
		}
		remove_from_faction = DJI
		DJI = {
			country_event = {
				id = djibouti.10
				days = 1
			}
		}
	}
}
country_event = { #German rule is maintained
	id = djibouti.6
	immediate = { log = "[GetDateText]: [Root.GetName]: event djibouti.6" }
	title = djibouti.6.t
	desc = djibouti.6.d
	picture = GFX_report_event_coast2
	is_triggered_only = yes
	trigger = {
		OR = {
			tag = DJI
			AND = {
				tag = GER
				DJI = {
					is_subject_of = GER
				}
			}
		}
	}
	option = {
		name = djibouti.6.a
		ai_chance = {
			factor = 80
		}
		add_political_power = 10
	}
}

country_event = { #An Independent Djibouti
	id = djibouti.7
	immediate = { log = "[GetDateText]: [Root.GetName]: event djibouti.7" }
	title = djibouti.7.t
	desc = djibouti.7.d
	picture = GFX_report_event_coast2
	is_triggered_only = yes
	
	option = {
		name = djibouti.7.a
		ai_chance = {
			factor = 80
		}
	}
}

country_event = { #Restoration of Sagallo
	id = djibouti.8
	immediate = { log = "[GetDateText]: [Root.GetName]: event djibouti.8" }
	title = djibouti.8.t
	desc = djibouti.8.d
	picture = GFX_report_event_coast2
	is_triggered_only = yes
	trigger = {
		OR = {
			tag = DJI
			AND = {
				tag = RUS
				DJI = {
					is_subject_of = RUS
				}
			}
		}
	}
	option = {
		name = djibouti.8.a
		ai_chance = {
			factor = 80
		}
	}
}

country_event = { #Restoration of French Colonial Rule
	id = djibouti.9
	immediate = { log = "[GetDateText]: [Root.GetName]: event djibouti.9" }
	title = djibouti.9.t
	desc = djibouti.9.d
	picture = GFX_report_event_coast2
	is_triggered_only = yes
	trigger = {
		OR = {
			tag = DJI
			AND = {
				tag = RUS
				DJI = {
					is_subject_of = RUS
				}
			}
		}
	}
	option = {
		name = djibouti.9.a
		ai_chance = {
			factor = 80
		}
	}
}
country_event = { #They renounced us!
	id = djibouti.10
	immediate = { log = "[GetDateText]: [Root.GetName]: event djibouti.10" }
	title = djibouti.10.t
	desc = djibouti.10.d
	picture = GFX_report_event_coast2
	is_triggered_only = yes

	option = {
		name = djibouti.10.a
		ai_chance = {
			factor = 80
		}
		overlord = {
			set_autonomy = {
				target = DJI
				autonomous_state = autonomy_free
			}
			remove_from_faction = DJI
		}
		add_stability = -0.05
		add_political_power = -50
	}
}
country_event = { #Initial flavour event
	id = djibouti.11
	immediate = { log = "[GetDateText]: [Root.GetName]: event djibouti.11" }
	title = djibouti.11.t
	desc = djibouti.11.d
	picture = GFX_report_event_stonetown
	is_triggered_only = yes

	option = {
		name = djibouti.11.a
		ai_chance = {
			factor = 80
		}
		add_stability = -0.05
	}
}

country_event = { #Collapse of the DKAEB
	id = djibouti.12
	immediate = { log = "[GetDateText]: [Root.GetName]: event djibouti.12" }
	title = djibouti.12.t
	desc = djibouti.12.d
	picture = GFX_report_event_railway2
	is_triggered_only = yes

	option = {
		name = djibouti.12.a
		ai_chance = {
			factor = 80
		}
		if = {
			limit = {
				tag = ETH
			}
			add_political_power = -25
			complete_national_focus = ETH_Nationalised_Railroad
			set_country_flag = ETH_public_rail
			clr_country_flag = ETH_vestasien_rail
		}
		add_stability = -0.01
		#The DKAEB railway goes away
		if = {
			limit = {
				owns_state = 268
				}
			268 = { #Djibouti
				DJI_remove_DKAEB = yes
			}
		}
		if = {
			limit = {
				owns_state = 969
				}
			969 = { #Rift Valley
				DJI_remove_DKAEB = yes
			}
		}
		if = {
			limit = {
				owns_state = 548
				}
			548 = { #Uganda
				DJI_remove_DKAEB = yes
			}
		}
		if = {
			limit = {
				owns_state = 977
				}
			977 = { #Kivu
				DJI_remove_DKAEB = yes
			}
		}
		if = {
			limit = {
				owns_state = 949
				}
			949 = { #Maniema
				DJI_remove_DKAEB = yes
			}
		}
		if = {
			limit = {
				owns_state = 879
				}
			879 = { #Katanga
				DJI_remove_DKAEB = yes
			}
		}
	}
}
