
###########################
#Spanish African Events
###########################
#By IratePirate
###########################

add_namespace = spanishafrica

country_event = { #Spanish Africa Intro Event
	id = spanishafrica.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.1" }
	title = spanishafrica.1.t
	desc = spanishafrica.1.d
	picture = GFX_report_event_guinea
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.1.a
		ai_chance = {
			factor = 100
		}
		}
	}
	
country_event = { #Reform?
	id = spanishafrica.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.2" }
	title = spanishafrica.2.t
	desc = spanishafrica.2.d
	picture = GFX_report_event_pedro
	is_triggered_only = yes

	option = {
		name = spanishafrica.2.a
		ai_chance = {
			factor = 60
		}

		}
		
	option = {
		name = spanishafrica.2.b
		ai_chance = {
			factor = 100
		}
		set_politics = {
			ruling_party = authoritarian_democrat
			elections_allowed = no
		}
		add_popularity = {
			ideology = authoritarian_democrat
			popularity = 0.30
			}
		add_stability = -0.05
		add_war_support = 0.1
		}
	}

#event about el-Krim removed
	
country_event = { #Worker shortages
	id = spanishafrica.4
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.4" }
	title = spanishafrica.4.t
	desc = spanishafrica.4.d
	picture = GFX_report_event_picking
	is_triggered_only = yes
	
	option = {
		name = spanishafrica.4.a
		ai_chance = {
			factor = 100
		}
		if = {
		limit = {
			tag = SFA
			}
			add_ideas = SFA_labour_shortages
			add_stability = -0.02
		}
		add_political_power = -20
		}
	}
	
country_event = { #Black Monday
	id = spanishafrica.5
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.5" }
	title = spanishafrica.5.t
	desc = spanishafrica.5.d
	picture = GFX_report_event_stonetown
	is_triggered_only = yes
	
	option = {
		name = spanishafrica.5.a
		ai_chance = {
			factor = 100
		}
		if = {
		limit = {
			tag = SFA
			}
			add_stability = -0.25
			add_political_power = -100
			add_war_support = -0.15
			decrease_ruling_party_popularity_by_10 = yes
		}
		}
	}
	
country_event = { #Collapse of Spanish Africa
	id = spanishafrica.6
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.6" }
	title = spanishafrica.6.t
	desc = spanishafrica.6.d
	picture = GFX_report_event_lagoon

	mean_time_to_happen = {
		days = 60
	}

	fire_only_once = yes
	
trigger = {
		NOT = {
			has_country_flag = SFA_collapse
		}
		NOT = {
			has_game_rule = {
				rule = SFA_survival
				option = SFA_SURVIVAL_LIVES
			}
		}
		tag = SFA
		SPR = { is_ai = yes }
		date > 1936.06.01
		OR = {
			has_stability < 0
			has_game_rule = {
				rule = SFA_survival
				option = SFA_SURVIVAL_DIES
			}
		}
		NOT = {
			AND = {
				is_ai = yes
				has_war = yes
			}
		}
	}

	option = {
		name = spanishafrica.6.a
		ai_chance = {
			factor = 100
		}
		news_event = {
			id = sharedafrika.74
			days = 1
		}
		every_unit_leader = { set_nationality = SPR }
		transfer_navy = {
			target = SPR
		}
		hidden_effect = {
			SFA_collapse = yes
			set_country_flag = SFA_collapse
		}
	}
	option = {
		name = spanishafrica.6.b
	trigger = {
			country_exists = SPR
		}
		ai_chance = {
			factor = 0
		}
		news_event = {
			id = sharedafrika.74
			days = 1
		}
		hidden_effect = {
			SFA_collapse = yes
			set_country_flag = SFA_collapse
		}
		transfer_navy = {
			target = SPR
		}
		SPR = {
			change_tag_from = SFA
		}
	}
	option = {
		name = spanishafrica.6.c
	trigger = {
			country_exists = CAR
		}
		ai_chance = {
			factor = 0
		}
		news_event = {
			id = sharedafrika.74
			days = 1
		}
		hidden_effect = {
			SFA_collapse = yes
			set_country_flag = SFA_collapse
		}
		CAR = {
			change_tag_from = SFA
		}
	}
	option = {
		name = spanishafrica.6.e
	trigger = {
			country_exists = CNT
		}
		ai_chance = {
			factor = 0
		}
		news_event = {
			id = sharedafrika.74
			days = 1
		}
		hidden_effect = {
			SFA_collapse = yes
			set_country_flag = SFA_collapse
		}
		CNT = {
			change_tag_from = SFA
		}
	}
}

country_event = { #Rif raiders
	id = spanishafrica.7
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.7" }
	title = spanishafrica.7.t
	desc = spanishafrica.7.d
	picture = GFX_report_event_ETH_rif_map
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.7.a
		ai_chance = {
			factor = 100
		}
		if = {
			limit = {
				tag = SFA
				}
			add_political_power = -50
			}
		}
	option = {
		name = spanishafrica.7.b
		ai_chance = {
			factor = 30
		}
		if = {
			limit = {
				tag = SFA
				}
		add_stability = -0.05
			}
		}
	}
	
country_event = { #Rio Muni border
	id = spanishafrica.8
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.8" }
	title = spanishafrica.8.t
	desc = spanishafrica.8.d
	picture = GFX_report_event_rural
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.8.a
		ai_chance = {
			factor = 25
		}
		if = {
			limit = {
			tag = SFA
		}
		add_stability = -0.1
		add_war_support = 0.1
		}
	}
	option = {
		name = spanishafrica.8.b
		ai_chance = {
			factor = 75
		}
		if = {
			limit = {
			tag = SFA
		}
		add_stability = 0.05
		add_political_power = -50
		}
	}
}

	
country_event = { #Trade Unionists Deported to Annobón
	id = spanishafrica.9
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.9" }
	title = spanishafrica.9.t
	desc = spanishafrica.9.d
	picture = GFX_report_event_coast2
	is_triggered_only = yes
	
	#minor_flavor = yes
trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	option = {
		name = spanishafrica.9.a
		ai_chance = {
			factor = 30
		}
		if = {
			limit = {
				tag = SFA
			}
			add_political_power = 10
		}
		}
	}
	
country_event = { #Comite Sindical de Cacao Founded
	id = spanishafrica.10
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.10" }
	title = spanishafrica.10.t
	desc = spanishafrica.10.d
	picture = GFX_report_event_port_goods
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.10.a
		ai_chance = {
			factor = 30
		}
		if = {
			limit = {
				tag = SFA
			}
		}
		add_political_power = 10
		}
	}
	
country_event = { #The Collapse of CEGUI
	id = spanishafrica.11
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.11" }
	title = spanishafrica.11.t
	desc = spanishafrica.11.d
	picture = GFX_report_event_cable
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.11.a
		ai_chance = {
			factor = 30
		}
		if = {
			limit = {
				tag = SFA
			}
		}
		add_political_power = -20
		}
	}
	
country_event = { #Death of Malabo
	id = spanishafrica.12
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.12" }
	title = spanishafrica.12.t
	desc = spanishafrica.12.d
	picture = GFX_report_event_oyo
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.12.a
		ai_chance = {
			factor = 30
		}
		if = {
			limit = {
				tag = SFA
			}
			add_stability = -0.01
		}
		add_political_power = -5
		}
	}
	
country_event = { #Instituto Colonia Indigena established
	id = spanishafrica.13
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.13" }
	title = spanishafrica.13.t
	desc = spanishafrica.13.d
	picture = GFX_report_event_duse
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.13.a
		ai_chance = {
			factor = 30
		}
		if = {
			limit = {
				tag = SFA
			}
			add_stability = 0.01
		}
		add_political_power = 10
		}
	}
	
country_event = { #The ALENA Scandal
	id = spanishafrica.14
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.14" }
	title = spanishafrica.14.t
	desc = spanishafrica.14.d
	picture = GFX_report_event_street2
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.14.a
		ai_chance = {
			factor = 30
		}
		if = {
			limit = {
				tag = SFA
			}
			add_political_power = -50
			add_war_support = -0.02
			}
			decrease_ruling_party_popularity_by_5 = yes
		}
	}
	
country_event = { #Attack on the Evinayong Mission
	id = spanishafrica.15
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.15" }
	title = spanishafrica.15.t
	desc = spanishafrica.15.d
	picture = GFX_report_event_street2
	is_triggered_only = yes
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.15.a
		ai_chance = {
			factor = 30
		}
		if = {
			limit = {
				tag = SFA
			}
			add_stability = -0.01
			add_war_support = -0.01
			}
			add_political_power = -5
		}
	}
	
country_event = { #The Hatton & Cookson Incident
	id = spanishafrica.16
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.16" }
	title = spanishafrica.16.t
	desc = spanishafrica.16.d
	picture = GFX_report_event_march
	is_triggered_only = yes
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.16.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			add_stability = -0.01
			}
		}
	}
	
country_event = { #The Legend of Mbo Mba
	id = spanishafrica.17
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.17" }
	title = spanishafrica.17.t
	desc = spanishafrica.17.d
	picture = GFX_report_event_chiefs
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes
	option = {
		name = spanishafrica.17.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			add_political_power = -20
			}
		}
	}
	
country_event = { #Gold Discovered at Kukumankok
	id = spanishafrica.18
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.18" }
	title = spanishafrica.18.t
	desc = spanishafrica.18.d
	picture = GFX_report_event_hillstation
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.18.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			add_stability = 0.01
			}
		}
	}
	
country_event = { #Hermann Eidmann Summits Pico Basilé
	id = spanishafrica.19
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.19" }
	title = spanishafrica.19.t
	desc = spanishafrica.19.d
	picture = GFX_report_event_lake
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes
	option = {
		name = spanishafrica.19.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			add_stability = 0.01
			}
			add_political_power = 10
		}
	}
	
country_event = { #The San Carlos Affair
	id = spanishafrica.20
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.20" }
	title = spanishafrica.20.t
	desc = spanishafrica.20.d
	picture = GFX_report_event_guinea
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes
	option = {
		name = spanishafrica.20.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			add_stability = -0.01
			}
			add_political_power = -10
		}
	}
	
country_event = { #The Saint of the Forest
	id = spanishafrica.21
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.21" }
	title = spanishafrica.21.t
	desc = spanishafrica.21.d
	picture = GFX_report_event_lagoon
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes
	option = {
		name = spanishafrica.21.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			add_war_support = 0.01
			}
		}
	}
	
	
country_event = { #CEMR Develops New Iron Mine at Nador
	id = spanishafrica.22
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.22" }
	title = spanishafrica.22.t
	desc = spanishafrica.22.d
	picture = GFX_report_event_ruins
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.22.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
				290 = { add_resource = {
						type = steel
						amount = 6
					}
				}			
			}
		}
	}
	
country_event = { #Restoration of the SS Kaiser Wilhelm der Grosse
	id = spanishafrica.23
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.23" }
	title = spanishafrica.23.t
	desc = spanishafrica.23.d
	picture = GFX_report_event_willy
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.23.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = GER
			}
			add_political_power = 20
			}
		}
	}

	
country_event = { #The Spanish Army Reaches Semana
	id = spanishafrica.24
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.24" }
	title = spanishafrica.24.t
	desc = spanishafrica.24.d
	picture = GFX_report_event_march
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.24.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			add_political_power = 10
			}
		}
	}
	
country_event = { #Famine in the Rif
	id = spanishafrica.25
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.25" }
	title = spanishafrica.25.t
	desc = spanishafrica.25.d
	picture = GFX_report_event_ETH_rif_map
	is_triggered_only = yes

	option = {
		name = spanishafrica.25.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			add_stability = -0.01
			}
			add_political_power = 5
			290 = {
				add_dynamic_modifier = {
					modifier = SPR_famine
					days = 90
				}
			}
		}
	}

	
country_event = { #Turbulence in the Colonies
	id = spanishafrica.26
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.26" }
	title = spanishafrica.26.t
	desc = spanishafrica.26.d
	picture = GFX_report_event_boma
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.26.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			add_stability = -0.03
			decrease_ruling_party_popularity_by_5 = yes
			add_manpower = -287
			}
		if = {
			limit = {
				OR = {
					tag = MAF
					tag = CMR
					tag = GAB
					tag = KOG
					tag = TKE
					tag = KOG
				}
			}
			add_manpower = 761
			add_stability = -0.01
			}
			add_political_power = -10
		}
	}
	
country_event = { #Uprising in Mongomo
	id = spanishafrica.27
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.27" }
	title = spanishafrica.27.t
	desc = spanishafrica.27.d
	picture = GFX_report_event_namib
	is_triggered_only = yes

	option = {
		name = spanishafrica.27.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			add_political_power = -20
			}
		}
	}
	
country_event = { #Uprising in the Rif
	id = spanishafrica.28
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.28" }
	title = spanishafrica.28.t
	desc = spanishafrica.28.d
	picture = GFX_report_event_troops2
	is_triggered_only = yes

	option = {
		name = spanishafrica.28.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			add_political_power = -10
			}
		}
	}
	
country_event = { #Uprising in Mongomo #SPAIN or CAR
	id = spanishafrica.29
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.29" }
	title = spanishafrica.29.t
	desc = spanishafrica.29.d
	picture = GFX_report_event_namib
	is_triggered_only = yes

	option = {
		name = spanishafrica.29.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			}
			add_political_power  = 5
			hidden_effect = {
				load_oob = SFA_REB
			}
		}
	}
	
country_event = { #Revolt in the Rif
	id = spanishafrica.30
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.30" }
	title = spanishafrica.30.t
	desc = spanishafrica.30.d
	picture = GFX_report_event_ETH_rif_map
	is_triggered_only = yes
	

	option = {
		name = spanishafrica.30.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			}
			add_political_power  = 5
			hidden_effect = {
			load_oob = SFA_RIF
			}
		}
	}
	
country_event = { #The Alonso Affair
	id = spanishafrica.31
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.31" }
	title = spanishafrica.31.t
	desc = spanishafrica.31.d
	picture = GFX_report_event_portlouis
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = spanishafrica.31.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			add_stability = -0.02
			add_political_power = -20
			}
		if = {
			limit = {
				tag = SPR
			}
			add_stability = -0.01
			add_political_power = -10
			}
		}
	}

country_event = { #Conflict on Fernando Pó
	id = spanishafrica.32
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.32" }
	title = spanishafrica.32.t
	desc = spanishafrica.32.d
	picture = GFX_report_event_square
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes
	option = {
		name = spanishafrica.32.a
		ai_chance = {
			factor = 16
		}
		if = {
			limit = {
				tag = SFA
			}
			add_political_power = -10
		}
	}
}
country_event = { #Autonomy for the Rif - from SPR rework, for SFA
	id = spanishafrica.33
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.33" }
	title = spanishafrica.33.t
	desc = spanishafrica.33.d
	picture = GFX_report_event_SPR_rif_republic_map
	is_triggered_only = yes

	trigger = {
		owns_state = 290
	}
	
	option = {
		name = spanishafrica.33.a
		ai_chance = {
			factor = 30
		}
		add_political_power = -50
		290 = {
			remove_dynamic_modifier = { modifier = SPR_rif_is_going_to_shit_modifier }
		}
		every_owned_state = {
			limit = {
				OR = {
					state = 290
					state = 1318
				}
			}
			add_dynamic_modifier = { modifier = SPR_morocco_modifier }
		}
	}
	option = {
		name = spanishafrica.33.b
		ai_chance = {
			factor = 70
		}
		add_political_power = 50
		add_war_support = 0.05
		290 = {
			remove_dynamic_modifier = { modifier = SPR_rif_is_going_to_shit_modifier }
			set_demilitarized_zone = yes
		}
		hidden_effect = {
			country_event = {
				id = spanishafrica.34
				days = 3
			}
		}
	}
}

country_event = { #Rif Revolts Mid Civil War - from SPR rework, for SFA
	id = spanishafrica.34
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.34" }
	title = spanishafrica.34.t
	desc = spanishafrica.34.d
	picture = GFX_report_event_SPR_rif_republic_map
	timeout_days = 7
	is_triggered_only = yes

	trigger = {
		owns_state = 290
	}

	immediate = {
		290 = {
			set_demilitarized_zone = no
			transfer_state_to = RIF
			add_core_of = RIF
		}
		var:290.owner = {
			declare_war_on = {
				target = RIF
				type = annex_everything
			}
		}
	}
	
	option = {
		name = spanishafrica.34.a
		ai_chance = {
			factor = 25
		}
	}
}

country_event = { #The Rif Garrison Takes Over - from SPR rework, for SFA
	id = spanishafrica.35
	immediate = { log = "[GetDateText]: [Root.GetName]: event spanishafrica.35" }
	title = spanishafrica.35.t
	desc = spanishafrica.35.d
	picture = GFX_report_event_SPR_rif_republic_map
	is_triggered_only = yes

	trigger = {
		owns_state = 290
	}
	
	option = {
		name = spanishafrica.35.a
		ai_chance = {
			factor = 25
		}
		add_stability = 0.01
	}
}

country_event = {#nomads
	id = spanishafrica.36
	immediate = {log = "[GetDateText]: [Root.GetName]: event spanishafrica.36"}
	title = spanishafrica.36.t
	desc = spanishafrica.36.d
	picture = GFX_report_event_SPA_tropas_nomadas
	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = spanishafrica.36.a
		army_experience = 5
		set_technology = {
			camel_corps_tech = 1
		}
	}
}

country_event = {#regulares
	id = spanishafrica.37
	immediate = {log = "[GetDateText]: [Root.GetName]: event spanishafrica.37"}
	title = spanishafrica.37.t
	desc = spanishafrica.37.d
	picture = GFX_report_event_SPA_regulares
	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = spanishafrica.37.a
		army_experience = 5
	}
}

country_event = {#transfer Rif to SFA?
	id = spanishafrica.38
	immediate = {log = "[GetDateText]: [Root.GetName]: event spanishafrica.38"}
	title = spanishafrica.38.t
	desc = spanishafrica.38.d
	picture = GFX_report_event_SPA_regulares
	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = spanishafrica.38.a # keep it
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				SFA = { is_ai = no }
			}
		}
	}
	option = {
		name = spanishafrica.38.b # hand it to SFA
		ai_chance = {
			factor = 1
			modifier = {
				factor = 100
				SFA = { is_ai = no }
			}
		}
		SFA = {
			country_event = {
				id = spanishafrica.38
				days = 2
			}
		}
	}
}
country_event = {#Rif transferred
	id = spanishafrica.39
	immediate = {log = "[GetDateText]: [Root.GetName]: event spanishafrica.39"}
	title = spanishafrica.39.t
	desc = spanishafrica.39.d
	picture = GFX_report_event_SPA_regulares
	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = spanishafrica.39.a #nice
		transfer_state = 290
		add_political_power = 25
		hidden_effect = {
			country_event = { id = sprd.1165 days = 97 } #The Republican Exodus - fire to SFA instead of SPR
			country_event = { id = sprd.398 days = 171 } #Canarian Surrealists Assemble - fire to SFA instead of SPR
			country_event = { id = sprd.407 days = 216 } #The Return of Abd el Krim - fire to SFA instead of SPR
		}
	}
}
