#####Ak Koyunlu Major Events#####
# By Henrik 'Doomdark' Fhraeus #
#################################


#Confederate Clan Wars
event = {
	id = 103030
	trigger = {
		NOT = { domestic = { type = centralization value = 6 } }
	}
	random = no
	country = AKK
	name = "Confederate Clan Wars"
	desc = "In June of 1497, Rustam lost control of the Ak Koyunlu when Husayn 'Ali-Khani took Tabriz and proclaimed it for Ahmad, a young pretender released by Bayezid II. Ahmad ruled for little more than six months in a battle against Ayba-Sultan.  After his death, multiple powers, including Ayba-Sultan would raise various claimants across the empire. Known as the Confederate Clan Wars, battles would wrack the empire until only two claimants remained."
	style = 1
	date = { day = 14 month = december year = 1497 }
	offset = 10
	deathdate = { day = 30 month = january year = 1498 }
	action_a ={ 
		name = "Is the empire to crumble?"
		command = { type = revolt which = 486 }
		command = { type = revolt which = 488 }
		command = { type = revolt which = 489 }
		command = { type = revolt which = 527 }
		command = { type = revolt which = 534 }
		command = { type = revolt which = 533 }
		command = { type = revolt which = 528 }
		command = { type = revolt which = 531 }
		command = { type = revolt which = 532 }
		command = { type = revolt which = 508 }
		command = { type = revolt which = 2016 }
		command = { type = revolt which = -2 }
		command = { type = domestic which = centralization value = -1 }
		command = { type = revoltrisk which = 24 value = 15 }
		command = { type = stability value = -5 }
	}
}

#Treaty of Partition
event = {
	id = 103031
	trigger = {
		OR = {
			event = 103030
			countrysize = 4
			owned = { province = 1453 data = -1 } # Iraq
			NOT = { 
				 domestic = { type = centralization value = 6 }
			}
		}
	}
	random = no
	country = AKK
	name = "Treaty of Partition"
	desc = "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."
	style = 2
	date = { day = 1 month = september year = 1500 }
	offset = 15
	deathdate = { day = 30 month = november year = 1500 }
	action_a ={ 
		name = "A resolution at last, but at a terrible price"
		command = { type = independence which = IRA } # Baghdad
		command = { type = independence which = DUL } # Dulkadir
		command = { type = removecore which = 534 }
		command = { type = removecore which = 533 }
		command = { type = removecore which = 532 }
		command = { type = removecore which = 531 }
		command = { type = removecore which = 530 }
		command = { type = removecore which = 529 }
		command = { type = removecore which = 528 }
		command = { type = removecore which = 527 }
		command = { type = removecore which = 526 }
		command = { type = removecore which = 525 }
		command = { type = removecore which = 489 }
		command = { type = removecore which = 488 }
		command = { type = removecore which = 508 }
		command = { type = removecore which = 1454 }
		command = { type = removecore which = 1453 }
		command = { type = domestic which = centralization value = -2 }
		command = { type = revoltrisk which = 24 value = 3 }
		command = { type = trigger which = 350002 } # Iraq setup event
	}
}

#Treaty of Partition
event = {
	id = 350002
	random = no
	country = IRA
	name = "Treaty of Partition"
	desc = "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."
	style = 2
	action_a ={ 
		name = "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 = UZB value = -400 }
		command = { type = relation which = TUR value = -300 }
		command = { type = relation which = DUL value = -200 }
		command = { type = relation which = EGY value = -300 }
		command = { type = add_countryculture which = turkish }
		command = { type = add_countryculture which = kurdish }
		command = { type = remove_countryculture which = arabic }
		command = { type = trigger which = 103033 } # AKK province ceding event
	}
}

event = {
	id = 103033
	random = no
	country = AKK

	name = "Murad's domain"
	desc = "According to the Treaty of Partition, Sultan Murad was to receive the two Iraqs, Kerman, and Fars."
	style = 1

	action_a = { 
		name = "Grr..."
		command = { type = secedeprovince which = IRA value = 488 }
		command = { type = secedeprovince which = IRA value = 508 }
		command = { type = secedeprovince which = IRA value = 531 }
		command = { type = secedeprovince which = IRA value = 532 }
		command = { type = secedeprovince which = IRA value = 533 }
		command = { type = secedeprovince which = IRA value = 534 }
		command = { type = secedeprovince which = IRA value = 535 }
		command = { type = secedeprovince which = IRA value = 489 }
		command = { type = secedeprovince which = IRA value = 1802 }
		command = { type = secedeprovince which = IRA value = 1651 }
		command = { type = secedeprovince which = IRA value = 1454 }
		command = { type = secedeprovince which = IRA value = 1453 }
	}
}
event = {
	id = 103010
	trigger = {
		NOT = { exists = PER }
	}
	random = no
	country = AKK
	name = "Ismail of the Safavids"
	desc = "In August of 1501, Sheikh Ismail of the Safavids departed from Erzincan with the goal of securing irvan in order to establish a Safavid state.  Despite their superior equipment and numbers, the army of irvan found itself defeated by the religious zeal of Ismail's followers. After his success in irvan, Ismail moved to conquer the castle of Gulistan. Having caught wind of the Sheikh's plans, Alwand, ruler of the northeastern tribes of the Ak Koyunlu decided to meet this foe on the battlefield"
	style = 2
	date = { day = 1 month = december year = 1500 }
	offset = 0
	deathdate = { day = 1 month = december year = 1500 }
	action_a ={ 
		name = "Most unfortunate"
		command = { type = revolt which = 487 }
		command = { type = revolt which = 487 }
		command = { type = revolt which = 487 }
		command = { type = revolt which = 471 }
		command = { type = revolt which = 472 }
		command = { type = revolt which = 1961 }
		command = { type = revolt which = 1961 }
		command = { type = revolt which = 2014 }
		command = { type = revolt which = 2014 }
		command = { type = revolt which = 529 }
		command = { type = revolt which = 530 }
		command = { type = revolt which = -1 }
		command = { type = province_revoltrisk which = 487 value = 10 }
		command = { type = desertion which = 487 value = 7000 }
		command = { type = desertion which = -1 value = 3000 }
		command = { type = desertion which = -1 value = 3000 }
	}
}

event = {
	id = 103011
	trigger = {
		owned = { province = 2016 data = -1 }
		event = 103010
	}
	random = no
	country = AKK
	name = "Safavids in Tabriz"
	desc = "Unfortunately for Alwand, a similar situation, to the battles for irvan, occurred when his 'superior' forces encountered those of Ismail. Alwand's defeat at Shurur, allowed 15 year old Ismail to march victoriously into Tabriz and finally found the Safavid state. Meanwhile Alwand retreated to Diyarbakir in hopes of gathering a new force."
	style = 2
	date = { day = 1 month = december year = 1500 }
	offset = 0
	deathdate = { day = 1 month = december year = 1515 }
	action_a ={ 
		name = "Our capital is lost!"
		command = { type = province_revoltrisk which = 487 value = -10 }
		command = { type = capital which = 2016 } #Diyarbakir
		command = { type = stability value = -5 }
		command = { type = desertion which = -1 value = 10000 }
		command = { type = desertion which = -1 value = 10000 }
		command = { type = desertion which = -1 value = 10000 }
		command = { type = desertion which = 487 value = 5000 }
		command = { type = vp value = -100 }
		command = { type = independence which = PER } # Persia
		command = { type = trigger which = 254300 } #PER setup event, triggers event for AKK to cede provinces
	}
}

event = {
	id = 103012
	random = no
	country = AKK
	name = "The Growing Persia"
	desc = "Alwand's retreat to Diyarbakir, left the rest of his lands defenseless to Ismail's forces."
	style = 2
	action_a ={ 
		name = "Is all lost?"
		command = { type = secedeprovince which = PER value = 487 }
		command = { type = secedeprovince which = PER value = 488 }
		command = { type = secedeprovince which = PER value = 471 }
		command = { type = secedeprovince which = PER value = 472 }
		command = { type = secedeprovince which = PER value = 1961 }
		command = { type = secedeprovince which = PER value = 2014 }
		command = { type = secedeprovince which = PER value = 525 }
		command = { type = secedeprovince which = PER value = 526 }
		command = { type = secedeprovince which = PER value = 527 }
		command = { type = secedeprovince which = PER value = 528 } 
		command = { type = secedeprovince which = PER value = 529 }
		command = { type = secedeprovince which = PER value = 530 }
		command = { type = secedeprovince which = PER value = 531 }
		command = { type = secedeprovince which = PER value = 532 }
		command = { type = secedeprovince which = PER value = 533 }
                command = { type = secedeprovince which = PER value = 534 }
                command = { type = secedeprovince which = PER value = 535 }
                command = { type = secedeprovince which = PER value = 536 }
		command = { type = secedeprovince which = PER value = 1530 }
		command = { type = secedeprovince which = PER value = 1529 }
		command = { type = secedeprovince which = PER value = 1651 }
		command = { type = secedeprovince which = PER value = 1802 }
		command = { type = secedeprovince which = PER value = 489 }
		command = { type = secedeprovince which = PER value = 508 }
		command = { type = secedeprovince which = PER value = 1453 }
		command = { type = secedeprovince which = PER value = 1454 }
		command = { type = breakvassal which = PER }
	}
}

#Defeat at Alma-Qulaq
event = {
	id = 103034
	trigger = {
		event = 103031
		exists = PER
		OR = {
		        owned = { province = 525 data = -1 }
                        owned = { province = 526 data = -1 }
			owned = { province = 527 data = -1 }
			owned = { province = 528 data = -1 }
			owned = { province = 529 data = -1 }
			owned = { province = 533 data = -1 }
			owned = { province = 534 data = -1 }
			owned = { province = 535 data = -1 }
			owned = { province = 536 data = -1 }
			owned = { province = 1529 data = -1 }
			owned = { province = 1530 data = -1 }
			owned = { province = 1651 data = -1 }
			owned = { province = 1802 data = -1 }
		}
	}
	random = no
	country = IRA
	name = "Defeat at Alma-Qulaq"
	desc = "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. "
	style = 2
	date = { day = 20 month = june year = 1503 }
	offset = 5
	action_a ={ 
		name = "How embarassing!"
		command = { type = secedeprovince which = PER value = 533 }
		command = { type = secedeprovince which = PER value = 534 }
		command = { type = secedeprovince which = PER value = 535 }
		command = { type = secedeprovince which = PER value = 525 }
		command = { type = secedeprovince which = PER value = 526 }
		command = { type = secedeprovince which = PER value = 527 }
		command = { type = secedeprovince which = PER value = 528 }
		command = { type = secedeprovince which = PER value = 529 }
		command = { type = secedeprovince which = PER value = 536 }
		command = { type = secedeprovince which = PER value = 1530 }
		command = { type = secedeprovince which = PER value = 1529 }
		command = { type = secedeprovince which = PER value = 1651 }
		command = { type = secedeprovince which = PER value = 1802 }
		command = { type = vp value = -50 }
		command = { type = trigger which = 254301 } # PER
	}
}

#Shi'a takeover#
event = {
	id = 65052
	trigger = {
		owned = { province = 487 data = -1 }
		control = { province = 487 data = REB }
		NOT = { exists = PER }
}
	random = no
	country = AKK
	name = "EVENTNAME65052"
	desc = "EVENTHIST65052"
	style = 1

	date = { day = 1 month = may year = 1503 }
	offset = 30
	deathdate = { day = 1 month = january year = 1510 }

	action_a ={ 
		name = "ACTIONNAME65052A"
		command = { type = country which = PER }
		command = { type = capital which = 487 }
		command = { type = religion which = shiite }
		command = { type = add_countryculture which = persian }
		command = { type = add_countryculture which = ukrainian }
		command = { type = remove_countryculture which = turkish }
		command = { type = remove_countryculture which = kurdish }
		command = { type = revoltrisk value = -8 }
		command = { type = technology which = torthodox }
		command = { type = land value = 4000 }
                command = { type = cash value = 300 }
                command = { type = manpower value = 50 }
		command = { type = domestic which = QUALITY value = 1 }
		command = { type = cav which = -1 value = 7000 }
		command = { type = stability value = 1 }
	}
	action_b ={ 
		name = "ACTIONNAME65052B"
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = provincetax which = -1 value = -1 }
		command = { type = provincetax which = -1 value = -1 }
		command = { type = provincetax which = -1 value = -1 }
		command = { type = domestic which = centralization value = -2 }
		command = { type = revoltrisk which = 90 value = 8 }
		command = { type = stability value = -6 }
	}
}