###########################################
# Somalia Decisions by Todd Howard
###########################################

political_actions = {
	SOM_sultans_folly = {
		icon = generic_prepare_civil_war
		allowed = { always = no } #manually activated
		available = {
			has_completed_focus = SOM_forthegreatergood
		}
		is_good = no
		fire_only_once = yes
		days_mission_timeout = 200
		ai_will_do = { factor = 100 }
		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision SOM_sultans_folly"
			add_political_power = 150
			add_stability = 0.10
			increase_ruling_party_popularity_by_10 = yes
		}
		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout SOM_sultans_folly"
			custom_effect_tooltip = SOM_sultans_fall_tt
			add_political_power = -150
			add_stability = -0.10
			hidden_effect = {
				country_event = som.19
			}		
		}
	}
}

SOM_faction_decisions = {

SOM_djibouti_issue = {# purchase djibouti from MAF
icon = generic_agreement
		allowed = { original_tag = SOM }
		available = {
			tag = SOM
			is_subject = no
			DJI = {
				owns_state = 944
			}
		}
		visible = {
		DJI = {
			owns_state = 944
		}
		OR = {
				has_completed_focus = SOM_Securing_Social_State
				has_completed_focus = SOM_Securing_National_State
				has_completed_focus = SOM_Free_And_Proud
				has_completed_focus = SOM_True_Ajuuraan
				has_completed_focus = SOM_Proud_And_Regal
			}
		}
		fire_only_once = yes
		cost = 50
		days_remove = 15
		ai_will_do = { factor = 0 }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision SOM_djibouti_issue"
		}
		remove_effect = {
		country_event = som.44
		}
	}
	
SOM_djibouti_war = {# purchase djibouti from MAF
icon = generic_agreement
		allowed = { original_tag = SOM }
		available = {
			tag = SOM
			is_subject = no
			owns_state = 944
			DJI = {
				owns_state = 1297
			}
		}
		visible = {
		owns_state = 944
		DJI = {
			owns_state = 1297
			}
		}
		fire_only_once = yes
		cost = 50
		days_remove = 15
		ai_will_do = { factor = 0 }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision SOM_djibouti_issue"
		}
		remove_effect = {
		declare_war_on = {
				target = DJI
				type = annex_everything
			}
		}
	}
SOM_join_germany = {# join Reichspakt
icon = generic_agreement
		allowed = { original_tag = SOM }
		available = {
			tag = SOM
			is_in_faction = no
			is_subject = no
			GER = {
			exists = yes
			is_faction_leader = yes
				}
			OR = {
				has_government = authoritarian_democrat
				has_government = paternal_autocrat
				has_country_flag = SOM_BOQOR_DEM
				has_country_flag = SOM_REPUBLICAN_SYL
				}
			NOT = {
					has_idea = SOM_Somali_Isolation
				}
			}
		visible = {
			NOT = {
			has_idea = SOM_Somali_Isolation
			}
			owns_state = 944
			OR = {
				has_completed_focus = SOM_Securing_Social_State
				has_completed_focus = SOM_Securing_National_State
				has_completed_focus = SOM_Free_And_Proud
				has_completed_focus = SOM_True_Ajuuraan
				has_completed_focus = SOM_Proud_And_Regal
			}
		}
		fire_only_once = yes
		cost = 30
		days_remove = 15

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision SOM_join_germany"
		}
		remove_effect = {
		GER = {
		country_event = som.61
			}
		}
	}
SOM_join_japan = {# join Co-Prosperity Sphere
icon = generic_agreement
		allowed = { original_tag = SOM }
		available = {
			tag = SOM
			is_in_faction = no
			is_subject = no
			JAP = {
			exists = yes
			is_faction_leader = yes
				}
			OR = {
				has_government = national_populist
				has_government = authoritarian_democrat
				has_government = paternal_autocrat
				has_country_flag = SOM_BOQOR_DEM
			}
			ETH = {
				NOT = {
				is_in_faction_with = JAP
					}
				}
			NOT = {
			has_idea = SOM_Somali_Isolation
				}
			}
		visible = {
		NOT = {
			has_idea = SOM_Somali_Isolation
		}
		owns_state = 944
		OR = {
				has_completed_focus = SOM_Securing_Social_State
				has_completed_focus = SOM_Securing_National_State
				has_completed_focus = SOM_Free_And_Proud
				has_completed_focus = SOM_True_Ajuuraan
				has_completed_focus = SOM_Proud_And_Regal
			}
		}
		fire_only_once = yes
		cost = 30
		days_remove = 15

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision VIN_join_japan"
		}
		remove_effect = {
		JAP = {
		country_event = som.61
			}
		}
	}
SOM_join_entente = {# join Entente
icon = generic_agreement
		allowed = { original_tag = SOM }
		available = {
			tag = SOM
			is_in_faction = no
			is_subject = no
			ENT = {
			exists = yes
			is_faction_leader = yes
				}
			OR = {
				has_country_flag = SOM_REPUBLICAN_SYL
				has_country_flag = SOM_BOQOR_DEM
				has_country_flag = SOM_Boqor
				}
			NOT = {
					has_idea = SOM_Somali_Isolation
				}
			}
		visible = {
		NOT = {
			has_idea = SOM_Somali_Isolation
		}
		owns_state = 944
		OR = {
				has_completed_focus = SOM_Securing_Social_State
				has_completed_focus = SOM_Securing_National_State
				has_completed_focus = SOM_Free_And_Proud
				has_completed_focus = SOM_True_Ajuuraan
				has_completed_focus = SOM_Proud_And_Regal
			}
		}
		fire_only_once = yes
		cost = 30
		days_remove = 15

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision SOM_join_germany"
		}
		remove_effect = {
		ENT = {
		country_event = som.61
			}
		}
	}
SOM_join_egypt = {# join Cairo Axis
icon = generic_agreement
		allowed = { original_tag = SOM }
		available = {
			tag = SOM
			is_in_faction = no
			is_subject = no
			EGY = {
			exists = yes
			is_faction_leader = yes
				}
			NOT = {
				OR = {
				has_government = totalist
				has_government = syndicalist
				has_government = radical_socialist
				}
			}
			NOT = {
					has_idea = SOM_Somali_Isolation
				}
			}
		visible = {
		NOT = {
			has_idea = SOM_Somali_Isolation
		}
			owns_state = 944
			EGY = {
			is_faction_leader = yes
			}
		OR = {
				has_completed_focus = SOM_Securing_Social_State
				has_completed_focus = SOM_Securing_National_State
				has_completed_focus = SOM_Free_And_Proud
				has_completed_focus = SOM_True_Ajuuraan
				has_completed_focus = SOM_Proud_And_Regal
			}
		}
		fire_only_once = yes
		cost = 30
		days_remove = 15

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision SOM_join_germany"
		}
		remove_effect = {
		EGY = {
		country_event = som.61
			}
		}
	}
SOM_join_afghanistan = {# join Kabul Pact
icon = generic_agreement
		allowed = { original_tag = SOM }
		available = {
			tag = SOM
			is_in_faction = no
			is_subject = no
			AFG = {
			exists = yes
			is_faction_leader = yes
				}
			NOT = {
					has_idea = SOM_Somali_Isolation
				}
			}
		visible = {
		NOT = {
			has_idea = SOM_Somali_Isolation
		}
			owns_state = 944
			AFG = {
			is_faction_leader = yes
			}
		OR = {
				has_completed_focus = SOM_Securing_Social_State
				has_completed_focus = SOM_Securing_National_State
				has_completed_focus = SOM_Free_And_Proud
				has_completed_focus = SOM_True_Ajuuraan
				has_completed_focus = SOM_Proud_And_Regal
			}
		}
		fire_only_once = yes
		cost = 30
		days_remove = 15

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision SOM_join_afghanistan"
		}
		remove_effect = {
		AFG = {
		country_event = som.61
			}
		}
	}
SOM_join_ottomans = {# join Ottomans
icon = generic_agreement
		allowed = { original_tag = SOM }
		available = {
			tag = SOM
			is_in_faction = no
			is_subject = no
			has_country_flag = SOM_Boqor
			TUR = {
				exists = yes
				is_faction_leader = yes
				}
			EGY = {
				is_faction_leader = no
				}
			NOT = {
				has_country_leader = { ruling_only = yes name = "Maxamed Siyaad Barre" }
				has_government = totalist
				has_government = syndicalist
				has_government = radical_socialist
				}
			NOT = {
					has_idea = SOM_Somali_Isolation
				}
			}
		visible = {
		NOT = {
			has_idea = SOM_Somali_Isolation
		}
			owns_state = 944
		TUR = {
			is_faction_leader = yes
			}
		OR = {
				has_completed_focus = SOM_Securing_Social_State
				has_completed_focus = SOM_Securing_National_State
				has_completed_focus = SOM_Free_And_Proud
				has_completed_focus = SOM_True_Ajuuraan
				has_completed_focus = SOM_Proud_And_Regal
			}
		}
		fire_only_once = yes
		cost = 30
		days_remove = 15

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision SOM_join_germany"
		}
		remove_effect = {
		TUR = {
		country_event = som.61
			}
		}
	}
SOM_join_kivu = {# join Kivu
icon = generic_agreement
		allowed = { original_tag = SOM }
		available = {
			tag = SOM
			is_in_faction = no
			is_subject = no
		KIV = {
		exists = yes
		has_socialist_government = yes
		is_faction_leader = yes
		}
		OR = {
			has_government = totalist
			has_government = syndicalist
			has_government = radical_socialist
			}
		NOT = {
			has_idea = SOM_Somali_Isolation
			}
		}
		visible = {
		NOT = {
			has_idea = SOM_Somali_Isolation
		}
			owns_state = 944
		KIV = {
			is_faction_leader = yes
			}
		OR = {
				has_completed_focus = SOM_Securing_Social_State
				has_completed_focus = SOM_Securing_National_State
				has_completed_focus = SOM_Free_And_Proud
				has_completed_focus = SOM_True_Ajuuraan
				has_completed_focus = SOM_Proud_And_Regal
			}
		}
		fire_only_once = yes
		cost = 30
		days_remove = 15

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision SOM_join_germany"
		}
		remove_effect = {
		KIV = {
		country_event = som.61
			}
		}
	}
SOM_join_bhc = {# join BHC
icon = generic_agreement
		allowed = { original_tag = SOM }
		available = {
			tag = SOM
			is_in_faction = no
			is_subject = no
		BHC = {
		exists = yes
		has_socialist_government = yes
		is_faction_leader = yes
		}
		OR = {
			has_government = totalist
			has_government = syndicalist
			has_government = radical_socialist
			}
			NOT = {
					has_idea = SOM_Somali_Isolation
				}
		}
		visible = {
			owns_state = 944
		NOT = {
			has_idea = SOM_Somali_Isolation
		}
		BHC = {
			is_faction_leader = yes
			}
		OR = {
				has_completed_focus = SOM_Securing_Social_State
				has_completed_focus = SOM_Securing_National_State
				has_completed_focus = SOM_Free_And_Proud
				has_completed_focus = SOM_True_Ajuuraan
				has_completed_focus = SOM_Proud_And_Regal
			}
		}
		fire_only_once = yes
		cost = 30
		days_remove = 15

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision SOM_join_germany"
		}
		remove_effect = {
		BHC = {
		country_event = som.61
			}
		}
	}
SOM_join_russia = {# join Russia
icon = generic_agreement
		allowed = { original_tag = SOM }
		available = {
			tag = SOM
			is_in_faction = no
			is_subject = no
		RUS = {
		exists = yes
		is_faction_leader = yes
			}
		NOT = {
					has_idea = SOM_Somali_Isolation
				}
		}
		visible = {
			owns_state = 944
		NOT = {
			has_idea = SOM_Somali_Isolation
		}
		RUS = {
			is_faction_leader = yes
			}
		OR = {
				has_completed_focus = SOM_Securing_Social_State
				has_completed_focus = SOM_Securing_National_State
				has_completed_focus = SOM_Free_And_Proud
				has_completed_focus = SOM_True_Ajuuraan
				has_completed_focus = SOM_Proud_And_Regal
			}
		}
		fire_only_once = yes
		cost = 30
		days_remove = 15

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision SOM_join_germany"
		}
		remove_effect = {
		RUS = {
		country_event = som.61
			}
		}
	}
SOM_isolation = {# isolation
icon = generic_agreement
		allowed = { original_tag = SOM }
		available = {
			tag = SOM
			is_in_faction = no
			is_subject = no
		}
		visible = {
			owns_state = 944
		OR = {
				has_completed_focus = SOM_Securing_Social_State
				has_completed_focus = SOM_Securing_National_State
				has_completed_focus = SOM_Free_And_Proud
				has_completed_focus = SOM_True_Ajuuraan
				has_completed_focus = SOM_Proud_And_Regal
			}
		}
		fire_only_once = yes
		cost = 30
		days_remove = 15
		ai_will_do = { factor = 0 }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision SOM_join_germany"
		}
		remove_effect = {
		add_ideas = SOM_Somali_Isolation
		}
	}
}