﻿add_namespace = orda

#vstupi t woinu protiv slavian
country_event = {
	id = orda.1
	title = orda.1.t
	desc = orda.1.d
	picture = GFX_report_event_soviet_tanks_snow	
	trigger = {
		tag = ZOR		
		ZOR = {
			has_civil_war = no
			is_in_faction_with = ZPE			
			NOT = {
				has_war_with = ZSL
			}
			has_capitulated = no
		}
		ZPE = {
			has_war_with = ZSL
		}
	}
	mean_time_to_happen = { days = 1 }
	fire_only_once = yes
	#GO GO POWER ORDOS
	option = {
		name = orda.1.a
		ai_chance = {
			base = 90
		}
#		ZSL = {
#			country_event = { id = orda.2 }
#		}
		ZPE = {
			country_event = { id = orda.2 }
		}
		custom_effect_tooltip = orda.1.a_tt
	}
	#NO NO NO
	option = {
		name = orda.1.b
		ai_chance = {
			base = 1
		}
		add_stability = -0.15
		add_war_support = -0.15
	}
}

# slavian agressia
country_event = {
	id = orda.2
	title = orda.2.t
	desc = orda.2.d
	picture = GFX_report_event_soviet_tanks_snow
	is_triggered_only = yes	
	option = {
		name = orda.2.a
#		custom_effect_tooltip = orda.2.a_tt
#		hidden_effect = {
#			declare_war_on = {
#				type = annex_everything
#				target = ZOR
#			}
#		}
		ZOR = {
			add_to_war = { 
				targeted_alliance = ZPE 
				enemy = ZSL 
	#			hostility_reason = asked_to_join
			}
		}
	}
}

#fuckin peregovory so slavianami
country_event = {
	id = orda.3
	title = orda.3.t
	desc = orda.3.d
	picture = GFX_report_event_soviet_tanks_snow	
	is_triggered_only = yes	
	# trigger = {
		# tag = ZOR	
		# ZOR = {
			# has_war_with = ZSL
			# is_in_faction_with = ZPE
			# NOT = {
				# is_in_faction_with = ZUF
			# }
			# surrender_progress > 0.20
		# }
		# ZPE = {
			# has_war_with = ZSL
# #			surrender_progress > 0.08
		# }
		# ZSL = {			
			# surrender_progress < 0.90
		# }
	# }
	# mean_time_to_happen = { days = 1 }
	# fire_only_once = yes
	#TIKAEM S SELA
	option = {
		name = orda.3.a
		ai_chance = {
			base = 70
		}
		ZSL = {
			country_event = { id = orda.4 }
		}
		effect_tooltip = {
			ZOR = {	
				if = {
					limit = {
						is_in_faction = yes	
					}
					leave_faction = yes
				}
				white_peace = {
					tag = ZSL 
					message = ZSL_agree_peace_ZOR 
				}
				add_timed_idea = {
					idea = zuf_pozorny_mir
					days = 365
				}
			}
			ZSL = {
				transfer_state = 252
				transfer_state = 256
				transfer_state = 250
				transfer_state = 255
				transfer_state = 257
				transfer_state = 239
				transfer_state = 265
				transfer_state = 237
			}			
		}
		custom_effect_tooltip = orda.3.a_tt		
	}
	#NOU WE MUST STAND SK BLT
	option = {
		name = orda.3.b
		ai_chance = {
			base = 2
		}
		add_stability = 0.15
		add_war_support = 0.15
	}
}
#for ZSL  predlojenie ot ZOR
country_event = {
	id = orda.4
	title = orda.4.t
	desc = orda.4.d
	picture = GFX_report_event_soviet_tanks_snow
	is_triggered_only = yes	
	option = {
		name = orda.4.a
		custom_effect_tooltip = orda.4.a_tt
		ai_chance = {
			base = 70
		}	
		ZOR = {	
			if = {
				limit = {
					is_in_faction = yes	
				}
				leave_faction = yes
			}
			white_peace = {
					tag = ZSL 
					message = ZSL_agree_peace_ZOR 
				}
			country_event = { id = orda.5 }
			add_timed_idea = {
				idea = zuf_pozorny_mir
				days = 365
			}
		}
		ZSL = {
			transfer_state = 252
			transfer_state = 256
			transfer_state = 250
			transfer_state = 255
			transfer_state = 257
			transfer_state = 239
			transfer_state = 265
			transfer_state = 237
			country_event = { id = orda.7 }
			hidden_effect = {
				news_event = { hours = 3 id = ar_news.682 }
			}
		}
	}
	option = {
		name = orda.4.b
		ai_chance = {
			base = 1
		}
		ZOR = {
			country_event = { id = orda.6 }
		}
	}
}
# slaviane soglasilis
country_event = {
	id = orda.5
	title = orda.5.t
	desc = orda.5.d
	picture = GFX_report_event_soviet_tanks_snow
	is_triggered_only = yes	
	option = {
		name = orda.5.a
		custom_effect_tooltip = orda.5.a_tt
		add_stability = -0.15
		add_war_support = -0.15
	}
}
# slaviane NE soglasilis
country_event = {
	id = orda.6
	title = orda.6.t
	desc = orda.6.d
	picture = GFX_report_event_soviet_tanks_snow
	is_triggered_only = yes	
	option = {
		name = orda.6.a
		custom_effect_tooltip = orda.6.a_tt
		add_stability = -0.05
		add_war_support = -0.05
	}
}
# slaviane pobeda
country_event = {
	id = orda.7
	title = orda.7.t
	desc = orda.7.d
	picture = GFX_report_event_soviet_tanks_snow
	is_triggered_only = yes	
	option = {
		name = orda.7.a
		custom_effect_tooltip = orda.7.a_tt
		add_stability = 0.03	
	}
}

##### Султан мудро решает пора навести порядок. Шурасы будет распущен. В очередной попытке стабилизировать ситуацию мы проведем всеобщие выборы среди мужчин богатых да купцов и прочей аристократии. Будем надеется что они смогут сформировать эффективное Шурасы.
country_event = {
	id = orda.8
	title = orda.8.t
	desc = orda.8.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.8.a	
		add_ideas = zor_shurasi_raspusheno
		set_popularities = {
			democratic = 0
			neutrality = 100
			fascism = 0
			communism = 0
		}
	}	
}

##### рандомный эвент о том что какие то недовольные чуваки устроили погром и сломали дорогу вскоре после того как султан распустил шурасы
country_event = {
	id = orda.9
	title = orda.9.t
	desc = orda.9.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.9.a	
		random_owned_controlled_state = {
			limit = {
				infrastructure > 1								
			}
			damage_building = { type = infrastructure damage = 0.5 }
		}
	}	
}

##### эвент о том что всё чаще в обществе обвиняют именно султана что он не может наладить действия Шурасы. Дескать он хреновый такой управленец (это почти сразу после старта, минус стабка)
country_event = {
	id = orda.10
	title = orda.10.t
	desc = orda.10.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.10.a	
		add_stability = -0.06
	}	
}

##### эвент о том что в стране победила коалиция бейистов. Лидер всё еще султан, в будущем страну видимо ждут реформы +новость 917
country_event = {
	id = orda.11
	title = orda.11.t
	desc = orda.11.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.11.a
		hidden_effect = {
#			retire_country_leader = yes
			news_event = { hours = 3 id = ar_news.917 }
		}		
		remove_ideas = zor_shurasi_raspusheno
		add_popularity = {
			ideology = democratic
			popularity = 0.55
		}
		set_politics = {
			ruling_party = democratic
		}
		# create_country_leader = {
			# name = "Ренат IV Юсуф"
			# desc = " "
			# picture = "zorleader1.tga"
			# expire = "2020.1.1"
			# ideology = liberalism
			# traits = {
				# #
			# }
		# }	
		add_country_leader_role = {
			character = zor_renat_iv_yusuf
			country_leader = {
				ideology = liberalism
				traits = {  }
				expire = "2020.3.1.1"
			}	
			promote_leader = yes 
		}
	}	
}


##### рандомный эвент о том что какие то недовольные чуваки устроили погром и сломали дорогу вскоре после того как  бейистами БЫЛО ЗАЯВЛЕНО О НАЧАЛЕ РЕФОРМ задолбали уже дороги ломать, их и так почти нет
country_event = {
	id = orda.12
	title = orda.12.t
	desc = orda.12.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.12.a	
		random_owned_controlled_state = {
			limit = {
				infrastructure > 1								
			}
			damage_building = { type = infrastructure damage = 0.5 }
		}
	}	
}

##### эвент. выборы председателя шурасы. у нас тут два стула - Айрат Боргулы и Тагир Ороскилд. У каждого свои замашки. А еще оказывается что султан не очень то доволен текущим раскладом что его власть как то вдруг станоится не такой абсолютной. +новости на победу каждого из них. Айрат Боргулы - ar_news.918, Тагир Ороскилд- ar_news.919.
country_event = {
	id = orda.13
	title = orda.13.t
	desc = orda.13.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.13.a	#Айрат Боргулы
		ai_chance = {
			base = 5
			modifier = {
				add = 200				
				has_country_flag = ZOR_DEMOCR_BOGULU_flag				
			}
		}
		complete_national_focus = zor_airat_bolgury
		add_ideas = zor_sultan_tut
		# create_country_leader = {
			# name = "Айрат Боргулы"
			# desc = " "
			# picture = "airat_bolgury.tga"
			# expire = "2020.1.1"
			# ideology = liberalism
			# traits = {
				# drug_sultana
			# }
		# }
		add_country_leader_role = {
			character = zor_airat_borguly
			country_leader = {
				ideology = liberalism
				traits = { drug_sultana }
				expire = "2020.3.1.1"
			}	
			promote_leader = yes 
		}
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.918 }
		}
	}	
	option = {
		name = orda.13.b	#Тагир Ороскилд.
		ai_chance = {
			base = 5
			modifier = {
				add = 200				
				has_country_flag = ZOR_DEMOCR_OROSKILD_flag				
			}
		}
		complete_national_focus = zor_tafir_oroskild
		add_ideas = zor_sultan_tut
		# create_country_leader = {
			# name = "Тагир Ороскилд"
			# desc = " "
			# picture = "tagir_oroskild.tga"
			# expire = "2020.1.1"
			# ideology = liberalism
			# traits = {
				# yaryi_respublikanets
			# }
		# }
		add_country_leader_role = {
			character = zor_tagir_oroskild
			country_leader = {
				ideology = liberalism
				traits = { yaryi_respublikanets }
				expire = "2020.3.1.1"
			}	
			promote_leader = yes 
		}
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.919 }
		}
	}
}

##### Гражданская война в Булгарии (Событие1)
country_event = {
	id = orda.14
	title = orda.14.t
	desc = orda.14.d
	picture = GFX_report_event_generic_conference
	trigger = {
		has_government = democratic
		controls_state = 236 
		controls_state = 249
		XAS = {
			exists = no
		}
	}
	is_triggered_only = yes	
	option = {
		name = orda.14.a
		add_stability = -0.05	
		add_war_support = -0.05
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.932 }
			country_event = { id = orda.15 days = 3 random = 15 }	
			if = {
				limit = {
					is_in_faction_with = ZPE
				}
				add_ai_strategy = {
					type = dont_join_wars_with
					id = ZPE
					target_country = XAS
					value = 500
				}
			}
			if = {
				limit = {
					is_in_faction_with = ZUF
				}
				add_ai_strategy = {
					type = dont_join_wars_with
					id = ZUF
					target_country = XAS
					value = 500
				}
			}			
		}
	}	
}

##### Гражданская война в Булгарии (Событие 2)
country_event = {
	id = orda.15
	title = orda.15.t
	desc = orda.15.d
	picture = GFX_report_event_generic_conference
	trigger = {
		has_government = democratic
		controls_state = 236 
		controls_state = 249
		XAS = {
			exists = no
		}
	}
	is_triggered_only = yes	
	option = {
		name = orda.15.a	#Освободим Казань и семью!
		ai_chance = {
			base = 5
		}
		hidden_effect = {
			retire_country_leader = yes			
		}
		# create_country_leader = {
			# name = "Шурасы"
			# desc = " "
			# picture = "shurasi_prsn.tga"
			# expire = "2020.1.1"
			# ideology = liberalism
			# traits = {
				
			# }
		# }
		add_country_leader_role = {
			character = zor_szurasy
			country_leader = {
				ideology = liberalism
				traits = {  }
				expire = "2020.3.1.1"
			}	
			promote_leader = yes 
		}
		XAS = {
			transfer_state = 236
		}
		if = {
			limit = {
				controls_state = 237
			}
			XAS = {
				transfer_state = 237
			}
		}
		if = {
			limit = {
				controls_state = 406
			}
			XAS = {
				transfer_state = 406
			}
		}
		if = {
			limit = {
				controls_state = 407
			}
			XAS = {
				transfer_state = 407
			}
		}
		transfer_units_fraction = {	# 
			target = XAS
			size = 0.4 # Fallback in case one of the ratios below are not stipulated
			stockpile_ratio = 0.5
			army_ratio = 0.45
			navy_ratio = 0.35
			air_ratio = 0.4
			keep_unit_leaders = {						    
			}
			keep_unit_leaders_trigger = {					
			}
		}
		XAS = {
			add_popularity = {
				ideology = neutrality
				popularity = 0.5
			}
			set_politics = {
				ruling_party = neutrality
			}
			
			set_cosmetic_tag = XAS_BULGAR
			# create_country_leader = {
				# name = "Принц Саин"
				# desc = " "
				# picture = "murtazin_revolt.tga"
				# expire = "2020.1.1"
				# ideology = centrism
				# traits = {
					# zor_zakonny_naslednik
				# }
			# }
			add_country_leader_role = {
				character = XAS_prince_sain
				country_leader = {
					ideology = centrism
					traits = { zor_zakonny_naslednik }
					expire = "2020.3.1.1"
				}	
				promote_leader = yes 
			}
			every_state = {
				limit = {
					is_core_of = ZOR
					NOT = {
						is_core_of = XAS
					}
				}				
				add_claim_by = XAS
			}
#			declare_war_on = {
#				type = annex_everything
#				target = ZOR
#			}
			declare_war_on = {
				target = ZOR
				type = civil_war
			}
			add_civil_war_target = ZOR
			add_ai_strategy = {
				type = conquer
				id = XAS
				value = 200
			}
			add_ai_strategy = {
				type = antagonize
				id = XAS
				value = 200
			}
		}
		custom_effect_tooltip = orda.15.a.tt  
		if = {
			limit = {
				is_ai = no
			}
			XAS = { change_tag_from = ZOR }
		}		
		hidden_effect = {
			add_stability = -0.05	
			add_war_support = -0.05
			XAS = {
				load_oob = "XAS_rebel"	
				country_event = { hours = 3 id = orda.16 }
				add_equipment_to_stockpile = {
					type = infantry_equipment_0
					amount = 1526
					producer = ZOR
				}
				add_ai_strategy = {
					type = conquer
					id = ZOR
					value = 200
				}
				add_ai_strategy = {
					type = antagonize
					id = XAS
					value = 200
				}				
			}
			news_event = { hours = 3 id = ar_news.933 }
		}
	}
	option = {
		name = orda.15.b # Наследный Принц должен быть арестован
		ai_chance = {
			base = 7
		}
		random_list = {
			70 = {
				country_event = { id = orda.18 }
			}
			30 = {
				country_event = { id = orda.19 }	
			}
		}
	}	
}

##### эвент мятежной астрахани о том что в нашей армии много народа, выводим рекрутов кароч
country_event = {
	id = orda.16
	title = orda.16.t
	desc = orda.16.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = {
		name = orda.16.a
		add_stability = 0.1
		add_war_support = 0.12
		custom_effect_tooltip = orda.16.a.tt
		hidden_effect = {
			division_template = {
				name = "Rebels"	
				regiments = {
					infantry = { x = 0 y = 0 }
					infantry = { x = 0 y = 1 }
					infantry = { x = 1 y = 0 }
					infantry = { x = 1 y = 1 }
					infantry = { x = 2 y = 0 }
					infantry = { x = 2 y = 1 }
				}
				priority = 0
			}
			random_owned_controlled_state = {
				create_unit = {
					division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
					owner = XAS
				}
				create_unit = {
					division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
					owner = XAS
				}
				create_unit = {
					division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
					owner = XAS
				}
			}			
			if = {
				limit = {
					ZOR = {
						num_divisions > 15
					}
				}
				random_owned_controlled_state = {
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
				}
				random_owned_controlled_state = {
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
				}
				random_owned_controlled_state = {
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
				}
				random_owned_controlled_state = {
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
				}				
			}
			if = {
				limit = {
					ZOR = {
						num_divisions > 20
					}
				}
				random_owned_controlled_state = {
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
				}
				random_owned_controlled_state = {
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
				}
				random_owned_controlled_state = {
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
				}
				random_owned_controlled_state = {
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
				}				
			}
			if = {
				limit = {
					ZOR = {
						num_divisions > 27
					}
				}
				random_owned_controlled_state = {
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
				}
				random_owned_controlled_state = {
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
				}
				random_owned_controlled_state = {
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
					create_unit = {
						division = "division_template = \"Rebels\" start_experience_factor = 0.2 force_equipment_variants = { infantry_equipment_0 = { owner = \"ZOR\" } }"
						owner = XAS
					}
				}
				
			}
		}
	}	
}

##### выборы
country_event = {
	id = orda.17
	title = orda.17.t
	desc = orda.17.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.17.a	
		add_stability = 0.01
		add_political_power = 50
	}	
}

##### наследный принц сдается и останавливает армию. раскол предотвращён
country_event = {
	id = orda.18
	title = orda.18.t
	desc = orda.18.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.18.a	
		add_stability = 0.05
		add_war_support = -0.05
	}	
}

##### наследный принц продолжает свой марш. ну собственно тот же самый раскол и астрахань, только мы за нее не пересаживаемся играть а граем дальше за булгар
country_event = {
	id = orda.19
	title = orda.19.t
	desc = orda.19.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.19.a	
		hidden_effect = {
			retire_country_leader = yes			
		}
		# create_country_leader = {
			# name = "Шурасы"
			# desc = " "
			# picture = "shurasi_prsn.tga"
			# expire = "2020.1.1"
			# ideology = liberalism
			# traits = {
				
			# }
		# }
		add_country_leader_role = {
			character = zor_szurasy
			country_leader = {
				ideology = liberalism
				traits = {  }
				expire = "2020.3.1.1"
			}	
			promote_leader = yes 
		}
		XAS = {
			transfer_state = 236
		}
		if = {
			limit = {
				controls_state = 237
			}
			XAS = {
				transfer_state = 237
			}
		}
		if = {
			limit = {
				controls_state = 406
			}
			XAS = {
				transfer_state = 406
			}
		}
		if = {
			limit = {
				controls_state = 407
			}
			XAS = {
				transfer_state = 407
			}
		}
		transfer_units_fraction = {	# 
			target = XAS
			size = 0.4 # Fallback in case one of the ratios below are not stipulated
			stockpile_ratio = 0.5
			army_ratio = 0.45
			navy_ratio = 0.35
			air_ratio = 0.4
			keep_unit_leaders = {						    
			}
			keep_unit_leaders_trigger = {					
			}
		}
		XAS = {
			add_popularity = {
				ideology = neutrality
				popularity = 0.5
			}
			set_politics = {
				ruling_party = neutrality
			}		
			set_cosmetic_tag = XAS_BULGAR
			# create_country_leader = {
				# name = "Принц Саин"
				# desc = " "
				# picture = "murtazin_revolt.tga"
				# expire = "2020.1.1"
				# ideology = centrism
				# traits = {
					# zor_zakonny_naslednik
				# }
			# }
			add_country_leader_role = {
				character = XAS_prince_sain
				country_leader = {
					ideology = centrism
					traits = { zor_zakonny_naslednik }
					expire = "2020.3.1.1"
				}	
				promote_leader = yes 
			}
			every_state = {
				limit = {
					is_core_of = ZOR
					NOT = {
						is_core_of = XAS
					}
				}				
				add_claim_by = XAS
			}
#			declare_war_on = {
#				type = annex_everything
#				target = ZOR
#			}
			declare_war_on = {
				target = ZOR
				type = civil_war
			}
			add_civil_war_target = ZOR
		}			
		hidden_effect = {
			add_stability = -0.05	
			add_war_support = -0.05
			XAS = {
#				load_oob = "XAS_rebel"	
				country_event = { hours = 3 id = orda.16 }
				add_equipment_to_stockpile = {
					type = infantry_equipment_0
					amount = 1526
					producer = ZOR
				}
				add_ai_strategy = {
					type = conquer
					id = ZOR
					value = 150
				}				
			}
			news_event = { hours = 3 id = ar_news.933 }
		}
	}	
}

##### на выборах в шурасы победили консервы. Партия Кадимче это лучший выбор! и как то на бейистов они не особо посматривают
country_event = {
	id = orda.20
	title = orda.20.t
	desc = orda.20.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.20.a
		remove_ideas = zor_shurasi_raspusheno
		add_stability = 0.05
		add_popularity = {
			ideology = democratic
			popularity = -0.15
		}
		set_party_name = { 
			ideology = neutrality 
			long_name = ZOR_kadich_party 
			name = ZOR_kadich_party 
		}
	}	
}

##### Вся Власть Султану
country_event = {
	id = orda.21
	title = orda.21.t
	desc = orda.21.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.21.a
		# hidden_effect = {	
			# retire_country_leader = yes
		# }	
		remove_ideas = zor_shurasi_raspusheno	
		add_stability = -0.1		
		add_popularity = {
			ideology = fascism
			popularity = 0.65
		}
		set_politics = {
			ruling_party = fascism
		}
		# create_country_leader = {
			# name = "Ренат IV Юсуф"
			# desc = " "
			# picture = "zorleader1.tga"
			# expire = "2020.1.1"
			# ideology = absolut_monarchy
			# traits = {

			# }
		# }
		add_country_leader_role = {
			character = zor_renat_iv_yusuf
			country_leader = {
				ideology = absolut_monarchy
				traits = {  }
				expire = "2020.3.1.1"
			}	
			promote_leader = yes 
		}
		remove_country_leader_role = {
			character = zor_renat_iv_yusuf
			ideology = despotism
		}
		add_timed_idea = {
			idea = zor_krizis_vlasti_shuras
			days = 250
		}
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.934 }
			country_event = { id = orda.24 days = 15 random = 6 }
		}
	}	
}

##### эвент про то что победившие консервы из Кадимче (а они у нас просто под султаном все собственно) выбрали председателем шурасы наследника султана Принца Саина, султан становится нацдухом просто
country_event = {
	id = orda.22
	title = orda.22.t
	desc = orda.22.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.22.a
		remove_ideas = zor_shurasi_raspusheno
		add_stability = -0.05
		add_popularity = {
			ideology = neutrality
			popularity = 0.3
		}
		if = {
			limit = {
				NOT = { has_government = neutrality }
			}
			set_politics = {
				ruling_party = neutrality
			}
		}
		XAS_prince_sain = {
			set_nationality = ZOR
		}
		# create_country_leader = {
			# name = "Принц Саин"
			# desc = " "
			# picture = "murtazin_shurasi.tga"
			# expire = "2020.1.1"
			# ideology = centrism
			# traits = {
# #				zor_zakonny_naslednik
			# }
		# }	
		add_country_leader_role = {
			character = XAS_prince_sain
			country_leader = {
				ideology = centrism
				traits = {  }
				expire = "2020.3.1.1"
			}	
			promote_leader = yes 
		}
		add_ideas = zor_sultan_tut
		hidden_effect = {
			country_event = { id = orda.23 days = 15 random = 6 }
		}
	}	
}

##### бейисты не довольны тем что консервы из Кадимче выбрали председателем шурасы сынку султана, всё куплено, власть продажна ааа, бейисты формируют коалицию даже с наролдническими движениями омников (и откуда они у нас?) -стабки и + омники
country_event = {
	id = orda.23
	title = orda.23.t
	desc = orda.23.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.23.a
		add_stability = -0.03
		add_popularity = {
			ideology = communism
			popularity = 0.1
		}
		hidden_effect = {
			country_event = { id = orda.25 days = 15 random = 50 }
		}
	}	
}

##### бейисты и прочие не довольны тем что СУЛТАН УЗУРПИРОВЛ власть и разогнал шурасы совсем к херам. путь султана это. бейисты формируют коалицию даже с наролдническими движениями омников (и откуда они у нас?) -стабки и + омники
country_event = {
	id = orda.24
	title = orda.24.t
	desc = orda.24.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.24.a
		add_stability = -0.05
		add_popularity = {
			ideology = communism
			popularity = 0.1
		}
		hidden_effect = {
			country_event = { id = orda.25 days = 15 random = 50 }
		}
	}	
}

##### эвент о том что вышеназванная коалиция всё продолдает в городах и сёлах сходки мутить, они не очень то довольны продолжением нашей консервативной политики и кажется им уже просто подавай чёньть другое, лишь бы не султаны и всякие принцы (этот эвент либо для принца либо для султана-узурпатора, так что не конкретизируем лидера, только власть) забить на них и словить минуса к стабкам и + к омникам или же например сократим им на час рабочий день уже (ловим временный дебафф на перестановку промышленности, минус стройки всё такое)
country_event = {
	id = orda.25
	title = orda.25.t
	desc = orda.25.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.25.a
		ai_chance = {
			base = 5
		}
		add_stability = -0.05
		add_popularity = {
			ideology = communism
			popularity = 0.1
		}
		hidden_effect = {
			country_event = { id = orda.26 days = 15 random = 50 }
		}
	}
	option = {
		name = orda.25.b
		ai_chance = {
			base = 5
		}
		add_popularity = {
			ideology = communism
			popularity = -0.03
		}
		add_timed_idea = {
			idea = zor_perestanovki_v_promke
			days = 200
		}
		hidden_effect = {
			country_event = { id = orda.26 days = 15 random = 50 }
		}
	}	
}

##### следующий эвент о том что вышеназванная коалиция всё продолдает в городах и сёлах сходки мутить, они не очень то довольны продолжением нашей консервативной политики и кажется им уже просто подавай чёньть другое, лишь бы не султаны и всякие принцы (этот эвент либо для принца либо для султана-узурпатора, так что не конкретизируем лидера, только власть) забить на них и словить минуса к стабкам и + к омникам или же например оОЗАБОТИМСЯ введением каких нить соцгарантий (ловим временный дебафф экономике типа мы выделили внезапно много денег на социалочку)
country_event = {
	id = orda.26
	title = orda.26.t
	desc = orda.26.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.26.a
		ai_chance = {
			base = 5
		}
		add_stability = -0.05
		add_popularity = {
			ideology = communism
			popularity = 0.1
		}
	}
	option = {
		name = orda.26.b
		ai_chance = {
			base = 5
		}
		add_popularity = {
			ideology = communism
			popularity = -0.03
		}
		add_timed_idea = {
			idea = zor_denejka_sots_garantii
			days = 200
		}
	}	
}


##### эвент о том что новый лидер шурасы тагир ороскилд толкает пламенную речь о новом курсе старны, осуждает прежнюю власть, дескать передавая по наследству у руля часто были дегенераты и из за низ страна топталась на месте. но вот сейчас новый лидер (тоесть он) выбранный шурасы  компетентен в вопросах развития страны. ктото видит  в этой речи диктаторские замашки. эти люди покидают зал шурасы (ловим минус стабки немного , плюс варсаппорта, теряем поддержку демов) 
country_event = {
	id = orda.27
	title = orda.27.t
	desc = orda.27.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.27.a
		add_stability = -0.06
		add_popularity = {
			ideology = democratic
			popularity = -0.05
		}
		hidden_effect = {
			country_event = { id = orda.28 days = 1 random = 12 }
		}
	}	
}

##### эвент о том что султан выступает по радио после вот той пламенной речи тагира ороскилда. дескать ну всякое бывает, загнался парень. (султан еще не знает что его скоро арестуют)
country_event = {
	id = orda.28
	title = orda.28.t
	desc = orda.28.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.28.a
		add_stability = 0.01		
	}	
}

##### эвент русским-славянским-патерналисстким-всем идеологиям кароч. о том что розвидка донечла что булгарские готовят превентивный удар по нам, хотят нас марионеткой сделать.
country_event = {
	id = orda.29
	title = orda.29.t
	desc = orda.29.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.29.a
		add_opinion_modifier = {
			target = ZOR
			modifier = agressssor
		}
		add_ai_strategy = {
			type = antagonize
			id = ZOR
			value = 50
		}
	}	
}

##### эвент перми. Булгария (при принце или султане) решила выбрать новый курс и ориентируется на сотрудничество с южными странами такими как персия. Из нашего военного блока они благополучно вышли, обрывают все связи с нами. Ну что сказать, предатели
country_event = {
	id = orda.30
	title = orda.30.t
	desc = orda.30.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.30.a
		ai_chance = {
			factor = 20
		}	
		trigger = {
			num_faction_members > 1		
		}
		effect_tooltip = {
			ZOR = {
				leave_faction = yes
			}
		}
		set_faction_name = Ural_2
		add_opinion_modifier = {
			target = ZOR
			modifier = betrayed_alliance
		}
	}
	option = {
		name = orda.30.b
		ai_chance = {
			factor = 20
		}	
		trigger = {
			num_faction_members < 2		
		}
		effect_tooltip = {
			ZOR = {
				leave_faction = yes
			}
		}
		dismantle_faction = yes
		add_opinion_modifier = {
			target = ZOR
			modifier = betrayed_alliance
		}
	}
}


##### эвент лидеру персов о том что прибыла делегация из булгарии. 
country_event = {
	id = orda.31
	title = orda.31.t
	desc = orda.31.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.31.a
		ai_chance = {
			factor = 20
			modifier = {
				factor = 3
				has_opinion = {
					target = ZOR
					value > 10
				}
			}
		}
		add_opinion_modifier = {
			target = ZOR
			modifier = odna_dinastiya_15
		}
		ZOR = {
			set_country_flag = zor_zpe_dinastia_flag
			country_event = { id = orda.32 }
		}
	}
	option = {
		name = orda.31.a
		ai_chance = {
			factor = 2
			modifier = {
				factor = 3
				has_opinion = {
					target = ZOR
					value < 15
				}
			}
		}
		ZOR = {
			country_event = { id = orda.33 }
		}
	}	
}

##### эвент булгарии. династический брак конфирмед. ура
country_event = {
	id = orda.32
	title = orda.32.t
	desc = orda.32.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.32.a		
		add_opinion_modifier = {
			target = ZPA
			modifier = odna_dinastiya_15
		}
	}	
}

##### эвент булгарии. династический брак не удался. эмм, жальь
country_event = {
	id = orda.33
	title = orda.33.t
	desc = orda.33.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.33.a		
		
	}	
	option = {
		name = orda.33.b		
		trigger = {
			has_political_power > 100
		}
		custom_effect_tooltip = orda.33.b.tt 
		add_political_power = -100
		complete_national_focus = zor_panturkizm
	}
}

##### эвент лидеру персов о том булгасркие хотят в наш альянс. у нас там династия ж все дела
country_event = {
	id = orda.34
	title = orda.34.t
	desc = orda.34.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.34.a
		ai_chance = {
			factor = 30			
		}
		add_to_faction = ZOR
		add_ai_strategy = {
			type = alliance
			id = ZOR
			value = 100
		}
		ZOR = {
			country_event = { id = orda.35 }
			add_ai_strategy = {
				type = alliance
				id = ZPA
				value = 100
			}
		}
	}
	option = {
		name = orda.34.a
		ai_chance = {
			factor = 1			
		}
		ZOR = {
			country_event = { id = orda.36 }
		}
	}	
}

##### эвент булгарии. мы в альянсе с персиками. ух заживем
country_event = {
	id = orda.35
	title = orda.35.t
	desc = orda.35.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.35.a	
		add_stability = 0.01
		effect_tooltip = {
			ZPA = {
				add_to_faction = ZOR
			}
		}
	}	
}

##### эвент булгарии. персики нас не взяли в свой альянс
country_event = {
	id = orda.36
	title = orda.36.t
	desc = orda.36.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.36.a		
		add_stability = -0.01
	}	
}

##### эвент булгарии. товарищ тагир ороскилд и его сопартийцы арестовали султана, дескать он вёл антидулгарскую деятельность от обидок на то что теряет свою власть из за своей же некомпетентности. ну и семью его заодно тоже половили
country_event = {
	id = orda.37
	title = orda.37.t
	desc = orda.37.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.37.a		
		add_stability = -0.03
		set_cosmetic_tag = ZOR_RESP
		if = {
			limit = {
				has_idea = zor_sultan_tut
			}
			remove_ideas = zor_sultan_tut
		}
		if = {
			limit = {
				has_idea = zor_sultan_tut_2
			}
			remove_ideas = zor_sultan_tut_2
		}
		hidden_effect = {
			country_event = { id = orda.38 days = 7 random = 15 }
		}
	}	
}

##### эвент булгарии. после того как на султана половили в стране не особо спокойно, погромы всякие. Коменданские часы и прочее пришлось вводить
country_event = {
	id = orda.38
	title = orda.38.t
	desc = orda.38.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.38.a		
		add_stability = -0.02
		random_owned_controlled_state = {
			limit = {
				industrial_complex > 1								
			}
			damage_building = { type = industrial_complex damage = 0.5 }
		}
		random_owned_controlled_state = {
			limit = {
				infrastructure > 1								
			}
			damage_building = { type = infrastructure damage = 0.5 }
		}
	}	
}

##### эвент булгарии. тагир выступает с пламенной речью перед страной. В этот нелегкий час когда мир вокруг нас полыхает нам нужно сплотиться и всё такое. Дает стабку и варсаппорты ипрочие бусты на скорости строительсва
country_event = {
	id = orda.39
	title = orda.39.t
	desc = orda.39.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.39.a		
		add_stability = 0.02
		add_war_support = 0.05
		add_timed_idea = {
			idea = zor_vse_dlya_rodiny
			days = 400
		}
	}	
}

##### эвент хазария_нейм о том что булгарские поговаривают что причерноморские земли когда то их предки населяли. Они следуют модному тренду возврата былых владений? Таки стотыщ лет уже прошло же!
country_event = {
	id = orda.40
	title = orda.40.t
	desc = orda.40.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.40.a		
		effect_tooltip = {
			add_opinion_modifier = {
				target = ZOR
				modifier = agressssor
			}
		}
	}	
}

##### эвент на славянские марионетки НЕ АКТИВЕН ЭТОТ ЭВЕНТ. ЧЕК ФОКУС НА СЛ МАРИОНЕТК
country_event = {
	id = orda.41
	title = orda.41.t
	desc = orda.41.d
	picture = GFX_report_event_generic_conference
	is_triggered_only = yes	
	option = {
		name = orda.41.a
		if = {
			limit = {
				252 = {
					is_core_of = ZSL
				}
			}
			252 = {
				add_core_of = ZOR
				remove_core_of = ZSL
			}
		}
		if = {
			limit = {
				252 = {
					is_core_of = ZNN
				}
			}
			252 = {				
				remove_core_of = ZNN
			}
		}
		if = {
			limit = {
				NOT = {
					country_exists = ZVC
				}
				OR = {
					AND = {
						controls_state = 254
						controls_state = 223
						controls_state = 219
						controls_state = 222
						controls_state = 205
					}
					ZSL = {
						AND = {
							controls_state = 254
							controls_state = 223
							controls_state = 219
							controls_state = 222
							controls_state = 205
						}	
					}
				}					
			}
			release_puppet = ZVC
			add_stability = 0.05
		}
		if = {
			limit = {
				NOT = {
					country_exists = ZJS
				}
				OR = {
					AND = {
						controls_state = 253
						controls_state = 243
						controls_state = 248							
					}
					ZSL = {
						AND = {
							controls_state = 253
							controls_state = 243
							controls_state = 248	
						}	
					}
				}					
			}
			release_puppet = ZJS
			add_political_power = 120
		}
		if = {
			limit = {
				NOT = {
					country_exists = ZKY
				}
				OR = {
					AND = {
						controls_state = 190
						controls_state = 11
						controls_state = 189							
					}
					ZSL = {
						AND = {
							controls_state = 190
							controls_state = 11
							controls_state = 189
						}	
					}
				}					
			}
			release_puppet = ZKY
			add_political_power = 120
			add_war_support = 0.03
		}
		if = {
			limit = {
				NOT = {
					country_exists = ZKQ
				}
				OR = {
					AND = {
						controls_state = 5
						controls_state = 188
						controls_state = 780							
					}
					ZSL = {
						AND = {
							controls_state = 5
							controls_state = 188
							controls_state = 780
						}	
					}
				}					
			}
			release_puppet = ZKQ
			add_political_power = 120
			add_war_support = 0.03
		}
		if = {
			limit = {
				NOT = {
					country_exists = ZDC
				}
				OR = {
					AND = {
						controls_state = 85
						controls_state = 781												
					}
					ZSL = {
						AND = {
							controls_state = 85
							controls_state = 781
						}	
					}
				}					
			}
			release_puppet = ZDC
			add_political_power = 120
			add_war_support = 0.03
		}
		if = {
			limit = {
				NOT = {
					country_exists = ZPO
				}
				OR = {
					AND = {
						controls_state = 63
						controls_state = 62												
					}
					ZSL = {
						AND = {
							controls_state = 63
							controls_state = 62	
						}	
					}
				}					
			}
			release_puppet = ZPO
			add_political_power = 120
			add_war_support = 0.03
		}
	}	
}








