VAT_operation_catholic_uprising_in_croatia = { 
	icon = GFX_operations_catholic_uprising
	map_icon = GFX_operations_catholic_uprising_map
	name = operation_catholic_uprising_in_croatia
	desc = operation_catholic_uprising_in_croatia_desc
	priority = 1
	
	days = 30
	network_strength = 60

	danger_level = 3

	allowed = {
		original_tag = VAT
	}
	available = { 
		YUG = {
			any_controlled_state = {
				is_core_of = CRO
			}
		}
		custom_trigger_tooltip = {
			tooltip = check_upprusing_support_in_yugoslavia_tt
			check_variable = {
				yugoslavian_support_for_uprusing = 100
			}
		}
	}
	visible = {
		ROOT = { has_completed_focus = VAT_the_uprising_in_yugoslavia }
		NOT = {
			CRO = { is_subject_of = VAT }
			CRO = { has_cosmetic_tag = CRO_VAT_uprusing }
		}
	}

	operatives = 1

	equipment = {
		infantry_equipment = 500
		support_equipment = 50
	}

	operation_target = {
		targets = { YUG }
	}

	risk_chance = 0.1
	experience = 1
	cost_multiplier = 0

	outcome_potential = {
		custom_effect_tooltip = start_yugoslavian_operation_tt
	}

	outcome_execute = {
		custom_effect_tooltip = start_yugoslavian_operation_tt
		hidden_effect = {
			YUG = {
				remove_ideas = YUG_idea_croatian_opposition
				release = CRO
				release = SLV
			}
			CEA = {
				set_nationality = {
					target_country = CRO
					character = CRO_aloizie_stepinac
				}
			}
			CRO = {
				annex_country = {
					target = SLV
				}
				promote_character = {
					character = CRO_aloizie_stepinac
					ideology = papal_state
				}
				promote_character = {
					character = CRO_aloizie_stepinac
					ideology = constitutional_theocratic_monarchy
				}
				set_politics = {
					ruling_party = neutrality
				}
				set_party_name = {
					ideology = neutrality
					long_name = CRO_catholic_ustashi_goverment_long
					name = CRO_catholic_ustashi_goverment
				}
				set_cosmetic_tag = CRO_VAT_uprusing
				103 = {
					set_demilitarized_zone = no
				}
				109 = {
					set_demilitarized_zone = no
				}
				102 = {
					set_demilitarized_zone = no
				}
				853 = {
					set_demilitarized_zone = no
				}
				load_oob = CRO_croatian_catholic_uprusing
				every_state = {
					limit = {
						is_core_of = YUG
						NOT = {
							is_core_of = CRO
						}
					}
					add_claim_by = CRO
				}
				set_politics = {
					ruling_party = neutrality
					long_name = CRO_catholic_ustashi_goverment_long
					name = CRO_catholic_ustashi_goverment
				}
				add_popularity = {
					ideology = neutrality
					popularity = 0.5
				}
				add_ideas = VAT_country_in_civil_war
			}
			YUG = {
				set_province_controller = 11580
				set_province_controller = 11577
				set_province_controller = 6647
				set_province_controller = 6889
				set_province_controller = 3868
				set_province_controller = 11816
				
				if = {
					limit = {
						is_in_faction = yes
					}
					leave_faction = yes
				}
				
				add_ideas = VAT_country_in_civil_war

				declare_war_on = {
					target = CRO
					type = civil_war
				}
			}
		}
	}

	phases = {
		vat_prepare_plan_of_uprising = { base = 100 }
	}
	phases = { 
		vat_connect_with_rebels = { base = 100 }
	}
	phases = { 
		vat_give_the_order_to_start_an_uprising = { base = 100 }
	}
}

VAT_operation_start_catholic_uprising_in_country = { 
	icon = GFX_operations_catholic_uprising
	map_icon = GFX_operations_catholic_uprising_map
	name = operation_start_catholic_uprising_in_country
	desc = operation_start_catholic_uprising_in_country_desc
	priority = 1
	
	days = 30
	network_strength = 60

	danger_level = 2

	allowed = {
		original_tag = VAT
	}
	available = { 
		custom_trigger_tooltip = {
			tooltip = check_catholic_uprising_support_tt
			check_variable = {
				FROM.support_for_uprising = 100
			}
		}
	}
	visible = {
		ROOT = {
			NOT = { is_in_array = { vat_countries_where_operation_happend = FROM } } 
		}
		FROM = { 
			NOT = { is_subject_of = VAT is_in_faction_with = VAT } 
			has_country_flag = VAT_declined_ultimatum
			exists = yes
			is_subject = no
		}
	}

	operatives = 2
	
	equipment = {
		infantry_equipment = 5000
		support_equipment = 500
	}

	operation_target = {
		targets = { HUN }
	}

	risk_chance = 0.15
	experience = 1
	cost_multiplier = 0

	outcome_potential = {
		custom_effect_tooltip = vat_start_catholic_uprising
	}

	outcome_execute = {
		custom_effect_tooltip = vat_start_catholic_uprising
		hidden_effect = {
			CEA = {
				if = {
					limit = { FROM = { tag = HUN } } 
					set_variable = { current_bishop_character = HUN_Justinian_Seredi }
				}
				else_if = {
					limit = { FROM = { tag = BRA } } 
					set_variable = { current_bishop_character = BRA_Sebastian_Leme }
				}
			}
			VAT = { 
				add_to_array = {
					array = vat_countries_where_operation_happend
					value = FROM
				} 
			}
			
			FROM = {
				leave_faction = yes
				
				CEA = {
					set_nationality = {
						target_country = FROM
						character = CEA.current_bishop_character
					}
				}
				if = {
					limit = {
						FROM = { has_government = neutrality }
					}

					promote_character = {
						character = CEA.current_bishop_character
						ideology = constitutional_theocratic_monarchy
					}

					start_civil_war = {
						ideology = democratic
						size = 0.7
						army_ratio = 0.7
						VAT_init_catholic_uprising = yes
					}
				}
				else = {
					promote_character = {
						character = CEA.current_bishop_character
						ideology = papal_state
					}

					start_civil_war = {
						ideology = neutrality
						size = 0.7
						army_ratio = 0.7
						VAT_init_catholic_uprising = yes
					}
				}
				if = {
					limit = { FROM = { tag = HUN } } #Католики в Венгрии будут сражаться против немецких коллаборантов
					set_politics = {
						ruling_party = fascism
					}
				}
			}
			
		}
	}

	phases = {
		vat_prepare_plan_of_uprising = { base = 100 }
	}
	phases = { 
		vat_connect_with_rebels = { base = 100 }
	}
	phases = { 
		vat_give_the_order_to_start_an_uprising = { base = 100 }
	}
}

VAT_operation_start_catholic_coup_in_country = { 
	icon = GFX_operations_catholic_uprising
	map_icon = GFX_operations_catholic_uprising_map
	name = operation_start_catholic_coup_in_country
	desc = operation_start_catholic_coup_in_country_desc
	priority = 1
	
	days = 30
	network_strength = 75

	danger_level = 3

	allowed = {
		original_tag = VAT
	}
	available = { 
		custom_trigger_tooltip = {
			tooltip = check_catholic_uprising_support_tt
			check_variable = {
				FROM.support_for_uprising = 100
			}
		}
	}
	visible = {
		ROOT = {
			NOT = { is_in_array = { vat_countries_where_operation_happend = FROM } } 
		}
		FROM = { 
			NOT = { is_subject_of = VAT is_in_faction_with = VAT has_war_with = VAT } 
			has_country_flag = VAT_declined_ultimatum
			exists = yes
			is_subject = no
		}
	}

	operatives = 2
	
	equipment = {
		infantry_equipment = 1000
		support_equipment = 500
	}

	operation_target = {
		targets = { BRA }
	}

	risk_chance = 0.25
	experience = 1
	cost_multiplier = 0

	outcome_potential = {
		custom_effect_tooltip = vat_start_catholic_coup
	}

	outcome_execute = {
		custom_effect_tooltip = vat_start_catholic_coup
		hidden_effect = {
			CEA = {
				if = {
					limit = { FROM = { tag = BRA } } 
					set_variable = { current_bishop_character = BRA_Sebastian_Leme }
				}
			}
			VAT = { 
				add_to_array = {
					array = vat_countries_where_operation_happend
					value = FROM
				} 
				set_autonomy = {
					target = FROM
					autonomy_state = autonomy_puppet
					end_wars = no
					end_civil_wars = no
				}
			}
			
			FROM = {
				CEA = {
					set_nationality = {
						target_country = FROM
						character = CEA.current_bishop_character
					}
				}
				promote_character = {
					character = CEA.current_bishop_character
					ideology = papal_state
				}
				promote_character = {
					character = CEA.current_bishop_character
					ideology = constitutional_theocratic_monarchy
				}
				VAT_init_catholic_coup = yes
			}
			
		}
	}

	phases = {
		vat_prepare_plan_of_uprising = { base = 100 }
	}
	phases = { 
		vat_connect_with_rebels = { base = 100 }
	}
	phases = { 
		vat_give_the_order_to_start_an_uprising = { base = 100 }
	}
}

VAT_operation_catholic_uprising_in_country = { 
	icon = GFX_operations_catholic_uprising
	map_icon = GFX_operations_catholic_uprising_map
	name = operation_catholic_uprising_in_mexico
	desc = operation_catholic_uprising_in_mexico_desc
	priority = 1
	
	days = 120
	network_strength = 60

	danger_level = 3

	allowed = {
		original_tag = VAT
	}
	available = { 
	}

	visible = {
		ROOT = {
			NOT = { is_in_array = { vat_countries_where_operation_happend = FROM } } 
		}
		FROM = { 
			NOT = { is_subject_of = VAT is_in_faction_with = VAT } 
			has_country_flag = VAT_declined_ultimatum
			exists = yes
			is_subject = no
		}
	}

	operatives = 2

	equipment = {
		infantry_equipment = 10000
		support_equipment = 500
	}

	operation_target = {
		targets = { MEX }
	}

	risk_chance = 0.25
	experience = 1
	cost_multiplier = 0

	outcome_potential = {
		custom_effect_tooltip = vat_start_catholic_uprising
	}

	outcome_execute = {
		custom_effect_tooltip = vat_start_catholic_uprising
		hidden_effect = {
			if = {
				limit = { FROM = { tag = MEX } }
				FROM = {
					set_nationality = {
						target_country = CEA
						character = MEX_luis_maria_martinez
					}
				}
			}
			CEA = {
				if = {
					limit = { FROM = { tag = MEX } } 
					set_variable = { current_bishop_character = MEX_luis_maria_martinez }
				}
			}
			VAT = { 
				add_to_array = {
					array = vat_countries_where_operation_happend
					value = FROM
				} 
			}
			
			FROM = {
				leave_faction = yes
				
				CEA = {
					set_nationality = {
						target_country = FROM
						character = CEA.current_bishop_character
					}
				}
				if = {
					limit = {
						FROM = { has_government = neutrality }
					}

					promote_character = {
						character = CEA.current_bishop_character
						ideology = constitutional_theocratic_monarchy
					}

					start_civil_war = {
						ideology = democratic
						size = 0.7
						army_ratio = 0.7
						VAT_init_catholic_uprising = yes

						if = {
							limit = { tag = MEX }
							add_stability = 0.6 #Чтобы не возникло других гражданок в Мексике из-за стабильности
						}
					}
				}
				else = {
					promote_character = {
						character = CEA.current_bishop_character
						ideology = papal_state
					}

					start_civil_war = {
						ideology = neutrality
						size = 0.7
						army_ratio = 0.7
						VAT_init_catholic_uprising = yes

						if = {
							limit = { tag = MEX }
							add_stability = 0.6 #Чтобы не возникло других гражданок в Мексике из-за стабильности
						}
					}
				}
			}
		}
	}

	phases = {
		vat_prepare_plan_of_uprising = { base = 100 }
	}
	phases = { 
		vat_connect_with_rebels = { base = 100 }
	}
	phases = { 
		vat_give_the_order_to_start_an_uprising = { base = 100 }
	}
}

VAT_operation_loyal_regime_in_country = { 
	icon = GFX_operations_catholic_coup
	map_icon = GFX_operations_catholic_coup_map
	name = operation_loyal_regime_in_country
	desc = operation_loyal_regime_in_country_desc
	priority = 1
	
	days = 240
	network_strength = 75

	danger_level = 4


	allowed = {
		original_tag = VAT
	}
	available = { 
		FROM = {
			NOT = { has_government = communism }
		}
	}
	visible = {
		ROOT = {
			NOT = { is_in_array = { vat_countries_where_operation_happend = FROM } } 
		}
		FROM = { 
			NOT = { is_subject_of = VAT is_in_faction_with = VAT } 
			has_country_flag = VAT_declined_ultimatum
			exists = yes
			is_subject = no
			if = {
				limit = { tag = SPR }
				OR = { has_government = neutrality has_government = fascism }
			}
			if = {
				limit = { tag = SPA }
				OR = { has_government = neutrality has_government = fascism }
			}
		}
	}

	operatives = 2

	equipment = {
		infantry_equipment = 3000
		support_equipment = 500
	}

	operation_target = {
		targets = { MEX SPA SPB POR }
	}

	risk_chance = 0.35
	experience = 1
	cost_multiplier = 0

	outcome_potential = {
		custom_effect_tooltip = vat_start_catholic_coup
	}

	outcome_execute = {
		custom_effect_tooltip = vat_start_catholic_coup
		hidden_effect = {
			if = {
				limit = { FROM = { tag = MEX } }
				FROM = {
					set_nationality = {
						target_country = CEA
						character = MEX_luis_maria_martinez
					}
				}
			}
			CEA = {
				if = {
					limit = { FROM = { tag = MEX } } 
					set_variable = { current_bishop_character = MEX_luis_maria_martinez }
				}
				else_if = {
					limit = { FROM = { OR = { tag = SPA tag = SPB } } } 
					set_variable = { current_bishop_character = SPR_Isidro_Goma }
				}
				else_if = {
					limit = { FROM = { tag = POR } } 
					set_variable = { current_bishop_character = POR_Manuel_Cerejeira }
				}
			}
			VAT = { 
				add_to_array = {
					array = vat_countries_where_operation_happend
					value = FROM
				} 
				set_autonomy = {
					target = FROM
					autonomy_state = autonomy_vatican_diocese
					end_wars = no
					end_civil_wars = no
				}
			}
			
			FROM = {
				CEA = {
					set_nationality = {
						target_country = FROM
						character = CEA.current_bishop_character
					}
				}
				promote_character = {
					character = CEA.current_bishop_character
					ideology = papal_state
				}
				promote_character = {
					character = CEA.current_bishop_character
					ideology = constitutional_theocratic_monarchy
				}
				VAT_init_catholic_coup = yes
			}
		}
	}

	phases = { #infiltration
		infiltration_border = { base = 25 }
		infiltration_submarine = { base = 25 }
		infiltration_paradrop = { 
			base = 25 
			modifier = {
				ROOT = { 
					has_equipment = {
						transport_plane_equipment < 1
					}
				}
				factor = 0
			}
		}
		infiltration_diplomatic = {
			base = 25
			modifier = {
				factor = 20
				ROOT = { has_war = no }
				FROM = {
					has_war = no
				}
			}
		}
	}
	phases = { lar_fra_coup_pre_position_units = { base = 100 } }
	phases = { lar_fra_launch_coup = { base = 100 } }
}

VAT_operation_rear_resistance_in_country = { 
	icon = GFX_operations_rear_resistance
	map_icon = GFX_operations_rear_resistance_map
	name = operation_rear_resistance_in_country
	desc = operation_rear_resistance_in_country_desc
	priority = 1
	
	days = 100
	network_strength = 50

	danger_level = 2


	allowed = {
		original_tag = VAT
	}
	available = {
	}
	visible = {
		ROOT = {
			NOT = { is_in_array = { vat_countries_where_operation_happend = FROM } } 
		}
		FROM = { 
			NOT = { is_in_faction_with = VAT } 
			exists = yes
			has_capitulated = no
			is_subject = no
			if = {
				limit = { tag = SOV }
				ROOT = { has_country_flag = VAT_russian_white_movement_accepted }
			}
			else_if = {
				limit = { tag = GER }
				ROOT = { has_completed_focus = VAT_betrayal_of_the_century }
			}
		}
	}

	operatives = 2

	equipment = {
		infantry_equipment = 3000
		support_equipment = 300
	}

	operation_target = {
		targets = { SOV GER }
	}

	risk_chance = 0.20
	experience = 1.5
	cost_multiplier = 0

	outcome_potential = {
		custom_effect_tooltip = vat_organize_rear_resistance
	}

	outcome_execute = {
		custom_effect_tooltip = vat_organize_rear_resistance
		hidden_effect = {
			VAT = { 
				add_to_array = {
					array = vat_countries_where_operation_happend
					value = FROM
				} 
			}
			
			FROM = {
				set_country_flag = VAT_rear_resistance_organised
			}
		}
	}

	phases = { #infiltration
		infiltration_border = { base = 50 }
		infiltration_submarine = { base = 25 }
		infiltration_paradrop = { 
			base = 25 
		}
	}
	phases = { #resistance support
		resistance_support_arms_depots = { base = 25 }
		resistance_support_distribute_weapons = { base = 25 }
		resistance_support_organize_training = { base = 25 }
		resistance_support_coordinate_groups = { base = 25 }
	}
	phases = { #exfiltration
		exfiltration_air_pickup = { 
			base = 15 
		}
		exfiltration_border = { base = 30 }
		exfiltration_go_to_ground = { base = 30 }
		exfiltration_submarine_pickup = { base = 25 }
	}
}
