@zth_dlitelnost_reshenii_v_faze_1 = 5
@zth_dlitelnost_reshenii_v_faze_1_event = 6
@zth_dlitelnost_reshenii_v_faze_2 = 5
@zth_dlitelnost_reshenii_v_faze_2_event = 6
@zth_denejki_v_fond_time = 10

# ZTH_debug_test_cat = {
	# zth_debug_test_1 = {
		# icon = GFX_decision_eng_trade_unions_support
		# available = {
			
		# }
		# visible = {
			
		# }
		# fire_only_once = yes
		# cancel_if_not_visible = yes
		# cost = 1		
		# complete_effect = {
			# country_event = { id = sinka.32 }
		# }		
		# ai_will_do = {
			# factor = 0
		# }
	# }
	# zth_debug_test_2 = {
		# icon = GFX_decision_eng_trade_unions_support
		# available = {
			# is_subject_of = ZMN
		# }
		# visible = {
			
		# }
		# fire_only_once = yes
		# cancel_if_not_visible = yes
		# cost = 1		
		# complete_effect = {
			# ZMN = {
				# set_autonomy = {
					# target = ZTH
					# autonomy_state = autonomy_free
				# }
			# }
			# if = {
				# limit = {
					# is_in_faction = yes
				# }
				# leave_faction = yes
			# }
			# drop_cosmetic_tag = yes
		# }		
		# ai_will_do = {
			# factor = 0
		# }
	# }
# }

ZTH_vikupit_aktsii_cat = {		### АКЦИИ БЕСПЛАТНО И БЕЗ СМС ДОСТАТОЧНО ПРОСТО ПЕРЕЙТИ ПО ССЫЛКЕ
	zth_obespechit_nashu_nezavisimost = {
		icon = GFX_decision_generic_nationalism
		available = {			
			custom_trigger_tooltip = {
				tooltip = zth_imet_bolee_55_aktsiy
				check_variable = {
					var = zth_aktsii_u_korporatii_var
					value = 55
					compare = greater_than_or_equals
				}
			}
		}
		visible = {
			tag = ZTH
			is_subject_of = ZMN
		}
		fire_only_once = yes
		cancel_if_not_visible = yes
#		cost = 10		
		complete_effect = {
			ZMN = {
				country_event = { id = sinka.105 }
			}
		}		
		ai_will_do = {
			factor = 100			
		}
	}
	
	zth_vlojit_denejki = {		# Вложить денежные средства в фонд
		icon = GFX_decision_eng_trade_unions_support
		available = {
			has_idea = zth_aktsioner_sinki
			custom_trigger_tooltip = {
				tooltip = zth_v_fonde_menee_80000_tt
				check_variable = { zth_denejki_var < 80000 }
			}
		}
		visible = {
			ZTH = {
				is_subject_of = ZMN
			}
		}
		fire_only_once = no
		cancel_if_not_visible = yes
		cost = 10	
		days_remove = @zth_denejki_v_fond_time
		modifier = {
			political_power_factor = -0.4
			production_speed_buildings_factor = -0.5
			industrial_capacity_factory = -0.5
			industrial_capacity_dockyard = -0.5
			research_speed_factor = -0.3
		}
		remove_effect = {
			custom_effect_tooltip = zth_vlojit_denejki_tt
			add_to_variable = { zth_denejki_var = 1000 } 
			hidden_effect = {
				random_list = {
					95 = {
					
					}
					5 = {
						if = {
							limit = {
								tag = ZTH
							}
							country_event = { days = 3 id = sinka.109 }
						}						
					}
				}
			}
		}		
		ai_will_do = {
			factor = 90
			modifier = {
				factor = 0.5				
				check_variable = { zth_denejki_var > 7000 }			
			}
			modifier = {
				factor = 2				
				tag = ZTH				
			}			
			modifier = {
				factor = 0.4
				OR = {
					tag = ZMN
					tag = XNU
				}
			}
			modifier = {
				factor = 0
				check_variable = { zth_denejki_var > 11000 }
			}
		}
	}
	zth_slujba_po_zakupkam = {		
		icon = GFX_decision_eng_propaganda_campaigns
		available = {
			has_idea = zth_aktsioner_sinki			
		}
		visible = {		
			ZTH = {
				is_subject_of = ZMN
			}		
		}
		fire_only_once = yes
		cancel_if_not_visible = yes
		cost = mtth:zth_cost_of_komitety
#		days_remove = 5
		modifier = {
			
		}
		complete_effect = {
			custom_effect_tooltip = zth_slujba_po_zakupkam_tt
			set_country_flag = zth_slujba_po_zakupkam_flag
		}		
		ai_will_do = {
			factor = 10			
		}
	}
	zth_otdel_kontrolya_za_aktsiyami = {		
		icon = GFX_decision_ger_mefo_bills
		available = {
			has_idea = zth_aktsioner_sinki			
		}
		visible = {
			ZTH = {
				is_subject_of = ZMN
			}
		}
		fire_only_once = yes
		cancel_if_not_visible = yes
		cost = mtth:zth_cost_of_komitety	
#		days_remove = 5
		modifier = {
			
		}
		complete_effect = {
			custom_effect_tooltip = zth_otdel_kontrolya_za_aktsiyami_tt
			set_country_flag = zth_otdel_kontrolya_za_aktsiyami_flag
		}		
		ai_will_do = {
			factor = 10			
		}
	}
	zth_aktsii_vverh = {		## ВВЕРХ
		icon = GFX_decision_generic_decision
		available = {
			has_idea = zth_aktsioner_sinki	
			custom_trigger_tooltip = {
				tooltip = zth_cost_aktsii_menee_5000_trigg
				NOT = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag
				}	
			}
		}
		visible = {
			ZTH = {
				is_subject_of = ZMN
			}
		}
		fire_only_once = no
		cancel_if_not_visible = yes
		fixed_random_seed = no
		cost = 40	
#		days_remove = 5
		days_re_enable = 30
		modifier = {
			
		}
		complete_effect = {
			custom_effect_tooltip = povtoryaemoe_reshenie_30
			custom_effect_tooltip = zth_aktsii_vverh_tt
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag
				}
				clr_global_flag = zth_stoimost_aktsiy_4000_flag
				clr_global_flag = zth_stoimost_aktsiy_3000_flag
				set_global_flag = zth_stoimost_aktsiy_5000_flag
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag
				}
				clr_global_flag = zth_stoimost_aktsiy_5000_flag
				clr_global_flag = zth_stoimost_aktsiy_3000_flag
				set_global_flag = zth_stoimost_aktsiy_4000_flag
			}
			else = {
				clr_global_flag = zth_stoimost_aktsiy_5000_flag
				clr_global_flag = zth_stoimost_aktsiy_4000_flag
				set_global_flag = zth_stoimost_aktsiy_3000_flag
			}
			hidden_effect = {
				random_list = {
					97 = {
					
					}
					3 = {
						if = {
							limit = {
								ZTH = {
									has_stability > 0.5
								}
							}
							ZTH = {
								country_event = { days = 1 id = sinka.124 }
							}							
						}
						
					}
				}
			}
		}		
		ai_will_do = {
			factor = 1	
			modifier = {
				factor = 5
				tag = ZMN
			}	
		}
	}
	zth_aktsii_vniz = {			## ВНИЗ
		icon = GFX_decision_generic_ignite_civil_war
		available = {
			has_idea = zth_aktsioner_sinki	
			custom_trigger_tooltip = {
				tooltip = zth_cost_aktsii_bolee_3000_trigg
				NOT = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag
				}	
			}
		}
		visible = {
			ZTH = {
				is_subject_of = ZMN
			}
		}
		fire_only_once = no
		cancel_if_not_visible = yes
		cost = 40	
#		days_remove = 5
		days_re_enable = 30
		modifier = {
			
		}
		complete_effect = {
			custom_effect_tooltip = povtoryaemoe_reshenie_30
			custom_effect_tooltip = zth_aktsii_vniz_tt
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag
				}
				clr_global_flag = zth_stoimost_aktsiy_5000_flag
				clr_global_flag = zth_stoimost_aktsiy_3000_flag
				set_global_flag = zth_stoimost_aktsiy_4000_flag
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag
				}
				clr_global_flag = zth_stoimost_aktsiy_4000_flag
				clr_global_flag = zth_stoimost_aktsiy_5000_flag
				set_global_flag = zth_stoimost_aktsiy_3000_flag
			}
			else = {
				clr_global_flag = zth_stoimost_aktsiy_5000_flag
				clr_global_flag = zth_stoimost_aktsiy_4000_flag
				set_global_flag = zth_stoimost_aktsiy_3000_flag
			}
			hidden_effect = {
				random_list = {
					97 = {
					
					}
					3 = {
						if = {
							limit = {
								ZTH = {
									has_stability > 0.5
								}
							}
							ZTH = {
								country_event = { days = 1 id = sinka.124 }
							}							
						}
						
					}
				}
			}
		}		
		ai_will_do = {
			factor = 1		
			modifier = {
				factor = 7
				OR = {
					tag = ZTH
					tag = XNU
				}
			}	
		}
	}
	zth_vniz_otozvat_tovar = {			## ВНИЗ ДЛЯ СИНЬКИ!!!!!!!!!!!!!!!!!!!!!!!!
		icon = GFX_decision_generic_break_treaty
		available = {
			has_completed_focus = ztn_prodoljit_otdalenie_ot_chungi
			has_idea = zth_aktsioner_sinki	
			custom_trigger_tooltip = {
				tooltip = zth_cost_aktsii_bolee_3000_trigg
				NOT = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag
				}	
			}
		}
		visible = {
			tag = ZTH			
			is_subject_of = ZMN			
		}
		fire_only_once = yes
		cancel_if_not_visible = yes
		cost = 5
		modifier = {
			
		}
		complete_effect = {	
			add_stability = -0.02
			custom_effect_tooltip = zth_aktsii_vniz_tt
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag
				}
				clr_global_flag = zth_stoimost_aktsiy_5000_flag
				clr_global_flag = zth_stoimost_aktsiy_3000_flag
				set_global_flag = zth_stoimost_aktsiy_4000_flag
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag
				}
				clr_global_flag = zth_stoimost_aktsiy_4000_flag
				clr_global_flag = zth_stoimost_aktsiy_5000_flag
				set_global_flag = zth_stoimost_aktsiy_3000_flag
			}
			else = {
				clr_global_flag = zth_stoimost_aktsiy_5000_flag
				clr_global_flag = zth_stoimost_aktsiy_4000_flag
				set_global_flag = zth_stoimost_aktsiy_3000_flag
			}			
		}		
		ai_will_do = {
			factor = 30				
		}
	}
	zth_vniz_Priostanovit_resyrsy = {			## ВНИЗ ДЛЯ СИНЬКИ!!!!!!!!!!!!!!!!!!!!!!!!
		icon = GFX_decision_steel
		available = {
			has_completed_focus = ztn_prodoljit_otdalenie_ot_chungi
			has_idea = zth_aktsioner_sinki	
			custom_trigger_tooltip = {
				tooltip = zth_cost_aktsii_bolee_3000_trigg
				NOT = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag
				}	
			}
		}
		visible = {
			tag = ZTH			
			is_subject_of = ZMN			
		}
		fire_only_once = yes
		cancel_if_not_visible = yes
		cost = 5
		modifier = {
			
		}
		complete_effect = {				
			custom_effect_tooltip = zth_aktsii_vniz_tt
			add_stability = -0.02
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag
				}
				clr_global_flag = zth_stoimost_aktsiy_5000_flag
				clr_global_flag = zth_stoimost_aktsiy_3000_flag
				set_global_flag = zth_stoimost_aktsiy_4000_flag
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag
				}
				clr_global_flag = zth_stoimost_aktsiy_4000_flag
				clr_global_flag = zth_stoimost_aktsiy_5000_flag
				set_global_flag = zth_stoimost_aktsiy_3000_flag
			}
			else = {
				clr_global_flag = zth_stoimost_aktsiy_5000_flag
				clr_global_flag = zth_stoimost_aktsiy_4000_flag
				set_global_flag = zth_stoimost_aktsiy_3000_flag
			}			
		}		
		ai_will_do = {
			factor = 30				
		}
	}
	####
	zth_kupit_5_aktsiy = {	# СИНЬКЕ Попытаться выкупить 5 % акций у Чжунго
		icon = GFX_decision_eng_trade_unions_demand
		available = {			
			is_subject_of = ZMN
			custom_trigger_tooltip = {
				tooltip = zth_u_chungi_est_atksii_tt
				check_variable = { zth_aktsii_u_chungo_var > 0 }
			}
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag	# стоимость акций 5000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_5000_tt
					check_variable = {
						var = zth_denejki_var
						value = 5000
						compare = greater_than_or_equals
					}
				}
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag	# стоимость акций 4000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_4000_tt
					check_variable = {
						var = zth_denejki_var
						value = 4000
						compare = greater_than_or_equals
					}
				}
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag	# стоимость акций 3000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_3000_tt
					check_variable = {
						var = zth_denejki_var
						value = 3000
						compare = greater_than_or_equals
					}
				}
			}
		}
		visible = {
			tag = ZTH			
			is_subject_of = ZMN			
		}
		fire_only_once = no
		cancel_if_not_visible = yes	
		fixed_random_seed = no
		days_remove = 10
		complete_effect = {
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag	# стоимость акций 5000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_5000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -5000 } 
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag	# стоимость акций 4000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_4000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -4000 } 
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag	# стоимость акций 3000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_3000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -3000 } 
			}
		}
		remove_effect = {
			custom_effect_tooltip = zth_kupit_5_aktsiy_ugacha_tt
			random_list = {
				57 = {	# удача
					modifier = {
						factor = 1.2
						ZMN = {
							has_stability < 0.5
						}	
					}
					modifier = {
						factor = 1.2
						ZMN = {
							has_country_leader = {								
								character = ZMN_xian_zhou
								ruling_only = yes
							}
						}
					}
					modifier = {
						factor = 1.2
						has_country_flag = zth_slujba_po_zakupkam_flag	
					}
					modifier = {
						factor = 1.1
						has_global_flag = zth_stoimost_aktsiy_4000_flag
					}
					modifier = {
						factor = 1.2
						has_global_flag = zth_stoimost_aktsiy_3000_flag
					}
					modifier = {
						factor = 0
						check_variable = { zth_aktsii_u_chungo_var = 0 }	
					}
					country_event = { id = sinka.107 }
				}
				43 = {	# не оч
					modifier = {
						factor = 1.3
						ZMN = {
							has_completed_focus = zmn_itog_vsego_etogo
						}
					}
					modifier = {
						factor = 1.2
						ZMN = {
							has_country_flag = zth_otdel_kontrolya_za_aktsiyami_flag
						}
					}					
					modifier = {
						factor = 1.17
						ZMN = {
							has_country_leader = {
								character = ZMN_mao_dong
								ruling_only = yes
							}
						}
					}
					modifier = {
						factor = 1.05
						has_global_flag = zth_stoimost_aktsiy_5000_flag
					}
					country_event = { id = sinka.108 }
				}
			}
		}				
		ai_will_do = {
			factor = 80			
		}
	}
	zth_xnu_kupit_5_aktsiy = {	# СИНЬКЕ Попытаться выкупить 5 % акций у Банков Ву
		icon = GFX_decision_eng_trade_unions_demand
		available = {			
			is_subject_of = ZMN	##????
			custom_trigger_tooltip = {
				tooltip = zth_u_vu_est_atksii_tt
				check_variable = { zth_aktsii_u_vu_var > 0 }
			}
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag	# стоимость акций 5000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_5000_tt
					check_variable = {
						var = zth_denejki_var
						value = 5000
						compare = greater_than_or_equals
					}
				}
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag	# стоимость акций 4000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_4000_tt
					check_variable = {
						var = zth_denejki_var
						value = 4000
						compare = greater_than_or_equals
					}
				}
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag	# стоимость акций 3000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_3000_tt
					check_variable = {
						var = zth_denejki_var
						value = 3000
						compare = greater_than_or_equals
					}
				}
			}
		}
		visible = {
			tag = ZTH
			is_subject_of = ZMN	
		}
		fire_only_once = no
		cancel_if_not_visible = yes	
		fixed_random_seed = no
		days_remove = 10
		complete_effect = {
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag	# стоимость акций 5000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_5000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -5000 } 
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag	# стоимость акций 4000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_4000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -4000 } 
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag	# стоимость акций 3000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_3000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -3000 } 
			}
		}
		remove_effect = {
			custom_effect_tooltip = zth_kupit_5_aktsiy_vu_ugacha_tt
			random_list = {
				57 = {	# удача
					modifier = {
						factor = 1.2
						XNU = {
							has_stability < 0.5
						}	
					}
					modifier = {
						factor = 1.2
						XNU = {
							NOT = { has_government = democratic }
						}	
					}
					modifier = {
						factor = 1.2
						has_country_flag = zth_slujba_po_zakupkam_flag	
					}
					modifier = {
						factor = 1.1
						has_global_flag = zth_stoimost_aktsiy_4000_flag
					}
					modifier = {
						factor = 1.2
						has_global_flag = zth_stoimost_aktsiy_3000_flag
					}
					modifier = {
						factor = 0
						check_variable = { ZTH.zth_aktsii_u_vu_var = 0 }	
					}
					country_event = { id = sinka.112 }
				}
				43 = {	# не оч		
					modifier = {
						factor = 1.2
						XNU = {
							has_country_flag = zth_otdel_kontrolya_za_aktsiyami_flag
						}
					}
					modifier = {
						factor = 1.05
						has_global_flag = zth_stoimost_aktsiy_5000_flag
					}
					country_event = { id = sinka.113 }
				}
			}
		}				
		ai_will_do = {
			factor = 80			
		}
	}
	#### для чунги	
	zth_zmn_zabrat_sebe_sinku = {	
		icon = GFX_decision_generic_nationalism
		available = {				
			custom_trigger_tooltip = {
				tooltip = zth_imet_bolee_95_aktsiy
				check_variable = {
					var = ZTH.zth_aktsii_u_chungo_var
					value = 95
					compare = greater_than_or_equals
				}
			}
			OR = {
				has_completed_focus = zmn_itog_vsego_etogo
				has_completed_focus = zmn_min_vykhod_iz_kriz
			}			
		}
		visible = {
			tag = ZMN
			ZTH = {
				is_subject_of = ZMN
			}	
		}
		fire_only_once = yes
		cancel_if_not_visible = yes
#		cost = 10		
		complete_effect = {			
			country_event = { id = sinka.116 }			
		}		
		ai_will_do = {
			factor = 70			
		}
	}
	zth_zmn_kupit_5_aktsiy = {	# ЧЖУНГО Попытаться выкупить 5 % акций у Корпорации
		icon = GFX_decision_eng_trade_unions_demand
		available = {			
			ZTH = {
				is_subject_of = ZMN
			}	
			custom_trigger_tooltip = {
				tooltip = zth_u_korporat_est_atksii_tt
				check_variable = { ZTH.zth_aktsii_u_korporatii_var > 0 }
			}
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag	# стоимость акций 5000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_5000_tt
					check_variable = {
						var = zth_denejki_var
						value = 5000
						compare = greater_than_or_equals
					}
				}
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag	# стоимость акций 4000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_4000_tt
					check_variable = {
						var = zth_denejki_var
						value = 4000
						compare = greater_than_or_equals
					}
				}
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag	# стоимость акций 3000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_3000_tt
					check_variable = {
						var = zth_denejki_var
						value = 3000
						compare = greater_than_or_equals
					}
				}
			}
		}
		visible = {
			tag = ZMN
			ZTH = {
				is_subject_of = ZMN
			}
		}
		fire_only_once = no
		cancel_if_not_visible = yes	
		fixed_random_seed = no
		days_remove = 10
		complete_effect = {
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag	# стоимость акций 5000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_5000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -5000 } 
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag	# стоимость акций 4000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_4000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -4000 } 
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag	# стоимость акций 3000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_3000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -3000 } 
			}
		}
		remove_effect = {
			custom_effect_tooltip = zth_zmn_kupit_5_aktsiy_ugacha_tt
			random_list = {
				48 = {	# удача
					modifier = {
						factor = 1.2
						ZTH = {
							has_stability < 0.5
						}	
					}
					modifier = {
						factor = 1.2
						has_country_flag = zth_slujba_po_zakupkam_flag	
					}
					modifier = {
						factor = 1.1
						has_global_flag = zth_stoimost_aktsiy_4000_flag
					}
					modifier = {
						factor = 1.2
						has_global_flag = zth_stoimost_aktsiy_3000_flag
					}
					modifier = {
						factor = 0
						check_variable = { ZTH.zth_aktsii_u_korporatii_var = 0 }	
					}					
					country_event = { id = sinka.110 }
				}
				52 = {	# не оч
					modifier = {
						factor = 1.2
						ZTH = {
							has_country_flag = zth_otdel_kontrolya_za_aktsiyami_flag
						}
					}
					modifier = {
						factor = 1.05
						has_global_flag = zth_stoimost_aktsiy_5000_flag
					}
					country_event = { id = sinka.111 }
				}
			}
		}				
		ai_will_do = {
			factor = 2			
		}
	}
	zth_zmn_xnu_kupit_5_aktsiy = {	# ЧЖУНГО Попытаться выкупить 5 % акций у Банков Ву
		icon = GFX_decision_eng_trade_unions_demand
		available = {			
			ZTH = {
				is_subject_of = ZMN
			}
			custom_trigger_tooltip = {
				tooltip = zth_u_vu_est_atksii_tt
				check_variable = { ZTH.zth_aktsii_u_vu_var > 0 }
			}
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag	# стоимость акций 5000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_5000_tt
					check_variable = {
						var = zth_denejki_var
						value = 5000
						compare = greater_than_or_equals
					}
				}
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag	# стоимость акций 4000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_4000_tt
					check_variable = {
						var = zth_denejki_var
						value = 4000
						compare = greater_than_or_equals
					}
				}
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag	# стоимость акций 3000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_3000_tt
					check_variable = {
						var = zth_denejki_var
						value = 3000
						compare = greater_than_or_equals
					}
				}
			}
		}
		visible = {
			tag = ZMN
			ZTH = {
				is_subject_of = ZMN
			}
		}
		fire_only_once = no
		cancel_if_not_visible = yes
#		cost = 10	
		fixed_random_seed = no
		days_remove = 10
		complete_effect = {
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag	# стоимость акций 5000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_5000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -5000 } 
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag	# стоимость акций 4000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_4000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -4000 } 
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag	# стоимость акций 3000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_3000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -3000 } 
			}
		}
		remove_effect = {
			custom_effect_tooltip = zth_kupit_5_aktsiy_vu_ugacha_tt
			random_list = {
				48 = {	# удача
					modifier = {
						factor = 1.2
						XNU = {
							has_stability < 0.5
						}	
					}
					modifier = {
						factor = 1.2
						XNU = {
							NOT = { has_government = democratic }
						}	
					}
					modifier = {
						factor = 1.2
						has_country_flag = zth_slujba_po_zakupkam_flag	
					}
					modifier = {
						factor = 1.1
						has_global_flag = zth_stoimost_aktsiy_4000_flag
					}
					modifier = {
						factor = 1.2
						has_global_flag = zth_stoimost_aktsiy_3000_flag
					}
					modifier = {
						factor = 0
						check_variable = { ZTH.zth_aktsii_u_vu_var = 0 }	
					}
					country_event = { id = sinka.114 }
				}
				52 = {	# не оч
					modifier = {
						factor = 1.2
						XNU = {
							has_country_flag = zth_otdel_kontrolya_za_aktsiyami_flag
						}
					}
					modifier = {
						factor = 1.05
						has_global_flag = zth_stoimost_aktsiy_5000_flag
					}
					country_event = { id = sinka.115 }
				}
			}
		}				
		ai_will_do = {
			factor = 6			
		}
	}	
	#### ВУ
	zth_xnu_zabrat_sebe_sinku = {
		icon = GFX_decision_generic_nationalism
		available = {				
			custom_trigger_tooltip = {
				tooltip = zth_imet_bolee_55_aktsiy
				check_variable = {
					var = ZTH.zth_aktsii_u_vu_var
					value = 55
					compare = greater_than_or_equals
				}
			}
		}
		visible = {
			tag = XNU
			ZTH = {
				is_subject_of = ZMN
			}	
		}
		fire_only_once = yes
		cancel_if_not_visible = yes
#		cost = 10		
		complete_effect = {			
			country_event = { id = sinka.118 }			
		}		
		ai_will_do = {
			factor = 70			
		}
	}
	zth_xnu_zth_kupit_5_aktsiy = {	# Ву Попытаться выкупить 5 % акций у Корпорации
		icon = GFX_decision_eng_trade_unions_demand
		available = {			
			ZTH = {
				is_subject_of = ZMN
			}	
			custom_trigger_tooltip = {
				tooltip = zth_u_korporat_est_atksii_tt
				check_variable = { ZTH.zth_aktsii_u_korporatii_var > 0 }
			}
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag	# стоимость акций 5000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_5000_tt
					check_variable = {
						var = zth_denejki_var
						value = 5000
						compare = greater_than_or_equals
					}
				}
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag	# стоимость акций 4000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_4000_tt
					check_variable = {
						var = zth_denejki_var
						value = 4000
						compare = greater_than_or_equals
					}
				}
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag	# стоимость акций 3000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_3000_tt
					check_variable = {
						var = zth_denejki_var
						value = 3000
						compare = greater_than_or_equals
					}
				}
			}
		}
		visible = {
			tag = XNU
			ZTH = {
				is_subject_of = ZMN
			}
		}
		fire_only_once = no
		cancel_if_not_visible = yes	
		fixed_random_seed = no
		days_remove = 10
		complete_effect = {
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag	# стоимость акций 5000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_5000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -5000 } 
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag	# стоимость акций 4000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_4000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -4000 } 
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag	# стоимость акций 3000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_3000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -3000 } 
			}
		}
		remove_effect = {
			custom_effect_tooltip = zth_zmn_kupit_5_aktsiy_ugacha_tt
			random_list = {
				50 = {	# удача
					modifier = {
						factor = 1.2
						ZTH = {
							has_stability < 0.5
						}	
					}
					modifier = {
						factor = 1.2
						has_country_flag = zth_slujba_po_zakupkam_flag	
					}
					modifier = {
						factor = 1.1
						has_global_flag = zth_stoimost_aktsiy_4000_flag
					}
					modifier = {
						factor = 1.2
						has_global_flag = zth_stoimost_aktsiy_3000_flag
					}
					modifier = {
						factor = 0
						check_variable = { ZTH.zth_aktsii_u_korporatii_var = 0 }	
					}					
					country_event = { id = sinka.120 }
				}
				50 = {	# не оч
					modifier = {
						factor = 1.2
						ZTH = {
							has_country_flag = zth_otdel_kontrolya_za_aktsiyami_flag
						}
					}
					modifier = {
						factor = 1.05
						has_global_flag = zth_stoimost_aktsiy_5000_flag
					}
					country_event = { id = sinka.121 }
				}
			}
		}				
		ai_will_do = {
			factor = 2			
		}
	}
	zth_xnu_zmn_kupit_5_aktsiy = {	# Ву Попытаться выкупить 5 % акций у ЧЖУНГО 
		icon = GFX_decision_eng_trade_unions_demand
		available = {			
			ZTH = {
				is_subject_of = ZMN
			}
			custom_trigger_tooltip = {
				tooltip = zth_u_chungi_est_atksii_tt
				check_variable = { ZTH.zth_aktsii_u_chungo_var > 0 }
			}
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag	# стоимость акций 5000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_5000_tt
					check_variable = {
						var = zth_denejki_var
						value = 5000
						compare = greater_than_or_equals
					}
				}
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag	# стоимость акций 4000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_4000_tt
					check_variable = {
						var = zth_denejki_var
						value = 4000
						compare = greater_than_or_equals
					}
				}
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag	# стоимость акций 3000 за 5 %
				}
				custom_trigger_tooltip = {
					tooltip = zth_kupit_5_aktsiy_3000_tt
					check_variable = {
						var = zth_denejki_var
						value = 3000
						compare = greater_than_or_equals
					}
				}
			}
		}
		visible = {
			tag = XNU
			ZTH = {
				is_subject_of = ZMN
			}
		}
		fire_only_once = no
		cancel_if_not_visible = yes
#		cost = 10	
		fixed_random_seed = no
		days_remove = 10
		complete_effect = {
			if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_5000_flag	# стоимость акций 5000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_5000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -5000 } 
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_4000_flag	# стоимость акций 4000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_4000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -4000 } 
			}
			else_if = {
				limit = {
					has_global_flag = zth_stoimost_aktsiy_3000_flag	# стоимость акций 3000 за 5 %
				}
				custom_effect_tooltip = zth_ubiraem_3000_iz_fonda_tt
				add_to_variable = { zth_denejki_var = -3000 } 
			}
		}
		remove_effect = {
			custom_effect_tooltip = zth_kupit_5_aktsiy_ugacha_tt
			random_list = {
				50 = {	# удача
					modifier = {
						factor = 1.2
						ZMN = {
							has_stability < 0.5
						}	
					}
					modifier = {
						factor = 1.1
						ZMN = {
							has_country_leader = {
								character = ZMN_xian_zhou
								ruling_only = yes
							}
						}
					}
					modifier = {
						factor = 1.2
						has_country_flag = zth_slujba_po_zakupkam_flag	
					}
					modifier = {
						factor = 1.1
						has_global_flag = zth_stoimost_aktsiy_4000_flag
					}
					modifier = {
						factor = 1.2
						has_global_flag = zth_stoimost_aktsiy_3000_flag
					}
					modifier = {
						factor = 0
						check_variable = { zth_aktsii_u_chungo_var = 0 }	
					}
					country_event = { id = sinka.122 }
				}
				50 = {	# не оч
					modifier = {
						factor = 1.3
						ZMN = {
							has_completed_focus = zmn_itog_vsego_etogo
						}
					}
					modifier = {
						factor = 1.2
						ZMN = {
							has_country_flag = zth_otdel_kontrolya_za_aktsiyami_flag
						}
					}
					modifier = {
						factor = 1.17
						ZMN = {
							has_country_leader = {
								character = ZMN_mao_dong
								ruling_only = yes
							}
						}
					}
					modifier = {
						factor = 1.05
						has_global_flag = zth_stoimost_aktsiy_5000_flag
					}
					country_event = { id = sinka.123 }
				}
			}
		}				
		ai_will_do = {
			factor = 5			
		}
	}
	
	###########
	zth_vyvesti_denejki = {
		icon = GFX_decision_hol_attract_foreign_investors
		available = {
#			is_subject_of = ZMN
			custom_trigger_tooltip = {
				tooltip = zth_imet_bolee_1000_deneg
				check_variable = {
					var = zth_denejki_var
					value = 1000
					compare = greater_than_or_equals
				}
			}
		}
		visible = {
			
		}
		fire_only_once = no
		cancel_if_not_visible = yes
#		cost = 0
		days_remove = 5
		modifier = {
			political_power_factor = 0.3
			production_speed_buildings_factor = 0.3
			industrial_capacity_factory = 0.3
			industrial_capacity_dockyard = 0.3
			research_speed_factor = 0.2
		}
		remove_effect = {
			custom_effect_tooltip = zth_vyvesti_denejki_tt
			add_to_variable = { zth_denejki_var = -1000 } 
			add_political_power = 9
		}		
		ai_will_do = {
			factor = 100
			modifier = {
				factor = 0
				ZTH = {
					is_subject_of = ZMN
				}	
			}
		}
	}


}
###################################################################################################
ZTH_zahvat_zja_folkung_cat = {	# is_subject_of = ZMN
	ZTH_test_the_alaska_border = {	#first border incident
		icon = border_war
		allowed = {
			original_tag = ZTH
		}
		available = {
			has_global_flag = shogun_perevorot_flag
			ZJA = {
				has_war = yes
			}
			NOT = {
				has_war_with = ZJA
				is_in_faction_with = ZJA
			}
			473 = {
				any_neighbor_state = {
					is_controlled_by = ZJA
				}
			}
		}
		visible = {
			has_global_flag = shogun_perevorot_flag
			NOT = {
				has_global_flag = ZTH_nista_a_owner
			}
		}
		highlight_states = {
			OR = {
				state = 471
				state = 473
			}
		}
		fire_only_once = yes
		ai_will_do = {
			factor = 2
		}
		cost = 50
		days_remove = 30
		war_with_on_remove = ZJA
		complete_effect = {
			473 = {
				save_event_target_as = ZTH_ZJA_attacker_state
				set_state_flag = border_incident_active
			}
			471 = {
				save_event_target_as = ZTH_ZJA_defender_state
				set_state_flag = border_incident_active
			}
			ZJA = {
				country_event = { id = japanimp.11 days = 1 }
				activate_targeted_decision = { target = ZTH decision = ZTH_border_conflict_warning_ZJA }
			}
		}
		remove_effect = {
			activate_targeted_decision = { target = ZJA decision = ZTH_border_incident_forgotten }
			activate_targeted_decision = { target = ZJA decision = ZTH_escalate_incident_to_border_conflict_ZJA }
		}
	}

	#Mission for defender warning that a conflict with FROM is coming
	ZTH_border_conflict_warning_ZJA = {
		icon = border_war
		allowed = { always = no } #Activated from effect
		available = {
			hidden_trigger = { always = no }
		}
		war_with_target_on_timeout = yes
		ai_will_do = {
			base = 0
		}
		days_mission_timeout = 30
		fire_only_once = yes
		is_good = no		
		timeout_effect = {
			custom_effect_tooltip = escalation_possible_tooltip_for_defender
			custom_effect_tooltip = effects_if_border_conflict_is_lost
			hidden_effect = {
				remove_targeted_decision = { target = ZTH decision = ZTH_border_conflict_warning_ZJA }
				activate_targeted_decision = { target = ZTH decision = ZTH_border_conflict_escalation_warning_ZJA }
			}
		}
	}

	#Mission for defender warning FROM can escalate to war at any point is coming
	ZTH_border_conflict_escalation_warning_ZJA = {
		icon = border_war
		allowed = { always = no } #Activated from effect
		available = {
			hidden_trigger = { always = no }
		}
		highlight_states = {
		}
		war_with_target_on_timeout = yes
		ai_will_do = {
			base = 0
		}
		days_mission_timeout = 30
		fire_only_once = yes
		is_good = no
		timeout_effect = {
			custom_effect_tooltip = from_cannot_escalate
			custom_effect_tooltip = effects_if_border_conflict_is_lost
			effect_tooltip = {
				ZTH = {
					army_experience = 50
				}
			}
		}		
	}
	#Mission for attacker to escalate or incident is forgotten
	ZTH_border_incident_forgotten = {
		icon = border_war
		allowed = { always = no } #Activated from effect
		available = {
			hidden_trigger = { always = no }
		}
		highlight_states = {
			OR = {
				state = 473
				state = 471
			}
		}
		# ai_will_do = {
			# base = 0
		# }
		days_mission_timeout = 30
		fire_only_once = yes
		is_good = no		
		timeout_effect = {
			remove_targeted_decision = { target = ZJA decision = ZTH_escalate_incident_to_border_conflict_ZJA }
			add_political_power = -100
			add_war_support = -0.1 #Shameful Display
			hidden_effect = {
				ZJA = { remove_targeted_decision = { target = ZTH decision = ZTH_border_conflict_escalation_warning_ZJA } }
				ZJA = {
					473 = {
						clr_state_flag = border_incident_active
					}
					471 = {
						clr_state_flag = border_incident_active
					}
				}
			}
		}
	}

	#Decision to escalate incident on border with ZJA to border conflict
	ZTH_escalate_incident_to_border_conflict_ZJA = {
		icon = border_war
		allowed = { always = no } #Activated from effect
		available = {
			473 = {
				OR = {
					is_fully_controlled_by = ROOT
					CONTROLLER = {
						is_subject_of = ROOT
					}
					CONTROLLER = {
						is_in_faction_with = ROOT
					}
				}
			}
			divisions_in_border_state = {
				state = 473
				border_state = 471
				size > 0
			}
		}
		highlight_states = {
			OR = {
				state = 473
				state = 471			
			}
		}
		# ai_will_do = {
			# base = 10
			# modifier = { 
				# has_war = no
				# factor = 10
			# }
		# }
		fire_only_once = yes #Reactivation handled in effect
		complete_effect = {
			remove_targeted_decision = { target = ZJA decision = ZTH_border_incident_forgotten }
			start_border_war = {
				change_state_after_war = no
				attacker = {
					state = 473
					num_provinces = 4
					on_win = japanimp.12
					on_lose = japanimp.13
					on_cancel = japanimp.14
				}				
				defender = {
					state = 471
					num_provinces = 4
					on_win = japanimp.13
					on_lose = japanimp.12
					on_cancel = japanimp.14
				}
			}
			ZJA = {
				activate_targeted_decision = { target = ZTH decision = ZTH_border_conflict_escalate_conflict }
				activate_targeted_decision = { target = ZTH decision = ZTH_border_conflict_time_until_cancelled }
			}
			activate_targeted_decision = { target = ZJA decision = ZTH_border_conflict_escalate_conflict }
			activate_targeted_decision = { target = ZJA decision = ZTH_border_conflict_time_until_cancelled }
		}
	}
	#Mission for attacker to win border war against FROM in X days
	ZTH_border_conflict_time_until_cancelled = {
		icon = border_war
		allowed = { always = no } #Activated from effect
		available = {
			473 = { has_border_war = no }
			471 = { has_border_war = no }
		}		
		highlight_states = {
			OR = {
				state = 471
				state = 473
			}
		}
		# ai_will_do = {
			# base = 0
		# }
		days_mission_timeout = 90
		is_good = no
		fire_only_once = yes #Reactivation handled in effect
		complete_effect = {
		}
		timeout_effect = {
			cancel_border_war = {
				defender = 471
				attacker = 473
			}
			hidden_effect = {
				remove_targeted_decision = { target = ZJA decision = ZTH_border_conflict_escalate_conflict }
				remove_targeted_decision = { target = ZTH decision = ZTH_border_conflict_escalate_conflict }
			}
		}
	}

	#Decision to escalate conflict further
	ZTH_border_conflict_escalate_conflict = {
		icon = decision_generic_ignite_civil_war
		allowed = { always = no } #Activated from effect
		visible = {
			has_border_war_with = FROM
		}
		highlight_states = {
			OR = {
				state = 473
				state = 471
			}
		}
		cost = 120
		ai_will_do = {
			base = 0
		}
		fire_only_once = yes #Reactivation handled in effect
		complete_effect = {
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				set_border_war_data = {
					attacker = 473
					defender = 471
					defender_modifier = 0.15
					combat_width = 100
				}
			}
			else = {
				set_border_war_data = {
					attacker = 473
					defender = 471
					attacker_modifier = 0.15
					combat_width = 100
				}
			}
			ZJA = {
				set_country_flag = {
					flag = WTT_border_conflict_escalate_to_war_cooldown_@ROOT
					days = 60
					value = 1
				}
				remove_targeted_decision = { target = ZTH decision = ZTH_border_conflict_escalate_conflict }
			}
			set_country_flag = {
				flag = WTT_border_conflict_escalate_to_war_cooldown_@ZJA
				days = 60
				value = 1
			}
			custom_effect_tooltip = in_60_days
			activate_targeted_decision = { target = ZJA decision = ZTH_border_conflict_escalate_to_war }
		}
	}

	#Decision to escalate conflict further
	ZTH_border_conflict_escalate_to_war = {
		icon = decision_generic_ignite_civil_war
		allowed = { always = no } #Activated from effect
		visible = {
			NOT = { has_country_flag = WTT_border_conflict_escalate_to_war_cooldown_@FROM }
			has_border_war_with = FROM
		}
		highlight_states = {
			OR = {
				state = 471
				state = 473
			}
		}
		cost = 130
		ai_will_do = {
			base = 0
		}
		days_remove = 15
		fire_only_once = yes #Reactivation handled in effect
		war_with_target_on_remove = yes
		complete_effect = {
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				471 = { save_event_target_as = their_state }
				473 = { save_event_target_as = our_state }
			}
			else = {
				473 = { save_event_target_as = our_state }
				471 = { save_event_target_as = their_state }
			}
			ZJA = {
				country_event = { id = japanimp.15 }
				hidden_effect = {
					remove_targeted_decision = { target = ZTH decision = ZTH_border_conflict_escalate_to_war }
				}
		 	}
		}

		remove_effect = {
			cancel_border_war = {
				dont_fire_events = yes
				defender = 471
				attacker = 473
			}
			declare_war_on = { target = FROM type = puppet_wargoal_focus }
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				473 = {
					clr_state_flag = border_incident_active
				}
				471 = {
					clr_state_flag = border_incident_active
				}
				
			}
			else = {
				FROM = {
					473 = {
						clr_state_flag = border_incident_active
					}
					471 = {
						clr_state_flag = border_incident_active
					}
				}
			}
		}
	}

	#Decision to back down from conflict
	ZTH_border_conflict_back_out_of_conflict = {
		allowed = { always = no } #Activated from effect
		visible = {
			has_border_war_with = FROM
		}
		highlight_states = {
			OR = {
				state = 473
				state = 471
			}
		}
		# ai_will_do = {
			# base = 0
		# }
		fire_only_once = yes #Reactivation handled in effect
		complete_effect = {
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				finalize_border_war = {
					attacker_win = yes
					attacker = 473
					defender = 471
				}
			}
			else = {
				finalize_border_war = {
					attacker = 473
					defender = 471
					defender_win = yes
				}
			}
		}
	}
}

###################################################################################
ZTH_borba_za_vlast_1_cat = {
	zth_mission_faza_1 = {
		priority = 82
		icon = generic_civil_support				
		available = {			
			OR = {
				has_war = yes
				NOT = {
					has_government = democratic
				}
				custom_trigger_tooltip = {
					tooltip = zth_vse_5_gorodov_trigger_invert_tt
					zth_vse_5_gorodov_trigger = no
				}
				
#				country_exists = ZHE	# Ежэнь				
			}			
		}
		cancel_if_not_visible = yes
		days_mission_timeout = 125
		activation = {
			OR = {
				has_country_flag = zth_path_of_korporat_flag
				has_country_flag = zth_path_of_respubl_flag
			}
		}
		fixed_random_seed = no
		fire_only_once = yes
		is_good = no
		timeout_effect = {			
			if = {
				limit = {
					has_country_flag = zth_path_of_korporat_flag
				}
				custom_effect_tooltip = zth_mission_faza_1_tt_1
				add_stability = -0.1
				add_war_support = -0.1
				country_event = { id = sinka.23 }
			}	
			if = {
				limit = {
					has_country_flag = zth_path_of_respubl_flag
				}
				custom_effect_tooltip = zth_mission_faza_1_tt_2
				add_stability = -0.12
				add_war_support = -0.12
				country_event = { id = sinka.24 }
			}
		}
	}
	############
	############
	zth_378_zaruch_podderjk = {
		icon = GFX_decision_eng_propaganda_campaigns
		available = {
			controls_state = 378
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}
			custom_trigger_tooltip = {
				tooltip = zth_podderjka_max_trigger_tt
				check_variable = { zth_support_378_var < 5 }
			}
		}
		highlight_states = {
			state = 378
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		fixed_random_seed = no
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_loka_zaruch_podderjk_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			random_list = {
				80 = {
					modifier = {
						factor = 1.1
						has_country_flag = zth_findai_podderjka_1_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_korporat_busty_faza_1_flag
					}
					custom_effect_tooltip = zth_nasha_podderjka_uvelichilas
					add_to_variable = { zth_support_378_var = 1 } 
					clamp_variable = {
						var = zth_support_378_var
						min = 1
						max = 5
					}
				}
				20 = {
					custom_effect_tooltip = zth_nasha_podderjka_nichego
				}
			}
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}						
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_378_vskrit_sklady = {
		icon = GFX_decision_generic_industry
		available = {
			controls_state = 378
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}				
		}
		visible = {
			NOT = {
				has_country_flag = zth_378_sklad_nash_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_vskrit_sklady_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_378_sklad_nash_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}			
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_378_podgotovit_barrikady = {
		icon = GFX_decision_eng_blackshirt_march
		available = {
			controls_state = 378
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}		
		}
		visible = {
			NOT = {
				has_country_flag = zth_378_barrikady_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_barrikady_sklady_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_378_barrikady_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}			
		}
		ai_will_do = {
			factor = 5						
		}
	}
	zth_378_set_osvedomitelei = {
		icon = GFX_decision_onmap_recruit_operative
		available = {
			controls_state = 378
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}		
		}
		visible = {
			NOT = {
				has_country_flag = zth_378_set_osvedomitelei_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_set_osvedomitelei_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_378_set_osvedomitelei_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}			
		}
		ai_will_do = {
			factor = 5						
		}
	}
	#######################
	zth_386_zaruch_podderjk = {
		icon = GFX_decision_eng_propaganda_campaigns
		available = {
			controls_state = 386
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}
			custom_trigger_tooltip = {
				tooltip = zth_podderjka_max_trigger_tt	# лока нейтральна
				check_variable = { zth_support_386_var < 5 }
			}
		}
		highlight_states = {
			state = 386
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		fixed_random_seed = no
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_loka_zaruch_podderjk_tt	# лока нейтральна
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			random_list = {
				80 = {
					modifier = {
						factor = 1.1
						has_country_flag = zth_findai_podderjka_1_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_korporat_busty_faza_1_flag
					}
					custom_effect_tooltip = zth_nasha_podderjka_uvelichilas
					add_to_variable = { zth_support_386_var = 1 } 
					clamp_variable = {
						var = zth_support_386_var
						min = 1
						max = 5
					}
				}
				20 = {
					custom_effect_tooltip = zth_nasha_podderjka_nichego
				}
			}
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}			
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_386_vskrit_sklady = {
		icon = GFX_decision_generic_industry
		available = {
			controls_state = 386
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}
				
		}
		visible = {
			NOT = {
				has_country_flag = zth_386_sklad_nash_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_vskrit_sklady_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_386_sklad_nash_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}				
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_386_podgotovit_barrikady = {
		icon = GFX_decision_eng_blackshirt_march
		available = {
			controls_state = 386
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}		
		}
		visible = {
			NOT = {
				has_country_flag = zth_386_barrikady_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_barrikady_sklady_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_386_barrikady_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}			
		}
		ai_will_do = {
			factor = 5						
		}
	}
	zth_386_set_osvedomitelei = {
		icon = GFX_decision_onmap_recruit_operative
		available = {
			controls_state = 386
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}		
		}
		visible = {
			NOT = {
				has_country_flag = zth_386_set_osvedomitelei_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_set_osvedomitelei_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_386_set_osvedomitelei_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}			
		}
		ai_will_do = {
			factor = 5						
		}
	}
	############
	zth_1155_zaruch_podderjk = {
		icon = GFX_decision_eng_propaganda_campaigns
		available = {
			controls_state = 1155
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}
			custom_trigger_tooltip = {
				tooltip = zth_podderjka_max_trigger_tt	# лока нейтральна
				check_variable = { zth_support_1155_var < 5 }
			}
		}
		highlight_states = {
			state = 1155
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		fixed_random_seed = no
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_loka_zaruch_podderjk_tt	# лока нейтральна
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			random_list = {
				80 = {
					modifier = {
						factor = 1.1
						has_country_flag = zth_findai_podderjka_1_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_korporat_busty_faza_1_flag
					}
					custom_effect_tooltip = zth_nasha_podderjka_uvelichilas
					add_to_variable = { zth_support_1155_var = 1 } 
					clamp_variable = {
						var = zth_support_1155_var
						min = 1
						max = 5
					}
				}
				20 = {
					custom_effect_tooltip = zth_nasha_podderjka_nichego
				}
			}
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}			
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_1155_vskrit_sklady = {
		icon = GFX_decision_generic_industry
		available = {
			controls_state = 1155
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}
				
		}
		visible = {
			NOT = {
				has_country_flag = zth_1155_sklad_nash_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_vskrit_sklady_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_1155_sklad_nash_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}				
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_1155_podgotovit_barrikady = {
		icon = GFX_decision_eng_blackshirt_march
		available = {
			controls_state = 1155
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}		
		}
		visible = {
			NOT = {
				has_country_flag = zth_1155_barrikady_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_barrikady_sklady_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_1155_barrikady_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}
		}
		ai_will_do = {
			factor = 5						
		}
	}
	zth_1155_set_osvedomitelei = {
		icon = GFX_decision_onmap_recruit_operative
		available = {
			controls_state = 1155
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}		
		}
		visible = {
			NOT = {
				has_country_flag = zth_1155_set_osvedomitelei_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_set_osvedomitelei_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_1155_set_osvedomitelei_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}			
		}
		ai_will_do = {
			factor = 5						
		}
	}
	###########
	zth_1149_zaruch_podderjk = {
		icon = GFX_decision_eng_propaganda_campaigns
		available = {
			controls_state = 1149
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}
			custom_trigger_tooltip = {
				tooltip = zth_podderjka_max_trigger_tt	# лока нейтральна
				check_variable = { zth_support_1149_var < 5 }
			}
		}
		highlight_states = {
			state = 1149
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		fixed_random_seed = no
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_loka_zaruch_podderjk_tt	# лока нейтральна
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			random_list = {
				80 = {
					modifier = {
						factor = 1.1
						has_country_flag = zth_findai_podderjka_1_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_korporat_busty_faza_1_flag
					}
					custom_effect_tooltip = zth_nasha_podderjka_uvelichilas
					add_to_variable = { zth_support_1149_var = 1 } 
					clamp_variable = {
						var = zth_support_1149_var
						min = 1
						max = 5
					}
				}
				20 = {
					custom_effect_tooltip = zth_nasha_podderjka_nichego
				}
			}
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}			
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_1149_vskrit_sklady = {
		icon = GFX_decision_generic_industry
		available = {
			controls_state = 1149
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}
				
		}
		visible = {
			NOT = {
				has_country_flag = zth_1149_sklad_nash_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_vskrit_sklady_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_1149_sklad_nash_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}				
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_1149_podgotovit_barrikady = {
		icon = GFX_decision_eng_blackshirt_march
		available = {
			controls_state = 1149
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}		
		}
		visible = {
			NOT = {
				has_country_flag = zth_1149_barrikady_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_barrikady_sklady_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_1149_barrikady_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}	
		}
		ai_will_do = {
			factor = 5						
		}
	}
	zth_1149_set_osvedomitelei = {
		icon = GFX_decision_onmap_recruit_operative
		available = {
			controls_state = 1149
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}		
		}
		visible = {
			NOT = {
				has_country_flag = zth_1149_set_osvedomitelei_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_set_osvedomitelei_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_1149_set_osvedomitelei_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}			
		}
		ai_will_do = {
			factor = 5						
		}
	}
	####
		zth_1148_zaruch_podderjk = {
		icon = GFX_decision_eng_propaganda_campaigns
		available = {
			controls_state = 1148
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}
			custom_trigger_tooltip = {
				tooltip = zth_podderjka_max_trigger_tt	# лока нейтральна
				check_variable = { zth_support_1148_var < 5 }
			}
		}
		highlight_states = {
			state = 1148
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		fixed_random_seed = no
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_loka_zaruch_podderjk_tt	# лока нейтральна
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			random_list = {
				80 = {
					modifier = {
						factor = 1.1
						has_country_flag = zth_findai_podderjka_1_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_korporat_busty_faza_1_flag
					}
					custom_effect_tooltip = zth_nasha_podderjka_uvelichilas
					add_to_variable = { zth_support_1148_var = 1 } 
					clamp_variable = {
						var = zth_support_1148_var
						min = 1
						max = 5
					}
				}
				20 = {
					custom_effect_tooltip = zth_nasha_podderjka_nichego
				}
			}
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}			
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_1148_vskrit_sklady = {
		icon = GFX_decision_generic_industry
		available = {
			controls_state = 1148
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}
				
		}
		visible = {
			NOT = {
				has_country_flag = zth_1148_sklad_nash_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_vskrit_sklady_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_1148_sklad_nash_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}				
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_1148_podgotovit_barrikady = {
		icon = GFX_decision_eng_blackshirt_march
		available = {
			controls_state = 1148
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}		
		}
		visible = {
			NOT = {
				has_country_flag = zth_1148_barrikady_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_barrikady_sklady_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_1148_barrikady_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}			
		}
		ai_will_do = {
			factor = 5						
		}
	}
	zth_1148_set_osvedomitelei = {
		icon = GFX_decision_onmap_recruit_operative
		available = {
			controls_state = 1148
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				}
			}		
		}
		visible = {
			NOT = {
				has_country_flag = zth_1148_set_osvedomitelei_flag
			}
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_1
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_1_event id = sinka.5 }
			}	
		}
		remove_effect = {
			custom_effect_tooltip = zth_my_set_osvedomitelei_tt
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_1_odno_reshenie_flag
				country_event = { id = sinka.6 }
			}
			set_country_flag = zth_1148_set_osvedomitelei_flag			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}			
		}
		ai_will_do = {
			factor = 5						
		}
	}
	###

}


ZTH_borba_za_vlast_2_cat = {
	zth_mission_faza_2 = {
		priority = 85
		icon = generic_civil_support				
		available = {			
			OR = {
				has_war = yes
				NOT = {
					has_government = democratic
				}
				custom_trigger_tooltip = {
					tooltip = zth_vse_5_gorodov_trigger_invert_tt
					zth_vse_5_gorodov_trigger = no
				}				
#				country_exists = ZHE	# Ежэнь				
			}			
		}
		cancel_if_not_visible = yes
		days_mission_timeout = 135
		activation = {
			OR = {
				has_country_flag = zth_path_of_korporat_fasa_2_flag
				has_country_flag = zth_path_of_respubl_fasa_2_flag
			}
		}
		fixed_random_seed = no
		fire_only_once = yes
		is_good = no
		timeout_effect = {			
			custom_effect_tooltip = zth_mission_faza_2_tt
			if = {
				limit = {
					has_country_flag = zth_path_of_korporat_fasa_2_flag
				}
				add_stability = -0.08
				add_war_support = -0.08
				country_event = { id = sinka.61 }
			}	
			if = {
				limit = {
					has_country_flag = zth_path_of_respubl_fasa_2_flag
				}
				add_stability = -0.10
				add_war_support = -0.10
				country_event = { id = sinka.62 }
			}	
		}
	}
	zth_motivatsiya_podderjka = {
		icon = GFX_decision_generic_civil_support
		available = {
			controls_state = 378
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
				}
			}
			custom_trigger_tooltip = {
				tooltip = zth_menee_100_motivatsii_trigger_tt
				check_variable = { zth_motivatia_gorodov_var < 100 }
			}
		}		
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_2
		fixed_random_seed = no
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_2_event id = sinka.25 }
			}	
		}
		remove_effect = {
			zth_obshaya_podderjka_v_gorodah_plus_8 = yes
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
#				country_event = { days = 2 id = sinka.49 }
			}			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}						
		}
		ai_will_do = {
			base = 1
			modifier = {
				add = 25
				check_variable = { zth_motivatia_gorodov_var < 75 }
			}
		}
	}
	###
	zth_protivist_ataka_v_378 = {
		icon = GFX_decision_generic_prepare_civil_war
		available = {
			controls_state = 378
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
				}
			}
			custom_trigger_tooltip = {
				tooltip = zth_pod_kontrolem_voina_trigger_tt
				check_variable = { zth_support_378_var < 5 }
			}
		}
		highlight_states = {
			state = 378
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_2
		fixed_random_seed = no
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_2_event id = sinka.25 }
			}	
			custom_effect_tooltip = zth_ataka_faktory_tt
			if = {
				limit = {
					has_country_flag = zth_378_sklad_nash_flag
				}
				custom_effect_tooltip = zth_u_nas_est_sklad
			}
			if = {
				limit = {
					has_country_flag = zth_378_barrikady_flag
				}
				custom_effect_tooltip = zth_u_nas_est_barrikady
			}
			if = {
				limit = {
					has_country_flag = zth_378_set_osvedomitelei_flag
				}
				custom_effect_tooltip = zth_u_nas_est_osvedomitelei
			}
		}
		remove_effect = {
			custom_effect_tooltip = zth_loka_pereidem_v_ataku_tt
			random_list = {
				50 = {
					modifier = {
						factor = zth_modifikator_udachi_var	# от 1 до 1.4
						has_war = no
					}
					modifier = {
						factor = 1.2
						has_country_flag = zth_378_sklad_nash_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_378_barrikady_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_378_set_osvedomitelei_flag
					}
					modifier = {
						factor = 1.05
						has_country_flag = zth_path_of_korporat_fasa_2_flag	# корпорации чуть легче
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_findai_podderjka_2_flag	# Мотивация революционных отрядов
					}
					country_event = { id = sinka.27 }
				}
				50 = {
					country_event = { id = sinka.28 }
				}
			}
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
#				country_event = { id = sinka.26 }
#				country_event = { days = 2 id = sinka.49 }	# ход противника
			}			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}						
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_protivist_ataka_v_386 = {
		icon = GFX_decision_generic_prepare_civil_war
		available = {
			controls_state = 386
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
				}
			}
			custom_trigger_tooltip = {
				tooltip = zth_pod_kontrolem_voina_trigger_tt
				check_variable = { zth_support_386_var < 5 }
			}
		}
		highlight_states = {
			state = 386
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_2
		fixed_random_seed = no
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_2_event id = sinka.25 }
			}	
			custom_effect_tooltip = zth_ataka_faktory_tt
			if = {
				limit = {
					has_country_flag = zth_386_sklad_nash_flag
				}
				custom_effect_tooltip = zth_u_nas_est_sklad
			}
			if = {
				limit = {
					has_country_flag = zth_386_barrikady_flag
				}
				custom_effect_tooltip = zth_u_nas_est_barrikady
			}
			if = {
				limit = {
					has_country_flag = zth_386_set_osvedomitelei_flag
				}
				custom_effect_tooltip = zth_u_nas_est_osvedomitelei
			}
		}
		remove_effect = {
			custom_effect_tooltip = zth_loka_pereidem_v_ataku_tt
			random_list = {
				50 = {
					modifier = {
						factor = zth_modifikator_udachi_var	# от 1 до 1.4
						has_war = no
					}
					modifier = {
						factor = 1.2
						has_country_flag = zth_386_sklad_nash_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_386_barrikady_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_386_set_osvedomitelei_flag
					}
					modifier = {
						factor = 1.05
						has_country_flag = zth_path_of_korporat_fasa_2_flag	# корпорации чуть легче
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_findai_podderjka_2_flag	# Мотивация революционных отрядов
					}
					country_event = { id = sinka.30 }
				}
				50 = {
					country_event = { id = sinka.31 }
				}
			}
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
#				country_event = { id = sinka.29 }
#				country_event = { days = 2 id = sinka.49 }	# ход противника
			}			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}						
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_protivist_ataka_v_1155 = {
		icon = GFX_decision_generic_prepare_civil_war
		available = {
			controls_state = 1155
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
				}
			}
			custom_trigger_tooltip = {
				tooltip = zth_pod_kontrolem_voina_trigger_tt
				check_variable = { zth_support_1155_var < 5 }
			}
		}
		highlight_states = {
			state = 1155
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_2
		fixed_random_seed = no
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_2_event id = sinka.25 }
			}
			custom_effect_tooltip = zth_ataka_faktory_tt
			if = {
				limit = {
					has_country_flag = zth_1155_sklad_nash_flag
				}
				custom_effect_tooltip = zth_u_nas_est_sklad
			}
			if = {
				limit = {
					has_country_flag = zth_1155_barrikady_flag
				}
				custom_effect_tooltip = zth_u_nas_est_barrikady
			}
			if = {
				limit = {
					has_country_flag = zth_1155_set_osvedomitelei_flag
				}
				custom_effect_tooltip = zth_u_nas_est_osvedomitelei
			}			
		}
		remove_effect = {
			custom_effect_tooltip = zth_loka_pereidem_v_ataku_tt
			random_list = {
				50 = {
					modifier = {
						factor = zth_modifikator_udachi_var	# от 1 до 1.4
						has_war = no
					}
					modifier = {
						factor = 1.2
						has_country_flag = zth_1155_sklad_nash_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_1155_barrikady_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_1155_set_osvedomitelei_flag
					}
					modifier = {
						factor = 1.05
						has_country_flag = zth_path_of_korporat_fasa_2_flag	# корпорации чуть легче
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_findai_podderjka_2_flag	# Мотивация революционных отрядов
					}
					country_event = { id = sinka.33 }
				}
				50 = {
					country_event = { id = sinka.34 }
				}
			}
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
#				country_event = { id = sinka.32 }
#				country_event = { days = 2 id = sinka.49 }	# ход противника
			}			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}						
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_protivist_ataka_v_1149 = {
		icon = GFX_decision_generic_prepare_civil_war
		available = {
			controls_state = 1149
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
				}
			}
			custom_trigger_tooltip = {
				tooltip = zth_pod_kontrolem_voina_trigger_tt
				check_variable = { zth_support_1149_var < 5 }
			}
		}
		highlight_states = {
			state = 1149
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_2
		fixed_random_seed = no
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_2_event id = sinka.25 }
			}	
			custom_effect_tooltip = zth_ataka_faktory_tt
			if = {
				limit = {
					has_country_flag = zth_1149_sklad_nash_flag
				}
				custom_effect_tooltip = zth_u_nas_est_sklad
			}
			if = {
				limit = {
					has_country_flag = zth_1149_barrikady_flag
				}
				custom_effect_tooltip = zth_u_nas_est_barrikady
			}
			if = {
				limit = {
					has_country_flag = zth_1149_set_osvedomitelei_flag
				}
				custom_effect_tooltip = zth_u_nas_est_osvedomitelei
			}
		}
		remove_effect = {
			custom_effect_tooltip = zth_loka_pereidem_v_ataku_tt
			random_list = {
				50 = {
					modifier = {
						factor = zth_modifikator_udachi_var	# от 1 до 1.4
						has_war = no
					}
					modifier = {
						factor = 1.2
						has_country_flag = zth_1149_sklad_nash_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_1149_barrikady_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_1149_set_osvedomitelei_flag
					}
					modifier = {
						factor = 1.05
						has_country_flag = zth_path_of_korporat_fasa_2_flag	# корпорации чуть легче
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_findai_podderjka_2_flag	# Мотивация революционных отрядов
					}
					country_event = { id = sinka.36 }
				}
				50 = {
					country_event = { id = sinka.37 }
				}
			}
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
#				country_event = { id = sinka.35 }
#				country_event = { days = 2 id = sinka.49 }	# ход противника
			}			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}						
		}
		ai_will_do = {
			factor = 5					
		}
	}
	zth_protivist_ataka_v_1148 = {
		icon = GFX_decision_generic_prepare_civil_war
		available = {
			controls_state = 1148
			custom_trigger_tooltip = {
				tooltip = zth_borba_za_vlast_1_odno_reshenie
				NOT = {
					has_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
				}
			}
			custom_trigger_tooltip = {
				tooltip = zth_pod_kontrolem_voina_trigger_tt
				check_variable = { zth_support_1148_var < 5 }
			}
		}
		highlight_states = {
			state = 1148
		}
		cancel_if_not_visible = yes
		cost = 1		
		days_remove = @zth_dlitelnost_reshenii_v_faze_2
		fixed_random_seed = no
		complete_effect = {
			hidden_effect = {
				set_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
				country_event = { days = @zth_dlitelnost_reshenii_v_faze_2_event id = sinka.25 }
			}
			custom_effect_tooltip = zth_ataka_faktory_tt
			if = {
				limit = {
					has_country_flag = zth_1148_sklad_nash_flag
				}
				custom_effect_tooltip = zth_u_nas_est_sklad
			}
			if = {
				limit = {
					has_country_flag = zth_1148_barrikady_flag
				}
				custom_effect_tooltip = zth_u_nas_est_barrikady
			}
			if = {
				limit = {
					has_country_flag = zth_1148_set_osvedomitelei_flag
				}
				custom_effect_tooltip = zth_u_nas_est_osvedomitelei
			}
		}
		remove_effect = {
			custom_effect_tooltip = zth_loka_pereidem_v_ataku_tt
			random_list = {
				50 = {
					modifier = {
						factor = zth_modifikator_udachi_var	# от 1 до 1.4
						has_war = no
					}
					modifier = {
						factor = 1.2
						has_country_flag = zth_1148_sklad_nash_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_1148_barrikady_flag
					}
					modifier = {
						factor = 1.1
						has_country_flag = zth_1148_set_osvedomitelei_flag
					}
					modifier = {
						factor = 1.05
						has_country_flag = zth_path_of_korporat_fasa_2_flag	# корпорации чуть легче
					}	
					modifier = {
						factor = 1.1
						has_country_flag = zth_findai_podderjka_2_flag	# Мотивация революционных отрядов
					}	
					country_event = { id = sinka.39 }
				}
				50 = {
					country_event = { id = sinka.40 }
				}
			}
			hidden_effect = {
				clr_country_flag = zth_borba_za_vlast_2_odno_reshenie_flag
#				country_event = { id = sinka.38 }
#				country_event = { days = 2 id = sinka.49 }	# ход противника
			}			
			effect_tooltip = {
				country_event = { id = sinka.4 }	# пустышка
			}						
		}
		ai_will_do = {
			factor = 5					
		}
	}	
	
}


ZTH_pokupka_zemel_ejen_cat = {	# 	ZHE = { is_subject_of = ROOT	} ; has_completed_focus = zth_vikupit_zemli_dlya_strany	
	zth_kupit_zemli_u_ejen = {	
		icon = generic_operation		
		available = {
						
		}
		state_target = yes
		target_array = ZHE.core_states
		target_trigger = {
			FROM = {
				NOT = {
#					is_core_of = ZTH
					is_controlled_by = ZTH
				}
				any_neighbor_state = {
					is_core_of = ZTH 
				}
			}
		}
		visible = {				
			
		}
		fire_only_once = yes		
		cost = 35
		complete_effect = {					
#			set_state_owner = FROM	#Владелец?
#			set_state_controller = FROM	#контроллёр
			transfer_state = FROM
		}		
		ai_will_do = {
			factor = 98
		}
	}

}

ZTH_vydachs_pasportov_cat = {	# 	has_completed_focus = zth_vydacha_gos_paspartov	
	zth_pasporta_na_zemlyah = {	
		icon = generic_operation		
		available = {
			political_power_daily > 0.2				
		}
		state_target = yes
		target_array = controlled_states
		target_trigger = {
			FROM = {
				is_core_of = ZHE
				NOT = {
					is_core_of = ZTH
				}				
			}
		}
		visible = {				
			
		}
		days_remove = 100
		fire_only_once = no		
		cost = 50
		modifier = {
			political_power_gain = -0.2
		}
		remove_effect = {					
			add_state_core = FROM
			ZHE = {
				remove_state_core = FROM
			}
#			FROM = {				# Вариант 2
#				add_core_of = ZTH
#			}
		}		
		ai_will_do = {
			factor = 98
		}
	}
	
	zth_annexia_zth_decl = {
		icon = GFX_decision_eng_trade_unions_support
		available = {
			has_completed_focus = zth_zth_edinstvo		
			ZHE = {
				is_subject_of = ROOT
			}
			ZHE = {
				custom_trigger_tooltip = {
					tooltip = zth_annexia_zth_decl_trigg				
					num_of_controlled_states < 4
				}
			}
		}
		visible = {
			
		}
		cancel_if_not_visible = yes
		cost = 25		
		complete_effect = {
			country_event = { id = sinka.69 }
		}		
		ai_will_do = {
			factor = 98
		}
	}

}

ZTH_corp_vliyanie_na_sosedei_cat = {
	zth_vybrat_tsel_korporatii = {	#	выбрать себе цель
		icon = generic_operation
		targets = {
			ZNU ZCI ZHE ZAP ZJF ZIN XVP ZPC ZNV ZHK ZIS ZUT ZPK ZSA
		}	
		target_trigger = {
			FROM = {
				exists = yes
				is_subject = no
				has_war = no
				NOT = {
					has_government = communism					
				}
			}
		} 
		available = {			
			FROM = {
				exists = yes
				is_subject = no
				has_war = no
				NOT = {
					has_government = communism					
				}
			}
			FROM = {
				ic_ratio = {
					tag = ROOT
					ratio < 0.5
				}
			}
		}	
		visible = {	
			NOT = {
				has_country_flag = zth_korp_target_selected_flag
			}
#			FROM = {
#				exists = yes
#				is_subject = no				
#			}			
		}
		fire_only_once = no
		days_re_enable = 2
#		cost = 1		
		ai_will_do = {
			factor = 50
			modifier = {
				factor = 0.1
				FROM = {
					has_stability > 0.77		
				}
			}
		}
		complete_effect = {	
			custom_effect_tooltip = zth_korp_target_selected_tt    
			set_country_flag = zth_korp_target_selected_flag
			FROM = {
				set_country_flag = zth_target_of_korporat_flag
				hidden_effect = {
					country_event = { id = sinka.146 days = 2 random = 10 }	# эвент - страшилка
					every_other_country = {
						clr_country_flag = zth_target_of_korporat_flag	
					}
				}				
			}			
		}
	}
	zth_uchredit_tam_korporatsiu = {	#	учредить корпорацию
		icon = GFX_decision_aluminium
		targets = {
			ZNU ZCI ZHE ZAP ZJF ZIN XVP ZPC ZNV ZHK ZIS ZUT ZPK ZSA
		}	
		target_trigger = {
			FROM = {
				exists = yes
				is_subject_of = ZTH
			}
		} 
		available = {			
			FROM = {
				exists = yes
				is_subject_of = ZTH
			}			
		}	
		visible = {				
			FROM = {
				is_subject_of = ZTH	
				NOT = {
					OR = {
						has_cosmetic_tag = ZNU_KORP
						has_cosmetic_tag = ZCI_KORP	
						has_cosmetic_tag = ZHE_KORP		
						has_cosmetic_tag = ZAP_KORP	
						has_cosmetic_tag = ZJF_KORP
						has_cosmetic_tag = ZIN_KORP	
						has_cosmetic_tag = XVP_KORP	
						has_cosmetic_tag = ZPC_KORP
						has_cosmetic_tag = ZNV_KORP	
						has_cosmetic_tag = ZHK_KORP	
						has_cosmetic_tag = ZIS_KORP
						has_cosmetic_tag = ZUT_KORP	
						has_cosmetic_tag = ZPK_KORP
						has_cosmetic_tag = ZSA_KORP
					}
				}
			}			
		}
		fire_only_once = no
		days_re_enable = 2
		cost = 5		
		ai_will_do = {
			factor = 100			
		}
		complete_effect = {			
			FROM = {
				custom_effect_tooltip = zth_uchredit_tam_korporatsiu_tt 
				zth_smena_tega_marionetke_effect = yes					
			}			
		}
	}
	###############
	zth_zakluchit_torgovy_dogovor = {	#	заключить договор с ФРОМ
		icon = GFX_decision_eng_trade_unions_support
		targets = {
			ZNU ZCI ZHE ZAP ZJF ZIN XVP ZPC ZNV ZHK ZIS ZUT ZPK ZSA
		}	
#		target_trigger = {
#			FROM = {
#				has_country_flag = zth_target_of_korporat_flag				
#			}
#		} 
		available = {			
			FROM = {
				exists = yes
				is_subject = no
				has_war = no
				NOT = {
					has_government = communism					
				}
				has_stability < 0.8				
			}
			FROM = {
				ic_ratio = {
					tag = ROOT
					ratio < 0.5
				}
			}
		}	
		visible = {				
			has_country_flag = zth_korp_target_selected_flag	
			FROM = {
				has_country_flag = zth_target_of_korporat_flag	
				NOT = {
					has_idea = zth_sotrudnichestvo_s_korporatami
				}				
			}
		}
		fire_only_once = no
		days_re_enable = 50
		cost = 20		
		ai_will_do = {
			factor = 100			
		}
		complete_effect = {	
			custom_effect_tooltip = povtoryaemoe_reshenie_50	
			custom_effect_tooltip = zth_zakluchit_torgovy_dogovor_tt				
			FROM = {
				country_event = { id = sinka.147 }
				effect_tooltip = {	
					add_ideas = zth_sotrudnichestvo_s_korporatami
				}	
				custom_effect_tooltip = needs_approval
			}
			custom_effect_tooltip = zth_zakluchit_torgovy_dogovor_2_tt			
		}
	}
	
	zth_corp_nachinaem_investirovat = {		# Начинаем инвестировать в страна_нейм
		icon = GFX_decision_ger_mefo_bills
		targets = {
			ZNU ZCI ZHE ZAP ZJF ZIN XVP ZPC ZNV ZHK ZIS ZUT ZPK ZSA
		}	
#		target_trigger = {
#			FROM = {
#				has_country_flag = zth_target_of_korporat_flag				
#			}
#		} 
		available = {
			political_power_daily > 0.2
			FROM = {
				has_idea = zth_sotrudnichestvo_s_korporatami
				exists = yes
				is_subject = no
				has_war = no
				NOT = {
					has_government = communism					
				}
				has_stability < 0.8				
			}
			FROM = {
				ic_ratio = {
					tag = ROOT
					ratio < 0.5
				}
			}
		}	
		visible = {				
			has_country_flag = zth_korp_target_selected_flag	
			FROM = {
				has_country_flag = zth_target_of_korporat_flag								
			}
		}
		fire_only_once = no
		days_re_enable = 30
		days_remove = 28
		cost = 20		
		modifier = {
			political_power_gain = -0.2
		}
		remove_effect = {	
			custom_effect_tooltip = povtoryaemoe_reshenie_30	
			custom_effect_tooltip = zth_corp_nachinaem_investirovat_tt				
			FROM = {
				random_list = {					
					30 = {
						custom_effect_tooltip = zth_dolya_v_ekonomike_plus_2_tt
						add_to_variable = { zth_dolya_v_ekonomike_var = 2 }
						clamp_variable = {
							var = zth_dolya_v_ekonomike_var
							min = 0
							max = 100
						}
						hidden_effect = {
							country_event = { id = sinka.151 }
						}
					}
					40 = {
						modifier = {
							factor = 1.1
							has_completed_focus = zth_korpor_otdel_analitiki
						}
						custom_effect_tooltip = zth_dolya_v_ekonomike_plus_4_tt
						add_to_variable = { zth_dolya_v_ekonomike_var = 4 }
						clamp_variable = {
							var = zth_dolya_v_ekonomike_var
							min = 0
							max = 100
						}
						hidden_effect = {
							country_event = { id = sinka.151 }
						}
					}
					20 = {
						modifier = {
							factor = 1.4
							has_completed_focus = zth_korpor_otdel_analitiki
						}
						custom_effect_tooltip = zth_dolya_v_ekonomike_plus_7_tt
						add_to_variable = { zth_dolya_v_ekonomike_var = 7 }
						clamp_variable = {
							var = zth_dolya_v_ekonomike_var
							min = 0
							max = 100
						}
						hidden_effect = {
							country_event = { id = sinka.151 }
						}
					}
					10 = {
						custom_effect_tooltip = zth_dolya_v_ekonomike_nichego_tt						
					}
				}				
				zth_probros_modifikatorov_ot_korporatii = yes
				effect_tooltip = {
					country_event = { id = sinka.151 }
				}				
			}						
		}
		ai_will_do = {
			factor = 100			
		}
	}
	
	zth_corp_ukreplyaem_monopolii = {		# формировании монополии
		icon = GFX_decision_eng_trade_unions_demand
		targets = {
			ZNU ZCI ZHE ZAP ZJF ZIN XVP ZPC ZNV ZHK ZIS ZUT ZPK ZSA
		}	
#		target_trigger = {
#			FROM = {
#				has_country_flag = zth_target_of_korporat_flag				
#			}
#		} 
		available = {
			political_power_daily > 0.4
			FROM = {
				has_idea = zth_sotrudnichestvo_s_korporatami
				exists = yes
				is_subject = no
				has_war = no
				NOT = {
					has_government = communism					
				}
				has_stability < 0.8				
			}
			FROM = {
				custom_trigger_tooltip = {
					tooltip = zth_dolya_v_ekonomike_bolshe_25_trigg				
					check_variable = { zth_dolya_v_ekonomike_var > 25 }
				}
			}
			FROM = {
				ic_ratio = {
					tag = ROOT
					ratio < 0.5
				}
			}
		}	
		visible = {				
			has_country_flag = zth_korp_target_selected_flag	
			FROM = {
				has_country_flag = zth_target_of_korporat_flag								
			}
		}
		fire_only_once = no
		days_re_enable = 80
		days_remove = 30
		cost = 20		
		modifier = {
			political_power_gain = -0.4
		}
		remove_effect = {	
			custom_effect_tooltip = povtoryaemoe_reshenie_80	
			custom_effect_tooltip = zth_corp_nachinaem_investirovat_tt				
			FROM = {
				random_list = {					
					30 = {
						custom_effect_tooltip = zth_dolya_v_ekonomike_plus_6_tt
						add_to_variable = { zth_dolya_v_ekonomike_var = 6 }
						clamp_variable = {
							var = zth_dolya_v_ekonomike_var
							min = 0
							max = 100
						}
						hidden_effect = {
							country_event = { id = sinka.155 }
						}
					}
					40 = {
						modifier = {
							factor = 1.1
							has_completed_focus = zth_korpor_otdel_analitiki
						}
						custom_effect_tooltip = zth_dolya_v_ekonomike_plus_8_tt
						add_to_variable = { zth_dolya_v_ekonomike_var = 8 }
						clamp_variable = {
							var = zth_dolya_v_ekonomike_var
							min = 0
							max = 100
						}
						hidden_effect = {
							country_event = { id = sinka.155 }
						}
					}
					20 = {
						modifier = {
							factor = 1.4
							has_completed_focus = zth_korpor_otdel_analitiki
						}
						custom_effect_tooltip = zth_dolya_v_ekonomike_plus_11_tt
						add_to_variable = { zth_dolya_v_ekonomike_var = 11 }
						clamp_variable = {
							var = zth_dolya_v_ekonomike_var
							min = 0
							max = 100
						}
						hidden_effect = {
							country_event = { id = sinka.155 }
						}
					}
					10 = {
						custom_effect_tooltip = zth_dolya_v_ekonomike_nichego_tt						
					}
				}				
				zth_probros_modifikatorov_ot_korporatii = yes
				effect_tooltip = {
					country_event = { id = sinka.155 }
				}				
			}						
		}
		ai_will_do = {
			factor = 100			
		}
	}
	
	zth_dogovor_stroiki_dorogi = {	#	построить дороги
		icon = GFX_decision_rubber
		targets = {
			ZNU ZCI ZHE ZAP ZJF ZIN XVP ZPC ZNV ZHK ZIS ZUT ZPK ZSA
		}	
#		target_trigger = {
#			FROM = {
#				has_country_flag = zth_target_of_korporat_flag				
#			}
#		} 
		available = {			
			FROM = {
				has_idea = zth_sotrudnichestvo_s_korporatami
				exists = yes
				is_subject = no
				has_war = no
				NOT = {
					has_government = communism					
				}
				has_stability < 0.8				
			}
			FROM = {
				all_owned_state = {
					free_building_slots = {
						building = infrastructure
						size > 0
					}
				}
			}
			FROM = {
				ic_ratio = {
					tag = ROOT
					ratio < 0.5
				}
			}
		}	
		visible = {				
			has_country_flag = zth_korp_target_selected_flag	
			FROM = {
				has_country_flag = zth_target_of_korporat_flag								
			}
		}
		fire_only_once = no
		days_re_enable = 150
		cost = 40		
		ai_will_do = {
			factor = 100			
		}
		complete_effect = {	
			custom_effect_tooltip = povtoryaemoe_reshenie_150	
			custom_effect_tooltip = zth_dogovor_stroiki_dorogi_tt				
			FROM = {
				country_event = { id = sinka.152 }	
				effect_tooltip = {
					random_owned_controlled_state = {
						limit = {
							free_building_slots = {
								building = infrastructure
								size > 0
							}						
							is_in_home_area = yes						
						}
						add_building_construction = {
							type = infrastructure
							level = 1
							instant_build = yes
						}
					}
				}	
				custom_effect_tooltip = needs_approval
				custom_effect_tooltip = zth_dogovor_stroiki_dorogi_2_tt
			}					
		}
	}
	
	zth_corp_perevorot_v_tselevoi_strane = {		# переворот собсна
		icon = GFX_decision_generic_nationalism
		targets = {
			ZNU ZCI ZHE ZAP ZJF ZIN XVP ZPC ZNV ZHK ZIS ZUT ZPK ZSA
		}	
#		target_trigger = {
#			FROM = {
#				has_country_flag = zth_target_of_korporat_flag				
#			}
#		} 
		available = {
			political_power_daily > 0.4
			FROM = {
				has_idea = zth_sotrudnichestvo_s_korporatami
				exists = yes
				is_subject = no
				has_war = no
				NOT = {
					has_government = communism					
				}
				has_stability < 0.8				
			}
			FROM = {
				custom_trigger_tooltip = {
					tooltip = zth_dolya_v_ekonomike_bolshe_75_trigg				
					check_variable = { zth_dolya_v_ekonomike_var > 75 }
				}
			}
		}	
		visible = {				
			has_country_flag = zth_korp_target_selected_flag	
			FROM = {
				has_country_flag = zth_target_of_korporat_flag								
			}
		}
		fire_only_once = no
		days_re_enable = 80
		days_remove = 25
		cost = 20		
		modifier = {
			political_power_gain = -0.4
		}
		complete_effect = {
			hidden_effect = {
				FROM = {
					country_event = { id = sinka.169 }
				}
			}
		}
		remove_effect = {	
			custom_effect_tooltip = povtoryaemoe_reshenie_80	
			custom_effect_tooltip = zth_corp_perevorot_v_tselevoi_strane_tt				
			FROM = {
				random_list = {
					20 = {	# абсолютная победа
						modifier = {
							factor = 1.1
							has_completed_focus = zth_korpor_novye_polnomochiya_otdela_ohrany
						}
						modifier = {
							factor = 1.1
							has_completed_focus = zth_korpor_otdel_analitiki
						}
						modifier = {
							factor = 1.1
							check_variable = { zth_dolya_v_ekonomike_var > 80 }
						}
						modifier = {
							factor = 1.1
							check_variable = { zth_dolya_v_ekonomike_var > 85 }
						}
						modifier = {
							factor = 1.1
							check_variable = { zth_dolya_v_ekonomike_var > 90 }
						}
						modifier = {
							factor = 1.1
							has_opinion = {
								target = ZTH
								value > 30
							}
						}
						modifier = {
							factor = 1.1
							has_opinion = {
								target = ZTH
								value > 50
							}
						}
						country_event = { id = sinka.156 }
					}
					25 = {	# револ 
						modifier = {
							factor = 1.1
							has_completed_focus = zth_korpor_novye_polnomochiya_otdela_ohrany
						}
						modifier = {
							factor = 1.1
							has_completed_focus = zth_korpor_otdel_analitiki
						}
						modifier = {
							factor = 1.1
							check_variable = { zth_dolya_v_ekonomike_var > 80 }
						}
						modifier = {
							factor = 1.1
							check_variable = { zth_dolya_v_ekonomike_var > 85 }
						}
						modifier = {
							factor = 1.1
							check_variable = { zth_dolya_v_ekonomike_var > 90 }
						}
						modifier = {
							factor = 1.1
							has_opinion = {
								target = ZTH
								value > 30
							}
						}
						modifier = {
							factor = 1.1
							has_opinion = {
								target = ZTH
								value > 50
							}
						}
						country_event = { id = sinka.161 }
					}					
					25 = {	# полный провал
						modifier = {
							factor = 1.3
							has_opinion = {
								target = ZTH
								value < 0
							}
						}
						country_event = { id = sinka.158 }
					}
				}	
			}						
		}
		ai_will_do = {
			factor = 100			
		}
	}
	
	##################################################
	zth_smenit_target_corp = {	#	сменить цель
		icon = generic_break_treaty
		targets = {
			ZNU ZCI ZHE ZAP ZJF ZIN XVP ZPC ZNV ZHK ZIS ZUT ZPK ZSA
		}	
#		target_trigger = {
#			FROM = {
#				has_country_flag = zvz_our_target_flag				
#			}
#		} 		
		available = {			
			
		}	
		visible = {			
			has_country_flag = zth_korp_target_selected_flag
			FROM = {
				has_country_flag = zth_target_of_korporat_flag				
			}
		}
		fire_only_once = no
		days_re_enable = 1
#		cost = 1		
		ai_will_do = {
			factor = 0
			modifier = {
				add = 200
				any_other_country = {
					has_country_flag = zth_target_of_korporat_flag	
					OR = {
						is_subject = yes
						exists = no
						has_war = yes
						has_government = communism
						has_stability > 0.79
					}
				}
			}			
		}
		complete_effect = {	
			custom_effect_tooltip = zth_smenit_target_corp_tt
			clr_country_flag = zth_korp_target_selected_flag
			hidden_effect = {
				every_other_country = {
					clr_country_flag = zth_target_of_korporat_flag	
				}
			}
		}
	}

}


ZTH_corp_sosedi_cat = {	## это решения соседей корпорации
	zth_sosedu_skinut_dogovor = {	#	расторгнуть договор
		icon = generic_nationalism		 
		available = {			
			has_idea = zth_sotrudnichestvo_s_korporatami
		}	
		visible = {				
			
		}
		fire_only_once = no
		days_re_enable = 80
		cost = mtth:zth_sosedu_stoimost_otkaza_ot_dogovora_cost	
		ai_will_do = {
			factor = 0			
		}
		complete_effect = {	
#			custom_effect_tooltip = povtoryaemoe_reshenie_100	
			custom_effect_tooltip = zth_sosedu_skinut_dogovor_tt
			add_timed_idea = {
				idea = zth_posledstviya_rastorjeniya_dogovora
				days = mtth:zth_sosedu_dlitelnost_debaffa_pri_rastorjenii_dogovora				### сделать динамически
			}			
			remove_ideas = zth_sotrudnichestvo_s_korporatami						
			hidden_effect = {
				remove_dynamic_modifier = { modifier = zth_sotrudnichestvo_s_korp_dynamic_modifier } 
				set_variable = { zth_dolya_v_ekonomike_var = 0 }	# переменная доли экономики у корпорации синька
				zth_probros_modifikatorov_ot_korporatii = yes
			}
			ZTH = {
				country_event = { id = sinka.150 }
			}			
		}
	}
	
	zth_sosedu_sbit_vliyanie = {	#	сбить влияние
		icon = GFX_decision_generic_civil_support		 
		available = {			
			has_idea = zth_sotrudnichestvo_s_korporatami
			custom_trigger_tooltip = {
				tooltip = zth_dolya_v_ekonomike_bolshe_10_trigg				
				check_variable = { zth_dolya_v_ekonomike_var > 10 }
			}
		}	
		visible = {				
			
		}
		fire_only_once = no
		days_re_enable = 50
		cost = 10	
		ai_will_do = {
			factor = 10			
		}
		complete_effect = {	
			custom_effect_tooltip = povtoryaemoe_reshenie_50
			custom_effect_tooltip = zth_sosedu_sbit_vliyanie_tt
			if = {
				limit = {					
					ic_ratio = {
						tag = ZTH
						ratio > 0.5
					}					
				}
				custom_effect_tooltip = zth_sosedu_sbit_vliyanie_tt_2 
			}
			random_list = {	
				25 = {
					modifier = {
						factor = 1.2
						ZTH = {
							has_completed_focus = zth_korpor_novye_polnomochiya_otdela_ohrany
						}	
					}
					modifier = {
						factor = 0.5
						ic_ratio = {
							tag = ZTH
							ratio > 0.5
						}	
					}
					custom_effect_tooltip = zth_dolya_v_ekonomike_ostalas_tt						
				}
				25 = {
					custom_effect_tooltip = zth_dolya_v_ekonomike_minus_3_tt
					add_to_variable = { zth_dolya_v_ekonomike_var = -3 }	
					clamp_variable = {
						var = zth_dolya_v_ekonomike_var
						min = 0
						max = 100
					}	
				}
				25 = {						
					custom_effect_tooltip = zth_dolya_v_ekonomike_minus_4_tt
					add_to_variable = { zth_dolya_v_ekonomike_var = -4 }
					clamp_variable = {
						var = zth_dolya_v_ekonomike_var
						min = 0
						max = 100
					}	
				}
				25 = {						
					custom_effect_tooltip = zth_dolya_v_ekonomike_minus_5_tt
					add_to_variable = { zth_dolya_v_ekonomike_var = -5 }
					clamp_variable = {
						var = zth_dolya_v_ekonomike_var
						min = 0
						max = 100
					}	
				}					
			}
		}
	}


}