#####################
##  miwa was here  ##
#####################

add_namespace = afr

country_event = { #choosing a benefactor
	id = afr.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event afr.1 FROM = [From.GetName]" }
	title = afr.1.t
	desc = afr.1.d

	is_triggered_only = yes

	option = {
		name = afr.1.BEL
	trigger = {
			any_owned_state = { is_coastal = yes }
			capital_scope = { region = 145 }
			BEL = {
				exists = yes
				same_government_type_as_ROOT = yes
			}
		}
		BEL = { country_event = afr.2 }
	}

	option = {
		name = afr.1.BRA
	trigger = {
			any_owned_state = { is_coastal = yes }
			capital_scope = { region = 182 }
			BRA = {
				exists = yes
				same_government_type_as_ROOT = yes
			}
		}
		BRA = { country_event = afr.2 }
	}

	option = {
		name = afr.1.CAN
	trigger = {
			any_owned_state = { is_coastal = yes }
			capital_scope = {
				NOT = {
					region = 182
					region = 140
					region = 244
				}
			}
			SAF = {
				NOT = {
					exists = yes
					same_government_type_as_ROOT = yes
				}
			}
			CAN = {
				exists = yes
				same_government_type_as_ROOT = yes
			}
		}
		CAN = { country_event = afr.2 }
	}

	option = {
		name = afr.1.EGY
	trigger = {
			is_neighbor_of = EGY
			EGY = {
				exists = yes
				same_government_type_as_ROOT = yes
			}
		}
		EGY = { country_event = afr.2 }
	}

	option = {
		name = afr.1.ENG
	trigger = {
			any_owned_state = { is_coastal = yes }
			capital_scope = {
				NOT = {
					region = 182
					region = 140
					region = 244
				}
			}
			ENG = {
				exists = yes
				same_government_type_as_ROOT = yes
			}
		}
		ENG = { country_event = afr.2 }
	}

	option = {
		name = afr.1.FRA
	trigger = {
			any_owned_state = { is_coastal = yes }
			capital_scope = {
				OR = {
					region = 182
					region = 140
					region = 244
				}
			}
			FRA = {
				exists = yes
				same_government_type_as_ROOT = yes
			}
		}
		FRA = { country_event = afr.2 }
	}

	option = {
		name = afr.1.GER
	trigger = {
			any_owned_state = { is_coastal = yes }
			GER = {
				exists = yes
				same_government_type_as_ROOT = yes
			}
		}
		GER = { country_event = afr.2 }
	}

	option = {
		name = afr.1.LIB
	trigger = {
			any_owned_state = { is_coastal = yes }
			capital_scope = { region = 182 }
			LIB = {
				exists = yes
				same_government_type_as_ROOT = yes
			}
		}
		LIB = { country_event = afr.2 }
	}

	option = {
		name = afr.1.NFA
	trigger = {
			OR = {
				is_neighbor_of = NFA
				any_owned_state = { is_coastal = yes }
			}
			capital_scope = {
				OR = {
					region = 182
					region = 140
					region = 244
				}
			}
			NFA = {
				exists = yes
				same_government_type_as_ROOT = yes
			}
		}
		NFA = { country_event = afr.2 }
	}

	option = {
		name = afr.1.POR
	trigger = {
			is_neighbor_of = PAF
			POR = {
				exists = yes
				same_government_type_as_ROOT = yes
			}
		}
		POR = { country_event = afr.2 }
	}

	option = {
		name = afr.1.DEH
	trigger = {
			any_owned_state = { is_coastal = yes }
			capital_scope = { region = 182 }
			SAF = {
				NOT = {
					exists = yes
					same_government_type_as_ROOT = yes
				}
			}
			CAN = {
				NOT = {
					exists = yes
					same_government_type_as_ROOT = yes
				}
			}
			DEH = {
				exists = yes
				same_government_type_as_ROOT = yes
			}
		}
		DEH = { country_event = afr.2 }
	}

	option = {
		name = afr.1.SAF
	trigger = {
			OR = {
				is_neighbor_of = SAF
				any_owned_state = { is_coastal = yes }
			}
			capital_scope = {
				NOT = {
					region = 182
					region = 140
					region = 244
				}
			}
			SAF = {
				exists = yes
				same_government_type_as_ROOT = yes
			}
		}
		SAF = { country_event = afr.2 }
	}

	option = {
		name = afr.1.alone
		ai_chance = { base = 0 }
	}
}

country_event = {
	id = afr.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event afr.2 FROM = [From.GetName]" }
	title = afr.2.t
	desc = afr.2.d

	is_triggered_only = yes

	option = {
		name = afr.2.a
		ai_chance = { base = 100 }
		FROM = { country_event = afr.3 }
	}

	option = {
		name = afr.2.b
		ai_chance = { base = 0 }
		FROM = { country_event = afr.4 }
	}
}

country_event = {
	id = afr.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event afr.3 FROM = [From.GetName]" }
	title = afr.3.t
	desc = afr.3.d

	is_triggered_only = yes

	option = {
		name = afr.3.a
		add_political_power = 10
		if = {
			limit = { FROM = { tag = BEL } }
			set_country_flag = AFR_foreign_aid_BEL
			mark_focus_tree_layout_dirty = yes
		}
		if = {
			limit = { FROM = { tag = BRA } }
			set_country_flag = AFR_foreign_aid_BRA
			mark_focus_tree_layout_dirty = yes
		}
		if = {
			limit = { FROM = { tag = CAN } }
			set_country_flag = AFR_foreign_aid_CAN
			mark_focus_tree_layout_dirty = yes
		}
		if = {
			limit = { FROM = { tag = EGY } }
			set_country_flag = AFR_foreign_aid_EGY
			mark_focus_tree_layout_dirty = yes
		}
		if = {
			limit = { FROM = { tag = ENG } }
			set_country_flag = AFR_foreign_aid_ENG
			mark_focus_tree_layout_dirty = yes
		}
		if = {
			limit = { FROM = { tag = FRA } }
			set_country_flag = AFR_foreign_aid_FRA
			mark_focus_tree_layout_dirty = yes
		}
		if = {
			limit = { FROM = { tag = GER } }
			set_country_flag = AFR_foreign_aid_GER
			mark_focus_tree_layout_dirty = yes
		}
		if = {
			limit = { FROM = { tag = LIB } }
			set_country_flag = AFR_foreign_aid_LIB
			mark_focus_tree_layout_dirty = yes
		}
		if = {
			limit = { FROM = { tag = NFA } }
			set_country_flag = AFR_foreign_aid_NFA
			mark_focus_tree_layout_dirty = yes
		}
		if = {
			limit = { FROM = { tag = POR } }
			set_country_flag = AFR_foreign_aid_POR
			mark_focus_tree_layout_dirty = yes
		}
		if = {
			limit = { FROM = { tag = RAJ } }
			set_country_flag = AFR_foreign_aid_RAJ
			mark_focus_tree_layout_dirty = yes
		}
		if = {
			limit = { FROM = { tag = SAF } }
			set_country_flag = AFR_foreign_aid_SAF
			mark_focus_tree_layout_dirty = yes
		}
	}
}

country_event = {
	id = afr.4
	immediate = { log = "[GetDateText]: [Root.GetName]: event afr.4 FROM = [From.GetName]" }
	title = afr.4.t
	desc = afr.4.d

	is_triggered_only = yes

	option = {
		name = afr.4.a
		add_political_power = -10
	}
}

### afr.5: counter-proposal source tag
### afr.6: counter-proposal arrives
### afr.7: yes
### afr.8: no

