ZRI_opasnost_perevorota_decis = {
	zri_podgotovka_k_civiwar = {
		icon = generic_civil_support
		available = {
			OR = {
				AND = {
					NOT = { has_idea = rim_stag }
					NOT = { has_idea = rim_zastoi }	
				}		
				country_exists = XPX				
			}	
		}
		days_mission_timeout = 140
		cancel_if_not_visible = yes
		activation = {
			check_variable = { zri_opasnost_var > 80 }
			has_idea = rim_stag
			has_idea = rim_zastoi
			NOT = {
				has_global_flag = grazdanochka_v_rime
			}
#			has_country_flag = zri_situatia_nakalaetsya
		}
		visible = {
			
		}
		fixed_random_seed = no
		fire_only_once = no	#	check_variable = { zri_opasnost_var > 80 }
		is_good = no
		timeout_effect = {
			country_event = {
				id = romanimp.30
			}
		}
#		ai_will_do = {
#			factor = 12
#		}
	}
	zri_snihenie_nakala_situatsii_1_dec = {
		icon = generic_political_discourse
		available = {			
			custom_trigger_tooltip = {
				tooltip = zri_opasnost_var_bolshe_n
				check_variable = { zri_opasnost_var > 0 }
			}		
			not = {
				has_decision = zri_snihenie_nakala_situatsii_2_dec
			}
			OR = {
				political_power_daily > 0.3
				has_political_power > 10
			}
		}
		cost = 0
		ai_will_do = {
			factor = 11
			modifier = {
				has_country_flag = ZRI_IMPERATORLOOSER_RUL_flag
				factor = 0
			}
			modifier = {
				check_variable = { zri_opasnost_var > 60 }
				factor = 18
			}
			modifier = {
				check_variable = { zri_opasnost_var > 30 }
				factor = 10
			}
			modifier = {
				check_variable = { zri_opasnost_var > 10 }
				factor = 1
			}			
		}
		modifier = {
			political_power_gain = -0.3
		}
		days_remove = 45
		remove_effect = {
			zri_opasnost_v_minus_1 = yes
		}
	}
	zri_snihenie_nakala_situatsii_2_dec = {
		icon = generic_political_discourse
		available = {
			custom_trigger_tooltip = {
				tooltip = zri_opasnost_var_bolshe_n
				check_variable = { zri_opasnost_var > 0 }
			}	
			has_stability > 0.7			
			not = {
				has_decision = zri_snihenie_nakala_situatsii_1_dec
			}
			OR = {
				political_power_daily > 0.75
				has_political_power > 35
			}
		}
		cost = 0
		ai_will_do = {
			factor = 8
			modifier = {
				has_country_flag = ZRI_IMPERATORLOOSER_RUL_flag
				factor = 0
			}
			modifier = {
				check_variable = { zri_opasnost_var > 60 }
				factor = 15
			}
			modifier = {
				check_variable = { zri_opasnost_var > 30 }
				factor = 10
			}
			modifier = {
				check_variable = { zri_opasnost_var > 10 }
				factor = 1
			}
		}
		days_remove = 60
		modifier = {
			political_power_gain = -0.75
		}
		remove_effect = {
			zri_opasnost_v_minus_2 = yes
		}
	}
	zri_dat_otsrochku = {
		icon = generic_prepare_civil_war		
		available = {
			
		}
		visible = {
			has_active_mission = zri_podgotovka_k_civiwar		
		}
		fire_only_once = no			
		days_re_enable = 100
		cost = 180		
		complete_effect = {
			add_days_mission_timeout  = {
				mission = zri_podgotovka_k_civiwar
				days = 50
			}
		}
		ai_will_do = {
			factor = 0
		}	
	}
}



ZRI_nation_decis = {	
	ZRI_ministr_istorii_pomogaet = {
		icon = generic_operation
		allowed = {
			original_tag = ZRI
		}
		available = {
			has_government = fascism
			has_war = no						
		}
		cost = 55
		fire_only_once = no
		days_re_enable = 100
		days_remove = 100
		visible = {						
			has_completed_focus = rim_reform_minist_istorii
		}
		modifier = {
			stability_weekly = 0.003			
		}
		complete_effect = {

		}
		ai_will_do = {
			base = 0
			modifier = {
				add = 10
				has_stability < 0.75
			}
		}		
	}
	ZRI_massovaya_agitatia = {
		icon = generic_operation
		allowed = {
			original_tag = ZRI
		}
		available = {
			has_government = fascism
			has_war = no						
		}
		cost = 100
		fire_only_once = no
		days_re_enable = 160
		visible = {
			num_subjects > 0			
			has_government = fascism
			has_war = no			
			has_completed_focus = zri_zakon_o_agitatii_v_provkah
		}
		complete_effect = {
			custom_effect_tooltip = ZRI_massovaya_agitatia_tt
			every_other_country = {
				limit = {										
					OR = {
						is_subject_of = ZRI
						is_puppet_of = ZRI
					}
				}
				country_event = {
					id = romanimp.38
				}
			}			
		}
		ai_will_do = {
			factor = 20			
		}
	}
	ZRI_trebovania_XMZ_decl = {
		icon = generic_operation
		allowed = {
			original_tag = ZRI
		}
		available = {			
			has_war = no
			XMZ = {
				is_subject_of = ZRI
				controls_state = 107
			}
			162 = {
				is_controlled_by = ZRI
				industrial_complex > 0
			}
		}
		cost = 20
		fire_only_once = yes		
		visible = {
			has_completed_focus = zri_konsultatsii_s_provinciyami
			XMZ = {
				is_subject_of = ZRI
			}
			NOT = {
				has_global_flag = grazdanochka_v_rime
			}
		}
		complete_effect = {
			country_event = {
				id = romanimp.31
			}	
			if = {
				limit = {
					has_government = fascism
					has_idea = rim_stag
					has_idea = rim_zastoi
				}
				custom_effect_tooltip = zri_vernoue_reshenie_provki
			}	
		}
		ai_will_do = {
			factor = 100			
		}
	}
	ZRI_trebovania_swi_decl = {
		icon = generic_operation
		allowed = {
			original_tag = ZRI
		}
		available = {			
			has_war = no
			ZWI = {
				is_subject_of = ZRI
				controls_state = 3
				controls_state = 151
			}
		}
		cost = 20
		fire_only_once = yes		
		visible = {
			has_completed_focus = zri_konsultatsii_s_provinciyami
			ZWI = {
				is_subject_of = ZRI
			}
			NOT = {
				has_global_flag = grazdanochka_v_rime
			}
		}
		complete_effect = {
			country_event = {
				id = romanimp.40
			}
			if = {
				limit = {
					has_government = fascism
					has_idea = rim_stag
					has_idea = rim_zastoi
				}
				custom_effect_tooltip = zri_vernoue_reshenie_provki
			}	
		}
		ai_will_do = {
			factor = 20			
		}
	}
	ZRI_trebovania_aus_decl = {
		icon = generic_operation
		allowed = {
			original_tag = ZRI			
		}
		available = {			
			has_war = no	
			XAU = {
				is_subject_of = ZRI
			}
		}
		cost = 20
		fire_only_once = yes		
		visible = {
			has_completed_focus = zri_konsultatsii_s_provinciyami
			XAU = {
				is_subject_of = ZRI
			}
			NOT = {
				has_global_flag = grazdanochka_v_rime
			}
		}
		complete_effect = {
			country_event = {
				id = romanimp.42
			}	
			if = {
				limit = {
					has_government = fascism
					has_idea = rim_stag
					has_idea = rim_zastoi
				}
				custom_effect_tooltip = zri_vernoue_reshenie_provki
			}	
		}
		ai_will_do = {
			factor = 100			
		}
	}
	ZRI_trebovania_zbe_decl = {
		icon = generic_operation
		allowed = {
			original_tag = ZRI			
		}
		available = {			
			has_war = no	
			ZBE = {
				is_subject_of = ZRI
			}
		}
		cost = 20
		fire_only_once = yes		
		visible = {
			has_completed_focus = zri_konsultatsii_s_provinciyami
			ZBE = {
				is_subject_of = ZRI
			}
			NOT = {
				has_global_flag = grazdanochka_v_rime
			}
		}
		complete_effect = {
			country_event = {
				id = romanimp.47
			}	
			if = {
				limit = {
					has_government = fascism
					has_idea = rim_stag
					has_idea = rim_zastoi
				}
				custom_effect_tooltip = zri_vernoue_reshenie_provki
			}	
		}
		ai_will_do = {
			factor = 100			
		}
	}
	ZRI_trebovania_zav_decl = {
		icon = generic_operation
		allowed = {
			original_tag = ZRI			
		}
		available = {			
			has_war = no	
			ZAV = {
				is_subject_of = ZRI
			}
		}
		cost = 20
		fire_only_once = yes		
		visible = {
			has_completed_focus = zri_konsultatsii_s_provinciyami
			ZAV = {
				is_subject_of = ZRI
			}
			NOT = {
				has_global_flag = grazdanochka_v_rime
			}
		}
		complete_effect = {
			country_event = {
				id = romanimp.49
			}	
			if = {
				limit = {
					has_government = fascism
					has_idea = rim_stag
					has_idea = rim_zastoi
				}
				custom_effect_tooltip = zri_vernoue_reshenie_provki
			}	
		}
		ai_will_do = {
			factor = 100			
		}
	}
	ZRI_trebovania_zau_decl = {
		icon = generic_operation
		allowed = {
			original_tag = ZRI			
		}
		available = {			
			has_war = no	
			ZAU = {
				is_subject_of = ZRI
			}
		}
		cost = 20
		fire_only_once = yes		
		visible = {
			has_completed_focus = zri_konsultatsii_s_provinciyami
			ZAU = {
				is_subject_of = ZRI
			}
			NOT = {
				has_global_flag = grazdanochka_v_rime
			}
		}
		complete_effect = {
			country_event = {
				id = romanimp.61
			}
			if = {
				limit = {
					has_government = fascism
					has_idea = rim_stag
					has_idea = rim_zastoi
				}
				custom_effect_tooltip = zri_vernoue_reshenie_provki
			}
		}
		ai_will_do = {
			factor = 50			
		}
	}
	ZRI_trebovania_zkt_decl = {
		icon = generic_operation
		allowed = {
			original_tag = ZRI			
		}
		available = {			
			has_war = no	
			ZKT = {
				is_subject_of = ZRI
			}
		}
		cost = 20
		fire_only_once = yes		
		visible = {
			has_completed_focus = zri_konsultatsii_s_provinciyami
			ZKT = {
				is_subject_of = ZRI
			}
			NOT = {
				has_global_flag = grazdanochka_v_rime
			}
		}
		complete_effect = {
			country_event = {
				id = romanimp.63
			}	
			if = {
				limit = {
					has_government = fascism
					has_idea = rim_stag
					has_idea = rim_zastoi
				}
				custom_effect_tooltip = zri_vernoue_reshenie_provki
			}
		}
		ai_will_do = {
			factor = 100			
		}
	}
}	
	
#ROME MARIONETKI
ZRI_podavlenie_decis = {
	zri_ultimatum_svoim_marionetkam = {
		icon = generic_decision
		available = {
			FROM = {
				is_subject_of = ROOT				
				is_neighbor_of = ROOT				
			}
			ROOT = {
				has_stability > 0.70
				has_war = no
			}
		}
		visible = {
			FROM = { exists = yes }	
			FROM = {				
				is_subject_of = ROOT				
				is_neighbor_of = ROOT
				NOT = { has_war_with = ROOT }
			}				
		}
		target_trigger = {
			FROM = {
				is_subject_of = ROOT				
				is_neighbor_of = ROOT				
			}
		}
		highlight_states = {
		}
		ai_will_do = {
			base = 40			
		}
		cost = 85
		fire_only_once = yes
		complete_effect = {
			custom_effect_tooltip = zri_ultimatum_svoim_marionetkam_podskazka	
			if = {
				limit = {
					num_of_controlled_states > 15
					num_of_controlled_states < 25
				}
				add_stability = -0.05
			}
			if = {
				limit = {
					num_of_controlled_states > 26
					num_of_controlled_states < 45
				}
				add_stability = -0.08
			}
			if = {
				limit = {
					num_of_controlled_states > 46
					num_of_controlled_states < 60
				}
				add_stability = -0.11
			}
			if = {
				limit = {
					num_of_controlled_states > 61
					num_of_controlled_states < 90
				}
				add_stability = -0.14
			}
			if = {
				limit = {
					num_of_controlled_states > 91					
				}
				add_stability = -0.17
			}
			FROM = {
				add_stability = -0.05
				country_event = {
					id = romanimp.72
				}
			}
			add_named_threat = { threat = 2 name = zri_ultimatum_svoim_marionetkam_threattt }
		}		
	}
}
ZRI_democrrat_decis = {
	ZRI_democrrat_senatus_vplus = {
		icon = generic_political_discourse
		available = {			
			check_variable = { zri_senatus_support < zri_senatus_total }				
			not = {
				has_decision = ZRI_democrrat_senatus_vplus_2
			}
			OR = {
				political_power_daily > 0.3
				has_political_power > 10
			}
		}
		cost = 0		
		ai_will_do = {
			factor = 10
			modifier = {
				senatus_low_support_trigger = yes
				factor = 20
			}
			modifier = {
				senatus_medium_support_trigger = yes
				factor = 10
			}
			modifier = {
				senatus_high_support_trigger = yes
				factor = 1
			}
		}
		modifier = {
			political_power_gain = -0.3
		}
		days_remove = 30
		remove_effect = {
			zri_senatus_small_support = yes
		}
	}
	ZRI_democrrat_senatus_vplus_2 = {
		icon = generic_political_discourse
		available = {			
			check_variable = { zri_senatus_support < zri_senatus_total }
			not = {
				has_decision = ZRI_democrrat_senatus_vplus
			}
			OR = {
				political_power_daily > 0.75
				has_political_power > 35
			}
		}
		cost = 0		
		ai_will_do = {
			factor = 10
			modifier = {
				senatus_medium_support_trigger = yes
				factor = 0.5
			}
			modifier = {
				senatus_low_support_trigger = yes
				factor = 0.5
			}
			modifier = {
				senatus_high_support_trigger = yes
				factor = senatus_high_support_trigger
			}
		}
		modifier = {
			political_power_gain = -0.7
		}
		days_remove = 45
		remove_effect = {
			zri_senatus_medium_support = yes
		}
	}
	##############
	mussolini_prezident_programm_1 = {
		icon = generic_industry
		available = {
			has_country_flag = benitich_prezident_1
		}
		visible = {
			has_country_flag = zri_political_programmy_kandidatov
		}
		fire_only_once = no
		modifier = {			
			production_factory_max_efficiency_factor = 0.05
			industrial_capacity_factory = 0.1
			production_speed_buildings_factor = 0.05
			political_power_factor = -0.25
		}
		days_remove = 150
		days_re_enable = 400
		cost = 100
		complete_effect = {
		}

		ai_will_do = {
			base = 1			
		}
	}
	luigi_prezident_programm_1 = {
		icon = generic_industry
		available = {
			has_country_flag = luigi_prezident_1
		}
		visible = {
			has_country_flag = zri_political_programmy_kandidatov
		}

		fire_only_once = no
		modifier = {
			stability_weekly = 0.003
			war_support_weekly = 0.004
			political_power_factor = 0.1
		}
		days_remove = 150
		days_re_enable = 400
		cost = 100
		complete_effect = {
		}
		ai_will_do = {
			base = 1			
		}
	}
	alcide_prezident_programm_1 = {
		icon = generic_industry
		available = {
			has_country_flag = alcide_prezident_1
		}
		visible = {
			has_country_flag = zri_political_programmy_kandidatov
			NOT = {
				has_country_flag = zri_alcide_vybyl_iz_gonki
			}
		}

		fire_only_once = no
		modifier = {
			MONTHLY_POPULATION = 0.25
			research_speed_factor = 0.09
			consumer_goods_factor = 0.05
		}
		days_remove = 150
		days_re_enable = 400
		cost = 100
		complete_effect = {
		}
		ai_will_do = {
			base = 1			
		}
	}
	ludvig_prezident_programm_1 = {
		icon = generic_industry
		available = {
			has_country_flag = ludvig_prezident_1
		}
		visible = {
			has_country_flag = ludvig_prezident_1			
		}

		fire_only_once = no
		modifier = {
			army_core_defence_factor = 0.12
			experience_gain_army = 0.07
			naval_coordination = 0.014
			experience_gain_navy = 0.07
		}
		days_remove = 150
		days_re_enable = 400
		cost = 100
		complete_effect = {
		}
		ai_will_do = {
			base = 1			
		}
	}
	###################
	zri_princeps_servus_programm_0 = {
		icon = generic_industry
		available = {
			has_government = democratic
			has_war = no
		}
		visible = {
			has_idea = zri_princeps_servus	
		}
		fire_only_once = no
		modifier = {
			production_speed_buildings_factor = 0.1
			political_power_factor = 0.2
		}
		remove_trigger = {
			has_war = yes
		}
		days_remove = 150
		days_re_enable = 320
		cost = 75
		complete_effect = {
		}
		ai_will_do = {
			base = 2			
		}
	}
	zri_princeps_servus_programm_1 = {
		icon = generic_industry
		available = {
			has_government = democratic
			has_war = yes
		}
		visible = {
			has_idea = zri_princeps_servus	
		}
		fire_only_once = no
		modifier = {
			industry_free_repair_factor = 1
			conversion_cost_civ_to_mil_factor = -0.25
		}
		remove_trigger = {
			has_war = no
		}
		days_remove = 150
		days_re_enable = 320
		cost = 75
		complete_effect = {
		}
		ai_will_do = {
			base = 2			
		}
	}
	#
	zri_princeps_domitsian_programm_0 = {
		icon = generic_industry
		available = {
			has_government = democratic
			has_war = no
		}
		visible = {
			has_idea = zri_princeps_domitsian	
		}
		fire_only_once = no
		modifier = {
			political_power_factor = 0.25
			democratic_drift = 0.03
			stability_weekly = 0.002
		}
		remove_trigger = {
			has_war = yes
		}
		days_remove = 150
		days_re_enable = 320
		cost = 75
		complete_effect = {
		}
		ai_will_do = {
			base = 2			
		}
	}
	zri_princeps_domitsian_programm_1 = {
		icon = generic_industry
		available = {
			has_government = democratic
			has_war = yes
		}
		visible = {
			has_idea = zri_princeps_domitsian	
		}
		fire_only_once = no
		modifier = {			
			resistance_growth_on_our_occupied_states = 0.1 
			resistance_damage_to_garrison_on_our_occupied_states = -0.15
		}
		remove_trigger = {
			has_war = no
		}
		days_remove = 150
		days_re_enable = 320
		cost = 75
		complete_effect = {
		}
		ai_will_do = {
			base = 2			
		}
	}
	#
	zri_princeps_julii_programm_0 = {
		icon = generic_industry
		available = {
			has_government = democratic
			has_war = no
		}
		visible = {
			has_idea = zri_princeps_julii	
		}
		fire_only_once = no
		modifier = {
			experience_gain_army = 0.07
			training_time_factor = -0.1
		}
		remove_trigger = {
			has_war = yes
		}
		days_remove = 150
		days_re_enable = 320
		cost = 75
		complete_effect = {
		}
		ai_will_do = {
			base = 2			
		}
	}	
	zri_princeps_julii_programm_1 = {
		icon = generic_industry
		available = {
			has_government = democratic
			has_war = yes
		}
		visible = {
			has_idea = zri_princeps_julii	
		}
		fire_only_once = no
		modifier = {
			land_reinforce_rate = 0.2
			supply_consumption_factor = -0.15
			war_support_weekly = 0.003
		}
		remove_trigger = {
			has_war = no
		}
		days_remove = 150
		days_re_enable = 320
		cost = 75
		complete_effect = {
		}
		ai_will_do = {
			base = 2			
		}
	}
	zri_princeps_mark_programm_0 = {
		icon = generic_industry
		available = {
			has_government = democratic
			has_war = no
		}
		visible = {
			has_idea = zri_princeps_mark	
		}
		fire_only_once = no	
		modifier = {		
			research_speed_factor = 0.05
		}	
		remove_trigger = {
			has_war = yes
		}
		days_remove = 150
		days_re_enable = 320
		cost = 75
		complete_effect = {
		}
		ai_will_do = {
			base = 2			
		}
	}
	zri_princeps_mark_programm_1 = {
		icon = generic_industry
		available = {
			has_government = democratic
			has_war = yes
		}
		visible = {
			has_idea = zri_princeps_mark	
		}
		fire_only_once = no		
		modifier = {
			conversion_cost_civ_to_mil_factor = -0.2
			production_speed_bunker_factor = 0.2
			production_speed_anti_air_building_factor = 0.2
			production_speed_coastal_bunker_factor = 0.2
		}		
		remove_trigger = {
			has_war = no
		}
		days_remove = 150
		days_re_enable = 320
		cost = 75
		complete_effect = {
		}
		ai_will_do = {
			base = 2			
		}
	}

}


# ZRI_spasti_papu = {	#has_war_with = ZVZ controls_state = 2 
	# zri_papa_shelter_zba = {
		# icon = generic_operation
		# available = {
			# has_war_with = ZVZ
			# controls_state = 2 			
			# ZBA = {
				# exists = yes
				# has_war = no
			# }
		# }
		# visible = {
			# ZBA = {
				# has_government = fascism
			# }
		# }
		# fire_only_once = yes		
		# cost = 5
		# complete_effect = {
			# custom_effect_tooltip = zri_papa_shelter_bonus
			# ZBA = {
				# country_event = { id = romanimp.94 }
			# }
		# }
		# ai_will_do = {
			# factor = 1
			# modifier = {
				# factor = 200 # oh shit they are getting close!
				# OR = {
					# surrender_progress > 0.75
					# NOT = { controls_state = 162 }
					# NOT = { controls_state = 157 }
					# NOT = { controls_state = 117 }
				# }	
			# }	
		# }
	# }
	# zri_papa_shelter_znr = {
		# icon = generic_operation
		# targets = {
			# ZNR ZBR
		# }
		# available = {
			# has_war_with = ZVZ
			# controls_state = 2 			
			# FROM = {
				# exists = yes
				# has_war = no
				# has_opinion = {
					# target = ZRI
					# value > 15
				# }
			# }
			# has_opinion = {
				# target = FROM
				# value > 15
			# }
		# }
		# visible = {
			# FROM = {
				# NOT = {
					# has_government = communism
				# }	
			# }
		# }
		# fire_only_once = no
		# days_re_enable = 3	
		# cost = 5
		# complete_effect = {
			# custom_effect_tooltip = zri_papa_shelter_bonus
			# FROM = {
				# country_event = { id = romanimp.100 }
			# }
		# }
		# ai_will_do = {
			# factor = 1
			# modifier = {
				# factor = 200 # oh shit they are getting close!
				# OR = {
					# surrender_progress > 0.75
					# NOT = { controls_state = 162 }
					# NOT = { controls_state = 157 }
					# NOT = { controls_state = 117 }
				# }	
			# }	
		# }
	# }
	
	

# }

# ZRI_vernyt_papy = {
	# zri_zatrebovat_vozvrashenie_papy = {
		# icon = generic_operation
		# targets = {			#	добавить тэг лист
			# ZBA ZNR ZBR
		# }
		# target_trigger = {
			# has_country_flag = papa_rimskii_tut_flag
			# exists = yes
			# NOT = {
				# has_war_with = ZRI
			# }
		# }
		# visible = {
			
		# }
		# fire_only_once = no		
		# cost = 5
		# complete_effect = {
			# FROM = {
				# country_event = { id = romanimp.97 }
			# }
		# }
		# ai_will_do = {
			# factor = 50
			# modifier = {
				# factor = 100
				# has_stability > 0.5
			# }	
		# }
	# }
# }