namespace = dvg_morocco

# Prepare for War!
dvg_morocco.1 = {
	type = country_event
	placement = ROOT

	title = dvg_morocco.1.t
	desc = dvg_morocco.1.d
	flavor = dvg_morocco.1.f
	
	event_image = {
		video = "gfx/event_pictures/middleeast_courtroom_upheaval.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/middleeast/courtroom_upheaval"

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

	duration = 3

	trigger = {
	}
	
	
	# Inshallah!
	option = {
		name = dvg_morocco.1.a
		default_option = yes
		add_journal_entry = {
			type = je_prepare_for_independence_war_morocco
		}
		add_radicals = {
			value = 0.3
			culture = cu:portuguese
		}
		add_loyalists = {
			value = 0.15
		}
		ai_chance = {
			base = 1
		}
	}
}

# War of Independence Begins!
dvg_morocco.2 = {
	type = country_event
	placement = ROOT

	title = dvg_morocco.2.t
	desc = dvg_morocco.2.d
	flavor = dvg_morocco.2.f
	
	event_image = {
		video = "gfx/event_pictures/middleeast_courtroom_upheaval.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/middleeast/courtroom_upheaval"

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

	duration = 3

	trigger = {
	}
	
	
	# Vive!
	option = {
		name = dvg_morocco.2.a
		default_option = yes
		add_loyalists = {
			value = 0.15
		}
		ai_chance = {
			base = 1
		}
	}
}

# We must bide our time.
dvg_morocco.3 = {
	type = country_event
	placement = ROOT

	title = dvg_morocco.3.t
	desc = dvg_morocco.3.d
	flavor = dvg_morocco.3.f
	
	event_image = {
		video = "gfx/event_pictures/middleeast_courtroom_upheaval.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/middleeast/courtroom_upheaval"

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

	duration = 3

	trigger = {
	}
	
	#... and?
	option = {
		name = dvg_morocco.3.b
		default_option = yes
		add_radicals = {
			value = 0.3
			culture = cu:portuguese
		}
		add_loyalists = {
			value = 0.5
			culture = cu:maghrebi
		}
		trigger_event = { id = dvg_morocco.2 }
		c:SPA = {
			trigger_event = { id = dvg_spain.10 }
		}
		ai_chance = {
			base = 1
		}
	}
	
	# Shame really
	option = {
		name = dvg_morocco.3.a
		add_loyalists = {
			value = 0.5
			culture = cu:portuguese
		}
		ai_chance = {
			base = 0
		}
	}
}

# We have won!
dvg_morocco.4 = {
	type = country_event
	placement = ROOT

	title = dvg_morocco.4.t
	desc = dvg_morocco.4.d
	flavor = dvg_morocco.4.f

	event_image = {
		video = "gfx/event_pictures/unspecific_signed_contract.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/unspecific/signed_contract"

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

	duration = 3

	trigger = {
	}

	#whoop
	option = {
		name = dvg_morocco.4.a
		default_option = yes
		add_radicals = {
			value = 0.5
			culture = cu:portuguese
		}
		add_loyalists = {
			value = 0.5
			culture = cu:maghrebi
		}
		ai_chance = {
			base = 1
		}
	}
}
		
# War for Morocco
dvg_morocco.5 = {
	type = country_event
	placement = ROOT

	title = dvg_morocco.5.t
	desc = dvg_morocco.5.d
	flavor = dvg_morocco.5.f
	
	event_image = {
		video = "gfx/event_pictures/middleeast_courtroom_upheaval.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/middleeast/courtroom_upheaval"

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

	duration = 1

	trigger = {
	}
	
	
	# Oh dear
	option = {
		name = dvg_morocco.5.a
		default_option = yes
		add_journal_entry = {
			type = je_independence_war_morocco
		}
		ai_chance = {
			base = 1
		}
	}
}

# Spain... Let us become independent?
dvg_morocco.6 = {
	type = country_event
	placement = ROOT

	title = dvg_morocco.6.t
	desc = dvg_morocco.6.d
	flavor = dvg_morocco.6.f
	
	event_image = {
		video = "gfx/event_pictures/middleeast_courtroom_upheaval.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/middleeast/courtroom_upheaval"

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

	duration = 3
	
	cooldown = { months = 12 }

	trigger = {
	}
	
	
	# I guess this works.
	option = {
		name = dvg_morocco.6.a
		default_option = yes
		add_journal_entry = {
			type = je_independence_war_morocco
		}
		ai_chance = {
			base = 1
		}
	}
	
	#... and?
	option = {
		name = dvg_morocco.3.b
		add_radicals = {
			value = 0.3
			culture = cu:portuguese
		}
		add_loyalists = {
			value = 0.5
			culture = cu:maghrebi
		}
		c:SPA = {
			trigger_event = { id = dvg_spain.10 }
		}
		ai_chance = {
			base = 0
		}
	}
}