###########################
# Suidwestafrika Events
###########################

add_namespace = swa
add_namespace = NMB.collapse

### Südwes becomes Suidwes

country_event = { #New Statthalter?
	id = swa.1
	immediate = {log = "[GetDateText]: [Root.Getname]: event swa.1"}
	title = swa.1.t
	desc = swa.1.d
	is_triggered_only = yes
	fire_only_once = yes
	picture = GFX_report_event_african_soldiers


option = { 
		name = swa.1.a
		ai_chance = {
			factor = 100
		}
		retire_country_leader = yes

create_country_leader = {
	name = "Louis Weichardt"
	picture = "gfx/leaders/NAM/NAM_Louis_Weichardt.png"
	expire = "1.1.1"
	ideology = social_democrat_subtype
	traits = {}
}

create_country_leader = {
	name = "Louis Weichardt"
	picture = "gfx/leaders/NAM/NAM_Louis_Weichardt.png"
	expire = "1.1.1"
	ideology = social_liberal_subtype
	traits = {}
}
create_country_leader = {
	name = "Louis Weichardt"
	picture = "gfx/leaders/NAM/NAM_Louis_Weichardt.png"
	expire = "1.1.1"
	ideology = colonial_govt_subtype
	traits = {}
}

create_country_leader = {
	name = "Louis Weichardt"
	picture = "gfx/leaders/NAM/NAM_Louis_Weichardt.png"
	expire = "1.1.1"
	ideology = social_conservative_subtype
	traits = {}
}

create_country_leader = {
	name = "Louis Weichardt"
	picture = "gfx/leaders/NAM/NAM_Louis_Weichardt.png"
	expire = "1.1.1"
	ideology = market_liberal_subtype
	traits = {}
}

create_country_leader = {
	name = "Louis Weichardt"
	picture = "gfx/leaders/NAM/NAM_Louis_Weichardt.png"
	expire = "1.1.1"
	ideology = autocratic_colonial_govt_subtype
	traits = {}
}

create_country_leader = {
	name = "Louis Weichardt"
	picture = "gfx/leaders/NAM/NAM_Louis_Weichardt.png"
	expire = "1.1.1"
	ideology = national_populist_subtype
	traits = {}
}

hidden_effect = {
set_cosmetic_tag = NAM_SAF
			}
			
			}
}

country_event = {
	id = swa.2
	immediate = {log = "[GetDateText]: [Root.GetName]: event swa.2"}
	title = swa.2.t
	desc = swa.2.d
	picture = GFX_report_event_SPR_civwar3

	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = swa.2.a
		hidden_effect = {
		set_global_flag = NMB_MAF_collapse
		}
	}
}

country_event = {
	id = swa.3
	immediate = {log = "[GetDateText]: [Root.GetName]: event swa.3"}
	title = swa.3.t
	desc = swa.3.d
	picture = GFX_report_event_SPR_civwar3

	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = swa.3.a
	}
	option = {
	name = swa.3.b
	if = {
		limit = {
			NMB = {
			   owns_state = 871
			   owns_state = 955
			   owns_state = 956
			   owns_state = 813
			   owns_state = 958
			   owns_state = 957
			}
		}
		ZAM = {
			transfer_state = 871
			transfer_state = 955
			transfer_state = 956
			transfer_state = 813
			transfer_state = 958
			transfer_state = 957
		}
		ZAM = {
			add_state_core = 871
			add_state_core = 955
			add_state_core = 956
			add_state_core = 813
			add_state_core = 958
			add_state_core = 957
		}
		SAF = {
			puppet = MLW
		}
		MLW = {
			set_capital = { state = 813 }
			set_cosmetic_tag = ZAM
			}
		}
		else = {
			add_political_power = 10
		}
	}
}

country_event = {
	id = swa.4
	immediate = {log = "[GetDateText]: [Root.GetName]: event swa.4"}
	title = swa.4.t
	desc = swa.4.d
	picture = GFX_report_event_SPR_civwar3
	
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
	name = swa.4.a
	COG = {
	 country_event = swa.5
	 set_global_flag = COG_is_in_civil_war
	 }
	}
	
	}
	
country_event = {
	id = swa.5
	immediate = {log = "[GetDateText]: [Root.GetName]: event swa.5"}
	title = swa.5.t
	desc = swa.5.d
	picture = GFX_report_event_SPR_civwar3
	
	is_triggered_only = yes
	fire_only_once = yes
trigger = {
	COG = {
	has_global_flag = COG_is_in_civil_war
	}
	
	}
	
	option = {
	name = swa.5.a
	GER = {
	add_to_faction = COG
	}
	COG = {
	add_ideas = MAF_Colonial_Nation
	}
	if = {
	limit = {
	MSF = { exists = yes }
	}
	declare_war_on = {
			target = MSF
			type = annex_everything
		}
		}
	
	if = {
	limit = {
	KIV = { exists = yes }
	}
	declare_war_on = {
			target = KIV
			type = annex_everything
		}
		}
	}
	
	
	option = {
	name = swa.5.b
	COG = {
	give_military_access = NMB
	}
	SAF = {
	if = {
	limit = {
	MSF = { exists = yes }
	}
	declare_war_on = {
			target = MSF
			type = annex_everything
		}
	}
	if = {
	limit = {
	KIV = { exists = yes }
	}
	declare_war_on = {
			target = KIV
			type = annex_everything
		}
		}
	}
	}
	}
	
country_event = {
	id = swa.6
	immediate = {log = "[GetDateText]: [Root.GetName]: event swa.6"}
	title = swa.6.t
	desc = swa.6.d
	picture = GFX_report_event_SPR_civwar3
	
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
	name = swa.6.a
		MAF = {
			every_unit_leader = {
limit = { has_unit_leader_flag = NMB_leader_flag }
set_nationality = NMB
			}
		}
		NMB = {
			random_unit_leader = {
limit = { has_id = 22992 }
promote_leader = yes
			}
		}
		MAF = {
			declare_war_on = {
target = NMB
type = annex_everything
			}
			declare_war_on = {
target = NBL
type = annex_everything
			}
			random_unit_leader = {
limit = { has_id = 8794 }			
remove_unit_leader = yes
			}
		}
	}
	
	}
	
country_event = {
	id = NMB.collapse.4
	immediate = {log = "[GetDateText]: [Root.GetName]: event NMB.collapse.4"}
	title = NMB.collapse.4.t
	desc = NMB.collapse.4.d
	picture = GFX_report_event_SPR_civwar3

	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = NMB.collapse.4.a
		TZN = {
			transfer_state = 546
			transfer_state = 965
			transfer_state = 918
			add_state_core = 546
			add_state_core = 965
			add_state_core = 918
		}
		NMB = {
			puppet = TZN
		}
		TZN = {
			create_country_leader = {
name = "Mohamed Husen"
desc = "POLITICS_HUSAN_DESC"
picture = "gfx/leaders/TZN/Portrait_TZN_Muhamed_Husan.png"
expire = "1.1.1"
ideology = authoritarian_democrat_subtype
traits = {}
			}
			hidden_effect = {
set_cosmetic_tag = TZN_GER_BUT_NOT_GOERING
			}
		}
	}
}

country_event = {
	id = NMB.collapse.8
	immediate = {log = "[GetDateText]: [Root.GetName]: event NMB.collapse.8"}
	title = NMB.collapse.8.t
	desc = NMB.collapse.8.d
	picture = GFX_report_event_SPR_civwar3
	
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
	name = NMB.collapse.8.a
	GER = {
	add_to_faction = GAB
	}
	hidden_effect = {
add_ideas = MAF_Colonial_Nation
			}
	}
	}

country_event = {
	id = NMB.collapse.9
	immediate = {log = "[GetDateText]: [Root.GetName]: event NMB.collapse.9"}
	title = NMB.collapse.9.t
	desc = NMB.collapse.9.d
	picture = GFX_report_event_SPR_civwar3
	
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
	name = NMB.collapse.9.a
	KEN = {
			   transfer_state = 547
			   transfer_state = 548
			   transfer_state = 892
			   transfer_state = 925
			   transfer_state = 969
			   transfer_state = 548
		
	}
	NMB = {
		puppet = KEN
		}
	}
}

country_event = {
	id = swa.20000
	immediate = {
		log = "[GetDateText]: [Root.GetName]: event swa.2"
		set_cosmetic_tag = NAM_SAF
	}
	title = swa.2.t
	desc = swa.2.d
	picture = GFX_report_event_SPR_civwar3

	mean_time_to_happen = {
		days = 180
	}
	
trigger = {
		tag = NMB
		is_subject_of = SAF
		NOT = {
			has_cosmetic_tag = NAM_SAF
		}
	}
	fire_only_once = yes
	hidden = yes

}

	
	