

##################################################################################################################
#### Португальское владычество в Омане. Поправлено на отсутствие Ормуза. Дана возможность выбора за Оман
##################################################################################################################

#Portuguese force-vassalization of Ormuz for Ormuz#
event = {
	id = 423000
      trigger = { exists = POR discovered = 504 }                
	random = no
	country = OMA
      date = { month = october year = 1507 } 
	offset = 30
      deathdate = { day = 1 month = january year = 1515 }
	name = "Захват Ормуза"
	desc = "В октябре 1507 года Ормуз понёс полное порожение в морской битве против португальцев. В этом сражении Альфонсо де Альбукерке захватил известное судно Мери. Вскоре после того, как Ормуз во главе с Когетаром был захвачен, отпала надобность строить крепость по плану Альбукерке. По этому, трое капитанов Альбукерке покинули своего командира и отплыли в Индию."
	style = 2
	action_a ={ 
		name = "Проклятые португальцы!"
                 command = { type = stability value = -1 }
                 command = { type = trade value = -50 }
                 command = { type = breakvassal which = PER }
                 command = { type = breakvassal which = TUR }
                 command = { type = breakvassal which = MAM }
                 command = { type = breakvassal which = GUJ }
                 command = { type = breakvassal which = QAR }
                 command = { type = breakvassal which = ADE }
                 command = { type = breakvassal which = AKA }
                 command = { type = breakvassal which = TIM }
                 command = { type = breakvassal which = AKK }
                 command = { type = breakvassal which = CUM }
                 command = { type = trigger which = 423004 }
                 }
         action_b ={ 
		name = "Шайтан им в зад, а не покорность!"
                 command = { type = revoltrisk which = 60 value = 10 }
                 command = { type = stability   value = -6 }
                 command = { type = treasury value = -300 }
}
}

#The Portuguese take possession of Ormuz#
event = {
	id = 423005
      trigger = { exists = POR }                
	random = no
	country = OMA
      date = { month = october year = 1515 } 
	offset = 30
      deathdate = { month = january year = 1516 }
	name = "Ормуз принадлежит Португалии"
	desc = "В 1515 году по приказу Альбукерке португальцы убили губернатора города, перса Рейса Хамада. Во время строительства форта они захватили арсенал и сделали правителя шейха Ормуза своей марионеткой."
	style = 2
	action_a ={ 
		name = "У нас нет другого выхода, кроме как подчиниться португальцам"
                 command = { type = breakvassal which = PER }
                 command = { type = breakvassal which = TUR }
                 command = { type = breakvassal which = MAM }
                 command = { type = breakvassal which = GUJ }
                 command = { type = breakvassal which = QAR }
                 command = { type = breakvassal which = ADE }
                 command = { type = breakvassal which = AKA }
                 command = { type = breakvassal which = TIM }
                 command = { type = breakvassal which = AKK }
                  command = { type = breakvassal which = CUM }
                 command = { type = relation which = POR value = 150 }
command = { type = capital which = 505 } 
command = { type = secedeprovince which = POR value = 504 }
command = { type = secedeprovince which = POR value = 765 }
command = { type = secedeprovince which = POR value = 1802 }
command = { type = secedeprovince which = POR value = 756 }
                 command = { type = stability   value = 1 }
                 command = { type = trigger which = 423003 }
           }
          action_b ={ 
		name = "Шайтан им в зад, а не покорность!"
                 command = { type = revoltrisk which = 60 value = 10 }
                 command = { type = stability   value = -6 }
                 command = { type = treasury value = -300 }
}

}

event = {
	id = 248002
	trigger = { event = 260093 } ###Oman must revolt from Portugal
	random = no
	country = OMA
	name = "Воровство португальских судов"
	desc = "Отстроив береговую линию, оставленные португальские суда составляют большую часть оманского флота."
	style = 1

	date = { day = 1 month = january year = 1640 }
	offset = 360
	deathdate = { day = 30 month = december year = 1660 }

	action_a ={ 
		name = "Позволить нам повернуть оружие неверных против них самих"
		command = { type = warships which = -1 value = 6 }
command = { type = galleys which = -1 value = 20 }
		command = { type = transports which = -1 value = 4 }
		command = { type = domestic which = land value = -1 }
                command = { type = CAV which = -2 value = 10000 }
                command = { type = INF which = -2 value = 6000 }
                command = { type = war which = POR }
                }
	}

###############################################################################

#The Omani Rebellion#
event = {
	id = 301016
	trigger = {
                OR = {
		owned = {
			province = 504 #Mascate
			data = -1
		        }
                vassal = { country = TUR country = OMA }
                     }
	}
	random = no
	country = TUR
	name = "Оманское восстание"
	desc = "Правление оттоманов  в Омане было закончено, когда Ахмад ибн Саид Йеменский прогнал всех турок и восстановил независимость Оманского султаната в 1741 году."
	style = 4

	date = { day = 1 month = january year = 1740 }
	offset = 1000
        deathdate = { day = 31 month = december year = 1770 }

	action_a ={ 
		name = "Позволить им уйти"                   
		command = { type = independence which = OMA }
                command = { type = trigger which = 248000 } #OMA: Ahmad ibn Said seizes power
                command = { type = secedeprovince which = OMA value = 504 }
                command = { type = secedeprovince which = OMA value = 505 }
                command = { type = secedeprovince which = OMA value = 506 }
               
command = { type = secedeprovince which = OMA value = 1756 }

	}
	action_b ={ # Crush the rebels
		name = "Сокрушить мятежников" 
		command = { type = revolt which = 504 }
		command = { type = revolt which = 504 }
		
                command = { type = revolt which = 505 }
                command = { type = revolt which = 506 }
command = { type = revolt which = 504 }
		command = { type = revolt which = 504 }
	
                command = { type = revolt which = 505 }
                command = { type = revolt which = 506 }
		command = { type = revoltrisk which = 36 value = 4 }
		command = { type = stability value = -2 }
	}
}

#Omani independence
event = {
      id = 248000
      random = no
      country = OMA
      name = "Ахмад ибн Саид захватывает власть"
      desc = "Правление оттоманов  в Омане было закончено, когда Ахмад ибн Саид Йеменский прогнал всех турок и восстановил независимость Оманского султаната в 1741 году. До конца столетия, Оман преобразовался в одно из самых мощных государств Аравии, управляя Занзибаром и частью персидского и белуджистанского побережья."
      style = 4
      
      action_a = {
               name = "О, Аллах!"
               command = { type = breakvassal which = TUR }
               command = { type = relation which = TUR value = -300 } 
               command = { type = stability value = 6 }
               command = { type = CAV which = -2 value = 10000 }
               command = { type = INF which = -2 value = 6000 }
              command = { type = galleys which = -1 value = 16 }
               command = { type = addcore which = 765 } #Zanzibar
               command = { type = addcore which = 1802 } #Hormouz
               command = { type = addcore which = 756 } #Mekran

                 }
}
#Treaty of friendship with Great Britain
event = {
      id = 248001
      random = no
      country = OMA
      name = "Соглашение о дружбе и защите с Великобританией"
      desc = "В 1646 году Оман подписал экономическое соглашение с британкой Ост-Индской компанией. Наполеон в это же самое время стремился бросить вызов британским торговым и политическим действиям в Индийском океане, во время египетской компании, британское правительство быстро отреагировал на эту угрозу, предложив оманскому султану Сбоду более тесное сотрудничество. Сбод согласился и в 1798 и 1800 годах, были подписаны два британо-оманских договора. Оман стал важной опорной точкой для Королевского флота. При британском сотрудничестве, оманская торговля и колонизация процветали,  Оман стал самым богатым и самым мощным султанатом среди всех аравийских стран."
      style = 4

      date = { day = 1 month = january year = 1798 }
      offset = 500
       
      action_a = {
               name = "Принять британскую защиту"
               command = { type = trigger which = 164000 } #ENG: British influence in Oman               
               command = { type = trade value = 1000 }
               command = { type = domestic which = mercantilism value = -3 }
               command = { type = colonists value = 4 } 
               command = { type = naval value = 500 }
               command = { type = explorer which = -1 }
command = { type = warships which = -1 value = 6 }
               command = { type = relation which = ENG value = 100 }
               command = { type = relation which = FRA value = -100 }
               command = { type = stability value = 2 }
                 }
      action_b = {
               name = "Отклонить соглашение"
               command = { type = relation which = ENG value = -100 }
               command = { type = domestic which = mercantilism value = 1 } 
                 }
}

#British influence 
event = {
      id = 164000
      random = no
      country = ENG
      name = "Британское влияние в Омане"
      desc = "В 1646 году Оман подписал экономическое соглашение с британкой Ост-Индской компанией. Наполеон в это же самое время стремился бросить вызов британским торговым и политическим действиям в Индийском океане, во время египетской компании, британское правительство быстро отреагировал на эту угрозу, предложив оманскому султану Сбоду более тесное сотрудничество. Сбод согласился и в 1798 и 1800 годах, были подписаны два британо-оманских договора. Оман стал важной опорной точкой для Королевского флота. При британском сотрудничестве, оманская торговля и колонизация процветали,  Оман стал самым богатым и самым мощным султанатом среди всех аравийских стран."
      style = 4
      
      action_a = {
               name = "Отлично"
               command = { type = vassal which = OMA }
               command = { type = treasury value = 200 }
               command = { type = relation which = OMA value = 50 }
                 }
}



event = {
	id = 248003
	trigger = {
		OR = { 	owned = { province = 765 data = POR } ###Zanzibar
			owned = { province = 766 data = POR } ###Rufiji
			owned = { province = 763 data = POR } ###Mombasa
			owned = { province = 762 data = POR } ###Kenya
			owned = { province = 761 data = POR } ###Malindi
			owned = { province = 764 data = POR } }###Tanga trigger expanded to ensure the event fires unless Portugal completely botches the conquest of the Swahili coast
		}
	random = no
	country = OMA
	name = "Суахили ищет помощи"
	desc = "Вдохновлённые успешным восстанием Омана против португальцев, народы побережья Суахили ищут оманской помощи против ненавистных португальцев."
	style = 1

	date = { day = 1 month = january year = 1652 }
	offset = 360
	deathdate = { day = 30 month = december year = 1660 }

	action_a ={ 
		name = "Мы поможем им!"
		command = { type = add_countryculture which = Swahili }
		command = { type = add_countryculture which = Somali }
		command = { type = addcore which = 760 } ###Mogadiscio
		command = { type = addcore which = 761 } ###Malindi
		command = { type = addcore which = 762 } ###Kenya
		command = { type = addcore which = 763 } ###Mombasa
		command = { type = addcore which = 764 } ###Tanga
		command = { type = addcore which = 765 } ###Zanzibar
		command = { type = addcore which = 766 } ###Rufiji
		command = { type = addcore which = 1513 }
		command = { type = addcore which = 1514 }
command = { type = addcore which = 1512 }
		command = { type = addcore which = 1515 }
		command = { type = relation which = POR value = -300 }
		command = { type = relation which = CYR value = 200 }
		command = { type = relation which = DEL value = 200 }
		command = { type = relation which = ARM value = 200 } 
		command = { type = relation which = ZAN value = 200 }
		command = { type = relation which = ZUL value = 200 }
		command = { type = relation which = ANJ value = 200 }
		command = { type = relation which = HEI value = 200 } 
		command = { type = relation which = MSK value = 200 } ###any other East African States to be included would also get the relation bonus
	}

	action_b ={ #It's Not Our Fight#
		name = "Это не наше дело"
		command = { type = relation which = ZAN value = -100 }
		command = { type = relation which = ZUL value = -100 }
		command = { type = relation which = CYR value = -100 }
		command = { type = relation which = DEL value = -100 }
		command = { type = relation which = ARM value = -100 }
		command = { type = relation which = ANJ value = -100 }
		command = { type = relation which = HEI value = -100 }
		command = { type = relation which = MSK value = -100 } ###Again, these effects to be duplicated for all new East African states
		command = { type = stability value = -2 }
	}
}

event = {
	id = 248004
	trigger = {
	exists = ENG
	exists = HOL
        } 
	random = no
	country = OMA
	name = "Тайная помощь с Запада"
	desc = "Видя возможность ослабить позиции Португалии в Индийском океане, англичане и голландцы субсидируют оманские вооружённые силы."
	style = 1

	date = { day = 1 month = january year = 1640 }
	offset = 360
	deathdate = { day = 30 month = december year = 1680 }

	action_a ={ 
		name = "Принять любую предложенную помощь"
		command = { type = land value = 1000 }
		command = { type = naval value = 1000 }
		command = { type = relation which = POR value = -300 }
		command = { type = relation which = ENG value = 150 }
		command = { type = relation which = HOL value = 150 }
		command = { type = treasury value = 200 }}

	action_b ={
		name = "Отказаться от помощи неверных"
		command = { type = relation which = ENG value = -100 }
		command = { type = relation which = HOL value = -100 }
		command = { type = stability value = -2 }
	}
}

###Event to shift Oman's capital to Muscat from Ormuz/Nizwa/Rustak(ID#505###

event = {
	id = 248005
	trigger = {
		owned = { province = 505 data = OMA } 
	}
	random = no
	country = OMA
	name = "Хамад аль Саид"
	desc = "Хамад аль Саид узурпирует трон неподходящего на эту должность Саида Имама I, установив новую столицу в Мускате."
	style = 1

	date = { day = 1 month = january year = 1784 }
	offset = 30
	deathdate = { day = 30 month = december year = 1786 }

	action_a ={
		name = "Принять нового султана"
		command = { type = capital which = 505 }
		command = { type = domestic which = centralization value = 1 }}


	action_b ={ 
		name = "Остаться в старой столице"
		command = { type = domestic which = centralization value = -1 }
		command = { type = stability value = -2 }
	}
}

########################
#Omani cilvil war
########################

#The War Begins#
event = {
	id = 248006
	trigger = {}
	random = no
	country = OMA
	name = "Билараб аль Яруби"
	desc = "Регент Билараб аль Яруби пришёл к власти в Омане, в 1720 году после убийства своего конкурента Маханна. Билараб правил недолго, так как была доказана его причастность к убийству Маханна, на трон всходит новый султан, молодой Саиф"
	style = 1

	date = { day = 1 month = january year = 1722 }


	action_a ={ 
		name = "Неудачное время"
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
                command = { type = revolt which = -1 }
                command = { type = revolt which = -1 }
		command = { type = revoltrisk which = 120 value = 12 }
	}
}




# Persia is Resurrected
event = {
	id = 45315
	trigger = {
		exists = PER
		OR = {
			owned = { province = 525 data = -1 }
			owned = { province = 530 data = -1 }
			owned = { province = 531 data = -1 }
			owned = { province = 528 data = -1 }
			owned = { province = 529 data = -1 }
			owned = { province = 526 data = -1 }
			owned = { province = 527 data = -1 }
			owned = { province = 532 data = -1 }
			owned = { province = 533 data = -1 }
			owned = { province = 534 data = -1 }
			owned = { province = 535 data = -1 }
			owned = { province = 1529 data = -1 }
			owned = { province = 1530 data = -1 }
                        owned = { province = 487 data = -1 }
owned = { province = 1437 data = -1 }
owned = { province = 1327 data = -1 }
		}
	}
	random = no
	country = OMA
	name = "EVENTNAME3817"
	desc = "EVENTHIST3817"
	style = 2
	
	date = { day = 1 month = january year = 1497 }
	offset = 60
	deathdate = { day = 1 month = january year = 1530 }

	action_a = { # Let them be.
		name = "ACTIONNAME3817A"
		command = { type = relation which = PER value = 400 }
		command = { type = secedeprovince which = PER value = 525 }
		command = { type = secedeprovince which = PER value = 530 }
		command = { type = secedeprovince which = PER value = 531 }
		command = { type = secedeprovince which = PER value = 528 }
		command = { type = secedeprovince which = PER value = 529 }
		command = { type = secedeprovince which = PER value = 526 }
		command = { type = secedeprovince which = PER value = 527 }
		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 = 487 }
		command = { type = secedeprovince which = PER value = 1529 }
		command = { type = secedeprovince which = PER value = 1530 }
command = { type = secedeprovince which = PER value = 1437 }
command = { type = secedeprovince which = PER value = 1327 }

	}
	action_b = { # Crush the rebellion.
		name = "ACTIONNAME3817B"
		command = { type = revoltrisk which = 120 value = 8 }
		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 = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = stability value = -6 }
	}
}
