﻿add_namespace = ethiopia

#ethiopia requests Investments from China
country_event = {
	id = ethiopia.1
	title = ethiopia.1.t
	desc = ethiopia.1.d
	picture = GFX_united_states_dollar

	is_triggered_only = yes

	option = {
		name = ethiopia.1.a
		log = "[GetDateText]: [This.GetName]: ethiopia.1.a executed"
		add_political_power = -10
		ETH = {
			add_political_power = 30
			add_opinion_modifier = {
				target = ROOT
				modifier = loan_granted
			}
			add_to_variable = { influence_array_val^1 = 5 }
			recalculate_influence = yes
		}

		ai_chance = {
			factor = 200
		}
	}

	option = {
		name = ethiopia.1.b
		log = "[GetDateText]: [This.GetName]: ethiopia.1.b executed"
		add_popularity = {
			ideology = democratic
			popularity = 0.01
		}
		add_to_variable = { party_pop_array^2 = 0.01 }
		recalculate_party = yes

		ETH = {
			add_opinion_modifier = {
				target = ROOT
				modifier = loan_denied
			}
			add_to_variable = { influence_array_val^1 = -5 }
			recalculate_influence = yes
		}

		ai_chance = {
			factor = 15
		}
	}
}

#ethiopia requests Investments from England
country_event = {
	id = ethiopia.2
	title = ethiopia.2.t
	desc = ethiopia.2.d
	picture = GFX_united_states_dollar

	is_triggered_only = yes

	option = {
		name = ethiopia.2.a
		log = "[GetDateText]: [This.GetName]: ethiopia.2.a executed"
		add_political_power = -10
		ETH = {
			add_political_power = 30
			add_opinion_modifier = {
				target = ROOT
				modifier = loan_granted
			}
			add_to_variable = { influence_array_val^3 = 5 }
			recalculate_influence = yes
		}

		ai_chance = {
			factor = 200
		}
	}

	option = {
		name = ethiopia.2.b
		log = "[GetDateText]: [This.GetName]: ethiopia.2.b executed"
		add_popularity = {
			ideology = democratic
			popularity = 0.01
		}
		add_to_variable = { party_pop_array^2 = 0.01 }
		recalculate_party = yes

		ETH = {
			add_opinion_modifier = {
				target = ROOT
				modifier = loan_denied
			}
			add_to_variable = { influence_array_val^3 = -5 }
			recalculate_influence = yes
		}

		ai_chance = {
			factor = 15
		}
	}
}

#ethiopia requests Investments from France
country_event = {
	id = ethiopia.3
	title = ethiopia.3.t
	desc = ethiopia.3.d
	picture = GFX_united_states_dollar

	is_triggered_only = yes

	option = {
		name = ethiopia.3.a
		log = "[GetDateText]: [This.GetName]: ethiopia.3.a executed"
		add_political_power = -10
		ETH = {
			add_political_power = 30
			add_opinion_modifier = {
				target = ROOT
				modifier = loan_granted
			}
			add_to_variable = { influence_array_val^4 = 5 }
			recalculate_influence = yes
		}

		ai_chance = {
			factor = 200
		}
	}

	option = {
		name = ethiopia.3.b
		log = "[GetDateText]: [This.GetName]: ethiopia.3.b executed"
		add_popularity = {
			ideology = democratic
			popularity = 0.01
		}
		add_to_variable = { party_pop_array^2 = 0.01 }
		recalculate_party = yes

		ETH = {
			add_opinion_modifier = {
				target = ROOT
				modifier = loan_denied
			}
			add_to_variable = { influence_array_val^4 = -5 }
			recalculate_influence = yes
		}

		ai_chance = {
			factor = 15
		}
	}
}

#ethiopia requests Investments from Germany
country_event = {
	id = ethiopia.4
	title = ethiopia.4.t
	desc = ethiopia.4.d
	picture = GFX_united_states_dollar

	is_triggered_only = yes

	option = {
		name = ethiopia.4.a
		log = "[GetDateText]: [This.GetName]: ethiopia.4.a executed"
		add_political_power = -10
		ETH = {
			add_political_power = 30
			add_opinion_modifier = {
				target = ROOT
				modifier = loan_granted
			}
			add_to_variable = { influence_array_val^5 = 5 }
			recalculate_influence = yes
		}

		ai_chance = {
			factor = 200
		}
	}

	option = {
		name = ethiopia.4.b
		log = "[GetDateText]: [This.GetName]: ethiopia.4.b executed"
		add_popularity = {
			ideology = democratic
			popularity = 0.01
		}
		add_to_variable = { party_pop_array^2 = 0.01 }
		recalculate_party = yes

		ETH = {
			add_opinion_modifier = {
				target = ROOT
				modifier = loan_denied
			}
			add_to_variable = { influence_array_val^5 = -5 }
			recalculate_influence = yes
		}

		ai_chance = {
			factor = 15
		}
	}
}

country_event = {
	id = ethiopia.5
	title = ethiopia.5.t
	desc = ethiopia.5.d
	picture = GFX_african_union

	is_triggered_only = yes

	option = {
		name = ethiopia.5.a
		log = "[GetDateText]: [This.GetName]: ethiopia.5.a executed"
		create_faction = african_alliance
		news_event = {
			id = ethiopia_news.3
			hours = 3
		}
		every_country = {
			limit = {
				NOT = { original_tag = ETH }
				NOT = { original_tag = ERI }
				is_in_africa = yes
				is_puppet = no
				is_in_faction = no
				#has_idea = african_union_member
				NOT = { has_war_with = ETH }
			}
			country_event = {
				id = ethiopia.6
				days = 1
			}
		}
	}
}

#Invitation to the African Alliance
country_event = {
	id = ethiopia.6
	title = ethiopia.6.t
	desc = ethiopia.6.d
	picture = GFX_african_union

	is_triggered_only = yes

	option = {
		name = ethiopia.6.a
		log = "[GetDateText]: [This.GetName]: ethiopia.6.a executed"
		ETH = { add_to_faction = ROOT }

		ai_chance = {
			factor = 100
			modifier = {
				has_government = democratic
				add = 40
			}
			modifier = {
				OR = {
					has_country_flag = col_leader_liberalism
					has_country_flag = col_member_liberalism
				}
				add = 15
			}
			modifier = {
				OR = {
					has_country_flag = col_leader_socialism
					has_country_flag = col_member_socialism
					has_country_flag = col_leader_Neutral_Green
					has_country_flag = col_member_Neutral_Green
				}
				add = 10
			}
		}
	}

	option = {
		name = ethiopia.6.b
		log = "[GetDateText]: [This.GetName]: ethiopia.6.b executed"
		ai_chance = {
			factor = 2
			modifier = {
				OR = {
					has_government = fascism
					has_government = nationalist
					has_government = communism
				}
				add = 60
			}
		}
	}
}

country_event = {
	id = ethiopia.7
	title = ethiopia.7.t
	desc = ethiopia.7.d
	picture = GFX_ETH_light_rail

	is_triggered_only = yes

	option = {
		name = ethiopia.7.a
		log = "[GetDateText]: [This.GetName]: ethiopia.7.a executed"
		233 = {
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		}
	}
}

### Ethio-Djibouti Railways destroyed
country_event = {
	id = ethiopia.8
	title = ethiopia.8.t
	desc = ethiopia.8.d
	picture = GFX_broken_infrastructure

	fire_only_once = yes

	trigger = {
		tag = ETH
		date > 2008.1.1
		OR = {
			NOT = { has_country_flag = ETH_railway_repaired_flg }
			NOT = { has_active_mission = ETH_rehabilitation_railway_2 }
		}
	}

	option = {
		name = ethiopia.8.a
		log = "[GetDateText]: [This.GetName]: ethiopia.8.a executed"
		234 = {
			remove_building = {
				type = infrastructure
				level = 1
			}
		}
		set_country_flag = ETH_railway_destroyed_flg
	}
}

country_event = {
	id = ethiopia.9
	title = ethiopia.9.t
	desc = ethiopia.9.d
	picture = GFX_ETH_light_rail

	is_triggered_only = yes

	option = {
		name = ethiopia.9.a
		log = "[GetDateText]: [This.GetName]: ethiopia.9.a executed"
		233 = {
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		}
	}
}

country_event = {
	id = ethiopia.10
	title = ethiopia.10.t
	desc = ethiopia.10.d
	picture = GFX_ETH_railway

	is_triggered_only = yes

	option = {
		name = ethiopia.10.a
		log = "[GetDateText]: [This.GetName]: ethiopia.10.a executed"
		233 = {
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		}
		234 = {
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		}
		236 = {
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		}
	}
}

### EPLF forms again
country_event = {
	id = ethiopia.11
	title = ethiopia.11.t
	desc = ethiopia.11.d
	picture = GFX_ETH_ELF

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ethiopia.11.a
		log = "[GetDateText]: [This.GetName]: ethiopia.11.a executed"
		set_country_flag = EPLF_formed_again
		hidden_effect = { set_variable = { elpf_presence = 5 } }
		load_focus_tree = { tree = ETH_eritrea_focus keep_completed = yes }
		ERI = {
			create_country_leader = {
				name = "Yemane Gebreab"
				desc = ""
				picture = "Portrait_Yemane_Gebreab.dds"
				expire = "2050.1.1"
				ideology = Nat_Autocracy
				traits = {
					#
				}
			}
		}
	}
}

### EPLF attacked convoy
country_event = {
	id = ethiopia.12
	title = ethiopia.12.t
	desc = ethiopia.12.d
	picture = GFX_ETH_truck

	trigger = {
		tag = ETH
		has_country_flag = EPLF_formed_again
	}

	fire_only_once = yes

	option = {
		name = ethiopia.12.a
		log = "[GetDateText]: [This.GetName]: ethiopia.12.a executed"
		random_list = {
			25 = { add_equipment_to_stockpile = { type = infantry_weapons amount = -100 } add_equipment_to_stockpile = { type = util_vehicle_equipment amount = -6 } add_manpower = -12 }
			25 = { add_equipment_to_stockpile = { type = L_AT_Equipment amount = -30 } add_equipment_to_stockpile = { type = util_vehicle_equipment amount = -6 } add_manpower = -12 }
			25 = { add_equipment_to_stockpile = { type = AA_Equipment amount = -30 } add_equipment_to_stockpile = { type = util_vehicle_equipment amount = -6 } add_manpower = -12 }
			25 = { add_equipment_to_stockpile = { type = cnc_equipment amount = -50 } add_equipment_to_stockpile = { type = util_vehicle_equipment amount = -6 } add_manpower = -12 }
		}
	}
}

### Isaias Afwerki arrested
country_event = {
	id = ethiopia.13
	title = ethiopia.13.t
	desc = ethiopia.13.d
	picture = GFX_african_guard

	trigger = {
		tag = ETH
		OR = {
			AND = {
				owns_state = 228
				owns_state = 229
				NOT = { country_exists = ERI }
			}
			ERI = { is_subject_of = ETH }
		}
	}

	fire_only_once = yes

	option = {
		name = ethiopia.13.a
		log = "[GetDateText]: [This.GetName]: ethiopia.13.a executed"
		hidden_effect = {
			ETH = { country_event = { id = ethiopia.11 days = 2 } }
		}
	}
}

### Isaias Afwerki trial - autocrat
country_event = {
	id = ethiopia.14
	title = ethiopia.14.t
	desc = ethiopia.14.d
	picture = GFX_court

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ethiopia.14.a
		log = "[GetDateText]: [This.GetName]: ethiopia.14.a executed"
	}
	option = {
		name = ethiopia.14.b
		log = "[GetDateText]: [This.GetName]: ethiopia.14.b executed"
	}
}

### Isaias Afwerki trial - democratic - life imprisonment
country_event = {
	id = ethiopia.15
	title = ethiopia.15.t
	desc = ethiopia.15.d
	picture = GFX_court

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ethiopia.15.a
		log = "[GetDateText]: [This.GetName]: ethiopia.15.a executed"
	}
}

### Isaias Afwerki trial - democratic - death sentence
country_event = {
	id = ethiopia.16
	title = ethiopia.16.t
	desc = ethiopia.16.d
	picture = GFX_court

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ethiopia.16.a
		log = "[GetDateText]: [This.GetName]: ethiopia.16.a executed"
	}
}

### EPLF attackes police station
country_event = {
	id = ethiopia.17
	title = ethiopia.17.t
	desc = ethiopia.17.d
	picture = GFX_ETH_truck

	trigger = {
		tag = ETH
		has_country_flag = EPLF_formed_again
	}

	fire_only_once = yes

	option = {
		name = ethiopia.17.a
		log = "[GetDateText]: [This.GetName]: ethiopia.17.a executed"
		add_equipment_to_stockpile = { type = infantry_weapons amount = -50 } add_manpower = -30
	}
}

### Zere Yacobe Selassie returns to Ethiopia
country_event = {
	id = ethiopia.18
	title = ethiopia.18.t
	desc = ethiopia.18.d
	picture = GFX_ETH_Zera_Yacob_Selassie

	trigger = {
		focus_progress = {
			focus = ETH_invite_zera_yacob
		progress > 0.3
		}
	}

	fire_only_once = yes

	option = {
		name = ethiopia.18.a
		log = "[GetDateText]: [This.GetName]: ethiopia.18.a executed"
		create_country_leader = {
			name = "Zere Yacobe Selassie"
			picture = "Portrait_Zere_Selassie.dds"
			ideology = Monarchist
		}
		hidden_effect = { ROOT = { country_event = { id = ethiopia.19 days = 7 } } }
	}
}

### Zere Yacobe Selassies coronation
country_event = {
	id = ethiopia.19
	title = ethiopia.19.t
	desc = ethiopia.19.d
	picture = GFX_ETH_cathedral

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = ethiopia.19.a
		log = "[GetDateText]: [This.GetName]: ethiopia.19.a executed"
		add_stability = 0.05
	}
}
