#Baghdad Koyunlu - Irak (IRA)

#-----------------------------------------------------------------------------------------------

#(1419-1464) Junior Branch of the Kara Koyunlu
#by Garbon
event = {
	id = 350003
	trigger = {
		owned = { province = 508 data = -1 }
	}
	random = no
	country = IRA
	name = "EVENTNAME350003" #Junior Branch of the Kara Koyunlu
	desc = "EVENTHIST350003"
	#-#As a junior branch of the Kara Koyunlu, the Koyunlu situated in Baghdad were expected to turn over any lands they conquered to the main branch, that the main branch had previous designs on.

	date = { day = 1 month = january year = 1419 }
	offset = 10
	deathdate = { day = 29 month = december year = 1464 }

	action_a = {
		name = "ACTIONNAME350003A" #Cede Basrah
		command = { type = relation which = QAR value = 5 }
		command = { type = cedeprovince which = QAR value = 508 } #Basrah
	}
	action_b = {
		name = "ACTIONNAME350003B" #Basrah will remain ours
		command = { type = relation which = QAR value = -300 }
		command = { type = stability value = -2 }
	}
}
#(1419-1464) Junior Branch of the Kara Koyunlu
#by Garbon
event = {
	id = 350004
	trigger = {
		owned = { province = 488 data = -1 }
	}
	random = no
	country = IRA
	name = "EVENTNAME350004" #Junior Branch of the Kara Koyunlu
	desc = "EVENTHIST350004"
	#-#As a junior branch of the Kara Koyunlu, the Koyunlu situated in Baghdad were expected to turn over any lands they conquered to the main branch, that the main branch had previous designs on.

	date = { day = 1 month = january year = 1419 }
	offset = 10
	deathdate = { day = 29 month = december year = 1464 }

	action_a = {
		name = "ACTIONNAME350004A" #Cede Kirkuk
		command = { type = relation which = QAR value = 5 }
		command = { type = cedeprovince which = QAR value = 488 } #Kirkuk
	}
	action_b = {
		name = "ACTIONNAME350004B" #Kirkuk will remain ours
		command = { type = relation which = QAR value = -300 }
		command = { type = stability value = -2 }
	}
}
#(1419-1464) Junior Branch of the Kara Koyunlu
#by Garbon
event = {
	id = 350005
	trigger = {
		owned = { province = 531 data = -1 }
	}
	random = no
	country = IRA
	name = "EVENTNAME350005" #Junior Branch of the Kara Koyunlu
	desc = "EVENTHIST350005"
	#-#As a junior branch of the Kara Koyunlu, the Koyunlu situated in Baghdad were expected to turn over any lands they conquered to the main branch, that the main branch had previous designs on.

	date = { day = 1 month = january year = 1419 }
	offset = 10
	deathdate = { day = 29 month = december year = 1464 }

	action_a = {
		name = "ACTIONNAME350005A" #Cede Hamadan
		command = { type = relation which = QAR value = 5 }
		command = { type = cedeprovince which = QAR value = 531 } #Hamadan
	}
	action_b = {
		name = "ACTIONNAME350005B" #Hamadan will remain ours
		command = { type = relation which = QAR value = -300 }
		command = { type = stability value = -2 }
	}
}
#(1419-1464) Junior Branch of the Kara Koyunlu
#by Garbon
event = {
	id = 350006
	trigger = {
		owned = { province = 530 data = -1 }
	}
	random = no
	country = IRA
	name = "EVENTNAME350006" #Junior Branch of the Kara Koyunlu
	desc = "EVENTHIST350006"
	#-#As a junior branch of the Kara Koyunlu, the Koyunlu situated in Baghdad were expected to turn over any lands they conquered to the main branch, that the main branch had previous designs on.

	date = { day = 1 month = january year = 1419 }
	offset = 10
	deathdate = { day = 29 month = december year = 1464 }

	action_a = {
		name = "ACTIONNAME350006A" #Cede Qazvin
		command = { type = relation which = QAR value = 5 }
		command = { type = cedeprovince which = QAR value = 530 } #Tabriz
	}
	action_b = {
		name = "ACTIONNAME350006B" #Qazvin will remain ours
		command = { type = relation which = QAR value = -300 }
		command = { type = stability value = -2 }
	}
}
#(1419-1464) Junior Branch of the Kara Koyunlu
#by Garbon
event = {
	id = 350007
	trigger = {
		owned = { province = 529 data = -1 }
	}
	random = no
	country = IRA
	name = "EVENTNAME350007" #Junior Branch of the Kara Koyunlu
	desc = "EVENTHIST350007"
	#-#As a junior branch of the Kara Koyunlu, the Koyunlu situated in Baghdad were expected to turn over any lands they conquered to the main branch, that the main branch had previous designs on.

	date = { day = 1 month = january year = 1419 }
	offset = 10
	deathdate = { day = 29 month = december year = 1464 }

	action_a = {
		name = "ACTIONNAME350007A" #Cede Tabaristan
		command = { type = relation which = QAR value = 5 }
		command = { type = cedeprovince which = QAR value = 529 } #Tabaristan
	}
	action_b = {
		name = "ACTIONNAME350007B" #Tabaristan will remain ours
		command = { type = relation which = QAR value = -300 }
		command = { type = stability value = -2 }
	}
}
#(1419-1464) Junior Branch of the Kara Koyunlu
#by Garbon
event = {
	id = 350008
	trigger = {
		owned = { province = 532 data = -1 }
	}
	random = no
	country = IRA
	name = "EVENTNAME350008" #Junior Branch of the Kara Koyunlu
	desc = "EVENTHIST350008"
	#-#As a junior branch of the Kara Koyunlu, the Koyunlu situated in Baghdad were expected to turn over any lands they conquered to the main branch, that the main branch had previous designs on.

	date = { day = 1 month = january year = 1419 }
	offset = 10
	deathdate = { day = 29 month = december year = 1464 }

	action_a = {
		name = "ACTIONNAME350008A" #Cede Awhaz
		command = { type = relation which = QAR value = 5 }
		command = { type = cedeprovince which = QAR value = 532 } #Awhaz
	}
	action_b = {
		name = "ACTIONNAME350008B" #Awhaz will remain ours
		command = { type = relation which = QAR value = -300 }
		command = { type = stability value = -2 }
	}
}

#(1419-1445) An Ak Koyunlu Client State
#by Garbon
event = {
	id = 350009 #triggered by AKK_103041 A
	random = no
	country = IRA
	name = "EVENTNAME350009" #An Ak Koyunlu Client State
	desc = "EVENTHIST350009"
	#-#Released as a pretender in Iraq and backed by the Ak Koyunlu, this Kara Koyunlu prince had no choice but to fight for the throne.

	action_a = {
		name = "ACTIONNAME350009A" #We shall prevail!
		command = { type = war which = QAR }
		command = { type = relation which = QAR value = -400 }
		command = { type = CAV which = -1 value = 5000 }
	}
}

#(1429-1430) The Jalayirids
#by Garbon
event = {
	id = 350000
	trigger = {
		NOT = { owned = { province = 508 data = -1 } }
		exists = BAS
	}
	random = no
	country = IRA
	name = "EVENTNAME350000" #The Jalayrids
	desc = "EVENTHIST350000"
	#-#The collapse of the Il-Khanate led to the formation of many successor states. The most succesful of these would become the legacy of Hasan the Jalayir, a governor of Turkey. His descendents would rule Azerbaijan and the Western half of Iran until 1374 when the Kara Koyunlu declared their independence and took Kurdistan and later Tabriz. These two nations would find themselves swept over by the might of Timurlane. However when Timurid hegemony receded, the Jalayirids remained permanently stunted allowing the Kara Koyunlu to overthrow the Jalayrids and annex the last of their lands in 1431.

	date = { day = 21 month = december year = 1429 }
	offset = 30
	deathdate = { day = 21 month = december year = 1430 }

	action_a = {
		name = "ACTIONNAME350000A" #We tire of their existence!
		command = { type = relation which = BAS value = -400 }
		command = { type = INF which = -1 value = 5000 }
		command = { type = CAV which = -2 value = 2500 }
		command = { type = addcore which = 508 } #Basrah
		command = { type = breakvassal which = BAS }
	}
	action_b = {
		name = "ACTIONNAME350000B" #We will only be tolerant for so long
		command = { type = relation which = BAS value = -200 }
		command = { type = INF which = -2 value = 1000 }
		command = { type = CAV which = -1 value = 500 }
		command = { type = casusbelli which = BAS value = 240 }
		command = { type = addcore which = 508 } #Basrah
		command = { type = breakvassal which = BAS }
	}
}

#(1444-1446) Death of Ispan
#by Garbon
event = {
	id = 350001
	trigger = { monarch = 063502 } #Elvend
	random = no
	country = IRA
	name = "EVENTNAME350001" #Death of Ispan
	desc = "EVENTHIST350001"
	#-#The death of Ispan signaled trouble for the Baghdad branch of the Kara Koyunlu. Ispan bequeathed the government to his nephew Elvend as his son Fluad was too young at the time. However, most of the emirs preferred Fulad believing that a younger ruler would be easier to manipulate. Because the interests of these errant emirs were in conflict with those of Jahan Shah, the main branch of the Kara Koyunlu found itself taking greater interest in the affairs of Baghdad.

	date = { day = 1 month = january year = 1444 }
	offset = 10
	deathdate = { day = 29 month = december year = 1446 }

	action_a = {
		name = "ACTIONNAME350001A" #Is the end near?
		command = { type = breakvassal which = QAR }
		command = { type = INF which = -2 value = 2000 }
		command = { type = revolt which = -1 }
		command = { type = stability value = -1 }
		command = { type = relation which = QAR value = -400 }
		command = { type = trigger which = 266004 } #QAR: Death of Ispan
	}
}

#(1446-1459) Kara Koyunlu in Irak - Ahistorical
#by Garbon
event = {
	id = 350011 #triggered by TIM_296000
	random = no
	country = IRA
	name = "EVENTNAME350011" #Kara Koyunlu in Irak
	desc = "EVENTHIST296000"
	#-#Unable to control large parts of what had once been the Timurid Empire, lgh Beg supported a puppet government of Kara Koyunlu princes in Iraq, as a desperate attempt to hold onto that far flung territory.

	action_a = {
		name = "ACTIONNAME306000A" #We shall be unstoppable!
		command = { type = INF which = -2 value = 10000 }
		command = { type = CAV which = -1 value = 5000 }
		command = { type = relation which = TIM value = 400 }
		command = { type = relation which = QAR value = -400 }
		command = { type = relation which = AKK value = -400 }
		command = { type = remove_countryculture which = turkish }
		command = { type = add_countryculture which = turkish }
		command = { type = remove_countryculture which = arabic }
		command = { type = add_countryculture which = arabic }
		command = { type = trigger which = 296001 } #TIM: Ambitions in Iraq
	}
}

#(1500) Treaty of Partition
#by Garbon
event = {
	id = 350002 #triggered by AKK_103031
	random = no
	country = IRA
	name = "EVENTNAME103031" #Treaty of Partition
	desc = "EVENTHIST103031"
	#-#By the summer 1500, only two claimants to the throne of the empire remained: Alwand in Tabriz, and Sultan Murad of Shiraz. After disposing of Alwand's brother, Sultan Murad made camp in the northwestern frontier of Persian Iraq. With neither side attempting to force the issue, the dispute was eventually submitted to arbitration. A treaty was drawn up that divide the Ak Koyunlu empire at the Qizil Uzan river, between the two pretenders. Alwand accorded the environs of Azerbaijan, Diyarbakir and Arminiya, while Sultan Murad received the two Iraqs, Kerman, and Fars. With this decrease in power, the Ak Koyunlu was unable to check the strength of Dulkadir or the up and coming Ismail of Safavid origin.

	action_a = {
		name = "ACTIONNAME103031A" #A resolution at last, but at a terrible price
		command = { type = CAV which = -1 value = 5000 }
		command = { type = CAV which = -1 value = 5000 }
		command = { type = relation which = AKK value = -400 }
		command = { type = relation which = TIM value = -400 }
		command = { type = relation which = FAR value = -400 }
		command = { type = relation which = UZB value = -400 }
		command = { type = relation which = KHO value = -400 }
		command = { type = relation which = TUR value = -300 }
		command = { type = relation which = DUL value = -200 }
		command = { type = relation which = MAM value = -300 }
		command = { type = remove_countryculture which = arabic }
		command = { type = add_countryculture which = turkish }
		command = { type = add_countryculture which = kurdish }
		command = { type = trigger which = 103033 } #province ceding event #AKK: Murad's domain
	}
}

#(1503) Defeat at Alma-Qulaq
#by Garbon
event = {
	id = 350010
	trigger = {
		event = 103031 #AKK: Treaty of Partition
		exists = PER
		OR = {
			owned = { province = 527 data = -1 }
			owned = { province = 528 data = -1 }
			owned = { province = 529 data = -1 }
			owned = { province = 531 data = -1 }
			owned = { province = 532 data = -1 }
			owned = { province = 533 data = -1 }
			owned = { province = 534 data = -1 }
			owned = { province = 535 data = -1 }
		}
	}
	random = no
	country = IRA
	name = "EVENTNAME350010" #Defeat at Alma-Qulaq
	desc = "EVENTHIST350010"
	#-#On June 20th of 1503, the forces of Sultan Murad encountered those of Ismail at Alma-Qulaq near Hamadan. His total defeat sealed the fate of his Iranian possessions, which accepted Safavid overlordship without resistance.

	date = { day = 19 month = june year = 1503 }

	action_a = {
		name = "ACTIONNAME350010A" #How embarassing!
		command = { type = cedeprovince which = PER value = 531 } #Hamadan
		command = { type = cedeprovince which = PER value = 532 } #Awhaz
		command = { type = cedeprovince which = PER value = 533 } #Isfahan
		command = { type = cedeprovince which = PER value = 534 } #Fars
		command = { type = cedeprovince which = PER value = 535 } #Hormouz
		command = { type = cedeprovince which = PER value = 527 } #Kerman
		command = { type = cedeprovince which = PER value = 528 } #Lut
		command = { type = cedeprovince which = PER value = 529 } #Tabaristan
		command = { type = vp value = -50 }
		command = { type = trigger which = 254301 } #PER: Victory at Alma-Qulaq
	}
}

#-----------------------------------------------------------------------------------------------

#First free id: 350012
