scramble_for_africa = {

	icon = "gfx/interface/icons/event_icons/event_map.dds"

	is_shown_when_inactive = {
		has_technology_researched = quinine
		any_scope_state = {
			is_incorporated = no
			state_in_africa = yes
		}
	}

	possible = {
		has_technology_researched = malaria_prevention
		any_scope_state = {
			is_incorporated = no
			state_in_africa = yes
			has_state_trait = state_trait_malaria
		}
		OR = {
			has_law = law_type:law_colonial_resettlement
			has_law = law_type:law_colonial_exploitation
		}
	}

	immediate = {
		trigger_event = {
			id = africa_colonial_events.1
			days = 0
			popup = yes
		}
	}

	complete = {
		custom_tooltip = {
			text = scramble_for_africa_complete_tt
			any_scope_state = {
				is_incorporated = no
				state_in_africa = yes
				count >= 7
			}
		}
	}

	on_complete = {
		trigger_event = {
			id = africa_colonial_events.2
			days = 0
			popup = yes
		}
	}

	fail = {
		NOT = {
			any_scope_state = {
				is_incorporated = no
				state_in_africa = yes
			}
		}
	}

	#on_fail = {
	#	trigger_event = {
	#		id = africa_colonial_events.3
	#		days = 0
	#		popup = yes
	#	}
	#}

	status_desc = {
		first_valid = {
			triggered_desc = {
				desc = scramble_for_africa_6_states
				trigger = {
					any_scope_state = {
						count >= 6
						is_incorporated = no
						state_in_africa = yes
					}
				}
			}
			triggered_desc = {
				desc = scramble_for_africa_4_states
				trigger = {
					any_scope_state = {
						count >= 4
						is_incorporated = no
						state_in_africa = yes
					}
				}
			}
			triggered_desc = {
				desc = scramble_for_africa_3_states
				trigger = {
					any_scope_state = {
						count >= 1
						is_incorporated = no
						state_in_africa = yes
					}
				}
			}
			triggered_desc = {
				desc = scramble_for_africa_0_states
			}
		}
	}

	# 20 years
	timeout = 7300

	on_timeout = {

	}

	on_monthly_pulse = {
		random_events = {
			100 = 0
			10 = africa_colonial_events.4
			10 = africa_colonial_events.5
			10 = africa_colonial_events.6
			5 = africa_colonial_events.7
			#10 = patagonia.2#
			10 = amazon.2

			10 = africa_colonial_events.40
			10 = africa_colonial_events.41
			10 = africa_colonial_events.51
			10 = africa_colonial_events.53
			10 = africa_colonial_events.54
		}
	}

	weight = 200
	should_be_pinned_by_default = yes
}
