PAP_decisions_category_papal_army = {

	# PAP_decision_immacolata_concezione = {

	# 	icon = GFX_decision_blueprint

	# 	available = {
	# 		NOT = { has_country_flag = ROM_ship_order_in_progress_flag }
	# 		has_completed_focus = PAP_focus_navy
	# 		set_temp_variable = {
	# 			amount_of_money_to_check = 5.5
	# 		}
	# 		has_specific_amount_of_money_with_inflation_included = yes
	# 		2 = {
	# 			naval_base > 0
	# 		}
	# 	}
		
	# 	# visible = {
	# 	# 	has_completed_focus = PAP_focus_navy
	# 	# }

	# 	#allowed = { TAG = PAP }
		
	# 	custom_cost_trigger = {
	# 		set_temp_variable = {
	# 			amount_of_money_to_check = 5.5
	# 		}
	# 		has_navy_experience > 49.9
	# 	}
	# 	custom_cost_text = eoanb_money_and_navy_experience_50
		
	# 	fire_only_once = yes
	# 	ai_will_do = {
	# 		factor = 100
	# 	}

	# 	complete_effect = {
	# 		custom_effect_tooltip = AUS_navy_reform_ongoing_effect_tt
	# 		set_temp_variable = { money_to_gain = -5.5 }
	# 		add_money_with_tooltip_effect = yes
	# 		navy_experience = -50
	# 		hidden_effect = {
	# 			set_country_flag = ROM_ship_order_in_progress_flag
	# 		}
	# 	}
		
	# 	remove_effect = {
	# 		custom_effect_tooltip = AUS_ship_order_in_progress_effect_tt
	# 		hidden_effect = {
	# 		clr_country_flag = ROM_ship_order_in_progress_flag
	# 			create_equipment_variant = {
	# 				name = "Immacolata Concezione"
	# 				type = ship_hull_corvette_0
	# 				name_group = GER_CA_HISTORICAL
	# 				parent_version = 0
	# 				modules = {
	# 					fixed_ship_battery_slot = ship_cannon_battery_0
	# 					fixed_ship_fire_control_system_slot = fire_control_system_0
	# 					fixed_ship_engine_slot = ship_engine_sail_0
	# 					fixed_ship_armor_slot = empty
	# 					mid_1_custom_slot = empty
	# 					front_1_custom_slot = empty
	# 				}
	# 				
	# 			}
	# 			create_ship = {
	# 				type = ship_hull_corvette_0
	# 				equipment_variant = "Immacolata Concezione"
	# 				name = "Immacolata Concezione"
	# 			}
	# 		}
	# 	}
	# }
	
	PAP_decision_prussian_ship = {

		icon = GFX_decision_blueprint

		available = {
			NOT = { has_country_flag = ROM_ship_order_in_progress_flag }
			has_completed_focus = PAP_focus_buy_prussian_paddle_steamers
			set_temp_variable = {
				amount_of_money_to_check = 5.5
			}
			has_specific_amount_of_money_with_inflation_included = yes
			1407 = {
				naval_base > 2
			}
		}
		
		visible = {
	 	 	has_completed_focus = PAP_focus_buy_prussian_paddle_steamers
		}

		#allowed = { TAG = PAP }
		
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 5.5
			}
			has_navy_experience > 49.9
		}
		custom_cost_text = eoanb_money_and_navy_experience_50
		
		fire_only_once = yes
		ai_will_do = {
			factor = 100
		}

		complete_effect = {
			custom_effect_tooltip = AUS_navy_reform_ongoing_effect_tt
			set_temp_variable = { money_to_gain = -5.5 }
			add_money_with_tooltip_effect = yes
			navy_experience = -50
			hidden_effect = {
				set_country_flag = ROM_ship_order_in_progress_flag
			}
		}
		
		remove_effect = {
			custom_effect_tooltip = AUS_ship_order_in_progress_effect_tt
			hidden_effect = {
				clr_country_flag = ROM_ship_order_in_progress_flag
				create_equipment_variant = {
					name = "Sanctus Bonifatius"
					type = ship_hull_gunboat_2
					name_group = DEN_GB_HISTORICAL
					parent_version = 0
					modules = {
						fixed_ship_battery_slot = ship_cannon_battery_1
						fixed_ship_fire_control_system_slot = fire_control_system_0
						fixed_ship_engine_slot = ship_engine_steam_screw_gunboat
						fixed_ship_secondaries_slot = empty
						fixed_ship_armor_slot = ship_armor_capital_hardwood_0
						mid_1_custom_slot = empty
						mid_2_custom_slot = empty
						rear_1_custom_slot = empty
					}
					
				}
				create_ship = {
					type = ship_hull_gunboat_2
					equipment_variant = "Sanctus Bonifatius"
					name = "Sanctus Bonifatius"
				}
			}
		}
	}

	PAP_decision_expand_papal_navy_port = {

	 	icon = naval_base

	 	available = {
	 		NOT = { has_country_flag = ROM_navy_reform_ongoing_flag }
	 		has_completed_focus = PAP_focus_papal_naval_history
	 		set_temp_variable = {
	 			amount_of_money_to_check = 1.5
	 		}
	 		has_specific_amount_of_money_with_inflation_included = yes 
	 	}
		
		visible = {
	 	 	has_completed_focus = PAP_focus_papal_naval_history
		}
			
	 	#allowed = { TAG = PAP }
		
	 	custom_cost_trigger = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 1.5
	 		}
	 	}
	 	custom_cost_text = eoanb_money_cost_text
		
	 	days_remove = 730 #Was missing and creating errors
		
	 	fire_only_once = yes

	 	ai_will_do = {
	 		factor = 100
	 	}

	 	modifier = {
		
	 	}

	 	complete_effect = {
	 		custom_effect_tooltip = AUS_navy_reform_ongoing_effect_tt
	 		set_temp_variable = { money_to_gain = -1.5 }
	 		add_money_with_tooltip_effect = yes
	 		hidden_effect = {
	 			set_country_flag = ROM_navy_reform_ongoing_flag
	 		}
	 	}
		
	 	remove_effect = {
	 		EOANBSYS_institutions_innovative_add_two = yes
	 		2 = {
	 			add_building_construction = {
	 				type = naval_base
	 				province = 11751
	 				level = 1
	 				instant_build = yes
	 			}
	 		}
	 		set_temp_variable = {
	 			unemployment_value = -0.0002
	 		}
	 		add_unemployment_effect = yes
	 		hidden_effect = {
	 			clr_country_flag = ROM_navy_reform_ongoing_flag
	 		}
	 	}
	}
	
	PAP_decision_roma_steamer = {

		icon = GFX_decision_blueprint

	 	available = {
	 		NOT = { has_country_flag = ROM_ship_order_in_progress_flag }
	 		has_completed_focus = PAP_focus_naval_patrol_question
	 		set_temp_variable = {
	 			amount_of_money_to_check = 5.5
	 		}
	 		has_specific_amount_of_money_with_inflation_included = yes
	 		has_navy_size = {
	 			size > 0
	 		}
	 		2 = {
	 			naval_base > 2
	 		}
	 	}
		
	 	visible = {
			has_completed_focus = PAP_focus_naval_patrol_question
	  	}

	 	#allowed = { TAG = PAP }
		
	 	custom_cost_trigger = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 5.5
	 		}
	 		has_navy_experience > 49.9
	 	}
	 	custom_cost_text = eoanb_money_and_navy_experience_50
		
	 	fire_only_once = yes
	 	ai_will_do = {
	 		factor = 100
	 	}

	 	complete_effect = {
	 		set_temp_variable = { money_to_gain = -5.5 }
	 		add_money_with_tooltip_effect = yes
	 		navy_experience = -50
	 		hidden_effect = {
	 			set_country_flag = ROM_ship_order_in_progress_flag
	 		}
	 	}
		
	 	remove_effect = {
	 		custom_effect_tooltip = AUS_ship_order_in_progress_effect_tt
	 		hidden_effect = {
				create_equipment_variant = {
					name = "Roma"
					type = ship_hull_gunboat_2
					name_group = DEN_GB_HISTORICAL
					parent_version = 0
					modules = {
						fixed_ship_battery_slot = ship_cannon_battery_1
						fixed_ship_fire_control_system_slot = fire_control_system_0
						fixed_ship_engine_slot = ship_engine_steam_screw_gunboat
						fixed_ship_secondaries_slot = empty
						fixed_ship_armor_slot = ship_armor_capital_hardwood_0
						mid_1_custom_slot = empty
						mid_2_custom_slot = empty
						rear_1_custom_slot = empty
					}
				}
				create_ship = {
					type = ship_hull_gunboat_2
					equipment_variant = "Roma"
					name = "Roma"
				}
	 		}
	 	}
	}
	
	#Order Mazzocchi Rifles
	PAP_decision_order_mazzocchi_rifles = {

	 	icon = generic_industry
		
	 	#allowed = { tag = PAP }

	 	available = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 0.3
	 		}
	 		has_specific_amount_of_money_with_inflation_included = yes
	 	}

		visible = {
	 	 	has_completed_focus = PAP_focus_state_defence
		}

	 	fire_only_once = yes
		
	 	custom_cost_trigger = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 0.3
	 		}
	 	}
	 	custom_cost_text = eoanb_money_cost_text
		
         days_remove = 180
         
         modifier = {
            
         }
		
	 	complete_effect = {
	 		set_temp_variable = { money_to_gain = -0.3 }
	 		add_money_with_tooltip_effect = yes
	 	}
       
         remove_effect = {
	 		add_equipment_to_stockpile = {
	 			type = infantry_equipment
	 			amount = 1000
	 			producer = PAP
	 		}
	 		set_temp_variable = {
	 			inflation_to_gain = 0.05
	 		}
	 		add_inflation_with_tooltip_effect = yes
	     }
       
	 	ai_will_do = {
	 		base = 500
	 	}
	 }
	
	#Invest into F.Ili Mazzocchi
	PAP_decision_invest_mazzocchi = {

	 	icon = generic_industry
		
	 	#allowed = { tag = PAP }

	 	available = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 0.05
	 		}
	 		has_specific_amount_of_money_with_inflation_included = yes
	 	}

		visible = {
			has_completed_focus = PAP_focus_state_defence
		}

	 	fire_only_once = yes
		
	 	custom_cost_trigger = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 0.05
	 		}
	 	}
	 	custom_cost_text = eoanb_money_cost_text
		
        days_remove = 180
         
		modifier = {
            
		}
		
		complete_effect = {
	 		set_temp_variable = { money_to_gain = -0.05 }
	 		add_money_with_tooltip_effect = yes
	 	}
       
        remove_effect = {
	 		add_tech_bonus = { 
	 			bonus = 0.75 
	 			uses = 1 
	 			category = infantry_weapons 
	 			category = tech_category_handguns
	 		}
	 		set_temp_variable = {
	 			inflation_to_gain = 0.01
	 		}
	 		add_inflation_with_tooltip_effect = yes
	     }
       
	 	ai_will_do = {
	 		base = 500
	 	}
	}
	
	#Buy Rifles from Liège Factories
	PAP_decision_buy_rifles_from_liege_factories = {

		icon = generic_industry
		
		#allowed = { tag = PAP }

		available = {
			has_completed_focus = PAP_focus_foreign_rifles
		}

		visible = {
			country_exists = BEL
			BEL = { owns_state = 34 }
			BEL = { has_war = no }
		}

		fire_only_once = yes
		
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 1
			}
			has_specific_amount_of_money_with_inflation_included = yes
			has_political_power > 49.9
			command_power > 49.99
		}
		custom_cost_text = eoanb_money_and_political_power_50_and_command_power_50
		
		days_remove = 90
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -1 }
			add_money_with_inflation_included_with_tooltip_effect = yes
			add_political_power = -50
			add_command_power = -50
		}
		
		remove_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 1000
				producer = BEL
			}
		}
		
		ai_will_do = {
			base = 500
		}
	}
	
	#Battalion of St Patrick
	PAP_decision_battalion_st_patrick = {

		icon = generic_industry
		
		#allowed = { tag = PAP }

	 	available = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 0.05
	 		}
	 		has_specific_amount_of_money_with_inflation_included = yes
	 	}

	 	 visible = {
	 		has_completed_focus = PAP_focus_st_patrick_batallion
	 	 }

	 	fire_only_once = yes
		
	 	custom_cost_trigger = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 0.05
	 		}
	 	}
	 	custom_cost_text = eoanb_money_cost_text
		
        days_remove = 180
         
        modifier = {
            
        }
		
		complete_effect = {
	 		set_temp_variable = { money_to_gain = -0.05 }
	 		add_money_with_tooltip_effect = yes
	 	}
       
        remove_effect = {
			EOANBSYS_national_crisis_progress_minus_one = yes
			EOANBSYS_national_crisis_risorgimento_crisis_update = yes
	 		785 = {
	 			create_unit = {
	 				division = "name = \"Battaglione di San Patrizio\" division_template = \"Fanteria Papale\"  start_experience_factor = 0.7"
	 				owner = PAP
	 			}
	 		}
	    }
       
	 	ai_will_do = {
	 		base = 500
	 	}
	}
	
	#The Franco-Belgian Division
	PAP_decision_franco_belgian_division = {

		icon = generic_industry
		
		#allowed = { tag = PAP }

	 	available = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 0.05
	 		}
	 		has_specific_amount_of_money_with_inflation_included = yes
	 	}

	 	 visible = {
	 		has_completed_focus = PAP_focus_franco_belgian_division
	 	 }

	 	fire_only_once = yes
		
	 	custom_cost_trigger = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 0.05
	 		}
	 	}
	 	custom_cost_text = eoanb_money_cost_text
		
        days_remove = 180
         
        modifier = {
            
        }
		
		complete_effect = {
	 		set_temp_variable = { money_to_gain = -0.05 }
	 		add_money_with_tooltip_effect = yes
	 	}
       
        remove_effect = {
			EOANBSYS_national_crisis_progress_minus_one = yes
			EOANBSYS_national_crisis_risorgimento_crisis_update = yes
	 		785 = {
	 			create_unit = {
	 				division = "name = \"Divisione Franco-Belga\" division_template = \"Fanteria Papale\"  start_experience_factor = 0.7"
	 				owner = PAP
	 			}
	 		}
	    }
       
	 	ai_will_do = {
	 		base = 500
	 	}
	}
	
	#Austrian Bersaglieri
	PAP_decision_austrian_bersaglieri = {

	 	icon = generic_industry
		
	 	#allowed = { tag = PAP }

	 	available = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 0.05
	 		}
	 		has_specific_amount_of_money_with_inflation_included = yes
	 	}

	 	visible = {
			has_completed_focus = PAP_focus_form_austrian_division
	 	}

	 	fire_only_once = yes
		
	 	custom_cost_trigger = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 0.05
	 		}
	 	}
	 	custom_cost_text = eoanb_money_cost_text
		
         days_remove = 180
         
         modifier = {
            
         }
		
	 	complete_effect = {
	 		set_temp_variable = { money_to_gain = -0.05 }
	 		add_money_with_tooltip_effect = yes
	 	}
       
         remove_effect = {
			EOANBSYS_national_crisis_progress_minus_one = yes
			EOANBSYS_national_crisis_risorgimento_crisis_update = yes
	 		785 = {
	 			create_unit = {
	 				division = "name = \"Bersaglieri Austriaci\" division_template = \"Fanteria Papale\"  start_experience_factor = 0.7"
	 				owner = PAP
	 			}
	 		}
	     }
       
	 	ai_will_do = {
	 		base = 500
	 	}
	}
	
	#Papal Zouaves
	PAP_decision_papal_zouaves = {

	 	icon = generic_industry
		
	 	#allowed = { tag = PAP }

	 	available = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 0.05
	 		}
	 		has_specific_amount_of_money_with_inflation_included = yes
	 	}

	 	visible = {
	 		has_completed_focus = PAP_focus_unite_zouves_crusaders
	 	}

	 	fire_only_once = yes
		
	 	custom_cost_trigger = {
	 		set_temp_variable = {
	 			amount_of_money_to_check = 0.05
	 		}
	 	}
	 	custom_cost_text = eoanb_money_cost_text
		
        days_remove = 180
         
        modifier = {
            
        }
		
	 	complete_effect = {
	 		set_temp_variable = { money_to_gain = -0.05 }
	 		add_money_with_tooltip_effect = yes
	 	}
       
        remove_effect = {
			EOANBSYS_national_crisis_progress_minus_one = yes
			EOANBSYS_national_crisis_risorgimento_crisis_update = yes
	 		785 = {
	 			create_unit = {
	 				division = "name = \"Zuavi Pontifici\" division_template = \"Fanteria Papale\"  start_experience_factor = 0.7"
	 				owner = PAP
	 			}
	 		}
	     }
       
	 	ai_will_do = {
	 		base = 500
	 	}
	 }
	
	#Appoint Athanase Charles Marie de Charette as Zouaves Commander
	PAP_decision_charette_zouaves = {

	 	icon = generic_industry
		
	 	#allowed = { tag = PAP }

	 	available = {
	 		
	 	}

		visible = {
			has_completed_focus = PAP_focus_unite_zouves_crusaders
		}

	 	fire_only_once = yes
		
	 	cost = 75
		
        days_remove = 180
         
		modifier = {
            
        }
		
	 	complete_effect = {
		
	 	}
       
		remove_effect = {
	 		PAP_athanase_charles_marie_de_charette = {	
	 			add_advisor_role = {
	 				advisor = {
	 					slot = high_command
	 					ledger = army
	 					idea_token = PAP_athanase_charles_marie_de_charette_high_command
	 					cost = 100
	 					traits = {
	 						army_entrenchment_2
	 					}
	 				}
	 			}
	 		}
	     }
       
	 	ai_will_do = {
	 		base = 500
	 	}
	}
	
	#Antibes Legion
	PAP_decision_antibes_legion = {

		icon = generic_industry
		
		#allowed = { tag = PAP }

		available = {
			date > 1866.09.08
			set_temp_variable = {
				amount_of_money_to_check = 0.05
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}

		visible = {
			has_completed_focus = PAP_focus_antibas_legion
		}

		fire_only_once = yes
		
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 0.05
			}
		}
		custom_cost_text = eoanb_money_cost_text
		
        days_remove = 180
         
        modifier = {
            
        }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.05 }
			add_money_with_tooltip_effect = yes
		}
       
        remove_effect = {
			EOANBSYS_national_crisis_progress_minus_one = yes
			EOANBSYS_national_crisis_risorgimento_crisis_update = yes
			785 = {
				create_unit = {
					division = "name = \"Legione di Antibo\" division_template = \"Fanteria Papale\"  start_experience_factor = 0.7"
					owner = PAP
					id = 25
				}
			}
	    }
       
		ai_will_do = {
			base = 500
		}
	}
	PAP_decision_defenses_against_garibaldi = {

		icon = generic_construction

		available = {
			has_completed_focus = PAP_focus_defence_against_garibaldis
			set_temp_variable = {
				amount_of_money_to_check = 0.02
			}
			has_specific_amount_of_money_with_inflation_included = yes 
		}
		
		visible = {
			has_completed_focus = PAP_focus_defence_against_garibaldis
		}
		
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 0.02
			}
		}
		custom_cost_text = eoanb_money_cost_text
		
		days_remove = 70
		
		fire_only_once = yes

		ai_will_do = {
			factor = 100
		}

		modifier = {
			
		}

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.02 }
			add_money_with_tooltip_effect = yes
		}
		
		remove_effect = {
			2 = {
				add_building_construction = {
					type = bunker
					level = 3
					instant_build = yes
					province = 9904
				}
			}
		}
	}
}
PAP_decisions_category_papal_financing = {
	PAP_decision_reduce_wasteful_spendings = {

		icon = generic_decision

		available = {
			has_completed_focus = PAP_focus_reduce_wasteful_spendings
			has_political_power > 20
			NOT = {has_idea = PAP_vic_idea_Failing_Finances_3}
			NOT = {has_idea = PAP_vic_idea_Failing_Finances_4}
		}
		
		visible = {
			has_completed_focus = PAP_focus_reduce_wasteful_spendings
			has_idea = PAP_vic_idea_Failing_Finances_9
		}
		
		custom_cost_trigger = {
			has_political_power > 19.9
		}
		custom_cost_text = eoanb_money_cost_text
		
		days_remove = 50
		
		fire_only_once = yes

		ai_will_do = {
			factor = 100
		}

		modifier = {
			
		}

		complete_effect = {
			add_political_power = -20
		}
		
		remove_effect = {
			if = {
				limit = { has_idea = PAP_vic_idea_Failing_Finances_4 }
				swap_ideas = {
					remove_idea = PAP_vic_idea_Failing_Finances_4
					add_idea = PAP_vic_idea_Failing_Finances_5
				}
			}
			if = {
				limit = { has_idea = PAP_vic_idea_Failing_Finances_5 }
				swap_ideas = {
					remove_idea = PAP_vic_idea_Failing_Finances_5
					add_idea = PAP_vic_idea_Failing_Finances_6
				}
			}
			if = {
				limit = { has_idea = PAP_vic_idea_Failing_Finances_6 }
				swap_ideas = {
					remove_idea = PAP_vic_idea_Failing_Finances_7
					add_idea = PAP_vic_idea_Failing_Finances_7
				}
			}
			if = {
				limit = { has_idea = PAP_vic_idea_Failing_Finances_7 }
				swap_ideas = {
					remove_idea = PAP_vic_idea_Failing_Finances_7
					add_idea = PAP_vic_idea_Failing_Finances_8
				}
			}
			if = {
				limit = { has_idea = PAP_vic_idea_Failing_Finances_8 }
				swap_ideas = {
					remove_idea = PAP_vic_idea_Failing_Finances_9
					add_idea = PAP_vic_idea_Failing_Finances_9
				}
			}
		}
	}
	PAP_decision_taxation_reform = {

		icon = generic_decision

		available = {
			has_completed_focus = PAP_focus_taxation_reform
			set_temp_variable = {
				amount_of_money_to_check = 0.01
			}
			has_specific_amount_of_money_with_inflation_included = yes 
		}
		
		visible = {
			has_completed_focus = PAP_focus_taxation_reform
		}
		
		custom_cost_trigger = {
			has_political_power > 9.9
			set_temp_variable = {
				amount_of_money_to_check = 0.01
			}
		}
		custom_cost_text = eoanb_money_cost_text
		
		days_remove = 100
		
		fire_only_once = yes

		ai_will_do = {
			factor = 100
		}

		modifier = {
			
		}

		complete_effect = {
			add_political_power = -10
			set_temp_variable = { money_to_gain = -0.01 }
			add_money_with_tooltip_effect = yes
		}
		
		remove_effect = {
			swap_ideas = {
				remove_idea = PAP_vic_idea_Failing_Finances_2
				add_idea = PAP_vic_idea_Failing_Finances_3
			}
		}
	}
	PAP_decision_adopt_lira = {

		icon = generic_decision

		available = {
			has_completed_focus = PAP_focus_adopt_the_lira
			set_temp_variable = {
				amount_of_money_to_check = 0.01
			}
			has_specific_amount_of_money_with_inflation_included = yes 
		}
		
		visible = {
			has_completed_focus = PAP_focus_adopt_the_lira
		}
		
		custom_cost_trigger = {
			has_political_power > 9.9
			set_temp_variable = {
				amount_of_money_to_check = 0.01
			}
		}
		custom_cost_text = eoanb_money_cost_text
		
		days_remove = 365
		
		fire_only_once = yes

		ai_will_do = {
			factor = 100
		}

		modifier = {
			consumer_goods_expected_value = 0.1
			political_power_gain = -0.1
		}

		complete_effect = {
			add_political_power = -10
			set_temp_variable = { money_to_gain = -0.01 }
			add_money_with_tooltip_effect = yes
		}
		
		remove_effect = {
			swap_ideas = {
				remove_idea = PAP_vic_idea_Failing_Finances_3
				add_idea = PAP_vic_idea_Failing_Finances_4
			}
		}
	}
	PAP_decision_peters_pence  = {

		icon = generic_decision

		available = {
			has_completed_focus = PAP_focus_beg_for_money
		}
		
		visible = {
			has_completed_focus = PAP_focus_beg_for_money
		}
		
		days_re_enable = 365
		
		fire_only_once = yes

		ai_will_do = {
			factor = 100
		}

		modifier = {
			
		}

		complete_effect = {
			if = {
				limit = {has_completed_focus = PAP_focus_institutionalize_donations}
				set_temp_variable = { money_to_gain = 0.1 }
				add_money_with_inflation_included_with_tooltip_effect = yes
			}
			else = {
				set_temp_variable = { money_to_gain = 0.05 }
				add_money_with_inflation_included_with_tooltip_effect = yes
			}
		}
	}
	PAP_decision_making_use_of_the_donations  = {

		icon = generic_decision

		available = {
			has_completed_focus = PAP_focus_institutionalize_donations
		}
		
		visible = {
			has_completed_focus = PAP_focus_institutionalize_donations
		}
		
		days_remove = 180
		
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 3
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}
		custom_cost_text = eoanb_money_cost_text
		
		fire_only_once = yes

		ai_will_do = {
			factor = 100
		}

		modifier = {
			
		}
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -3 }
			add_money_with_inflation_included_with_tooltip_effect = yes
		}

		remove_effect = {
			1407 = {
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 1
			}
		}
	}
}
PAP_decisions_category_papal_railway = {
	PAP_decision_rome_civitavecchia_line  = {

		icon = train_2

		available = {
			has_completed_focus = PAP_focus_rome_civitavecchia_line
			set_temp_variable = {
				amount_of_money_to_check = 0.01
			}
			has_specific_amount_of_money_with_inflation_included = yes 
			has_idea = PAP_Societa_Romane
		}
		
		visible = {
			has_completed_focus = PAP_focus_rome_civitavecchia_line
		}
		
		days_re_enable = 180
		
		fire_only_once = yes

		ai_will_do = {
			factor = 100
		}

		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 0.01
			}
		}

		modifier = {
			
		}

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.01 }
			add_money_with_tooltip_effect = yes
		}
		
		remove_effect = {
			build_railway = {
				level = 2
				controller_priority = {
					base = 1
					modifier = {
						tag = PAP
						add = 2
					}
				}
				start_province = 9904
				target_province = 6862
			}
		}
	}
	PAP_decision_ancona_falconara_line  = {

		icon = train_2

		available = {
			has_completed_focus = PAP_focus_ancona_falconara_line
			set_temp_variable = {
				amount_of_money_to_check = 0.01
			}
			has_specific_amount_of_money_with_inflation_included = yes 
			has_idea = PAP_Societa_Romane
		}
		
		visible = {
			has_completed_focus = PAP_focus_ancona_falconara_line
		}
		
		days_re_enable = 180
		
		fire_only_once = yes

		ai_will_do = {
			factor = 100
		}

		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 0.01
			}
		}

		modifier = {
			
		}

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.01 }
			add_money_with_tooltip_effect = yes
		}
		
		remove_effect = {
			build_railway = {
				level = 2
				controller_priority = {
					base = 1
					modifier = {
						tag = PAP
						add = 2
					}
				}
				start_province = 967
				target_province = 14142
			}
		}
	}
	PAP_decision_rome_orte_line  = {

		icon = train_2

		available = {
			has_completed_focus = PAP_focus_rome_orte_line
			set_temp_variable = {
				amount_of_money_to_check = 0.01
			}
			has_specific_amount_of_money_with_inflation_included = yes 
			has_idea = PAP_Societa_Romane
		}
		
		visible = {
			has_completed_focus = PAP_focus_rome_orte_line
		}
		
		days_re_enable = 180
		
		fire_only_once = yes

		ai_will_do = {
			factor = 100
		}

		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 0.01
			}
		}

		modifier = {
			
		}

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.01 }
			add_money_with_tooltip_effect = yes
		}
		
		remove_effect = {
			build_railway = {
				level = 2
				controller_priority = {
					base = 1
					modifier = {
						tag = PAP
						add = 2
					}
				}
				start_province = 9904
				target_province = 9794
			}
		}
	}
	PAP_decision_orte_falconara_line  = {

		icon = train_2

		available = {
			has_completed_focus = PAP_focus_orte_falconara_line
			set_temp_variable = {
				amount_of_money_to_check = 0.01
			}
			has_specific_amount_of_money_with_inflation_included = yes 
			has_idea = PAP_Societa_Romane
		}
		
		visible = {
			has_completed_focus = PAP_focus_orte_falconara_line
		}
		
		days_remove = 160
		
		fire_only_once = yes

		ai_will_do = {
			factor = 100
		}

		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 0.01
			}
		}

		modifier = {
			
		}

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.01 }
			add_money_with_tooltip_effect = yes
		}
		
		remove_effect = {
			build_railway = {
				level = 2
				controller_priority = {
					base = 1
					modifier = {
						tag = PAP
						add = 2
					}
				}
				start_province = 9794
				target_province = 14142
			}
		}
	}
	PAP_decision_rome_naples_line = {

		icon = train_2
		available = {
			has_completed_focus = PAP_focus_connect_kingdom_two_sicilies
			has_idea = PAP_Societa_Romane
		}
		
		visible = {
			has_completed_focus = PAP_focus_connect_kingdom_two_sicilies
		}

		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 2
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}
		custom_cost_text = eoanb_money_cost_text
		
		days_remove = 160
		fire_only_once = yes

		complete_effect = {
			set_temp_variable = { money_to_gain = -2 }
			add_money_with_inflation_included_with_tooltip_effect = yes
		}
		remove_effect = {
			build_railway = {
				level = 2
				controller_priority = {
					base = 1
					modifier = {
						tag = PAP
						add = 2
					}
				}
				start_province = 9904
				target_province = 923
			}
			add_opinion_modifier = {
				target = NSC
				modifier = medium_increase
			}
			
			EOANBSYS_national_crisis_progress_minus_one = yes
			EOANBSYS_national_crisis_risorgimento_crisis_update = yes
		}
	}
}

PAP_decisions_category_papal_countryside_reform = {
	PAP_decision_expand_ports = {

		icon = generic_construction

		available = {
			has_completed_focus = PAP_focus_expand_ports
		}

		visible = {
			has_completed_focus = PAP_focus_expand_ports
		}

		fire_only_once = yes

		custom_cost_trigger = {
        	set_temp_variable = { amount_of_money_to_check = 0.02 }
    	}
		custom_cost_text = eoanb_money_cost_text
		
		days_remove = 60
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.02 }
			add_money_with_tooltip_effect = yes
		}
		
		remove_effect = {
			2 = {
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
			}
		}
		ai_will_do = {
			base = 200
		}
	}
	PAP_decision_expand_fishing_market = {

		icon = generic_construction

		available = {
			has_completed_focus = PAP_focus_expand_fishing_market
		}

		visible = {
			has_completed_focus = PAP_focus_expand_fishing_market
		}

		fire_only_once = yes

		custom_cost_trigger = {
        	set_temp_variable = { amount_of_money_to_check = 0.03 }
    	}
		custom_cost_text = eoanb_money_cost_text
		
		days_remove = 60
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
		}
		
		remove_effect = {
			add_offsite_building = { type = industrial_complex level = 1 }
		}
		ai_will_do = {
			base = 200
		}
	}
	PAP_decision_consolidate_land = {
		state_target = yes
		available = {
			has_completed_focus = PAP_focus_wrestle_merchants
			has_political_power > 25
		}
		visible = {
			FROM = {
				check_variable = {
					PAP_admin_psbf < 0.0
				}
			}
		}
		targets = {2 781 157 161 }
		on_map_mode = map_only
		icon = infrastructure
		allowed = { 
			tag = PAP
		}
		ai_will_do ={
			base = 200
		}
		days_remove = 50
		complete_effect = {
			add_political_power = -25
		}
		remove_effect = {
			FROM = {
				add_to_variable = { PAP_admin_psbf = 0.05 tooltip = production_speed_buildings_factor_tooltip }
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							PAP_admin_psbf < 0
						}
						check_variable = {
							PAP_admin_lsif < 0
						}
						check_variable = {
							PAP_admin_srf < 0
						}
					}
				}
				2 = { remove_dynamic_modifier = { modifier = dynmod_PAP_inefficient_administration } }
				781 = { remove_dynamic_modifier = { modifier = dynmod_PAP_inefficient_administration } }
				157 = { remove_dynamic_modifier = { modifier = dynmod_PAP_inefficient_administration } }
				161 = { remove_dynamic_modifier = { modifier = dynmod_PAP_inefficient_administration } }
			}
		}
	}
	PAP_decision_modernize_road_network = {
		state_target = yes
		available = {
			has_completed_focus = PAP_focus_continue_road_modernization
			set_temp_variable = {
				amount_of_money_to_check = 0.01
			}
			has_specific_amount_of_money_with_inflation_included = yes
			has_political_power > 25
		}
		visible = {
			FROM = {
				check_variable = {
					PAP_admin_lsif < 0.00
				}
			}
		}
		custom_cost_trigger = {
        	set_temp_variable = { amount_of_money_to_check = 0.01 }
    	}
		custom_cost_text = eoanb_money_cost_text
		targets = {2 781 157 161 }
		on_map_mode = map_only
		icon = infrastructure
		allowed = { 
			tag = PAP
		}
		ai_will_do ={
			base = 200
		}
		days_remove = 50
		complete_effect = {
			add_political_power = -25
			set_temp_variable = { money_to_gain = -0.01 }
			add_money_with_tooltip_effect = yes
		}
		remove_effect = {
			FROM = {
				add_to_variable = { PAP_admin_lsif = 0.05 tooltip = local_supplies_tooltip }
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							PAP_admin_psbf < 0
						}
						check_variable = {
							PAP_admin_lsif < 0
						}
						check_variable = {
							PAP_admin_srf < 0
						}
					}
				}
				2 = { remove_dynamic_modifier = { modifier = dynmod_PAP_inefficient_administration } }
				781 = { remove_dynamic_modifier = { modifier = dynmod_PAP_inefficient_administration } }
				157 = { remove_dynamic_modifier = { modifier = dynmod_PAP_inefficient_administration } }
				161 = { remove_dynamic_modifier = { modifier = dynmod_PAP_inefficient_administration } }
			}
		}
	}
	PAP_decision_drain_marshes = {
		state_target = yes
		available = {
			has_completed_focus = PAP_focus_drain_marshes
			has_political_power > 25
		}
		visible = {
			FROM = {
				check_variable = {
					PAP_admin_srf < 0.0
				}
			}
		}
		targets = {2 781 157 161 }
		on_map_mode = map_only
		icon = infrastructure
		allowed = { 
			tag = PAP
		}
		ai_will_do ={
			base = 200
		}
		days_remove = 80
		complete_effect = {
			add_political_power = -25
		}
		remove_effect = {
			FROM = {
				add_to_variable = { PAP_admin_srf = 0.05 tooltip = local_resources_factor_tooltip }
			}
			if = {
				limit = {
					AND = {
						check_variable = {
							PAP_admin_psbf < 0
						}
						check_variable = {
							PAP_admin_lsif < 0
						}
						check_variable = {
							PAP_admin_srf < 0
						}
					}
				}
				2 = { remove_dynamic_modifier = { modifier = dynmod_PAP_inefficient_administration } }
				781 = { remove_dynamic_modifier = { modifier = dynmod_PAP_inefficient_administration } }
				157 = { remove_dynamic_modifier = { modifier = dynmod_PAP_inefficient_administration } }
				161 = { remove_dynamic_modifier = { modifier = dynmod_PAP_inefficient_administration } }
			}
		}
	}

	PAP_decision_improve_water_access = {
		available = {
			has_completed_focus = PAP_focus_romes_water_access	
		}
		
		visible = {
			has_completed_focus = PAP_focus_romes_water_access
		}

		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 4
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}
		custom_cost_text = eoanb_money_cost_text
		
		days_remove = 200
		fire_only_once = yes

		complete_effect = {
			set_temp_variable = { money_to_gain = -4 }
			add_money_with_inflation_included_with_tooltip_effect = yes
		}

		remove_effect = {
			2 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = naval_base
					province = 9904
					level = 1
					instant_build = yes
				}
			}
		}
	}

	PAP_decision_modernise_the_southern_road_network = {
		available = {
			has_completed_focus = PAP_focus_fix_southern_road_network
		}
		
		visible = {
			has_completed_focus = PAP_focus_fix_southern_road_network
		}

		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 5
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}
		custom_cost_text = eoanb_money_cost_text
		
		days_remove = 190
		fire_only_once = yes

		complete_effect = {
			set_temp_variable = { money_to_gain = -5 }
			add_money_with_inflation_included_with_tooltip_effect = yes
		}

		remove_effect = {
			2 = {
				add_building_construction = {
					type = supply_node
					level = 1
					instant_build = yes
					province = 11751
				}
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 1
			}
			1407 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
	}

	PAP_decision_invest_into_sicilian_infrastructure = {

		available = {
			has_completed_focus = PAP_focus_fix_southern_road_network
		}
		
		visible = {
			has_completed_focus = PAP_focus_fix_southern_road_network
		}

		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 2
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}
		custom_cost_text = eoanb_money_cost_text
		
		days_remove = 150
		fire_only_once = yes

		complete_effect = {
			set_temp_variable = { money_to_gain = -2 }
			add_money_with_inflation_included_with_tooltip_effect = yes
		}

		remove_effect = {
			117 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
	}
}
PAP_Papal_Influence_category_decisions = {
	#Hold a Military Parade
	PAP_decision_bop_hold_a_military_parade = {

		icon = GFX_decision_generic_prepare_civil_war

		fire_only_once = no
		days_re_enable = 180
         
        custom_cost_trigger = {
        	command_power > 9.99
    	}
		custom_cost_text = eoanb_command_power_10
		
		complete_effect = {
			add_power_balance_value = {
				id = PAP_Balance_Of_Power_Papal_Influence
				value = 0.05
				tooltip_side = PAP_BOP_Xavier_de_Merode
			}
			add_command_power = -10
		}
       
		ai_will_do = {
			base = 500
		}
	}

	# Agressive Foreign Policy
	PAP_decision_bop_agressive_foreign_policy = {

		icon = GFX_decision_generic_police_action

		fire_only_once = no
		cost = 20
		days_re_enable = 365
		
		complete_effect = {
			add_stability = -0.05
			add_power_balance_value = {
				id = PAP_Balance_Of_Power_Papal_Influence
				value = 0.15
				tooltip_side = PAP_BOP_Xavier_de_Merode
			}
			add_opinion_modifier = { target = PIE modifier = PAP_agressive_foreign_policy }
			reverse_add_opinion_modifier = { target = PIE modifier = PAP_agressive_foreign_policy }
		}
       
		ai_will_do = {
			base = 500
		}
	}

	# Stir the flames of the Counter Risorgimento
	PAP_decision_bop_stir_the_flames_of_the_counter_risorgimento = {

		icon = GFX_decision_generic_political_rally

		visible = { has_completed_focus = PAP_focus_spearhead_counter_risorgimento }

		fire_only_once = no
		days_remove = 180
		days_re_enable = 180
		
		complete_effect = {
			add_stability = -0.02
			add_power_balance_modifier = {
				id = PAP_Balance_Of_Power_Papal_Influence
				modifier = PAP_BoP_counter_risorgimento_ideas
			}
		}

		remove_effect = {
			remove_power_balance_modifier = {
				id = PAP_Balance_Of_Power_Papal_Influence
				modifier = PAP_BoP_counter_risorgimento_ideas
			}
		}
       
		ai_will_do = {
			base = 500
		}
	}

	#Secure Diplomatic Backings
	PAP_decision_bop_secure_diplomatic_backings = {

		icon = GFX_decision_hol_attract_foreign_investors

		fire_only_once = no
		days_re_enable = 180
        cost = 10
		
		complete_effect = {
			add_power_balance_value = {
				id = PAP_Balance_Of_Power_Papal_Influence
				value = -0.05
				tooltip_side = PAP_BOP_Giacomo_Antonelli
			}
		}
       
		ai_will_do = {
			base = 500
		}
	}

	# Flexible foreign policy
	PAP_decision_bop_flexible_foreign_policy = {

		icon = GFX_decision_generic_political_address

		fire_only_once = no
		days_re_enable = 365
		custom_cost_trigger = {
        	has_army_experience > 14
    	}
		custom_cost_text = eoanb_army_xp_15
		
		complete_effect = {
			add_stability = -0.05
			army_experience = -15
			add_power_balance_value = {
				id = PAP_Balance_Of_Power_Papal_Influence
				value = -0.15
				tooltip_side = PAP_BOP_Giacomo_Antonelli
			}
		}
       
		ai_will_do = {
			base = 500
		}
	}

	# Replace the French
	PAP_replace_the_french = {

		icon = GFX_decision_generic_fundraising

		visible = { has_completed_focus = PAP_focus_french_withdrawl }

		fire_only_once = no
		days_remove = 180
		days_re_enable = 180
		
		complete_effect = {
			add_stability = -0.02
			add_power_balance_modifier = {
				id = PAP_Balance_Of_Power_Papal_Influence
				modifier = PAP_BoP_replacing_the_french
			}
		}

		remove_effect = {
			custom_effect_tooltip = PAP_replace_the_french_tt
			hidden_effect = {
				if = {
					limit = {
						NSC = {
							has_opinion = {
								target = PAP
								value > 20
							}
						}
					}

					add_manpower = 500
				}
				if = {
					limit = {
						TUS = {
							has_opinion = {
								target = PAP
								value > 20
							}
						}
					}

					add_manpower = 500
				}
				if = {
					limit = {
						MOD = {
							has_opinion = {
								target = PAP
								value > 20
							}
						}
					}

					add_manpower = 500
				}

				if = {
					limit = {
						PRM = {
							has_opinion = {
								target = PAP
								value > 20
							}
						}
					}

					add_manpower = 500
				}

				if = {
					limit = {
						PIE = {
							has_opinion = {
								target = PAP
								value > 20
							}
						}
					}

					add_manpower = 500
				}

				if = {
					limit = {
						AUS = {
							has_opinion = {
								target = PAP
								value > 20
							}
						}
					}

					add_manpower = 500
				}

				if = {
					limit = {
						FRA = {
							has_opinion = {
								target = PAP
								value > 20
							}
						}
					}

					add_manpower = 500
				}

				if = {
					limit = {
						SPR = {
							has_opinion = {
								target = PAP
								value > 20
							}
						}
					}

					add_manpower = 500
				}

				if = {
					limit = {
						MEX = {
							has_opinion = {
								target = PAP
								value > 20
							}
						}
					}

					add_manpower = 500
				}

				if = {
					limit = {
						BRA = {
							has_opinion = {
								target = PAP
								value > 20
							}
						}
					}

					add_manpower = 500
				}
			}
			remove_power_balance_modifier = {
				id = PAP_Balance_Of_Power_Papal_Influence
				modifier = PAP_BoP_replacing_the_french
			}
		}
       
		ai_will_do = {
			base = 500
		}
	}
}