##################
#Kakheti events
##################

#Split - if Kakheti is the break-away state
event = {

id = 349000 #triggered by GEO 175005, option B
random = no
country = U16
name = "Georgia falls apart"
desc = "That is something only the ai is going to see."
action_a ={ name = "OK"
command = { type = INF which = -2 value = 5000 }
command = { type = CAV which = -2 value = 2500 }
command = { type = relation which = SEL value = -150 }
command = { type = breakvassal which = SEL }
}}
#######################




#Kakheti joins Russia events
event = {

id = 349008
trigger = {
exists = PER
exists = TUR
exists = RUS
owned = { province = 457 data = RUS } # Russia has Astrakhan
NOT = { OR = {
exists = BYZ # no threat for the faith
exists = TRE
countrysize = 5 # too strong 
} }
}
random = no
country = U16 
name = "Georgia threatened"
desc = "For centuries Georgia was an enclave of Christianity in the Caucasian mountains. As the last Byzantine states succumbed, the country became isolated from the rest of the world, surrounded by potential enemies and fighting feudal quarrels. As Persia emerged in the east and the Osman power grew in the west, Georgia was plunged into the front lines between the two titans. In the meantime Russia grew in strengh, having reached as far as Caspian Sea. Hoping to receive substantial aid and save his faith, Alexander, king of the still independent Kakheti, asked the tsar to become the overlord of Georgia."
style = 1
date = { day = 1 month = march year = 1584 } # Reign of Feodor or Boris in Russia
offset = 36
deathdate = { day = 1 month = january year = 1600 }

action_a ={ 
name = "Submit to Russia"
command = { type = stability value = -1 }
command = { type = relation which = RUS value = 50 }
command = { type = relation which = TUR value = -50 }
command = { type = relation which = PER value = -25 }
command = { type = breakvassal which = TUR }
command = { type = breakvassal which = PER }
command = { type = breakvassal which = CRI }
command = { type = breakvassal which = SEL }
command = { type = trigger which = 349009 } # RUS event
}
action_b ={
name = "Rely on our strengh"
command = { type = stability value = 2 }
command = { type = treasury value = -50 }
command = { type = INF which = -2 value = 2500 }
command = { type = CAV which = -2 value = 7500 }
command = { type = relation which = TUR value = -25 }
command = { type = relation which = PER value = -25 } 
command = { type = domestic which = OFFENSIVE value = 2 }
command = { type = domestic which = INNOVATIVE value = -1 } 
}
action_c ={
name = "Appease the infidels"
command = { type = stability value = -2 }
command = { type = relation which = TUR value = 50 }
command = { type = relation which = PER value = 50 }
command = { type = treasury value = -100 }
}
}


event = {

id = 349009 #triggered by 349008, option a
random = no
country = RUS 
name = "Georgians ask our protection"
desc = "Alexander, the king of Kakheti, asked Your Majesty to accept sovereignty over the ancient Iverian Kingdom, including territories dependent from it. In return he wants our protection of Georgia, which, according to his thoughts, would result in building fortresses on the Terek river and sending a force of about 20,000 men to control Daghestan.  At the same time the Persians have agreed to give us all of Daghestan, Azerbaijan and even Tabriz if we manage to take it away from the Ottomans. If we agree, though, the Ottomans would be very disgruntled."
style = 3

action_a = {
name = "Let us accept these gifts"
command = { type = treasury value = -200 }
command = { type = addcore which = 470 } 
command = { type = addcore which = 1058 } 
command = { type = relation which = U16 value = 100 }
command = { type = relation which = PER value = 25 } #an action against the turks
command = { type = relation which = TUR value = -50 }
command = { type = vassal which = U16 }
command = { type = alliance which = U16 }
command = { type = trigger which = 349011 } # Georgian benefits
command = { type = trigger which = 349010 } #Ottoman Event
command = { type = vp value = 10 }
}
action_b ={
name = "We shall not run after illusions"
command = { type = trigger which = 349012 } # Georgian outcome
command = { type = stability value = 1 }
command = { type = vp value = -10 }
}
}

# Turkish reaction
event = {

id = 349010 # triggered by russian 349009, option A
random = no
country = TUR
name = "Kakheti is a russian vassal"
desc = "On the 15th of October 1586, Alexander of Kakheti has sworn loyality to Feodor of Russia. Since then he has refused to send any aid to our forces at Tabriz. Seeing the cordiality between the Shah and the Tsar, we can foresee that for us this is not good at all. How shall we react?"
style = 3

action_a ={
name = "They are foolish to anger us"
command = { type = stability value = 1 }
command = { type = relation which = U16 value = -100 }
command = { type = relation which = RUS value = -100 }
command = { type = casusbelli which = U16 value = 60 }
command = { type = casusbelli which = RUS value = 60 }
command = { type = vp value = 10 }
}
action_b ={
name = "Let us wait for a better time to strike"
command = { type = vp value = -10 }
}
action_c ={
name = "We have no use of another enemy"
command = { type = relation which = RUS value = 100 }
command = { type = vp value = -25 } 
}
}

# Kakheti benefits from vassalization
event = {

id = 349011 #triggered by russian 349009, option A
random = no
country = U16 
name = "Russian aid arrives"
desc = "Unlike his successors, Feodor kept his word and sent aid to the king."
style = 1

action_a ={ 
name = "Great!"
command = { type = stability value = 3 }
command = { type = domestic which = INNOVATIVE value = 1 } # cultural contact
command = { type = domestic which = OFFENSIVE value = -1 }
command = { type = relation which = RUS value = 150 }
command = { type = fortress which = -1 value = 1 }
command = { type = INF which = -2 value = 2500 }
command = { type = ART which = -2 value = 15 }
command = { type = land value = 250 } 
command = { type = infra value = 500 } 
command = { type = treasury value = 100 }
}
}

# Russians reject
event = {

id = 349012 #triggered by russian 349009, option B
random = no
country = U16 
name = "Russia rejects the vassalization of Kakheti"
desc = "Struggling itself and fearing to anger the mighty Turks, the 'Third Rome' didn't come to Georgia's aid. The kingdom was left to find a more pragmatic way to survive."
style = 1

action_a ={ 
name = "We shall withstand the storm alone!"
command = { type = stability value = -1 }
command = { type = domestic which = OFFENSIVE value = 1 }
command = { type = land value = 200 } 
}
}
##################################################  #######





#Kakheti Regicide
event = {

id = 349013
trigger = {
event = 349011 # Georgia is a russian vassal
owned = { province = 487 data = PER } # Persia has Azerbaijan
owned = { province = 472 data = PER } # Persia has vanilla Kurdistan
control = { province = 487 data = PER }
control = { province = 472 data = PER }
}
random = no
country = U16
name = "Regicide in Kakheti"
desc = "As Persia regained its strength it set an eye on its northern borderlands once again, into regions where Russia had expanded. Prince Konstantin, the son of Alexander of Kakheti, had been educated at the Persian court since he was young and converted to Shi'ite Islam. Shah Abbas ordered him to seize the throne and sent an army into Georgia to help fighting the Turks. Having a garrison of only forty russian soldiers Alexander could not dare to offend Abbas, whose Persians soon killed him along with his son Giorgi in order to enthrone Konstantin the very same day. Russia could not really interfere as it slowly but surely went into a civil war over its own throne."

date = { day = 1 month = january year = 1602} # Reign of Feodor or Boris in Russia
offset = 36
deathdate = { day = 1 month = january year = 1606 }
style = 1

action_a ={ 
name = "Konstantin becomes king"
command = { type = breakvassal which = RUS } 
command = { type = relation which = RUS value = -50 }
command = { type = relation which = PER value = 50 }
command = { type = domestic which = INNOVATIVE value = -1 }
command = { type = trigger which = 349100 }# U16 dummy
command = { type = trigger which = 349015 }# Russian event
}
action_b ={
name = "Alexander defies Abbas"
command = { type = relation which = PER value = -250 }
command = { type = trigger which = 349016 }
}
} 


#Dummy U16 event to ensure they get vassalized to PER
#You can't break a vassalization and vassalize the nation to another country in a direct followup event
event = {

id = 349100
#triggered by 349013A
random = no
country = U16
name = "Konstantin becomes king"
desc = "As Konstantin eliminated his opponents, he soon accepted Abbas of Persia as his overlord."
style = 1

action_a ={ 
name = "Konstantin becomes king"
command = { type = trigger which = 349014 } 
}
}

#Kakheti Regicide - Persians vassalize Georgia
event = {
#triggered by 349100
id = 349014
random = no
country = PER
name = "Konstantin is king of Georgia"
desc = "As a result of a coup in Georgia, Persian forces put Konstantin, Abbas' puppet, on the throne. Although short lived, this vassalization improved the Persian position in their endless wars against the Turks."
action_a ={ 
name = "Excellent"
command = { type = stability value = 1 }
command = { type = vassal which = U16 } 
}
}

#Kakheti Regicide - Russian event
event = {
#triggered by 349013A
id = 349015
random = no
country = RUS
name = "Konstantin is king of Georgia"
desc = "While Persia was being defeated by the Turks during Hodabend's reign it recognized the Russian presence in the Caucasus. But once Abbas made peace with the Ottomans he started to regard Russia as a geopolitical enemy. Backed by him, Konstantin, the son of Russiophile king Alexander, killed his father and rose to the throne. At the same time the Ottomans burned down the new Russian forts in Daghestan. As Russia was consumed in instability it could not really protect its interest, conserving its claims for better times."
action_a ={ 
name = "We can't help here"
command = { type = removecore which = 470 } # Armenia
command = { type = removecore which = 1058 } # Daghestan
command = { type = secedeprovince which = TUR value = 471 }
}
action_b ={ 
name = "We shall not accept this humiliation"
command = { type = stability value = -1 }
command = { type = relation which = PER value = -150 }
command = { type = relation which = TUR value = -100 }
command = { type = casusbelli which = TUR value = 24 }
command = { type = casusbelli which = PER value = 24 }
command = { type = treasury value = -200 }
command = { type = secedeprovince which = TUR value = 471 }
}
}

#Kakheti Regicide - Georgia refuses
event = {
#triggered by 349013B
id = 349016
random = no
country = PER
name = "Persia claims Kakheti"
desc = "Abbas, having set an eye on Kakheti, sent his troops to ensure the king did not decide to plot against Persia.  Alas, king Alexander boldly refused to pay any respect to Abbas, hoping for Russian protection."
action_a ={ 
name = "They will pay!"
command = { type = addcore which = 1058 } #Armenia-Kakheti
command = { type = relation which = U16 value = -100 }
command = { type = casusbelli which = U16 value = 36 }
}
}
############################################





#Persian invasions
event = {

id = 349017
trigger = {
vassal = { country = PER country = U16 }
owned = { province = 487 data = PER } # Persia has Azerbaijan
owned = { province = 473 data = PER } # Persia has Kurdistan
}
random = no
country = U16
name = "Teimuraz breaks with Abbas"
desc = "Teimuraz I, another Christian king of Kakhetia, became king in 1606, and kept himself quite independent.  Therefore, Shah Abbas of Persia invited him and Luarsab II of Kartli to a royal hunt. Keeping the fate of murdered king Alexander of Kakheti in mind Teimuraz refused.  Infuriated, the shah gathered armies and moved towards Georgia.  Teimuraz sent two of his sons to Abbas but the latter could not be appeased. Still refusing to arrive at the shah's camp personally he had to prepare for a war..."

date = { day = 1 month = january year = 1610} 
offset = 36
deathdate = { day = 1 month = january year = 1614 }
style = 4

action_a ={ 
name = "Teimuraz backs down and meets Abbas" # Possible game over
command = { type = trigger which = 349018 } # Abbas decides what to do
command = { type = stability value = -2 }
}

action_b ={ 
name = "Abbas invades Georgia" 
command = { type = breakvassal which = PER } 
command = { type = war which = PER }
command = { type = relation which = PER value = -250 }
}
} # do we need a third, less radical option?


event = {
id = 349018 #Triggered by 349017 OPTION A
random = no
country = PER
name = "Georgia is on it's knees"
desc = "Teimuraz I, the king of Kakheti, as well as Luarsab of Kartli have shown disrespect to Shah Abbas for some time by refusing to show up at his court. Fearing his inevitable revenge and unwilling to spill the blood of their subjects, they finally arrived there and begged for his mercy while at home no real defence could be organized without them."
style = 3
action_a ={
name = "Imprison the kings and take their lands"
command = { type = inherit which = U16 }
command = { type = badboy value = 1 }
}
action_b ={
name = "Take some tribute and reinstall them"
command = { type = treasury value = 100 } 
command = { type = trigger which = 349019 } #U16 pays tribute
}
action_c ={
name = "Show mercy and release them"
command = { type = relation which = U16 value = 50 }
}
}

event = {
id = 349019 #triggered by 349018 OPTION B
random = no
country = U16
name = "Persia demands tribute"
desc = "When the kings of Kakheti and Kartli were 'visiting' Abbas of Persia, they had no choice but to accept any humiliation the latter demanded. Luckily Abbas demanded a high, but not unbearable tribute as ransom for their kingdoms."
style = 3
action_a ={
name = "We have to pay..."
command = { type = treasury value = -100 }
}
}
##########################################





#Revolt of Jandieri
event = {
id = 349020
trigger = {
owned = { province = 1742 data = PER } # Georgia is conquered
}
random = no
country = PER
name = "Revolt of David Jandieri"
desc = "When Kakheti was conquered by the shah, the behaviour of the Kyzylbash was not good at all. Plundering and raping, the Persians soon earned the hatred of the local population. In 1615 a revolt started under the leadership of David Jandieri."

date = { day = 1 month = january year = 1615} 
offset = 1
deathdate = { day = 1 month = january year = 1616 }
style = 3

action_a ={ 
name = "Georgia is in revolt!"
command = { type = revolt which = 1742 }
command = { type = revolt which = 1742 }
command = { type = revolt which = 1742 }
command = { type = province_revoltrisk which = 1742 value = 15 }
}
}

event = {

id = 349021
trigger = { event = 349020 }
random = no
country = U16
name = "Revolt of Jandieri"
desc = "When the Kakhetine people had had enough of the Persian yoke a revolt started under David Jandieri. After its success king Teimuraz, who had been living in exile since Abbas annexed Kakheti, returned to the throne and joined the battle against Persia. Alas, in 1617 Abbas returned, even more determined than before. When Teimuraz fled once again Jandieri organized the nation's defense. There was not a single castle that capitulated without being taken by surprise."
date = { day = 1 month = january year = 1615} 
offset = 0
deathdate = { day = 1 month = march year = 1616 }
style = 3
action_a ={
name = "Let us die as free men!" 
command = { type = breakvassal which = PER }
command = { type = war which = PER }
command = { type = relation which = PER value = -300 }
command = { type = land value = 500 }
command = { type = INF which = -2 value = 5000 }
command = { type = CAV which = -2 value = 5000 }#perhaps also waking a sleeping Jandieri?
}
}

event = {
id = 349022
random = no
country = U16
trigger = {
control = { province = 1742 data = PER } # Georgia is conquered
event = 349020 }
name = "Abbas' revenge"
desc = "When Abbas conquered Georgia after the revolts he did not show any mercy to the population. The rebels did not capitulate and Abbas took terrible revenge on them. Whole villages were burned and many people were deliberately killed.  About 100,000 georgians were reported to have been killed while another 200,000 were deported far into Persia into Mazandaran and Hamadan, where their Islamizied descendants live today."
date = { day = 1 month = january year = 1615 } 
offset = 0
deathdate = { day = 1 month = january year = 1625 }
style = 3
action_a ={ 
name = "Woe upon Georgia!"
command = { type = revolt which = 1742 }
command = { type = revolt which = 1742 }
command = { type = provincetax which = 1742 value = -2 }
command = { type = population which = 1742 value = -2000 }
}
}

#########################################
#349023-349050 for the Saakadze sequence





#Muslim kings of Georgia events 
event = {
id = 349050
trigger = { 
NOT = { vassal = { country = RUS country = U16 } }
NOT = { vassal = { country = TUR country = U16 } }
neighbour = PER }
random = no
country = U16
name = "Rostom, the muslim king"
desc = "Teimuraz made peace with Abbas, being accepted as the sole king of Kartli and Kakheti. When the shah died, though, Teimuraz was more than unsure if the new shah would also recognize him. Therefore he tried to help one of the candidates to become shah to ensure his gratitude. Sadly for him he chose the wrong one while Rostom, a descendant of a Kartlian Bagrationi subline living at the Persian court intrigued in favour of Safi, became the winning candidate.  As he also was muslim he seemed to be a perfect candidate in the eyes of the new shah to replace Teimuraz, who turned out to be a traitor.  Thus an age of 'islamized' kings of Georgia started, although they were wise enough not to try to enforce the new religion on the population."

date = { day = 1 month = january year = 1632 } 
offset = 200 # because he gradually took GEO
deathdate = { day = 1 month = january year = 1655 }
style = 3

action_a ={ 
name = "Let the people believe what they want"
command = { type = stability value = 1 }
command = { type = religion which = shiite }
command = { type = add_countryculture which = persian }
command = { type = remove_countryculture which = georgian } #avoiding an easy conversion
command = { type = relation which = PER value = 50 }
command = { type = domestic which = INNOVATIVE value = 1 }
command = { type = trigger which = 349051 } #PER vassalization
}
action_b ={
name = "Let us praise Allah"
command = { type = stability value = -3 }
command = { type = religion which = shiite }
command = { type = technology which = muslim }
command = { type = provincereligion which = -2 value = shiite }
command = { type = domestic which = INNOVATIVE value = -2 }
command = { type = missionaries value = 2 }
command = { type = breakvassal which = PER }
command = { type = breakvassal which = RUS } 
command = { type = breakvassal which = TUR } 
command = { type = relation which = PER value = 100 }
command = { type = relation which = RUS value = -100 }
command = { type = relation which = BYZ value = -100 } #If it existed...
command = { type = revolt which = -1 }
command = { type = revolt which = -1 }
command = { type = revolt which = -1 }
command = { type = trigger which = 349051 }#PER vassalization
}
action_c ={
name = "Let us reconvert and expel the oppressor"
command = { type = stability value = -1 }
command = { type = casusbelli which = PER value = 36 }
command = { type = relation which = PER value = -250 }
command = { type = relation which = RUS value = 50 }
command = { type = relation which = BYZ value = 50 }
}
}

event = {
id = 349051 #Triggered by 349050, option a+b
random = no
country = PER
name = "Muslim kings in Kartli and Kakheti"
desc = "After Teimuraz supported Safi's competitor in the succession after Abbas' death, the shah decided to install Rostom, an islamified Georgian prince who had been living in Persia as the mayor of Ispahan as king of Kartli and Kakheti.  Rostom managed to beat Teimuraz and accepted Persian overlordship without restraint."
action_a ={
name = "Let us appoint him"
command = { type = vassal which = U16 } 
}
}

event = {
id = 349052
trigger = { religion = shiite } 
random = no
country = U16
name = "Teimuraz and Irakli"
desc = "In 1732 the shah appointed Teimuraz II as the king of Kartli, while his nephew Irakli became the king of Kakheti, causing the defacto unification of the two kingdoms. Another remarkable thing was that both were crowned in Christian ritual, which made them the first christian kings in Kartli and Kakheti since Rostom's times."
date = { day = 1 month = january year = 1732 } 
offset = 0
deathdate = { day = 1 month = january year = 1795 }
style = 4
action_a ={
name = "A century of Islam is over"
command = { type = stability value = 2 }
command = { type = relation which = PER value = -50 }
command = { type = relation which = RUS value = 100 }
command = { type = religion which = orthodox }
command = { type = technology which = torthodox }
command = { type = conversion which = -1 }
command = { type = add_countryculture which = georgian }
command = { type = remove_countryculture which = persian }
command = { type = domestic which = INNOVATIVE value = 1 }
}
action_b ={
name = "Christianity is dead in Georgia"
command = { type = add_countryculture which = georgian }
command = { type = remove_countryculture which = persian }
command = { type = relation which = PER value = 100 }
command = { type = domestic which = INNOVATIVE value = -1 }
}
}
#####################################




#Unification
event = {
id = 349053
trigger = {

} 
random = no
country = U16
name = "Kartli and Kakheti united"
desc = "In 1762, Teimuraz II. of Kartli died. His nephew, Irakli II. of Kakheti finally could unite both east-Georgian kingdoms into one realm, which once again became known as Georgia. Irakli pursued a strict policy of limiting the local feudals' power, tried to turn Georgia into an absolutist state and seeked contact with Russia and Imereti to fight off persian hegemony."
date = { day = 1 month = january year = 1762 } 
offset = 0
deathdate = { day = 11 month = january year = 1798 }
style = 4
action_a ={
name = "Proclaim an united Georgia"
command = { type = stability value = 1 }
command = { type = country which = GEO }
command = { type = relation which = RUS value = 70 }
command = { type = relation which = SEL value = 70 }
command = { type = domestic which = ARISTOCRACY value = -3 }
command = { type = domestic which = CENTRALIZATION value = 4 }
command = { type = domestic which = INNOVATIVE value = 2 }
command = { type = addcore which = 470 } # Imereti
}
action_b ={
name = "Rule Kartli-Kakheti in personal union"
command = { type = stability value = 2 }
command = { type = domestic which = INNOVATIVE value = -1 }
command = { type = domestic which = CENTRALIZATION value = -1 }
}
}