@zkr_prodoljitelnost_resheni = 200	#длительность решений всякие бустф

ZKR_invest_dec = {	#original_tag = ZKR	

	####################
	zkr_peregovory_so_slavianami_o_mire = {
		icon = generic_political_discourse
		available = {			
			surrender_progress > 0.38				
			ZSL = {	
				OR = {				
					controls_state = 258 
					controls_state = 220 
					controls_state = 193 
					controls_state = 202 
					controls_state = 198 
				}
			}	
			##хмм....
			owns_state = 258
			owns_state = 220
			owns_state = 193
			owns_state = 202
			owns_state = 260
			owns_state = 225
			owns_state = 259
			owns_state = 203	
			owns_state = 198
		}
		visible = {
			has_war_with = ZSL
			is_in_faction = no				
			# добавить флаг на конкретизацию войны? или условие клеймов славян на земли киева
		}
		fire_only_once = yes		
		cost = 5
		complete_effect = {
			country_event = { id = krim.1 }
		}
		ai_will_do = {
			base = 50
			modifier = {
				add = 100
				surrender_progress > 0.42
			}
			modifier = {
				factor = 0
				any_other_country = {
					is_major = yes
					is_in_faction_with = ZKR
				}
			}
		}
	}

	######################
	zkr_zayavka_na_sneg = {
		icon = generic_political_discourse
#		target_root_trigger = {
#			is_in_faction = no			
#			has_completed_focus = zkr_vizit_v_democr_rim	
#			NOT = {
#				country_exists = ZRI
#			}
#		}
		available = {
			OR = {
				has_government = democratic
				has_government = neutrality
			}
			NOT = {
				has_war_with = ZRI
			}
			has_added_tension_amount < 10			
			is_in_faction = no
			is_subject = no
		}				
		visible = {
#			is_in_faction = no			
#			has_completed_focus = zkr_vizit_v_democr_rim	
			ZRI = {
				has_government = democratic
				is_faction_leader = yes
				has_completed_focus = zri_vnesnepolitical_democr
			}
		}
		fire_only_once = no		
		days_re_enable = 350
		cost = 50
		complete_effect = {
			custom_effect_tooltip = zkr_zayavka_na_sneg_tt
			ZRI = {
				country_event = { id = ar_political.706 }
			}
		}
		ai_will_do = {
			base = 2
			modifier = {
				add = 2
				has_government = democratic
			}
		}
	}
	######################
	zkr_zayavka_v_chernomorsy_allianse = {
		icon = generic_political_discourse
#		target_root_trigger = {
#			is_in_faction = no			
#			has_completed_focus = zkr_ally_romea_vizantosy	
#			NOT = {
#				country_exists = ZVZ
#			}
#		}
		available = {
			OR = {
				has_government = democratic
				has_government = neutrality
			}
			NOT = {
				has_war_with = ZVZ
			}
			has_added_tension_amount < 10			
			is_subject = no
			is_in_faction = no			
		}			
		visible = {
#			is_in_faction = no			
#			has_completed_focus = zkr_ally_romea_vizantosy
			ZVZ = {
				is_faction_leader = yes
				has_completed_focus = zvz_chernomorsky_soyz
			}
		}
		fire_only_once = no		
		days_re_enable = 350
		cost = 50
		complete_effect = {
			custom_effect_tooltip = zkr_zayavka_v_chernomorsy_allianse_tt
			ZVZ = {
				country_event = { id = ar_political.800 }
			}
		}
		ai_will_do = {
			base = 2
			modifier = {
				add = 2
				has_government = democratic
			}
		}
	}	
	
	#######################################################################################################
	zkr_add_stabka = {
		icon = generic_political_discourse
		available = {
			has_stability < 0.85			
		}
		visible = {
			always = yes
		}
		fire_only_once = no
		modifier = {
			stability_weekly = 0.003						
		}
		days_remove = @zkr_prodoljitelnost_resheni
		days_re_enable = 300
		cost = 100
#		cost = mtth:zkr_cost_investits_dymanic
		complete_effect = {
			custom_effect_tooltip = povtoryaemoe_reshenie			
		}
		ai_will_do = {
			base = 0
			modifier = {
				add = 1
				has_stability < 0.6
			}
		}
	}
	zkr_add_warsupp = {
		icon = generic_civil_support
		available = {
			has_war_support < 0.75			
		}
		visible = {
			always = yes
		}
		fire_only_once = no
		modifier = {
			war_support_weekly = 0.003						
		}
		days_remove = @zkr_prodoljitelnost_resheni
		days_re_enable = 300
		cost = 100
		complete_effect = {
			custom_effect_tooltip = povtoryaemoe_reshenie
		}
		ai_will_do = {
			base = 0
			modifier = {
				add = 1
				has_war_support < 0.6
			}
		}
	}
	zkr_invest_stroik = {
		icon = generic_construction
		available = {
#			has_war_support < 0.7			
		}
		visible = {
			always = yes
		}
		fire_only_once = no
		modifier = {
			production_speed_buildings_factor = 0.1					
		}
		days_remove = @zkr_prodoljitelnost_resheni
		days_re_enable = 300
#		cost = 100
		cost = mtth:zkr_cost_investits_dymanic
		complete_effect = {
			custom_effect_tooltip = povtoryaemoe_reshenie
			custom_effect_tooltip = zkr_cost_investits_dymanic_tt
		}
		ai_will_do = {
			base = 0
			modifier = {
				add = 1
				has_political_power > 500
			}
		}
	}
	zkr_invest_konveerov = {
		icon = generic_industry
		available = {
#			has_war_support < 0.7			
		}
		visible = {
			always = yes
		}
		fire_only_once = no
		modifier = {
			production_factory_efficiency_gain_factor = 0.05
			production_factory_start_efficiency_factor = 0.05
		}
		days_remove = @zkr_prodoljitelnost_resheni
		days_re_enable = 300
#		cost = 100
		cost = mtth:zkr_cost_investits_dymanic
		complete_effect = {
			custom_effect_tooltip = povtoryaemoe_reshenie
			custom_effect_tooltip = zkr_cost_investits_dymanic_tt
		}
		ai_will_do = {
			base = 0
			modifier = {
				add = 1
				has_political_power > 500
			}
		}
	}
	zkr_invest_str_bunkerov = {
		icon = generic_operation
		available = {
#			has_war_support < 0.7			
		}
		visible = {
			always = yes
		}
		fire_only_once = no
		modifier = {
			production_speed_bunker_factor = 0.2
			production_speed_coastal_bunker_factor = 0.2
			production_speed_anti_air_building_factor = 0.2
		}
		days_remove = @zkr_prodoljitelnost_resheni
		days_re_enable = 300
#		cost = 100
		cost = mtth:zkr_cost_investits_dymanic
		complete_effect = {
			custom_effect_tooltip = povtoryaemoe_reshenie
			custom_effect_tooltip = zkr_cost_investits_dymanic_tt
		}
		ai_will_do = {
			base = 0
			modifier = {
				add = 1
				has_war = yes
			}
		}
	}
	zkr_invest_nauka_boost = {
		icon = generic_research
		available = {
#			has_war_support < 0.7			
		}
		visible = {
			always = yes
		}
		fire_only_once = no
		modifier = {
			research_speed_factor = 0.04
		}
		days_remove = @zkr_prodoljitelnost_resheni
		days_re_enable = 300
#		cost = 100
		cost = mtth:zkr_cost_investits_dymanic
		complete_effect = {
			custom_effect_tooltip = povtoryaemoe_reshenie
			custom_effect_tooltip = zkr_cost_investits_dymanic_tt
		}
		ai_will_do = {
			base = 0
			modifier = {
				add = 1
				has_political_power > 500
			}
		}
	}
	zkr_razvitie_logistiki_dorog = {
		icon = generic_decision
		available = {
#			has_war_support < 0.7			
		}
		visible = {
			always = yes
		}
		fire_only_once = no
		modifier = {
			production_speed_infrastructure_factor = 0.2
		}
		days_remove = @zkr_prodoljitelnost_resheni
		days_re_enable = 300
#		cost = 100
		cost = mtth:zkr_cost_investits_dymanic
		complete_effect = {
			custom_effect_tooltip = povtoryaemoe_reshenie
			custom_effect_tooltip = zkr_cost_investits_dymanic_tt
		}
		ai_will_do = {
			base = 0
			modifier = {
				add = 1
				has_political_power > 500
			}
		}
	}
	zkr_kyrsy_podgotovki_v_armii = {
		icon = generic_prepare_civil_war
		available = {
#			has_war_support < 0.7			
		}
		visible = {
			always = yes
		}
		fire_only_once = no
		modifier = {
			training_time_factor = -0.1
			experience_gain_army = 0.03
			mobilization_speed = 0.12
		}
		days_remove = @zkr_prodoljitelnost_resheni
		days_re_enable = 300
		cost = 100
		complete_effect = {
			custom_effect_tooltip = povtoryaemoe_reshenie			
		}
		ai_will_do = {
			base = 0
			modifier = {
				add = 1
				has_political_power > 500
			}
		}
	}
	zkr_kompleksnoe_finans_flota = {
		icon = generic_naval
		available = {
#			has_war_support < 0.7			
		}
		visible = {
			always = yes
		}
		fire_only_once = no
		modifier = {
			experience_gain_navy = 0.03
			industrial_capacity_dockyard = 0.15
			production_speed_naval_base_factor = 0.15
			production_speed_dockyard_factor = 0.15
		}
		days_remove = @zkr_prodoljitelnost_resheni
		days_re_enable = 300
		cost = 100
		complete_effect = {
			custom_effect_tooltip = povtoryaemoe_reshenie
		}
		ai_will_do = {
			base = 0
			modifier = {
				add = 1
				has_political_power > 700
			}
		}
	}
	zkr_kompleksnoe_finans_aviatsii = {
		icon = generic_air
		available = {
#			has_war_support < 0.7			
		}
		visible = {
			always = yes
		}
		fire_only_once = no
		modifier = {
			experience_gain_air = 0.03
			production_speed_air_base_factor = 0.10
		}
		days_remove = 100
		days_re_enable = 300
		cost = 100
		complete_effect = {
			custom_effect_tooltip = povtoryaemoe_reshenie
		}
		ai_will_do = {
			base = 0
			modifier = {
				add = 1
				has_political_power > 700
			}
		}
	}
	zkr_spets_issledovaniya = {
		icon = generic_ignite_civil_war
		available = {
#			has_war_support < 0.7			
		}
		visible = {
			always = yes
		}
		fire_only_once = no
		modifier = {
			production_speed_nuclear_reactor_factor = 0.12
			production_speed_rocket_site_factor = 0.12
#			research_bonus = {
#				nuclear = 0.15
#				rocketry = 0.15
#			}
		}		
		days_remove = @zkr_prodoljitelnost_resheni
		days_re_enable = 300
#		cost = 100
		cost = mtth:zkr_cost_investits_dymanic
		complete_effect = {
			custom_effect_tooltip = povtoryaemoe_reshenie
			custom_effect_tooltip = zkr_cost_investits_dymanic_tt
		}
		ai_will_do = {
			base = 0			
		}
	}
	
	
	
}

ZKR_oborona_categ_dec = {	#has_completed_focus = zkr_oborona_sewera	
	######################
	zha_ukrepleniya_202 = {
		icon = generic_operation	
		available = {
			has_war = no
			has_full_control_of_state = 220	
			ZSL = {
				owns_state = 222
			}
			num_of_civilian_factories_available_for_projects > 0
		}		
		highlight_states = {			
			state = 220			
		}
		fire_only_once = yes
		modifier = {
			civilian_factory_use = 1
		}
		cost = 25
		days_remove = 27
		ai_will_do = {
			factor = 70
		}
		remove_effect = {
			custom_effect_tooltip = zha_ukrepleniya_na_granitse
			hidden_effect = {
				220 = { set_building_level = { type = bunker level = 1 province = { all_provinces = yes limit_to_border = yes level < 1	} } }
			}	
			add_war_support = 0.02
		}
	}
	zha_ukrepleniya_259 = {
		icon = generic_operation	
		available = {
			has_war = no
			has_full_control_of_state = 258	
			ZSL = {
				owns_state = 222
			}
			num_of_civilian_factories_available_for_projects > 0
		}		
		highlight_states = {			
			state = 258			
		}
		fire_only_once = yes
		modifier = {
			civilian_factory_use = 1
		}
		cost = 25
		days_remove = 27
		ai_will_do = {
			factor = 70
		}
		remove_effect = {
			custom_effect_tooltip = zha_ukrepleniya_na_granitse
			hidden_effect = {
				258 = { set_building_level = { type = bunker level = 1 province = { all_provinces = yes limit_to_border = yes level < 1	} } }
			}
			add_war_support = 0.02
		}
	}
	zha_second_wall_ukrepleniya = {
		icon = generic_operation	
		available = {
			has_war = no
			has_full_control_of_state = 220	
			has_full_control_of_state = 260
			has_full_control_of_state = 258
			has_full_control_of_state = 240
			ZSL = {
				OR = {
					owns_state = 222
					owns_state = 223
				}	
			}
			num_of_civilian_factories_available_for_projects > 2
		}		
		highlight_states = {			
			state = 240			
		}
		fire_only_once = yes
		modifier = {
			civilian_factory_use = 3
		}
		cost = 50
		days_remove = 30
		ai_will_do = {
			factor = 5
		}
		remove_effect = {
			custom_effect_tooltip = zha_second_wall_ukrepleniya_tt
			hidden_effect = {
				220 = {
					add_building_construction = {
						type = bunker
						level = 2
						province = 9542
						instant_build = yes
					} 
					add_building_construction = {
						type = bunker
						level = 2
						province = 3580
						instant_build = yes
					} 
					add_building_construction = {
						type = bunker
						level = 2
						province = 580
						instant_build = yes
					} 
					add_building_construction = {
						type = bunker
						level = 2
						province = 522
						instant_build = yes
					} 
				}
				260 = {
					add_building_construction = {
						type = bunker
						level = 2
						province = 413
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						level = 2
						province = 6317
						instant_build = yes
					}
				}
				258 = {
					add_building_construction = {
						type = bunker
						level = 2
						province = 457
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						level = 2
						province = 3554
						instant_build = yes
					}
				}	
				240 = {
					add_building_construction = {
						type = bunker
						level = 2
						province = 9579
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						level = 2
						province = 11396
						instant_build = yes
					}
				}	
			}
			add_war_support = 0.08
			army_experience = 10
		}
	}	
	#####
	zkr_scorched_earth_1 = {
		icon = generic_scorched_earth
		available = {
			has_war = yes			
			has_equipment = {
				support_equipment > 14
			}
		}
		cost = 35
		fire_only_once = yes
		visible = {
			has_war = yes
			OR = {
				controls_state = 225
				controls_state = 220
				controls_state = 260				
			}			
		}

		complete_effect = {
			add_equipment_to_stockpile = {
				type = support_equipment_1
				amount = -14
			}
			if = {
				limit = {
					controls_state = 225
				}
				225 = {
					damage_building = {
						type = infrastructure
						damage = 3
					}
				}
			}
			if = {
				limit = {
					controls_state = 220
				}
				220 = {
					damage_building = {
						type = infrastructure
						damage = 3
					}
				}
			}
			if = {
				limit = {
					controls_state = 260
				}
				260 = {
					damage_building = {
						type = infrastructure
						damage = 3
					}
				}
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 200
				surrender_progress > 0.1
				has_war_support < 0.5
			}	
		}	
	}
}	

ZKR_evakuatsiya_promki = {
	zkr_move_industr_202_to_196 = {
		icon = generic_construction
		highlight_states = {
			state = 
		}
		available = {
			202 = {
				is_owned_and_controlled_by = ZKR				
				industrial_complex > 0
			}
			196 = { is_owned_and_controlled_by = ZKR } 		
		}
		fire_only_once = yes
		cost = 25
		days_remove = 15
		modifier = {
			
		}
		ai_will_do = {
			factor = 10			
		}		
		remove_effect = {
			if = {
				limit = {
					controls_state = 202
				}
				202 = {					
					remove_building = {
						type = industrial_complex
						level = 1
					}
				}					
				196 = {
					add_extra_state_shared_building_slots = 1					
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}	
					hidden_effect = {						
						damage_building = { type = industrial_complex damage = 0.1 }
					}
				}
				custom_effect_tooltip = relocate_industry_repair
			}
			custom_effect_tooltip = zkr_move_industr_203_to_196_tt
		}
	}
	
	zkr_move_industr_260_to_200 = {
		icon = generic_construction
		highlight_states = {
			state = 260
		}
		available = {
			260 = {
				is_owned_and_controlled_by = ZKR				
				arms_factory > 0
			}
			200 = { is_owned_and_controlled_by = ZKR } 		
		}
		fire_only_once = yes
		cost = 25
		days_remove = 15
		modifier = {
			
		}
		ai_will_do = {
			factor = 10							
		}		
		remove_effect = {
			if = {
				limit = {
					controls_state = 260
				}
				260 = {					
					remove_building = {
						type = arms_factory
						level = 1
					}
				}					
				200 = {
					add_extra_state_shared_building_slots = 1					
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}	
					hidden_effect = {						
						damage_building = { type = arms_factory damage = 0.1 }
					}
				}
				custom_effect_tooltip = relocate_industry_repair
			}
			custom_effect_tooltip = zkr_move_industr_260_to_200_tt
		}
	}
}	

ZKR_plan_mesti = {	#	has_completed_focus = zkr_revenge_zsl
	zkr_podgotovka_k_provokatsiyam = {
		icon = generic_prepare_civil_war	
		available = {
			220 = {
				is_controlled_by = ZSL					
			}
			259 = { is_owned_and_controlled_by = ZKR } 	
			has_equipment = {
				infantry_equipment > 100
			}
		}
		visible = {
			OR = {
				NOT = {
					has_country_flag = zkr_podgotovka_k_provokatsiyam_zavershena_flag	
				}	
				AND = {
					NOT = {
						has_country_flag = zkr_provokatsiya_v_202_comlet_flag	
						has_country_flag = zkr_provokatsiya_v_220_comlet_flag	
					}
				}
			}
		}		
		fire_only_once = no
		cost = 15
		days_remove = 15
		days_re_enable = 3		
		ai_will_do = {
			factor = 10	
			modifier = {
				factor = 0
				has_war = yes
			}
			modifier = {
				factor = 100
				ZSL = {
					has_war = yes
				}	
			}
		}
		complete_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = -100				
			}
		}		
		remove_effect = {
			custom_effect_tooltip = zkr_podgotovka_k_provokatsiyam_tt  
			set_country_flag = zkr_podgotovka_k_provokatsiyam_zavershena_flag	# локализовать флаг
			hidden_effect = {
				ZSL = {
					country_event = { id = krim.52 }
				}
			}	
		}
	}
	zkr_provokatsiya_v_220 = {
		icon = generic_prepare_civil_war
		highlight_states = {
			state = 220
		}
		available = {
			220 = {
				is_controlled_by = ZSL					
			}
			259 = { is_owned_and_controlled_by = ZKR }			
		}
		visible = {	
			has_country_flag = zkr_podgotovka_k_provokatsiyam_zavershena_flag
			NOT = {
				has_country_flag = zkr_provokatsiya_v_220_comlet_flag
			}	
		}
		fire_only_once = no
		days_re_enable = 10
		days_remove = 5
		cost = 15
		ai_will_do = {
			factor = 10	
			modifier = {
				factor = 0
				has_war = yes
			}
			modifier = {
				factor = 100
				ZSL = {
					has_war = yes
				}	
			}	
		}
		fixed_random_seed = no
		remove_effect = {
			custom_effect_tooltip = zkr_provokatsiya_v_220_tt #да - да, это снова рандом
			random_list = {
				70 = {					
					modifier = {
						factor = 0.1
						has_war_support > 0.5
					}					
					country_event = { id = krim.54 }
					set_country_flag = zkr_provokatsiya_v_220_comlet_flag
					hidden_effect = {
						ZSL = {
							country_event = { id = krim.55 }
						}
					}
				}
				30 = {					
					modifier = {
						factor = 0.1
						has_war_support < 0.5
					}					
					country_event = { id = krim.53 }
				}
			}
		}		
	}
	zkr_provokatsiya_v_193 = {
		icon = generic_prepare_civil_war
		highlight_states = {
			state = 193
		}
		available = {
			193 = {
				is_controlled_by = ZSL					
			}
			259 = { is_owned_and_controlled_by = ZKR }			
		}
		visible = {	
			has_country_flag = zkr_podgotovka_k_provokatsiyam_zavershena_flag
			NOT = {
				has_country_flag = zkr_provokatsiya_v_193_comlet_flag
			}	
		}
		fire_only_once = no
		days_re_enable = 10
		days_remove = 5
		cost = 15
		ai_will_do = {
			factor = 10	
			modifier = {
				factor = 0
				has_war = yes
			}
			modifier = {
				factor = 100
				ZSL = {
					has_war = yes
				}	
			}	
		}
		fixed_random_seed = no
		remove_effect = {
			custom_effect_tooltip = zkr_provokatsiya_v_193_tt #да - да, это снова рандом
			random_list = {
				70 = {
					modifier = {						
						factor = 0.1
						has_war_support > 0.5						
					}
					country_event = { id = krim.59 }
					set_country_flag = zkr_provokatsiya_v_193_comlet_flag
					hidden_effect = {
						ZSL = {
							country_event = { id = krim.62 }
						}
					}
				}
				30 = {
					modifier = {						
						factor = 0.1
						has_war_support < 0.5						
					}
					country_event = { id = krim.58 }
				}
			}
		}		
	}
	zkr_predostavit_romee_otchet_ob_agressii = {
		icon = generic_prepare_civil_war
		available = {
			220 = {
				is_controlled_by = ZSL					
			}			
		}
		visible = {	
			is_in_faction_with = ZVZ
			has_country_flag = zkr_provokatsiya_v_202_comlet_flag	
			has_country_flag = zkr_provokatsiya_v_220_comlet_flag						
		}		
		fire_only_once = yes
		cost = 20		
		ai_will_do = {
			factor = 10	
			modifier = {
				factor = 0
				has_war = yes
			}
			modifier = {
				factor = 100
				ZSL = {
					has_war = yes
				}	
			}
		}
		complete_effect = {
			ZVZ = {
				country_event = { id = krim.63 }
				custom_effect_tooltip = needs_approval
			}
		}		
	}
}