VAT_support_for_the_uprising_category = {
	VAT_the_pope_speech = {
		icon = GFX_decision_generic_speech

		allowed = { tag = VAT }

		available = {
			custom_trigger_tooltip = {
				tooltip = not_ready_uprising_tt
				check_variable = { support_for_the_uprising < 100 }
			}
			VAT_Conclave = {
				is_country_leader = no
			}
		}

		fire_only_once = yes

		cost = 40

		complete_effect = {
			custom_effect_tooltip = add_15_support_uprising_tt
			add_to_variable = { support_for_the_uprising = 15 } 
			clamp_variable = {
 				var = support_for_the_uprising
 				min = -20
 				max = 100
			}
		}

		ai_will_do = {
			factor = 10
		}
	}

	VAT_recruit_a_collaborator = {
		icon = GFX_decision_generic_fundraising

		allowed = { tag = VAT }

		available = {
			custom_trigger_tooltip = {
				tooltip = not_ready_uprising_tt
				check_variable = { support_for_the_uprising < 100 }
			}
		}

		days_remove = 30
		cost = 35
		days_re_enable = 20

		modifier = {
			political_power_gain = -0.15
		}

		complete_effect = {
			custom_effect_tooltip = add_15_support_uprising_tt
			add_to_variable = { support_for_the_uprising = 15 } 
			clamp_variable = {
 				var = support_for_the_uprising
 				min = -20
 				max = 100
			}
		}

		ai_will_do = {
			factor = 10
		}
	}

	VAT_propaganda_among_italians = {
		icon = GFX_decision_hol_radio_oranje

		allowed = { tag = VAT }

		available = {
			custom_trigger_tooltip = {
				tooltip = not_ready_uprising_tt
				check_variable = { support_for_the_uprising < 100 }
			}
		}

		days_remove = 30
		cost = 30

		modifier = {
			political_power_gain = -0.15
		}

		complete_effect = {
			custom_effect_tooltip = add_10_support_uprising_tt
			add_to_variable = { support_for_the_uprising = 10 } 
			clamp_variable = {
 				var = support_for_the_uprising
 				min = -20
 				max = 100
			}
		}

		ai_will_do = {
			factor = 10
		}
	}

	VAT_to_persuade_the_priest = {
		icon = GFX_decision_hol_attract_foreign_investors

		allowed = { tag = VAT }

		available = {
			custom_trigger_tooltip = {
				tooltip = not_ready_uprising_tt
				check_variable = { support_for_the_uprising < 100 }
			}
		}

		days_remove = 10
		cost = 20

		modifier = {
			political_power_gain = -0.1
		}

		complete_effect = {
			custom_effect_tooltip = add_5_support_uprising_tt
			add_to_variable = { support_for_the_uprising = 5 } 
			clamp_variable = {
 				var = support_for_the_uprising
 				min = -20
 				max = 100
			}
		}

		ai_will_do = {
			factor = 10
		}
	}

	VAT_debug_support_for_the_uprising = {
		icon = decision_generic_decision

		allowed = { tag = VAT }

		visible = {
			is_debug = yes
		}

		available = {
		}

		cost = 0

		complete_effect = {
			custom_effect_tooltip = add_100_support_uprising_tt
			add_to_variable = { support_for_the_uprising = 100 } 
			clamp_variable = {
 				var = support_for_the_uprising
 				min = -20
 				max = 100
			}
		}

		ai_will_do = {
			factor = 10
		}
	}

	VAT_debug_decrease_support_for_the_uprising = {
		icon = decision_generic_decision

		allowed = { tag = VAT }

		visible = {
			is_debug = yes
		}

		available = {
		}

		cost = 0

		complete_effect = {
			custom_effect_tooltip = remove_10_support_uprising_tt
			add_to_variable = { support_for_the_uprising = -10 } 
			clamp_variable = {
 				var = support_for_the_uprising
 				min = -20
 				max = 100
			}
		}

		ai_will_do = {
			factor = 10
		}
	}

	VAT_recruit_italian_politician = {
		icon = GFX_decision_generic_political_discourse

		allowed = { tag = VAT }

		visible = {
			ITA = {
				any_character = {
					is_advisor = yes
					has_character_flag = vat_italian_politician_can_be_recruited
				}
			}
		}

		days_remove = 5
		cost = 10

		complete_effect = {
			ITA = {
				random_character = {
					limit = {
						is_advisor = yes
						has_character_flag = vat_italian_politician_can_be_recruited
					}
					set_nationality = {
						character = THIS
						target_country = VAT
					}
				}
			}
		}
	}

	VAT_recruit_italian_general = {
		icon = GFX_decision_generic_army_support

		allowed = { tag = VAT }

		visible = {
			ITA = {
				any_character = {
					OR = {
						is_unit_leader = yes
						is_advisor = yes
					}
					has_character_flag = vat_italian_gerenal_can_be_recruited
				}
			}
		}

		days_remove = 5
		cost = 15

		complete_effect = {
			add_to_variable = { vat_recruited_italian_generals = 1 }
			ITA = {
				if = {
					limit = {
						has_character = ITA_pietro_badoglio
					}
					ITA_pietro_badoglio = {
						set_nationality = {
							character = THIS
							target_country = VAT
						}
					}
				}
				else_if = {
					limit = {
						has_character = ITA_giovanni_messe
					}
					ITA_giovanni_messe = {
						set_nationality = {
							character = THIS
							target_country = VAT
						}
					}
				}
				else = {
					random_character = {
						limit = {
							OR = {
								is_unit_leader = yes
								is_advisor = yes
							}
							has_character_flag = vat_italian_gerenal_can_be_recruited
						}
						set_nationality = {
							character = THIS
							target_country = VAT
						}
					}
				}
			}
		}
	}

	VAT_fascist_counter_propaganda_mission = {

		available = {
			#hidden_trigger = { always = no }
			OR = {
				# AND = { #Не понял для чего я это делал, потому комментирую
				# 	check_variable = { support_for_the_uprising > 90 }
				# 	has_completed_focus = VAT_start_operation_return_to_rome
				# }
				has_completed_focus = VAT_start_operation_return_to_rome
				check_variable = { support_for_the_uprising > 90 }
			}
		}
		activation = {
			always = no
		}

		icon = GFX_decision_eng_propaganda_campaigns   
		is_good = no
		days_mission_timeout = fascist_counter_propaganda_mission_days_timeout_var
		timeout_effect = {
			activate_mission = VAT_fascist_counter_propaganda_mission
			add_to_variable = { support_for_the_uprising = fascist_counter_propaganda_var } 
			add_to_variable = { fascist_counter_propaganda_var = -2 }
			add_to_variable = { fascist_counter_propaganda_mission_days_timeout_var = 5 }
			clamp_variable = {
 				var = fascist_counter_propaganda_var
 				min = -5
 				max = -15
			}
			clamp_variable = {
				var = support_for_the_uprising
				min = 0
				max = 100
		    }
			clamp_variable = {
				var = fascist_counter_propaganda_mission_days_timeout_var
				max = 35
			}
			custom_effect_tooltip = remove_support_uprising_tt
			add_days_mission_timeout = {
				mission = VAT_fascist_counter_propaganda_mission
				days = 5
			}
			hidden_effect = {
				country_event = {
					id = vat_random.5
					days = 5
					random_days = 15
				}
			}
		}
	}

	VAT_italian_invasion_mission = {
		icon = GFX_decision_SWI_consolidate_council_power

		available = {
			check_variable = {
				tooltip = vat_support_for_uprising_more_minus_15
				support_for_the_uprising > -15
			}
		}
		activation = {
			check_variable = {
				support_for_the_uprising < -15
			}
		}

		is_good = no
		days_mission_timeout = 10

		timeout_effect = {
			ITA = {
				declare_war_on = {
					target = VAT
					type = annex_everything
				}
			}
		}
	}


	VAT_capture_abruzzo_mission = {
		icon = GFX_decision_generic_operation

		available = {
			OR = {
				controls_state = 157
				PAP = { controls_state = 157 }
			}
			OR = {
				controls_state = 2
				PAP = { controls_state = 2 }
			}
		}

		activation = {
			always = no
		}

		is_good = no
		days_mission_timeout = 30

		timeout_effect = {
			add_war_support = -0.15
			add_stability = -0.15
		}
		complete_effect = {
			effect_tooltip = {
				activate_mission = VAT_defend_abruzzo_mission
			}
		}
	}

	VAT_defend_abruzzo_mission = {
		icon = GFX_decision_generic_protection

		activation = {
			OR = {
				controls_state = 157
				PAP = { controls_state = 157 }
			}
			OR = {
				controls_state = 2
				PAP = { controls_state = 2 }
			}
			has_war_with = ITA
			PAP = {
				exists = yes
			}
			has_completed_focus = VAT_bet_on_ideological_disagreements
		}

		available = {
			NOT = {
				controls_state = 157
				PAP = { controls_state = 157 }
			}
			NOT = {
				controls_state = 2
				PAP = { controls_state = 2 }
			}
		}

		is_good = yes
		days_mission_timeout = 30

		timeout_effect = {
			country_event = vat.40
		}
	}
}

#Мобилизация ополчения
VAT_mobilisation_category = {

	VAT_mobilisation_decision = {
		icon = GFX_decision_generic_prepare_civil_war
		state_target = yes
		target_array = ITA.core_states

		target_trigger = {
			FROM = {
				is_controlled_by = ROOT
				NOT = { is_capital = yes }
			}
		}

		on_map_mode = map_and_decisions_view

		days_remove = 10

		fire_only_once = yes

		cost = 20

		remove_effect = {
			add_manpower = 10000
			FROM = {
				create_unit = {
					division = "name = \"Divisione della Guardia Interna\" division_template = \"Divisione della Guardia Interna\" start_experience_factor = 0.5"
					owner = VAT
				}
			}
		}
	}
}

VAT_operations_category = {
	VAT_occupation_of_Libya = {
		icon = GFX_decision_generic_operation

		available = {
			VAT = {
				has_completed_focus = VAT_reorganisation_of_logistics
			}
		}
		visible = {
			VAT = { has_completed_focus = VAT_start_taking_care_of_things }
		}

		fire_only_once = yes

		cost = 15

		complete_effect = {
			VAT = {
				declare_war_on = {
					target = LBA
					type = annex_everything
				}
				every_state = {
					limit = {
						is_core_of = LBA
					}
					add_claim_by = VAT
				}
			}
		}

		ai_will_do = {
			factor = 10
		}
	}
}


VAT_discussion_of_condition_union_category = {

	VAT_discussion_of_condition_union_mission = {
		#activation = {
			
		#}
		available = {
			custom_trigger_tooltip = {
				tooltip = fail_of_discussion_of_condition_union_trigger_tt
				OR = {
					check_variable = { VAT_union_catholics_acceptance_var < -25 }
					check_variable = { VAT_union_orthodox_acceptance_var < -25 }
				}
			}
		}
		activation = {
			always = no
		}

		icon = mission_icon     # For GFX_decision_mission_icon
		is_good = yes
		days_mission_timeout = 365

		complete_effect = {
			country_event = {
				id = vat_second_council.6
				days = 2
			}
		}
		timeout_effect = {
			set_country_flag = VAT_union_catholics_accepted
			custom_effect_tooltip = agreement_of_union_ready_for_signing_tt
			hidden_effect = {
				country_event = vat_second_council.7
			}
		}
	}

	VAT_debug_start_mission = {
		visible = {
			is_debug = yes
		}
		complete_effect = {
			activate_mission = VAT_discussion_of_condition_union_mission
		}
	}

	VAT_discussion_of_condition_with_catholics = {

		icon = GFX_decision_eng_support_imperialist_coup


		cost = discussion_of_condition_with_priests_cost_var #cost = 35
		days_remove = 20
		days_re_enable = 10

		available = {
			custom_trigger_tooltip = {
				tooltip = vat_union_catholics_acceptance_less_100
				check_variable = { VAT_union_catholics_acceptance_var < 100 }
			}
		}

		modifier = {
			political_power_gain = -0.07
		}
	
		remove_effect = {
			add_to_variable = {
				var = VAT_union_catholics_acceptance_var
				value = 5
				tooltip = VAT_union_catholics_acceptance_5_tt
			}
			clamp_variable = {
				var = VAT_union_catholics_acceptance_var
				min = -50
				max = 100
			}
		}
	}

	VAT_discussion_of_condition_with_orthodox = {

		icon = eng_ally_imperialist_coup

		cost = discussion_of_condition_with_priests_cost_var #cost = 35
		days_remove = 20
		days_re_enable = 10

		available = {
			custom_trigger_tooltip = {
				tooltip = vat_union_orthodox_acceptance_less_100
				check_variable = { VAT_union_orthodox_acceptance_var < 100 }
			}
		}

		modifier = {
			political_power_gain = -0.12
		}
	
		remove_effect = {
			add_to_variable = {
				var = VAT_union_orthodox_acceptance_var
				value = 5
				tooltip = VAT_union_orthodox_acceptance_5_tt
			}
			clamp_variable = {
				var = VAT_union_orthodox_acceptance_var
				min = -50
				max = 100
			}
		}
	}

	VAT_concessions_for_catholic_priests = {

		icon = GFX_decision_eng_trade_unions_demand


		cost = concessions_for_priests_cost_var #cost = 40
		days_remove = 30
		days_re_enable = 50

		available = {
			custom_trigger_tooltip = {
				tooltip = vat_union_catholics_acceptance_less_100
				check_variable = { VAT_union_catholics_acceptance_var < 100 }
			}
		}

		modifier = {
			political_power_gain = -0.15
		}
	
		remove_effect = {
			add_popularity = {
				ideology = fascism
				popularity = 0.03
			}
			add_to_variable = {
				var = VAT_union_catholics_acceptance_var
				value = 10
				tooltip = VAT_union_catholics_acceptance_10_tt
			}
			clamp_variable = {
				var = VAT_union_catholics_acceptance_var
				min = -50
				max = 100
			}
		}
	}

	VAT_concessions_for_orthodox = {
		icon = GFX_decision_eng_trade_unions_support

		cost = concessions_for_priests_cost_var #cost = 40
		days_remove = 30
		days_re_enable = 60

		available = {
			custom_trigger_tooltip = {
				tooltip = vat_union_orthodox_acceptance_less_100
				check_variable = { VAT_union_orthodox_acceptance_var < 100 }
			}
		}

		modifier = {
			political_power_gain = -0.07
		}
	
		remove_effect = {
			add_war_support = -0.03
			add_to_variable = {
				var = VAT_union_orthodox_acceptance_var
				value = 10
				tooltip = VAT_union_orthodox_acceptance_10_tt
			}
			add_to_variable = {
				var = VAT_union_catholics_acceptance_var
				value = -5
				tooltip = VAT_union_catholics_unacceptance_5_tt
			}
			clamp_variable = {
				var = VAT_union_orthodox_acceptance_var
				min = -50
				max = 100
			}
			clamp_variable = {
				var = VAT_union_catholics_acceptance_var
				min = -50
				max = 100
			}
		}
	}

	VAT_compromisses_between_catolics_and_orthodox = {
		icon = GFX_decision_generic_political_discourse

		available = {
			has_active_mission = VAT_discussion_of_condition_union_mission
		}

		cost = compromisses_between_catolics_and_orthodox_cost_var #cost = 50
		days_remove = 30
		days_re_enable = 20

		available = {
			custom_trigger_tooltip = {
				tooltip = vat_union_catholics_orthodox_and_acceptance_less_100
				check_variable = { VAT_union_orthodox_acceptance_var < 100 }
				check_variable = { VAT_union_catholics_acceptance_var < 100 }
			}
		}

		modifier = {
			political_power_gain = -0.15
		}
	
		remove_effect = {
			if = {
				limit = {
					check_variable = { VAT_union_catholics_acceptance_var < 100 }
				}
				add_to_variable = {
					var = VAT_union_catholics_acceptance_var
					value = 5
					tooltip = VAT_union_catholics_acceptance_5_tt
				}
			}
			if = {
				limit = {
					check_variable = { VAT_union_orthodox_acceptance_var < 100 }
				}
				add_to_variable = {
					var = VAT_union_orthodox_acceptance_var
					value = 5
					tooltip = VAT_union_orthodox_acceptance_5_tt
				}
			}
			add_days_mission_timeout = {
				mission = VAT_discussion_of_condition_union_mission
				days = 20
			}
			clamp_variable = {
				var = VAT_union_orthodox_acceptance_var
				min = -50
				max = 100
			}
			clamp_variable = {
				var = VAT_union_catholics_acceptance_var
				min = -50
				max = 100
			}
		}
	}
}

# VAT_integration_of_lands = {
# 	VAT_integration_of_aquitania = {
# 		icon = GFX_decision_generic_speech

# 		allowed = { tag = VAT }

# 		available = {
# 			set_temp_variable = { ttv = my_array^num }
# 			multiply_temp_variable = { ttv = 0.8 }
# 			for_each_loop_effect = {
# 				array = my_array
# 				value = v
# 				if = {
# 					limit = { controls_state = v }
# 					subtract_from_temp_variable = { ttv = 1 }
# 				}
# 			}
# 			if = {
# 				limit = { check_variable = { ttv > 0 }
# 				always = no
# 			}
# 			else = {
# 				always = yes #we controls 80+%
# 			}
# 		}

# 		fire_only_once = yes

# 		cost = 100

# 		complete_effect = {
# 		}

# 		ai_will_do = {
# 			factor = 10
# 		}
# 	}
# }