###########################
# Uganda-Kenya Events
###########################

add_namespace = ugken

### Maumau second uprising

country_event = { # Mau Mau mad
	id = ugken.1
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.1"}
	title = ugken.1.t
	desc = ugken.1.d
	picture = GFX_report_event_africamountain
	
	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			every_owned_state = {
				limit = {
					state = 925
				}
				KIK = { transfer_state = PREV }
			}
			if = {
				limit = {
					country_exists = KIK
					KIK = { NOT = { has_country_flag = MAF_already_exists } }
				}
				KIK = {
					add_state_core = 547
					add_state_core = 925
					remove_ideas = KIK_Mountain_Deferred
					remove_ideas = KIK_Maumau
					load_oob = KIK
					load_oob = KIK3
					add_ideas = MAF_Nat_Buff
				}
				ZZB = {
					add_state_core = 970
				}
			}
			KIK = { declare_war_on = { target = KEN type = annex_everything } }
			set_global_flag = KIK_second_uprising
		}
		KEN = {
			add_to_array = { global.MAF_collapse_tags = THIS }
		}
		KIK = {
			add_to_array = { global.MAF_collapse_tags = THIS }
		}
	}

	fire_only_once = yes

trigger = {
		tag = KEN
	}

	option = {
		name = ugken.1.a
		ai_chance = {
			factor = 0
		}
		add_political_power = -50
		add_stability = -0.02
		add_war_support = 0.05
		KIK = {
			change_tag_from = KEN
			mark_focus_tree_layout_dirty = yes
		}
	}
	
	option = {
		name = ugken.1.b
		ai_chance = {
			factor = 100
		}
		add_political_power = -50
		add_stability = -0.02
		add_war_support = 0.05		
	}
}
	
country_event = { # MAF is notified of colonialism choice (Collaborationist)
	id = ugken.2
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.2"}
	title = ugken.2.t
	desc = ugken.2.d
	picture = GFX_report_event_governorhaus

	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = ugken.2.a
		ai_chance = {
			factor = 100
		}
		add_stability = 0.01
	}
}

country_event = { # MAF is notified of colonialism choice (Center-Right)
	id = ugken.3
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.3"}
	title = ugken.3.t
	desc = ugken.3.d
	picture = GFX_report_event_governorhaus

	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = ugken.3.a
		ai_chance = {
			factor = 100
		}
	}
}
	
country_event = { # MAF is notified of colonialism choice (Center-Left)
	id = ugken.4
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.4"}
	title = ugken.4.t
	desc = ugken.4.d
	picture = GFX_report_event_pondicherry

	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes

	option = {
		name = ugken.4.a
		ai_chance = {
			factor = 100
		}
	}
}
	
country_event = { # Mau Mau military defeat
	id = ugken.5
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.5"}
	title = ugken.5.t
	desc = ugken.5.d
	picture = GFX_report_event_march

	is_triggered_only = yes

	option = {
		name = ugken.5.a
		ai_chance = {
			factor = 100
		}
		add_political_power = 20
		if = {
			limit = {
				has_idea = KEN_Maumau
				}
				add_stability = 0.02
			swap_ideas = {
				remove_idea = KEN_Maumau
				add_idea = KEN_Maumau2
			}
		}
	}
}

country_event = { # Reassuring Businesses
	id = ugken.6
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.6"}
	title = ugken.6.t
	desc = ugken.6.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes	

	fire_only_once = yes

	option = {
		name = ugken.6.a
		add_tech_bonus = {
			name = armor_bonus
			bonus = 1
			uses = 2
			category = armor
		}
	}
	option = {
		name = ugken.6.b
		add_tech_bonus = {
			name = construction_bonus
			bonus = 1
			uses = 2
			category = construction_tech
		}
	}
	option = {
		name = ugken.6.c
		add_political_power = 20
		add_stability = 0.05
	}
}

country_event = { # Nairobi MIC
	id = ugken.7
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.7"}
	title = ugken.7.t
	desc = ugken.7.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.7.a
		add_ideas = KEN_MIC_idea
	}
}

country_event = { # A Japanese Offer
	id = ugken.8
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.8"}
	title = ugken.8.t
	desc = ugken.8.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.8.a
		add_ideas = KEN_New_Investment_idea
		GER = {
		add_opinion_modifier = {
			target = KEN
			modifier = ITA_dislikes_govt
			}
		}
		JAP = {
		add_opinion_modifier = {
			target = KEN
			modifier = ITA_likes_govt
			}
		}
	}
	option = {
		name = ugken.8.b
		GER = {
		add_opinion_modifier = {
			target = KEN
			modifier = ITA_likes_govt
			}
		}
		JAP = {
		add_opinion_modifier = {
			target = KEN
			modifier = ITA_dislikes_govt
			}
		}
	}
}

country_event = { # Invisible Hand of the Marketplace
	id = ugken.9
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.9"}
	title = ugken.9.t
	desc = ugken.9.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.9.a
		add_ideas = KEN_Laissez_Faire_idea
	}
}

country_event = { # Nationalize Railroads
	id = ugken.10
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.10"}
	title = ugken.10.t
	desc = ugken.10.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.10.a
		random_owned_state = {
				limit = {
					is_core_of = KEN
					is_controlled_by = KEN
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
	}
}

country_event = { # Targeted Trade Barriers
	id = ugken.11
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.11"}
	title = ugken.11.t
	desc = ugken.11.d
	picture = GFX_report_event_generic_diplomacy2

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.11.a
		KEN = {
			GER = { embargo_PREV = yes }
		}
		add_manpower = -200
	}
	option = {
		name = ugken.11.b
		KEN = {
			CAN = { embargo_PREV = yes }
		}
		add_stability = -0.03
	}
	option = {
		name = ugken.11.c
		KEN = {
			JAP = { embargo_PREV = yes }
		}
		add_political_power = -10
	}
}

country_event = { # Lessons from the Somme and Verdun
	id = ugken.12
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.12"}
	title = ugken.12.t
	desc = ugken.12.d
	picture = GFX_report_event_generic_towar

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.12.a
		add_ideas = KEN_Verdun_idea
	}

	option = {
		name = ugken.12.b
		add_ideas = KEN_Somme_idea
	}
}

country_event = { # Scorched Earth Tactics
	id = ugken.13
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.13"}
	title = ugken.13.t
	desc = ugken.13.d
	picture = GFX_report_event_generic_towar

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.13.a
		add_ideas = KEN_Conscripting_Harassing_idea
	}

	option = {
		name = ugken.13.b
		add_ideas = KEN_Speed_Recovery_idea
	}

	option = {
		name = ugken.13.c
		add_tech_bonus = {
			name = nic.81.t
			bonus = 1
			uses = 1
			category = cat_mass_assault
		}
	}
}

country_event = { # Night of the Long Spears
	id = ugken.14
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.14"}
	title = ugken.14.t
	desc = ugken.14.d
	picture = GFX_report_event_legco2

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.14.a
		add_popularity = { ideology = social_democrat popularity = -0.10 }
	}
}

country_event = { # Tracking Down Rebels
	id = ugken.15
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.15"}
	title = ugken.15.t
	desc = ugken.15.d
	picture = GFX_report_event_generic_towar

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.15.a
		custom_effect_tooltip = jungle_warfare_effect
		hidden_effect = {
		set_technology = { jungle_warfare = 1 popup = no }
		}
	}
	option = {
		name = ugken.15.b
		custom_effect_tooltip = mountain_training_tech_effect
		hidden_effect = {
		set_technology = { mountain_training_tech = 1 popup = no }
		}
	}
}

country_event = { # University Restoration
	id = ugken.16
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.16"}
	title = ugken.16.t
	desc = ugken.16.d
	picture = GFX_report_event_legco2

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.16.a
		add_ideas = KEN_New_Students_idea
		add_political_power = 10
	}
}

country_event = { # Addressing Workers
	id = ugken.17
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.17"}
	title = ugken.17.t
	desc = ugken.17.d
	picture = GFX_report_event_legco2

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.17.a
		add_ideas = KEN_Better_Workers_Rights_idea
		add_political_power = -10
		add_stability = 0.03
	}
	option = {
		name = ugken.17.b
		add_ideas = KEN_Immigrant_Labor_idea
		add_popularity = { ideology = market_liberal popularity = 0.05 }
		add_political_power = 5
		add_stability = 0.01
	}
	option = {
		name = ugken.17.c
		add_ideas = KEN_Status_Quo_Labor_idea
		add_popularity = { ideology = social_conservative popularity = 0.05 }
		add_political_power = 25
		add_stability = -0.05
	}
}

country_event = { # Societal Safeguards
	id = ugken.18
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.18"}
	title = ugken.18.t
	desc = ugken.18.d
	picture = GFX_report_event_legco2

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.18.a
		add_popularity = { ideology = totalist popularity = -0.1 }
		add_popularity = { ideology = radical_socialist popularity = -0.1 }
		add_popularity = { ideology = syndicalist popularity = -0.1 }
		add_popularity = { ideology = social_democrat popularity = -0.1 }
		add_political_power = 20
		add_stability = 0.05
	}
	option = {
		name = ugken.18.b
		add_ideas = KEN_Farmer_Competition_idea
		add_popularity = { ideology = totalist popularity = -0.03 }
		add_popularity = { ideology = radical_socialist popularity = -0.03 }
		add_popularity = { ideology = syndicalist popularity = -0.03 }
		add_popularity = { ideology = social_democrat popularity = -0.03 }
		add_stability = 0.03
	}
}

country_event = { # A New Left
	id = ugken.19
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.19"}
	title = ugken.19.t
	desc = ugken.19.d
	picture = GFX_report_event_legco2

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.19.a
		add_popularity = { ideology = social_democrat popularity = 0.05 }
		add_popularity = { ideology = social_liberal popularity = 0.03 }
		add_political_power = 10
		add_stability = -0.02
	}
	option = {
		name = ugken.19.b
		add_popularity = { ideology = social_democrat popularity = 0.02 }
		add_popularity = { ideology = social_liberal popularity = 0.05 }
		add_popularity = { ideology = social_conservative popularity = 0.02 }
		add_popularity = { ideology = market_liberal popularity = 0.02 }
		add_political_power = -5
		add_stability = 0.05
	}
}

country_event = { # Free Healthcare?
	id = ugken.20
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.20"}
	title = ugken.20.t
	desc = ugken.20.d
	picture = GFX_report_event_legco2

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.20.a
		add_ideas = KEN_Free_Healthcare_idea
		add_popularity = { ideology = social_democrat popularity = 0.05 }
		add_political_power = -20
		add_stability = -0.02
	}
	option = {
		name = ugken.20.b
		add_ideas = KEN_Medicare_idea
		add_popularity = { ideology = social_liberal popularity = 0.05 }
		add_political_power = 10
		add_stability = 0.03
	}
	option = {
		name = ugken.20.c
		add_popularity = { ideology = social_democrat popularity = -0.02 }
		add_popularity = { ideology = social_liberal popularity = -0.02 }
		add_political_power = 30
		add_stability = 0.05
	}
}

country_event = { # Dealing with the UKP
	id = ugken.21
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.21"}
	title = ugken.21.t
	desc = ugken.21.d
	picture = GFX_report_event_legco2

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.21.a
		add_popularity = { ideology = social_democrat popularity = -0.05 }
		add_political_power = -15
		add_stability = 0.05
		add_command_power = 5
	}
	option = {
		name = ugken.21.b
		add_popularity = { ideology = social_democrat popularity = -0.02 }
		add_popularity = { ideology = social_liberal popularity = -0.02 }
		add_political_power = 20
		add_stability = -0.02
		add_manpower = -100
	}
}

country_event = { # Loyalty Questions
	id = ugken.22
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.22"}
	title = ugken.22.t
	desc = ugken.22.d
	picture = GFX_report_event_legco2

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ugken.22.a
		add_popularity = { ideology = authoritarian_democrat popularity = 0.05 }
		add_popularity = { ideology = paternal_autocrat popularity = 0.05 }
		add_political_power = 5
		add_stability = 0.05
		add_command_power = 15
	}
	option = {
		name = ugken.22.b
		add_popularity = { ideology = social_democrat popularity = 0.05 }
		add_popularity = { ideology = social_liberal popularity = 0.05 }
		add_political_power = -20
		add_stability = -0.02
		add_manpower = 1000
		add_command_power = 5
	}
	option = {
		name = ugken.22.c
		add_popularity = { ideology = market_liberal popularity = 0.05 }
		add_popularity = { ideology = social_conservative popularity = 0.05 }
		add_political_power = 20
		add_stability = -0.02
		add_command_power = 10
	}
}

country_event = { # Trio Event
	id = ugken.23
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.23"}
	title = ugken.23.t
	desc = ugken.23.d
	picture = GFX_report_event_KEN_mad_jack

	is_triggered_only = yes
	trigger = {
		is_ai = no
		NOT = { has_global_flag = player_dislikes_colonial_flavour_flag }
	}
	#minor_flavor = yes
	option = {
		name = ugken.23.a
		if = {
			limit = {
				tag = KEN
			}
		army_experience = 5
		add_command_power = 5
		}
	}
}

country_event = { # split up kenya uganda again?
	id = ugken.24
	immediate = {log = "[GetDateText]: [Root.GetName]: event ugken.24"}
	title = ugken.24.t
	desc = ugken.24.d
	picture = GFX_report_event_generic_diplomacy2

trigger = {
		has_global_flag = UGA_uprising
		NOT = {
			country_exists = UGA
		}
		owns_state = 548
		tag = KEN
	}

	fire_only_once = yes

	mean_time_to_happen = {
		days = 180
	}

	option = { #restore kenya-uganda
		name = ugken.24.a
		set_cosmetic_tag = KEN_FREESTATE
	}
	option = { #puppet uganda
		name = ugken.24.b
		UGA = {
			transfer_state = 548
			load_oob = UGA
		}
		UGA = {
			set_politics = {
				ruling_party = social_liberal
			}
		}
		UGA = {
			get_current_government_type = yes
		}
		KEN = {
			puppet = UGA
		}
		UGA = {
			restore_previous_government_type = yes
		}
		UGA = {
			add_popularity = {
				ideology = social_liberal
				popularity = 0.3
			}
		}
	}
}