#####################################################################

	add_namespace = afghan_rework
	add_namespace = afghan_tribal_affairs
	add_namespace = afghan_news
	
#####################################################################

country_event = { #Afghanistan wants a non-agression pact with Britain
	id = afghan_rework.1
	title = afghan_rework.1.t
	desc = afghan_rework.1.d
	picture = GFX_report_event_AFG_delegation
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.1.a #sure
		ai_chance = {
			base = 10
		}
		FROM = {
			country_event = afghan_rework.2
		}
	}
	option = {
		name = afghan_rework.1.b #nope
		ai_chance = {
			base = 0
		}
	}
}

country_event = { #Britain agrees
	id = afghan_rework.2
	title = afghan_rework.2.t
	desc = afghan_rework.2.d
	picture = GFX_report_event_AFG_delegation
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.2.a #sure
		ai_chance = {
			base = 10
		}
		add_stability = 0.05
		add_political_power = 100
		diplomatic_relation = {
			country = ENG
			relation = non_aggression_pact
			active = yes
		}
	}
}

country_event = { #Basmachi uprisings
	id = afghan_rework.3
	title = afghan_rework.3.t
	desc = afghan_rework.3.d
	picture = GFX_report_event_AFG_delegation
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.3.a #sure
		ai_chance = {
			base = 10
		}
		if = { # KHIVA
			limit = {
				AFG = {
					has_country_flag = khivan_uprising_1_flag
				}
			}
			KHI = {
				division_template = {
					name = "Basmachi Militia"
					is_locked = yes
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
						infantry = { x = 1 y = 2 }
						infantry = { x = 2 y = 0 }
						infantry = { x = 2 y = 1 }
						infantry = { x = 2 y = 2 }
					}
				}
			}
			832 = {
				transfer_state_to = KHI
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
			}
			AFG = { puppet = KHI }
			KHI = {
				declare_war_on = {
					target = SOV
					type = annex_everything
				}
			}
		}
		else_if = {
			limit = {
				AFG = {
					has_country_flag = khivan_uprising_2_flag
				}
			}
			KHI = {
				division_template = {
					name = "Basmachi Militia"
					is_locked = yes
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
						infantry = { x = 1 y = 2 }
						infantry = { x = 2 y = 0 }
						infantry = { x = 2 y = 1 }
						infantry = { x = 2 y = 2 }
					}
				}
			}
			832 = {
				transfer_state_to = KHI
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
			}
			AFG = { puppet = KHI }
			KHI = {
				declare_war_on = {
					target = SOV
					type = annex_everything
				}
			}
		}
		else_if = {
			limit = {
				AFG = {
					has_country_flag = khivan_uprising_3_flag
				}
			}
			KHI = {
				division_template = {
					name = "Basmachi Militia"
					is_locked = yes
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
						infantry = { x = 1 y = 2 }
						infantry = { x = 2 y = 0 }
						infantry = { x = 2 y = 1 }
						infantry = { x = 2 y = 2 }
					}
				}
			}
			832 = {
				transfer_state_to = KHI
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = KHI
				}
			}
			AFG = { puppet = KHI }
			KHI = {
				declare_war_on = {
					target = SOV
					type = annex_everything
				}
			}
		}
		if = { # BUKHARA
			limit = {
				AFG = {
					has_country_flag = bukharan_uprising_1_flag
				}
			}
			BUK = {
				division_template = {
					name = "Basmachi Militia"
					is_locked = yes
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
						infantry = { x = 1 y = 2 }
						infantry = { x = 2 y = 0 }
						infantry = { x = 2 y = 1 }
						infantry = { x = 2 y = 2 }
					}
				}
			}
			830 = {
				transfer_state_to = BUK
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
			}
			AFG = { puppet = BUK }
			BUK = {
				declare_war_on = {
					target = SOV
					type = annex_everything
				}
			}
		}
		else_if = {
			limit = {
				AFG = {
					has_country_flag = bukharan_uprising_2_flag
				}
			}
			BUK = {
				division_template = {
					name = "Basmachi Militia"
					is_locked = yes
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
						infantry = { x = 1 y = 2 }
						infantry = { x = 2 y = 0 }
						infantry = { x = 2 y = 1 }
						infantry = { x = 2 y = 2 }
					}
				}
			}
			830 = {
				transfer_state_to = BUK
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
			}
			AFG = { puppet = BUK }
			BUK = {
				declare_war_on = {
					target = SOV
					type = annex_everything
				}
			}
		}
		else_if = {
			limit = {
				AFG = {
					has_country_flag = bukharan_uprising_3_flag
				}
			}
			BUK = {
				division_template = {
					name = "Basmachi Militia"
					is_locked = yes
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
						infantry = { x = 1 y = 2 }
						infantry = { x = 2 y = 0 }
						infantry = { x = 2 y = 1 }
						infantry = { x = 2 y = 2 }
					}
				}
			}
			830 = {
				transfer_state_to = BUK
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = BUK
				}
			}
			AFG = { puppet = BUK }
			BUK = {
				declare_war_on = {
					target = SOV
					type = annex_everything
				}
			}
		}
		if = { # TURKMENISTAN
			limit = {
				AFG = {
					has_country_flag = turkmen_uprising_1_flag
				}
			}
			TMS = {
				division_template = {
					name = "Basmachi Militia"
					is_locked = yes
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
						infantry = { x = 1 y = 2 }
						infantry = { x = 2 y = 0 }
						infantry = { x = 2 y = 1 }
						infantry = { x = 2 y = 2 }
					}
				}
			}
			584 = {
				transfer_state_to = TMS
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
			}
			AFG = { puppet = TMS }
			TMS = {
				declare_war_on = {
					target = SOV
					type = annex_everything
				}
			}
		}
		else_if = {
			limit = {
				AFG = {
					has_country_flag = turkmen_uprising_2_flag
				}
			}
			TMS = {
				division_template = {
					name = "Basmachi Militia"
					is_locked = yes
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
						infantry = { x = 1 y = 2 }
						infantry = { x = 2 y = 0 }
						infantry = { x = 2 y = 1 }
						infantry = { x = 2 y = 2 }
					}
				}
			}
			584 = {
				transfer_state_to = TMS
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
			}
			AFG = { puppet = TMS }
			TMS = {
				declare_war_on = {
					target = SOV
					type = annex_everything
				}
			}
		}
		else_if = {
			limit = {
				AFG = {
					has_country_flag = turkmen_uprising_3_flag
				}
			}
			TMS = {
				division_template = {
					name = "Basmachi Militia"
					is_locked = yes
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
						infantry = { x = 1 y = 2 }
						infantry = { x = 2 y = 0 }
						infantry = { x = 2 y = 1 }
						infantry = { x = 2 y = 2 }
					}
				}
			}
			584 = {
				transfer_state_to = TMS
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
				create_unit = {
					division = "name = \"Basmachi Militia\" division_template = \"Basmachi Militia\" start_experience_factor = 0.7" 
					owner = TMS
				}
			}
			AFG = { puppet = TMS }
			TMS = {
				declare_war_on = {
					target = SOV
					type = annex_everything
				}
			}
		}
	}
}

country_event = { #return of Amanullah
	id = afghan_rework.4
	title = afghan_rework.4.t
	desc = afghan_rework.4.d
	picture = GFX_report_event_AFG_amanullah
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.4.a #sure
		ai_chance = {
			base = 10
		}
		set_politics = {
			ruling_party = democratic
			elections_allowed = no
		}
		add_political_power = 50
		hidden_effect = {
			news_event = afghan_news.2
		}
	}
}

country_event = { #first elections
	id = afghan_rework.5
	title = afghan_rework.5.t
	desc = afghan_rework.5.d
	picture = GFX_report_event_AFG_parliament
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.5.a #Fatherland Party
		ai_chance = {
			base = 10
		}
		set_party_name = {
			ideology = democratic
			long_name = AFG_hezb_e_watan
			name = AFG_hezb_e_watan
		}
		add_war_support = 0.1
	}
	
	option = {
		name = afghan_rework.5.b #People's Party
		ai_chance = {
			base = 10
		}
		set_party_name = {
			ideology = democratic
			long_name = AFG_hezb_e_khalq
			name = AFG_hezb_e_khalq
		}
		add_stability = 0.1
	}
}

country_event = { #Afghanistan demands a referendum in Pashtunistan
	id = afghan_rework.6
	title = afghan_rework.6.t
	desc = afghan_rework.6.d
	picture = GFX_report_event_election_vote
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.6.a #ok
		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				has_opinion = {
					target = AFG
					value > 25
				}
			}
			modifier = {
				factor = 3
				has_opinion = {
					target = AFG
					value > 50
				}
			}
			modifier = {
				factor = 5
				is_in_faction_with = AFG
			}
		}
		FROM = { country_event = afghan_rework.7 }
	}
	
	option = {
		name = afghan_rework.6.b #no
		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				has_opinion = {
					target = AFG
					value < 25
				}
			}
		}
		FROM = { country_event = afghan_rework.8 }
	}
}

country_event = { #successful referendum in Pashtunistan
	id = afghan_rework.7
	title = afghan_rework.7.t
	desc = afghan_rework.7.d
	picture = GFX_report_event_election_vote
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.7.a #great
		ai_chance = {
			base = 10
		}
		transfer_state = 442
		transfer_state = 987
		add_state_core = 442
		add_state_core = 987
	}
}

country_event = { #referendum declined
	id = afghan_rework.8
	title = afghan_rework.8.t
	desc = afghan_rework.8.d
	picture = GFX_report_event_AFG_pashtuns
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.8.a #ok lets kill them then
		ai_chance = {
			base = 10
		}
		add_political_power = -50
		create_wargoal = {
			type = take_state_focus
			target = FROM
			generator = { 442 987 }
		}
	}
	
	option = {
		name = afghan_rework.8.a #uhhh
		ai_chance = {
			base = 10
		}
	}
}

country_event = { #Afghanistan proposes peace
	id = afghan_rework.9
	title = afghan_rework.9.t
	desc = afghan_rework.9.d
	picture = GFX_report_event_AFG_delegation
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.9.a #ok
		ai_chance = {
			base = 10
		}
		FROM = { country_event = afghan_rework.10 }
	}
	
	option = {
		name = afghan_rework.9.a #nah
		ai_chance = {
			base = 0
		}
	}
}

country_event = { #peace event for Afghanistan
	id = afghan_rework.10
	title = afghan_rework.10.t
	desc = afghan_rework.10.d
	picture = GFX_report_event_AFG_delegation
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.10.a #ok
		ai_chance = {
			base = 10
		}
		transfer_state = 442
		transfer_state = 445
		transfer_state = 444
		if = {
			limit = {
				442 = { NOT = { is_claimed_by = ROOT } }
			}
			add_state_claim = 442
		}
		if = {
			limit = {
				445 = { NOT = { is_claimed_by = ROOT } }
			}
			add_state_claim = 445
		}
		if = {
			limit = {
				444 = { NOT = { is_claimed_by = ROOT } }
			}
			add_state_claim = 444
		}
		white_peace = FROM
	}
}

country_event = { #PDPA comes to power, factionalism becomes a thing
	id = afghan_rework.11
	title = afghan_rework.11.t
	desc = afghan_rework.11.d
	picture = GFX_report_event_AFG_weekh_zalmian
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.11.a #those Khalq people seem pretty cool
		ai_chance = {
			base = 10
		}
		add_power_balance_value = {
			id = AFG_pdpa_power_balance
			value = -0.1
			tooltip_side = AFG_khalq_side
		}
		hidden_effect = {
			country_event = afghan_rework.12
		}
	}
	
	option = {
		name = afghan_rework.11.b #Parcham is where it's at!
		ai_chance = {
			base = 10
		}
		add_power_balance_value = {
			id = AFG_pdpa_power_balance
			value = 0.1
			tooltip_side = AFG_parcham_side
		}
		hidden_effect = {
			country_event = afghan_rework.12
		}
	}
}

country_event = { #choose the communist flag
	id = afghan_rework.12
	title = afghan_rework.12.t
	desc = afghan_rework.12.d
	picture = GFX_report_event_AFG_khalq
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.12.a #red banner
		ai_chance = {
			base = 10
		}
		add_power_balance_value = {
			id = AFG_pdpa_power_balance
			value = -0.05
			tooltip_side = AFG_khalq_side
		}
		custom_effect_tooltip = keep_this_flag_tt
		hidden_effect = {
			country_event = { id = afghan_rework.26 days = 25 }
		}
	}
	
	option = {
		name = afghan_rework.12.b #tricolor
		ai_chance = {
			base = 10
		}
		add_power_balance_value = {
			id = AFG_pdpa_power_balance
			value = 0.05
			tooltip_side = AFG_parcham_side
		}
		custom_effect_tooltip = yay_new_flag_tt
		hidden_effect = {
			set_cosmetic_tag = AFG_parcham
			country_event = { id = afghan_rework.26 days = 25 }
		}
	}
}

country_event = { #parcham has won - change leader?
	id = afghan_rework.13
	title = afghan_rework.13.t
	desc = afghan_rework.13.d
	picture = GFX_report_event_AFG_parcham
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.13.a #yeah
		ai_chance = {
			base = 10
		}
		add_country_leader_role = {
			character = AFG_revolutionary_council
			promote_leader = yes
			country_leader = {
				ideology = marxism
				traits = { strong_party_discipline }
			}
		}
		retire_character = AFG_nur_muhammad_taraki
	}
	
	option = {
		name = afghan_rework.13.b #no
		ai_chance = {
			base = 10
		}
		add_country_leader_trait = compromise_leader
	}
}

country_event = { #parcham gets fucking purged
	id = afghan_rework.14
	title = afghan_rework.14.t
	desc = afghan_rework.14.d
	picture = GFX_report_event_AFG_khalq
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.14.a #super purge
		ai_chance = {
			base = 10
		}
		add_political_power = 175
	}
	
	option = {
		name = afghan_rework.14.b #mini purge
		ai_chance = {
			base = 10
		}
		add_stability = 0.1
	}
}

country_event = { #plebiscite in the tajik ssr?
	id = afghan_rework.15
	title = afghan_rework.15.t
	desc = afghan_rework.15.d
	picture = GFX_report_event_SOV_demands
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.15.a #sure whatevs
		ai_chance = {
			base = 10
		}
		FROM = { country_event = afghan_rework.16 }
	}
	
	option = {
		name = afghan_rework.15.b #what
		ai_chance = {
			base = 0
		}
	}
}

country_event = { #tajik ssr joins afghanistan
	id = afghan_rework.16
	title = afghan_rework.16.t
	desc = afghan_rework.16.d
	picture = GFX_report_event_AFG_nasir_muhammed
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.16.a #yay
		ai_chance = {
			base = 10
		}
		transfer_state = 742
		add_state_core = 742
	}
}

country_event = { #Faqir of Ipi starts uprising in Waziristan
	id = afghan_rework.17
	title = afghan_rework.17.t
	desc = afghan_rework.17.d
	picture = GFX_report_event_AFG_waziristan_uprising
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.17.a #we'll watch your career with great interest
		ai_chance = {
			base = 10
		}
		987 = {
			add_resistance = 10
			add_compliance = -10
			add_dynamic_modifier = {
				modifier = AFG_wazisistan_uprising
			}
		}
		set_country_flag = afg_waziristan_happened
	}
}

country_event = { #our claims in India?
	id = afghan_rework.18
	title = afghan_rework.18.t
	desc = afghan_rework.18.d
	picture = GFX_report_event_AFG_pashtuns
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.18.a #claim Pashtunistan
		ai_chance = {
			base = 10
		}
		add_state_claim = 442
		if = {
			limit = {
				has_power_balance = AFG_pdpa_power_balance
			}
			add_power_balance_value = {
				id = AFG_pdpa_power_balance
				value = -0.05
				tooltip_side = AFG_khalq_side
			}
		}
	}
	option = {
		name = afghan_rework.18.a #claim Pashtunistan and Balochistan
		ai_chance = {
			base = 10
		}
		add_state_claim = 442
		add_state_claim = 445
		add_state_claim = 444
		add_political_power = -10
		if = {
			limit = {
				has_power_balance = AFG_pdpa_power_balance
			}
			add_power_balance_value = {
				id = AFG_pdpa_power_balance
				value = 0.05
				tooltip_side = AFG_parcham_side
			}
		}
	}
	option = {
		name = afghan_rework.18.a #nah
		ai_chance = {
			base = 10
		}
		add_political_power = 35
	}
}

country_event = { #the Faqir of Ipi overthrows the Kabul government
	id = afghan_rework.19
	title = afghan_rework.19.t
	desc = afghan_rework.19.d
	picture = GFX_report_event_AFG_waziristan_uprising
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.19.a #claim Pashtunistan
		ai_chance = {
			base = 10
		}
		set_politics = {
			ruling_party = fascism
			elections_allowed = no
		}
		add_state_core = 442
		add_state_core = 987
		hidden_effect = {
			news_event = afghan_news.4
		}
	}
}

country_event = { #general uprising in the north west frontier
	id = afghan_rework.20
	title = afghan_rework.20.t
	desc = afghan_rework.20.d
	picture = GFX_report_event_AFG_wazir_lashkars
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.20.a #retreat from the region
		ai_chance = {
			base = 10
		}
		FROM = {
			country_event = afghan_rework.21
		}
	}
	
	option = {
		name = afghan_rework.20.b #fight them
		ai_chance = {
			base = 0
		}
	}
}

country_event = { #waziristan joins afghanistan
	id = afghan_rework.21
	title = afghan_rework.21.t
	desc = afghan_rework.21.d
	picture = GFX_report_event_AFG_wazir_lashkars
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.21.a #yay
		ai_chance = {
			base = 10
		}
		transfer_state = 442
		transfer_state = 987
		987 = {
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = arms_factory
				level = 1
				instant_build = yes
			}
		}
	}
}

country_event = { #mujahideen arm themselves
	id = afghan_rework.22
	title = afghan_rework.22.t
	desc = afghan_rework.22.d
	picture = GFX_report_event_AFG_tribal_warriors
	
	trigger = {
		tag = AFG
		NOT = { has_government = communism }
		has_war_with = SOV
		SOV = { has_government = communism }
	}
	
	fire_only_once = yes
	
	option = {
		name = afghan_rework.22.a #good
		ai_chance = {
			base = 10
		}
		add_ideas = AFG_mujahideen
	}
	
	option = {
		name = afghan_rework.22.a #give them some weapons
		ai_chance = {
			base = 10
		}
		add_ideas = AFG_mujahideen
		add_equipment_to_stockpile = {
			type = infantry_equipment
			amount = -500
		}
		add_popularity = {
			ideology = fascism
			popularity = 0.05
		}
		add_popularity = {
			ideology = neutrality
			popularity = 0.05
		}
		division_template = {
			name = "Mujahideen"
			division_names_group = AFG_INF_01
			is_locked = yes
			force_allow_recruiting = yes
			regiments = {
				irregular_infantry = { x = 0 y = 0 }
				irregular_infantry = { x = 0 y = 1 }
				irregular_infantry = { x = 0 y = 2 }
				irregular_infantry = { x = 1 y = 0 }
				irregular_infantry = { x = 1 y = 1 }
				irregular_infantry = { x = 1 y = 2 }
			}
		}
		267 = {
			create_unit = {
				division = "name = \"Mujahideen\" division_template = \"Mujahideen\" start_experience_factor = 0.8" 
				owner = AFG
			}
			create_unit = {
				division = "name = \"Mujahideen\" division_template = \"Mujahideen\" start_experience_factor = 0.8" 
				owner = AFG
			}
			create_unit = {
				division = "name = \"Mujahideen\" division_template = \"Mujahideen\" start_experience_factor = 0.8" 
				owner = AFG
			}
		}
	}
}

country_event = { #Nisar Muhammad returns from Tajikistan
	id = afghan_rework.23
	title = afghan_rework.23.t
	desc = afghan_rework.23.d
	picture = GFX_report_event_AFG_nasir_muhammed
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.23.a #yay
		ai_chance = {
			base = 10
		}
		set_country_flag = AFG_nisar_muhammad_returned
		custom_effect_tooltip = available_political_advisor
		show_ideas_tooltip = AFG_nisar_muhammad
		add_popularity = {
			ideology = communism
			popularity = 0.03
		}
	}
}

country_event = { #soviet influence takes over
	id = afghan_rework.24
	title = afghan_rework.24.t
	desc = afghan_rework.24.d
	picture = GFX_report_event_AFG_nasir_muhammed
	
	trigger = {
		tag = AFG
		has_government = communism
		is_ally_with = SOV
		SOV = { has_government = communism }
		check_variable = {
			var = sov_afg_coop_decisions_var
			value = 5
			compare = greater_than_or_equals
		}
	}
	
	fire_only_once = yes
	
	option = {
		name = afghan_rework.24.a #good
		ai_chance = {
			base = 10
		}
		SOV = {
			puppet = {
				target = AFG
				end_wars = no
			}
		}
		set_cosmetic_tag = AFG_afghan_ssr
	}
}

country_event = { #Afghanistan at the 1936 olympics
	id = afghan_rework.25
	title = afghan_rework.25.t
	desc = afghan_rework.25.d
	picture = GFX_report_event_AFG_olympics
	
	trigger = {
		has_global_flag = olympics_1936
	}
	
	fire_only_once = yes
	
	option = {
		name = afghan_rework.25.a #good
		ai_chance = {
			base = 10
		}
		add_political_power = 10
	}
}

country_event = { #question of language within PDPA
	id = afghan_rework.26
	title = afghan_rework.26.t
	desc = afghan_rework.26.d
	picture = GFX_report_event_AFG_weekh_zalmian
	
	is_triggered_only = yes
	
	option = {
		name = afghan_rework.26.a #pashtunization (khalq)
		ai_chance = {
			base = 10
		}
		add_power_balance_value = {
			id = AFG_pdpa_power_balance
			value = -0.05
			tooltip_side = AFG_khalq_side
		}
		add_political_power = 50
		add_stability = -0.05
	}
	
	option = {
		name = afghan_rework.26.b #dari as official (parcham)
		ai_chance = {
			base = 10
		}
		add_power_balance_value = {
			id = AFG_pdpa_power_balance
			value = 0.05
			tooltip_side = AFG_parcham_side
		}
		add_stability = 0.05
		add_political_power = -50
	}
}


################# tribal stuff ################

country_event = { #tribal unrest because the king gave rights to women
	id = afghan_tribal_affairs.1
	title = afghan_tribal_affairs.1.t
	desc = afghan_tribal_affairs.1.d
	picture = GFX_report_event_AFG_tribal_warriors
	
	is_triggered_only = yes
	
	option = {
		name = afghan_tribal_affairs.1.a #damnit
		ai_chance = {
			base = 10
		}
		add_timed_idea = {
			idea = AFG_major_tribal_unrest
			days = 90
		}
		unlock_decision_tooltip = AFG_crush_the_revolt
		set_country_flag = tribal_revolt_flag
	}
}

country_event = { #tribes rise up against the new communist government
	id = afghan_tribal_affairs.2
	title = afghan_tribal_affairs.2.t
	desc = afghan_tribal_affairs.2.d
	picture = GFX_report_event_AFG_tribal_warriors
	
	is_triggered_only = yes
	
	option = {
		name = afghan_tribal_affairs.2.a #ask the soviets to intervene
		ai_chance = {
			base = 10
		}
		trigger = {
			SOV = {
				exists = yes
				has_government = communism
			}
		}
		AFG_decrease_tribal_ns_effect = yes
		add_timed_idea = {
			idea = AFG_soviet_counter_insurgency_operation
			days = 60
		}
		give_military_access = SOV
		add_political_power = -25
		set_country_flag = afg_anti_communist_uprising
		hidden_effect = {
			country_event = {
				id = afghan_tribal_affairs.3
				days = 60
			}
		}
	}
	
	option = {
		name = afghan_tribal_affairs.2.b #we'll deal with it
		ai_chance = {
			base = 10
		}
		set_country_flag = afg_anti_communist_uprising
		add_ideas = AFG_anti_government_unrest
		add_political_power = 30
		unlock_decision_tooltip = AFG_offensive_against_the_rebels
	}
}

country_event = { #end of soviet intervention
	id = afghan_tribal_affairs.3
	title = afghan_tribal_affairs.3.t
	desc = afghan_tribal_affairs.3.d
	picture = GFX_report_event_soviet_soldiers_tank
	
	is_triggered_only = yes
	
	option = {
		name = afghan_tribal_affairs.3.a #yay
		ai_chance = {
			base = 10
		}
		AFG_decrease_tribal_ns_effect = yes
		if = {
			limit = {
				is_faction_leader = no
				SOV = {
					is_faction_leader = yes
				}
			}
			SOV = { add_to_faction = ROOT }
		}
		add_timed_idea = {
			idea = AFG_soviet_influence
			days = 365
		}
	}
}

country_event = { #mujahideen uprising
	id = afghan_tribal_affairs.4
	title = afghan_tribal_affairs.4.t
	desc = afghan_tribal_affairs.4.d
	picture = GFX_report_event_AFG_tribal_warriors
	
	is_triggered_only = yes
	
	option = {
		name = afghan_tribal_affairs.4.a #damn
		ai_chance = {
			base = 10
		}
		add_timed_idea = {
			idea = AFG_mujahideen_uprising
			days = 60
		}
		add_equipment_to_stockpile = {
			type = infantry_equipment
			amount = -1500
		}
		set_country_flag = mujahideen_uprising_flag
		unlock_decision_tooltip = AFG_centralize_power
	}
}

country_event = { #tribal chiefs resist conscription
	id = afghan_tribal_affairs.5
	title = afghan_tribal_affairs.5.t
	desc = afghan_tribal_affairs.5.d
	picture = GFX_report_event_AFG_tribal_warriors
	
	trigger = {
		tag = AFG
		has_idea = extensive_conscription
		OR = {
			has_idea = AFG_local_tribal_leaders
			has_idea = AFG_local_tribal_leaders_1
		}
	}
	
	fire_only_once = yes
	
	option = {
		name = afghan_tribal_affairs.5.a #compromise with them
		ai_chance = {
			base = 10
		}
		if = {
			limit = {
				has_idea = AFG_local_tribal_leaders
			}
			add_ideas = AFG_conscription_compromise_1
		}
		if = {
			limit = {
				has_idea = AFG_local_tribal_leaders_1
			}
			add_ideas = AFG_conscription_compromise_2
		}
		custom_effect_tooltip = conscription_compromise_tt
		if = {
			limit = {
				has_power_balance = AFG_pdpa_power_balance
			}
			add_power_balance_value = {
				id = AFG_pdpa_power_balance
				value = 0.05
				tooltip_side = AFG_parcham_side
			}
		}
	}
	
	option = {
		name = afghan_tribal_affairs.5.b #force conscription
		ai_chance = {
			base = 10
		}
		if = {
			limit = {
				has_idea = AFG_local_tribal_leaders
			}
			add_stability = -0.1
			add_political_power = -50
		}
		if = {
			limit = {
				has_idea = AFG_local_tribal_leaders_1
			}
			add_stability = -0.05
			add_political_power = -25
		}
		if = {
			limit = {
				has_power_balance = AFG_pdpa_power_balance
			}
			add_power_balance_value = {
				id = AFG_pdpa_power_balance
				value = 0.05
				tooltip_side = AFG_khalq_side
			}
		}
	}
}

################# NEWS ##############

news_event = { #Fourth Anglo-Afghan War
	id = afghan_news.1
	title = afghan_news.1.t
	desc = afghan_news.1.d
	picture = GFX_news_event_AFG_fourth_anglo_afghan
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = afghan_news.1.a
		trigger = {
			NOT = {
				TAG = AFG
			}
		}
	}
	option = {
		name = afghan_news.1.b
		trigger = { TAG = AFG }
	}
}

news_event = { #Amanullah Returns to Afghanistan
	id = afghan_news.2
	title = afghan_news.2.t
	desc = afghan_news.2.d
	picture = GFX_news_event_AFG_amanullah_khan
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = afghan_news.2.a
		trigger = {
			NOT = {
				TAG = AFG
			}
		}
	}
	option = {
		name = afghan_news.2.b
		trigger = { TAG = AFG }
	}
}

news_event = { #Communists Seize Power in Afghanistan
	id = afghan_news.3
	title = afghan_news.3.t
	desc = afghan_news.3.d
	picture = GFX_news_event_AFG_communists
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = afghan_news.3.a
		trigger = {
			NOT = {
				TAG = AFG
			}
		}
	}
	option = {
		name = afghan_news.3.b
		trigger = { TAG = AFG }
	}
}

news_event = { #Faqir of Ipi Marches on Kabul
	id = afghan_news.4
	title = afghan_news.4.t
	desc = afghan_news.4.d
	picture = GFX_news_event_AFG_faqir_of_ipi_takes_power
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = afghan_news.4.a
		trigger = {
			NOT = {
				TAG = AFG
			}
		}
	}
	option = {
		name = afghan_news.4.b
		trigger = { TAG = AFG }
	}
}

news_event = { #Rise of the Islamic Caliphate
	id = afghan_news.5
	title = afghan_news.5.t
	desc = afghan_news.5.d
	picture = GFX_news_event_AFG_islamic_caliphate
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = afghan_news.5.a
		trigger = {
			NOT = {
				TAG = AFG
			}
		}
	}
	option = {
		name = afghan_news.5.b
		trigger = { TAG = AFG }
	}
}

news_event = { #Unification of Central Asia
	id = afghan_news.6
	title = afghan_news.6.t
	desc = afghan_news.6.d
	picture = GFX_news_event_AFG_central_asian_unification
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = afghan_news.6.a
		trigger = {
			NOT = {
				TAG = AFG
			}
		}
	}
	option = {
		name = afghan_news.6.b
		trigger = { TAG = AFG }
	}
}