eoanb_category_economic = {

	SPR_buy_back_mining_rights_decision = {
		icon = steel
		available = {				
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		visible = {
			169 = { has_state_flag = SPR_sold_andalusia_mining_rights_flag }
			owns_state = 169
		}
		cost =50
		allowed = { TAG = SPR }
		fire_only_once = no
		complete_effect = {
			ENG = { remove_resource_rights = 169 }
			hidden_effect = {
				ENG = { country_event = { id = SPR_bankruptcy_events.4 } }
				set_temp_variable = { money_to_gain = -1 }
				add_money_with_tooltip_effect = yes 
				169 = { clr_state_flag = SPR_sold_andalusia_mining_rights_flag }
			}
		}
		ai_will_do = {
			base = 50
			modifier = {
				factor = 0
				set_temp_variable = { loan_size_to_check = 35}
				has_less_than_specific_loan_size = no
			}
		}
	}

	#Develop Coal in Andalusia
	SPR_decision_coal_mines = {

		icon = coal

		allowed = { tag = SPR }

		available = {
			has_completed_focus = SPR_mining_revolution
			has_stability > 0.2
		}

		visible = {
			has_full_control_of_state = 41
			has_full_control_of_state = 169
		}

		fire_only_once = yes

		custom_cost_trigger = {
        	set_temp_variable = { amount_of_money_to_check = 0.5 }
    	}
		custom_cost_text = eoanb_money_cost_text

		days_remove = 365

		modifier = {
			consumer_goods_expected_value = 0.05
		}

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.5 }
			add_money_with_tooltip_effect = yes
		}

		remove_effect = {
			41 = {
				add_building_construction = {
					type = 	coal_mine
					level = 1
					instant_build = yes
				}
			}
			169 = {
				add_building_construction = {
					type = 	coal_mine
					level = 1
					instant_build = yes
				}
			}
		}

		ai_will_do = {
			base = 1000
		}
	}

	#Develop Basque Iron Deposits
	SPR_decision_develop_basque_iron = {

		icon = generic_operation

		allowed = { tag = SPR }

		available = {
			has_completed_focus = SPR_basque_iron
			has_stability > 0.2
		}

		visible = {
			has_full_control_of_state = 172
			has_full_control_of_state = 1059
		}

		fire_only_once = yes

		custom_cost_trigger = {
        	set_temp_variable = { amount_of_money_to_check = 0.5 }
    	}
		custom_cost_text = eoanb_money_cost_text

		days_remove = 365

		modifier = {
			consumer_goods_expected_value = 0.05
		}

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.5 }
			add_money_with_tooltip_effect = yes
		}

		remove_effect = {
			add_resource = {
				type = iron
				amount = 3
				state = 172
			}
			add_resource = {
				type = iron
				amount = 5
				state = 1059
			}
		}

		ai_will_do = {
			base = 1000
		}
	}

	#Popularize Acero Toledano
	SPR_mission_acero_toledano = {

        icon = generic_factory

        allowed = { always = no }

        available = {
			owns_state = 175
			175 = { steel_mill > 0 }
        }

        activation = { always = no }

        highlight_states = {
			state = 175
		}

        fire_only_once = yes

        is_good = no

        days_mission_timeout = 1500

        timeout_effect = {
            if = {
	            limit = {
	            	is_ai = no
	            }
	            add_political_power = -50
				add_stability = -0.01
	        }
        }

        complete_effect = {
            175 = { add_extra_state_shared_building_slots = 1 }
			custom_effect_tooltip = SPR_mission_acero_toledano_effect_tt
        }

        ai_will_do = {
			base = 100
		}
    }

	#Madrid-Zaragoza Railway Concession
	SPR_decision_madrid_zaragoza_railway_concession = {
        icon = railway
        allowed = { TAG = SPR }
        available = {
			owns_state = 166
			owns_state = 176
			owns_state = 175
			owns_state = 804
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
        }
		cost = 50
		visible = { 
			has_completed_focus = SPR_new_railway_concessions
		}
        highlight_states = {
			state = 166
		}
        fire_only_once = yes
        days_remove = 720

        complete_effect = {
			hidden_effect = {   
				set_temp_variable = { money_to_gain = -0.4 }
				add_money_with_tooltip_effect = yes 
			}
		}
		
        remove_effect = {
            build_railway = {
				level = 1
				build_only_on_allied = yes
				controller_priority = {
					base = 1
				}
				fallback = yes
				path = { 3938 3858 6993 9785 11766 813 3816 }
				start_province = 3938
				target_province = 3816
			}
			#hidden_effect = {
			#	SPR = { country_event = { days = 730 id = SPR_bankruptcy_events.5 } }
			#}
        }

        ai_will_do = {
			base = 100
			modifier = { 
				factor = 0
				set_temp_variable = { loan_size_to_check = 200}
				has_less_than_specific_loan_size = no
			}
		}
    }

	#Valladolid-Burgos Railway Concession
	SPR_decision_valladolid_burgos_railway_concession = {
        icon = railway
        allowed = { TAG = SPR }
        available = {
			owns_state = 176
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
        }
		visible = { 
			has_completed_focus = SPR_new_railway_concessions
		}
		cost = 50
        highlight_states = {
			state = 176
		}
        fire_only_once = yes
        days_remove = 360
		
		complete_effect = {
			hidden_effect = { 
				set_temp_variable = { money_to_gain = -0.4 }
				add_money_with_tooltip_effect = yes 
				set_country_flag = SPR_decision_valladolid_burgos_railway_concession_flag
			}
		}
		
        remove_effect = {
            build_railway = {
				level = 1
				build_only_on_allied = yes
				controller_priority = {
					base = 1
				}
				fallback = yes
				path = { 885 903 6936 11825 }
				start_province = 885
				target_province = 11825
			}
			#hidden_effect = {
			#	SPR = { country_event = { days = 730 id = SPR_bankruptcy_events.6 } }
			#}
        }

        ai_will_do = {
			base = 100
			modifier = { 
				factor = 0
				set_temp_variable = { loan_size_to_check = 45}
				has_less_than_specific_loan_size = no
			}
		}
    }
	
	#Zaragoza-Barcelona Railway Concession
	SPR_mission_zaragoza_barcelona_railway_concession = {
        icon = railway
        allowed = { TAG = SPR }
        available = {
			owns_state = 176
			owns_state = 165
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
        }
		visible = { 
			has_completed_focus = SPR_railway_concessions
		}
		cost = 50
        highlight_states = {
			state = 165
		}
        fire_only_once = yes
        days_remove = 520
		
		complete_effect = {
			hidden_effect = {   
				set_temp_variable = { money_to_gain = -0.4 }
				add_money_with_tooltip_effect = yes 
			}
		}
		
        remove_effect = {
            build_railway = {
				level = 1
				build_only_on_allied = yes
				controller_priority = {
					base = 1
				}
				fallback = yes
				path = { 3816 9813 11793 6836 9797 9764 }
				start_province = 3816
				target_province = 9764
			}
			#hidden_effect = {
			#	SPR = { country_event = { days = 730 id = SPR_bankruptcy_events.6 } }
			#}
        }

        ai_will_do = {
			base = 100
			modifier = { 
				factor = 0
				set_temp_variable = { loan_size_to_check = 45}
				has_less_than_specific_loan_size = no
			}
		}
    }
	
	#Madrid-Santander Railway Concession
	SPR_mission_madrid_santander_railway_concession = {
        icon = railway
        allowed = { TAG = SPR }
        available = {
			owns_state = 1270
			owns_state = 176
			owns_state = 804
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
        }
		visible = { 
			has_completed_focus = SPR_railway_concessions
		}
		cost = 50
        highlight_states = {
			state = 1270
		}
        fire_only_once = yes
        days_remove = 720
		
		complete_effect = {
			hidden_effect = { 
				if = { 
					limit = { has_country_flag = SPR_decision_valladolid_burgos_railway_concession_flag }
					set_temp_variable = { money_to_gain = -0.4 }
					add_money_with_tooltip_effect = yes 
				}
				else = {   
					set_temp_variable = { money_to_gain = -0.6 }
					add_money_with_tooltip_effect = yes 
				}
			}
		}
		
        remove_effect = {
            if = {
				limit = { has_country_flag = SPR_decision_valladolid_burgos_railway_concession_flag }
				clr_country_flag = SPR_decision_valladolid_burgos_railway_concession_flag
				build_railway = {
					level = 1
					build_only_on_allied = yes
					controller_priority = {
						base = 1
					}
					fallback = yes
					path = { 3938 3794 9800 9846 11825 }
					start_province = 3938
					target_province = 11825
				}
				build_railway = {
					level = 1
					build_only_on_allied = yes
					controller_priority = {
						base = 1
					}
					fallback = yes
					path = { 903 9700 738 11688 }
					start_province = 903
					target_province = 11688
				}
			}
			else = {
				build_railway = {
					level = 1
					build_only_on_allied = yes
					controller_priority = {
						base = 1
					}
					fallback = yes
					path = { 3938 3794 9800 9846 11825 6936 903 9700 738 11688 }
					start_province = 3938
					target_province = 11688
				}
			}
			#hidden_effect = {
			#	SPR = { country_event = { days = 730 id = SPR_bankruptcy_events.6 } }
			#}
			
        }

        ai_will_do = {
			base = 100
			modifier = { 
				factor = 0
				set_temp_variable = { loan_size_to_check = 45}
				has_less_than_specific_loan_size = no
			}
		}
    }
	
	#Madrid-Cádiz  Railway Concession
	SPR_mission_madrid_cadiz_railway_concession = {
        icon = railway
        allowed = { TAG = SPR }
        available = {
			owns_state = 169
			owns_state = 173
			owns_state = 175
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
        }
		visible = { 
			has_completed_focus = SPR_railway_concessions
		}
        highlight_states = {
			state = 169
		}
		cost = 50
        fire_only_once = yes
        days_remove = 1080
		
		complete_effect = {
			hidden_effect = {   
				set_temp_variable = { money_to_gain = -0.7 }
				add_money_with_tooltip_effect = yes 
			}
		}
		
        remove_effect = {
            build_railway = {
				level = 1
				build_only_on_allied = yes
				controller_priority = {
					base = 1
				}
				fallback = yes
				path = { 3953 9828 12083 950 3871 875 9891 7098 7183 1048 }
				start_province = 3953
				target_province = 1048
			}
			#hidden_effect = {
			#	SPR = { country_event = { days = 730 id = SPR_bankruptcy_events.6 } }
			#}
        }

        ai_will_do = {
			base = 100
			modifier = { 
				factor = 0
				set_temp_variable = { loan_size_to_check = 45}
				has_less_than_specific_loan_size = no
			}
		}
    }
	
	#Madrid-Cartagena  Railway Concession
	SPR_mission_madrid_cartagena_railway_concession = {
        icon = railway
        allowed = { TAG = SPR }
        available = {
			owns_state = 175
			owns_state = 168
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
        }
		visible = { 
			has_completed_focus = SPR_railway_concessions
		}
        highlight_states = {
			state = 168
		}
        fire_only_once = yes
        days_remove = 360
		
		complete_effect = {
			hidden_effect = {   
				set_temp_variable = { money_to_gain = -0.3 }
				add_money_with_tooltip_effect = yes 
			}
		}
		
        remove_effect = {
            build_railway = {
				level = 1
				build_only_on_allied = yes
				controller_priority = {
					base = 1
				}
				fallback = yes
				path = { 832 9903 1093 10024 }
				start_province = 832
				target_province = 10024
			}
			#hidden_effect = {
			#	SPR = { country_event = { days = 730 id = SPR_bankruptcy_events.6 } }
			#}
        }

        ai_will_do = {
			base = 100
			modifier = { 
				factor = 0
				set_temp_variable = { loan_size_to_check = 45}
				has_less_than_specific_loan_size = no
			}
		}
    }
}

SPR_decision_category_debt_management = {

	MEX_cease_foreign_debt_repayments_decision = {
		icon = generic_break_treaty
		available = {
			if = {
				limit = { has_country_leader = { name = "Ignacio Comonfort" ruling_only = yes } }
				NOT = { has_country_leader = { name = "Ignacio Comonfort" ruling_only = yes } }
			}
			else = { has_government = centrism }
		}
		visible = {
			has_country_flag = MEX_foreign_debt_repayments_flag
			has_war = no
			NOT = { country_exists = MEC }
			NOT = { country_exists = MXE }
		}
		allowed = { TAG = MEX }
		fire_only_once = yes
		cost = 25
		complete_effect = {
			custom_effect_tooltip = MEX_cease_foreign_debt_repayments_decision_tooltip
			hidden_effect = {
				set_country_flag = MEX_cease_foreign_debt_repayments_decision_flag
				country_event = { id = SPR_mexican_expedition.4 }
			}
		}
		ai_will_do = {
			base = 0
			modifier = {
				add = 5
				set_temp_variable = { loan_size_to_check = 20}
				has_less_than_specific_loan_size = no
				date > 1861.1.1
			}
			modifier = {
				add = 25
				set_temp_variable = { loan_size_to_check = 30}
				has_less_than_specific_loan_size = no
				date > 1861.1.1
			}
			modifier = {
				add = 50
				date > 1861.1.1
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 0
				set_temp_variable = { loan_size_to_check = 10}
				has_less_than_specific_loan_size = yes
			}
		}
	}
	
	SPR_foreign_debt_repayments_mission = {
		icon = money
		allowed = {
			OR = {
				TAG = MEX
				TAG = MEC
				TAG = MXE
				TAG = GUA
				TAG = ELS
				TAG = HON
				TAG = NIC
				TAG = COS
				TAG = COL
				TAG = VEN
				TAG = ECU
				TAG = PRU
				TAG = CHL
				TAG = BOL
				TAG = URG
				TAG = BUE
				TAG = ARG
			}
		}
		available = {
			hidden_trigger = {
				OR = {
					set_temp_variable = { loan_size_to_check = 200}
					has_less_than_specific_loan_size = no
				}
			}
		}

		activation = {
			check_variable = {ROOT.SPR_debt_repayments_level > 0}
			hidden_trigger = {
				if = {
					limit = { OR = { TAG = MEX TAG = MEC TAG = MXE } }
					has_country_flag = MEX_foreign_debt_repayments_flag
				}
				NOT = { has_country_flag = debt_declared_bankruptcy_flag }
			}
		}

		is_good = no
		selectable_mission = no
		days_mission_timeout = 360

		timeout_effect = {
			hidden_effect = { activate_mission = SPR_foreign_debt_repayments_mission }
			set_temp_variable = { money_to_gain = -0.3 }
			add_money_with_tooltip_effect = yes 
			custom_effect_tooltip = MEX_foreign_debt_repayments_mission_complete_effect
		}
		complete_effect = {
			hidden_effect = {
				if = {
					limit = { OR = { TAG = MEX TAG = MEC TAG = MXE } }
					country_event = { id = mexico.41 days = 16 }
				}
				set_country_flag = debt_declared_bankruptcy_flag
			}
		}

		ai_will_do = {
			base = 0
		}
	}

	DOM_declare_bankruptcy_mission = {
		icon = money
		allowed = { tag = DOM }
		available = {
			hidden_trigger = {
				OR = {
					set_temp_variable = { loan_size_to_check = 200}
					has_less_than_specific_loan_size = no
				}
			}
		}

		activation = {
			check_variable = {ROOT.SPR_debt_repayments_level > 0}
			hidden_trigger = {
				TAG = DOM
				NOT = { has_country_flag = debt_declared_bankruptcy_flag }
				NOT = { has_country_flag = DOM_declared_bankruptcy_1861 }
			}
		}

		is_good = no
		selectable_mission = no
		days_mission_timeout = 360

		timeout_effect = {
			hidden_effect = { activate_mission = DOM_declare_bankruptcy_mission }
			set_temp_variable = { money_to_gain = -0.3 }
			add_money_with_tooltip_effect = yes 
			custom_effect_tooltip = DOM_declare_bankruptcy_mission_complete_effect
		}
		complete_effect = {
			hidden_effect = {
				country_event = { id = dom.38 days = 16 }
				set_country_flag = debt_declared_bankruptcy_flag
				set_country_flag = DOM_declared_bankruptcy_1861
			}
		}

		ai_will_do = {
			base = 0
		}
	}


	LIB_US_invests_to_pay_debt_decision = {
		icon = money
		allowed = { tag = LIB }
		available = {
			hidden_trigger = { always = no }
		}

		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = LIB_US_invests_to_pay_debt_decision_trigger
				OR = {
					NOT = { has_country_flag = USA_LIB_investment_flag }
					USA = { exists = no }
				}
			}
		}

		activation = {
			set_temp_variable = { loan_size_to_check = 30 }
			has_less_than_specific_loan_size = no
			hidden_trigger = {
				has_country_flag = USA_LIB_investment_flag
				OR = {
					USA = { exists = yes }
					any_other_country = { has_country_flag = LIB_investment_flag }
				}
				NOT = { has_country_flag = debt_declared_bankruptcy_flag }
			}
		}

		is_good = yes
		selectable_mission = yes
		custom_cost_trigger = { always = yes }
		custom_cost_text = LIB_US_invests_to_pay_debt_decision_custom_cost
		days_mission_timeout = 180

		timeout_effect = {
			if = {
				limit = { has_country_flag = USA_assist_lib_debt }
				hidden_effect = {
					set_temp_variable = { loans_amount = 6 }
					take_loan_without_inflation_effect = yes
				}
			}
			else = {
				hidden_effect = {
					set_temp_variable = { loans_amount = 4 }
					take_loan_without_inflation_effect = yes					
				}
			}
		}

		ai_will_do = {
			base = 0
		}
	}

	SPR_paying_debt_decision = {
		icon = money
		allowed = { always = no }
		available = {
			hidden_trigger = { always = no }
		}
		days_mission_timeout = 360
		activation = {
			has_country_flag = paying_debt
			NOT = { has_country_flag = debt_declared_bankruptcy_flag }
		}
		cancel_trigger = {
			hidden_trigger = { has_country_flag = debt_declared_bankruptcy_flag }
		}
		#cancel_if_not_visible = yes
		selectable_mission = yes
		custom_cost_trigger = { always = yes }
		custom_cost_text = SPR_paying_debt_decision_custom_cost
		is_good = yes
		timeout_effect = {
			#custom_effect_tooltip = EGY_afr_decrease_debt_1
			hidden_effect = {
			}
		}
		ai_will_do = {
			base = 0
		}
	}

	debt_colonial_profits_decision = {
		icon = money
		allowed = { always = yes }
		available = {
			hidden_trigger = { always = no }
		}
		days_mission_timeout = 360
		activation = {
			has_variable = total_colonial_profits
		}
		cancel_trigger = {
			hidden_trigger = { NOT = { has_variable = total_colonial_profits } }
			hidden_trigger = { has_country_flag = debt_declared_bankruptcy_flag }
		}
		selectable_mission = yes
		custom_cost_trigger = { always = yes }
		custom_cost_text = debt_colonial_profits_decision_custom_cost
		is_good = yes
		timeout_effect = {
			hidden_effect = {
				#NEEDS SOME NEW EFFECTS
				set_temp_variable = { loans_amount = 10 }
				take_loan_without_inflation_effect = yes
				
			}
		}
		ai_will_do = {
			base = 0
		}
	}

	SPR_debt_repayment_profits_decision = {
		icon = money
		allowed = { TAG = SPR }
		available = {
			hidden_trigger = { always = no }
		}
		days_mission_timeout = 360
		activation = {
			has_variable = SPR_debt_repayment_profits
		}
		cancel_trigger = {
			hidden_trigger = { NOT = { has_variable = SPR_debt_repayment_profits } }
			hidden_trigger = { has_country_flag = debt_declared_bankruptcy_flag }
		}
		selectable_mission = yes
		custom_cost_trigger = { always = yes }
		custom_cost_text = SPR_debt_repayment_profits_decision_custom_cost
		is_good = yes
		timeout_effect = {
			hidden_effect = {
				#NEEDS SOME NEW EFFECTS
				set_temp_variable = { loans_amount = 10 }
				take_loan_without_inflation_effect = yes
				
			}
		}
		ai_will_do = {
			base = 0
		}
	}
}

SPR_decision_category_colonial_affairs = {

	SPR_unclaimed_territory_menu_on = {
		available = {
			always = yes
		}
		#allowed = { tag = SPR }
		cost = 0
		fire_only_once = no
		visible = {
			has_country_flag = SPR_unclaimed_territory_colonize_decisions
			NOT = { has_country_flag = SPR_unclaimed_territory_menu_on_flag }
		}
		complete_effect = {
			custom_effect_tooltip = SPR_unclaimed_territory_menu_on_tooltip
			set_country_flag = SPR_unclaimed_territory_menu_on_flag
		}
		ai_will_do = {
			base = 100
		}
	}

	SPR_unclaimed_territory_menu_off = {
		available = {
			always = yes
		}
		#allowed = { tag = SPR }
		cost = 0
		fire_only_once = no
		visible = {
			has_country_flag = SPR_unclaimed_territory_menu_on_flag
			is_ai = no
		}
		complete_effect = {
			custom_effect_tooltip = SPR_unclaimed_territory_menu_off_tooltip
			clr_country_flag = SPR_unclaimed_territory_menu_on_flag
		}
	}

	SPR_unclaimed_territory_decision = {
		available = {
			hidden_trigger = { check_variable = { FROM.UCT_territory_management_state_menu_open@ROOT = 0 } }
			if = {
				limit = { NOT = { FROM = { is_claimed_by = ROOT } } }
				custom_trigger_tooltip = {
					tooltip = UCT_territory_management_establish_first_claim_cost_tooltip
				}
			}
			if = {
				limit = { FROM ={ has_state_flag = UCT_territory_management_claim_progress_convoy_3_flag } }
				custom_trigger_tooltip = {
					tooltip = UCT_territory_management_claim_progress_convoy_3_cost_tooltip
					has_equipment = { convoy_1 > 2 }
				}
			}
			else_if = {
				limit = { FROM ={ has_state_flag = UCT_territory_management_claim_progress_convoy_2_flag } }
				custom_trigger_tooltip = {
					tooltip = UCT_territory_management_claim_progress_convoy_2_cost_tooltip
					has_equipment = { convoy_1 > 1 }
				}
			}
			else_if = {
				limit = { FROM ={ has_state_flag = UCT_territory_management_claim_progress_convoy_1_flag } }
				custom_trigger_tooltip = {
					tooltip = UCT_territory_management_claim_progress_convoy_1_cost_tooltip
					has_equipment = { convoy_1 > 0 }
				}
			}
		}
		state_target = yes
		#allowed = { tag = SPR }
		visible = {
			has_country_flag = SPR_unclaimed_territory_menu_on_flag
			check_variable = { var = FROM.SPR_unclaimed_territory_abandon_claim_var@ROOT value = 0 compare = equals }
		}
		target_trigger = {
			FROM = {
				OR = {
					STATE = 633
					STATE = 639
					STATE = 725
					STATE = 645
					STATE = 648
					STATE = 632
					STATE = 631
					STATE = 630
					STATE = 727
					STATE = 642
					STATE = 643
				}
				check_variable = { var = FROM.SPR_unclaimed_territory_abandon_claim_var@ROOT value = 0 compare = equals }
			}
		}
		cost = 0
		fire_only_once = no
		complete_effect = {
			if = {
				limit = { NOT = { FROM = { is_claimed_by = ROOT } } }
				hidden_effect = { FROM = { state_event = { id = UCT_territory_management_establish_first_claim.1 } } }
				custom_effect_tooltip = UCT_territory_management_establish_first_claim_tooltip
			}
			else_if = {
				limit = {
					FROM ={
						OR = {
							has_state_flag = UCT_territory_management_claim_progress_convoy_3_flag
							has_state_flag = UCT_territory_management_claim_progress_convoy_2_flag
							has_state_flag = UCT_territory_management_claim_progress_convoy_1_flag
						}
					}
				}
				hidden_effect = {
					if = {
						limit = { FROM ={ has_state_flag = UCT_territory_management_claim_progress_convoy_3_flag } }
						FROM = { clr_state_flag = UCT_territory_management_claim_progress_convoy_3_flag }
					}
					else_if = {
						limit = { FROM ={ has_state_flag = UCT_territory_management_claim_progress_convoy_2_flag } }
						FROM = { clr_state_flag = UCT_territory_management_claim_progress_convoy_2_flag }
					}
					else_if = {
						limit = { FROM ={ has_state_flag = UCT_territory_management_claim_progress_convoy_1_flag } }
						FROM = { clr_state_flag = UCT_territory_management_claim_progress_convoy_1_flag }
					}
				}
				hidden_effect = { FROM = { state_event = { id = UCT_territory_management_establish_first_claim.3 } } }
				custom_effect_tooltip = UCT_territory_management_claim_progress_convoy_event_tooltip
			}
			else = {
				custom_effect_tooltip = UCT_territory_management_no_option_tooltip
			}
		}
		ai_will_do = {
			base = 0
		}
	}
}

eoanb_category_economic = {
	SPR_develop_right_hispaniola_infrastructure_decision = {
		icon = generic_construction
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_right_hispaniola_tooltip
				OR = {
					owns_state = 319
					319 = { OWNER = { is_subject_of = ROOT } }
				}
				OR = { 
					owns_state = 1318
					1318 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		highlight_states = {
			STATE = 1318
		}
		visible = {
			if = { 
				limit = {
					NOT = {
						319 = { has_state_flag = SPR_right_hispaniola_has_infrastructure_investments_flag }
						1318 = { has_state_flag = SPR_right_hispaniola_has_infrastructure_investments_flag }
					}
				}
				OR = { 
					has_country_flag = SPR_develop_right_hispaniola_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_develop_right_hispaniola_flag }
					}
				}
				if = { 
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						319 = { is_owned_by = DOM }
						1318 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 319
						319 = { OWNER = { is_subject_of = ROOT } }
					}
					OR = { 
						owns_state = 1318
						1318 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
		allowed = { 
			OR = {
				tag = SPR 
				tag = DOM
			}
		}
		cost = 100
		days_remove = 180
		fire_only_once = yes

		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_right_hispaniola_tooltip
				AND = {
					NOT = { owns_state = 319 }
					NOT = { 319 = { OWNER = { is_subject_of = ROOT } } }
				}
				AND = {
					NOT = { owns_state = 1318 }
					NOT = { 1318 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
		}
		remove_effect = {
			#finishing debt
			set_temp_variable = { money_to_gain = -0.3 }
			add_money_with_tooltip_effect = yes 
			319 = {
				add_building_construction = { type = infrastructure level = 1 instant_build = yes }
				set_state_flag = SPR_right_hispaniola_has_infrastructure_investments_flag
			}
			1318 = {
				add_building_construction = { type = infrastructure level = 1 instant_build = yes }
				add_building_construction = { type = naval_base level = 1 instant_build = yes province = 7660 }
				set_state_flag = SPR_right_hispaniola_has_infrastructure_investments_flag
			}
			custom_effect_tooltip = SPR_right_hispaniola_has_infrastructure_investments_tooltip
			#set_country_flag = SPR_right_hispaniola_has_infrastructure_investments_flag
		}
	}
	
	SPR_develop_left_hispaniola_infrastructure_decision = {
		icon = generic_construction
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_left_hispaniola_tooltip
				OR = {
					owns_state = 790
					790 = { OWNER = { is_subject_of = ROOT } }
				}
				OR = { 
					owns_state = 318
					318 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		highlight_states = {
			STATE = 318
		}
		visible = {
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
			if = { 
				limit = {
					NOT = {
						790 = { has_state_flag = SPR_left_hispaniola_has_infrastructure_investments_flag }
						318 = { has_state_flag = SPR_left_hispaniola_has_infrastructure_investments_flag }
					}
				}
				OR = { 
					has_country_flag = SPR_develop_left_hispaniola_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_develop_left_hispaniola_flag }
					}
				}
				if = { 
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						790 = { is_owned_by = DOM }
						318 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 790
						790 = { OWNER = { is_subject_of = ROOT } }
					}
					OR = { 
						owns_state = 318
						318 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
		allowed = { 
			OR = {
				tag = SPR 
				tag = DOM
			}
		}
		cost = 100
		days_remove = 180
		fire_only_once = yes

		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_left_hispaniola_tooltip
				AND = {
					NOT = { owns_state = 790 }
					NOT = { 790 = { OWNER = { is_subject_of = ROOT } } }
				}
				AND = {
					NOT = { owns_state = 318 }
					NOT = { 318 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
		}
		remove_effect = {
			#finishing debt
			set_temp_variable = { money_to_gain = -0.3 }
			add_money_with_tooltip_effect = yes 
			790 = {
				add_building_construction = { type = infrastructure level = 1 instant_build = yes }
				set_state_flag = SPR_left_hispaniola_has_infrastructure_investments_flag
			}
			318 = {
				add_building_construction = { type = infrastructure level = 1 instant_build = yes }
				add_building_construction = { type = naval_base level = 1 instant_build = yes province = 4641 }
				set_state_flag = SPR_left_hispaniola_has_infrastructure_investments_flag
			}
			custom_effect_tooltip = SPR_left_hispaniola_has_infrastructure_investments_tooltip
			#set_country_flag = SPR_right_hispaniola_has_infrastructure_investments_flag
		}
	}
	
	SPR_develop_puerto_rico_infrastructure_decision = {
		icon = generic_construction
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_puerto_rico_tooltip
				OR = {
					owns_state = 686
					686 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		highlight_states = {
			STATE = 686
		}
		visible = {
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
			if = { 
				limit = {
					NOT = {
						686 = { has_state_flag = SPR_puerto_rico_has_infrastructure_investments_flag }
					}
				}
				OR = { 
					has_country_flag = SPR_develop_cuba_and_puerto_rico_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_develop_cuba_and_puerto_rico_flag }
					}
				}
				if = { 
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						686 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 686
						686 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
		allowed = { 
			OR = {
				tag = SPR 
				tag = DOM
			}
		}
		cost = 100
		days_remove = 180
		fire_only_once = yes

		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_puerto_rico_tooltip
				AND = {
					NOT = { owns_state = 686 }
					NOT = { 686 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
			set_temp_variable = { money_to_gain = -0.3 }
			add_money_with_tooltip_effect = yes 
		}
		remove_effect = {
			#finishing debt
			set_temp_variable = { money_to_gain = -0.5 }
			add_money_with_tooltip_effect = yes 
			686 = {
				add_building_construction = { type = infrastructure level = 1 instant_build = yes }
				add_building_construction = { type = naval_base level = 1 instant_build = yes province = 1440 }
				set_state_flag = SPR_puerto_rico_has_infrastructure_investments_flag
			}
			custom_effect_tooltip = SPR_puerto_rico_has_infrastructure_investments_tooltip
			#set_country_flag = SPR_puerto_rico_has_infrastructure_investments_flag
		}
	}

	SPR_develop_cuba_infrastructure_decision = {
		icon = generic_construction
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_all_of_cuba_tooltip
				OR = {
					owns_state = 315
					315 = { OWNER = { is_subject_of = ROOT } }
				}
				OR = {
					owns_state = 1350
					1350 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		highlight_states = {
			STATE = 1350
		}
		visible = {
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
			if = { 
				limit = {
					NOT = {
						315 = { has_state_flag = SPR_cuba_has_infrastructure_investments_flag }
						1350 = { has_state_flag = SPR_cuba_has_infrastructure_investments_flag }
						1022 = { has_state_flag = SPR_cuba_has_infrastructure_investments_flag }
					}
				}
				OR = { 
					has_country_flag = SPR_develop_cuba_and_puerto_rico_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_develop_cuba_and_puerto_rico_flag }
					}
				}
				if = { 
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						315 = { is_owned_by = DOM }
						1350 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 315
						315 = { OWNER = { is_subject_of = ROOT } }
					}
					OR = { 
						owns_state = 1350
						1350 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
		allowed = { 
			OR = {
				tag = SPR 
				tag = DOM
			}
		}
		cost = 100
		days_remove = 180
		fire_only_once = yes

		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_all_of_cuba_tooltip
				AND = {
					NOT = { owns_state = 315 }
					NOT = { 315 = { OWNER = { is_subject_of = ROOT } } }
				}
				AND = {
					NOT = { owns_state = 1350 }
					NOT = { 1350 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
			set_temp_variable = { money_to_gain = -0.4 }
			add_money_with_tooltip_effect = yes
		}
		remove_effect = {
			#finishing debt
			set_temp_variable = { money_to_gain = -0.5 }
			add_money_with_tooltip_effect = yes
			1022 = {
				add_building_construction = { type = infrastructure level = 1 instant_build = yes }
				set_state_flag = SPR_cuba_has_infrastructure_investments_flag
			}
			1350 = {
				add_building_construction = { type = infrastructure level = 1 instant_build = yes }
				set_state_flag = SPR_cuba_has_infrastructure_investments_flag
			}
			315 = {
				add_building_construction = { type = infrastructure level = 1 instant_build = yes }
				add_building_construction = { type = naval_base level = 1 instant_build = yes province = 1550 }
				set_state_flag = SPR_cuba_has_infrastructure_investments_flag
			}
			custom_effect_tooltip = SPR_cuba_has_infrastructure_investments_tooltip
			#set_country_flag = SPR_cuba_has_infrastructure_investments_flag
		}
	}

	SPR_invest_sugar_trade_decision = {
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_all_of_cuba_tooltip
				OR = {
					owns_state = 315
					315 = { OWNER = { is_subject_of = ROOT } }
				}
				OR = {
					owns_state = 1350
					1350 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_cuba_has_infrastructure_investments_trigger
				OR = {
					315 = { has_state_flag = SPR_cuba_has_infrastructure_investments_flag }
					1350 = { has_state_flag = SPR_cuba_has_infrastructure_investments_flag }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		highlight_states = {
			STATE = 315
		}
		visible = {
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
			if = { 
				limit = {
					NOT = {
						315 = { has_state_flag = SPR_cuba_has_sugar_trade_investments_flag }
						1350 = { has_state_flag = SPR_cuba_has_sugar_trade_investments_flag }
					}
				}
				OR = { 
					has_country_flag = SPR_invest_in_sugar_trade_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_invest_in_sugar_trade_flag }
					}
				}
				if = { 
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						315 = { is_owned_by = DOM }
						1350 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 315
						315 = { OWNER = { is_subject_of = ROOT } }
					}
					OR = { 
						owns_state = 1350
						1350 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
		allowed = { 
			OR = {
				tag = SPR 
				tag = DOM
			}
		}
		cost = 100
		days_remove = 180
		fire_only_once = yes

		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_all_of_cuba_tooltip
				AND = {
					NOT = { owns_state = 315 }
					NOT = { 315 = { OWNER = { is_subject_of = ROOT } } }
				}
				AND = {
					NOT = { owns_state = 1350 }
					NOT = { 1350 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
			 
		}
		remove_effect = {
			#finishing debt
			if = {
				limit = { has_country_flag = SPR_invest_in_sugar_trade_nationalized_flag }
				 
				1350 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = { type = farm level = 1 instant_build = yes }
					set_state_flag = SPR_cuba_has_sugar_trade_investments_flag
				}
				315 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = { type = farm level = 1 instant_build = yes }
					set_state_flag = SPR_cuba_has_sugar_trade_investments_flag
				}
			}
			else = {
				hidden_effect = {
					1350 = {
						set_state_flag = SPR_cuba_has_sugar_trade_investments_flag
					}
					315 = {
						set_state_flag = SPR_cuba_has_sugar_trade_investments_flag
					}
				}
			}
			
			add_ideas = SPR_cuban_trading_boom
		}
	}

	SPR_expand_tobacco_plantations_decision = {
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_all_of_cuba_tooltip
				OR = {
					owns_state = 315
					315 = { OWNER = { is_subject_of = ROOT } }
				}
				OR = {
					owns_state = 1350
					1350 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_cuba_has_infrastructure_investments_trigger
				OR = {
					1350 = { has_state_flag = SPR_cuba_has_infrastructure_investments_flag }
					315 = { has_state_flag = SPR_cuba_has_infrastructure_investments_flag }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		highlight_states = {
			STATE = 315
		}
		visible = {
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
			if = { 
				limit = {
					NOT = {
						315 = { has_state_flag = SPR_cuba_has_tobacco_plantation_investments_flag }
						1350 = { has_state_flag = SPR_cuba_has_tobacco_plantation_investments_flag }
					}
				}
				OR = { 
					has_country_flag = SPR_expand_tobacco_plantations_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_expand_tobacco_plantations_flag }
					}
				}
				if = { 
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						315 = { is_owned_by = DOM }
						1350 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 315
						315 = { OWNER = { is_subject_of = ROOT } }
					}
					OR = { 
						owns_state = 1350
						1350 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
		allowed = { 
			OR = {
				tag = SPR 
				tag = DOM
			}
		}
		cost = 100
		days_remove = 180
		fire_only_once = yes

		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_all_of_cuba_tooltip
				AND = {
					NOT = { owns_state = 315 }
					NOT = { 315 = { OWNER = { is_subject_of = ROOT } } }
				}
				AND = {
					NOT = { owns_state = 1350 }
					NOT = { 1350 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
			set_temp_variable = { money_to_gain = -0.4 }
			add_money_with_tooltip_effect = yes
		}
		remove_effect = {
			#finishing debt
			#hidden_effect = { set_country_flag = SPR_cuba_has_tobacco_plantation_investments_flag }
			if = {
				limit = { has_country_flag = SPR_expand_tobacco_plantations_nationalized_flag }
				set_temp_variable = { money_to_gain = -0.5 }
				add_money_with_tooltip_effect = yes
				315 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = { type = farm level = 1 instant_build = yes }
					set_state_flag = SPR_cuba_has_tobacco_plantation_investments_flag
				}
				1350 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = { type = farm level = 1 instant_build = yes }
					set_state_flag = SPR_cuba_has_tobacco_plantation_investments_flag
				}
			}
			else = {
				hidden_effect = {
					1350 = {
						set_state_flag = SPR_cuba_has_tobacco_plantation_investments_flag
					}
					315 = {
						set_state_flag = SPR_cuba_has_tobacco_plantation_investments_flag
					}
				}
			}
		}
	}

	SPR_increase_cattle_land_in_puerto_rico_decision = {
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_puerto_rico_tooltip
				OR = {
					owns_state = 686
					686 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_puerto_rico_has_infrastructure_investments_trigger
				686 = { has_state_flag = SPR_puerto_rico_has_infrastructure_investments_flag }
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		highlight_states = {
			STATE = 686
		}
		visible = {
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
			if = { 
				limit = {
					NOT = {
						686 = { has_state_flag = SPR_puerto_rico_has_cattle_ranch_investments_flag }
					}
				}
				OR = { 
					has_country_flag = SPR_increase_cattle_land_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_increase_cattle_land_flag }
					}
				}
				if = { 
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						686 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 686
						686 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
		allowed = { 
			OR = {
				tag = SPR 
				tag = DOM
			}
		}
		cost = 100
		days_remove = 180
		fire_only_once = yes

		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_puerto_rico_tooltip
				AND = {
					NOT = { owns_state = 686 }
					NOT = { 686 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
			set_temp_variable = { money_to_gain = -0.4 }
			add_money_with_tooltip_effect = yes
		}
		remove_effect = {
			if = {
				limit = { has_country_flag = SPR_increase_cattle_land_nationalized_flag }
				set_temp_variable = { money_to_gain = -0.5 }
				add_money_with_tooltip_effect = yes
				686 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = { type = farm level = 1 instant_build = yes }
					set_state_flag = SPR_puerto_rico_has_cattle_ranch_investments_flag
				}
			}
			else = {
				hidden_effect = {
					686 = {
						set_state_flag = SPR_puerto_rico_has_cattle_ranch_investments_flag
					}
				}
			}
			#hidden_effect = { set_country_flag = SPR_puerto_rico_has_cattle_ranch_investments_flag }
		}
	}

	SPR_increase_cattle_land_in_cuba_decision = {
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_all_of_cuba_tooltip
				OR = {
					owns_state = 315
					315 = { OWNER = { is_subject_of = ROOT } }
				}
				OR = {
					owns_state = 1350
					1350 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_cuba_has_infrastructure_investments_trigger
				OR = { 
					315 = { has_state_flag = SPR_cuba_has_infrastructure_investments_flag }
					1350 = { has_state_flag = SPR_cuba_has_infrastructure_investments_flag }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		highlight_states = {
			STATE = 315
		}
		visible = {
			if = { 
				limit = {
					NOT = {
						315 = { has_state_flag = SPR_cuba_has_cattle_ranch_investments_flag }
						1350 = { has_state_flag = SPR_cuba_has_cattle_ranch_investments_flag }
					}
				}
				OR = { 
					has_country_flag = SPR_increase_cattle_land_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_increase_cattle_land_flag }
					}
				}
				if = { 
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						315 = { is_owned_by = DOM }
						1350 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 315
						315 = { OWNER = { is_subject_of = ROOT } }
					}
					OR = { 
						owns_state = 1350
						1350 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
		allowed = { 
			OR = {
				tag = SPR 
				tag = DOM
			}
		}
		cost = 100
		days_remove = 180
		fire_only_once = yes

		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_all_of_cuba_tooltip
				AND = {
					NOT = { owns_state = 315 }
					NOT = { 315 = { OWNER = { is_subject_of = ROOT } } }
				}
				AND = {
					NOT = { owns_state = 1350 }
					NOT = { 1350 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
			set_temp_variable = { money_to_gain = -0.4 }
			add_money_with_tooltip_effect = yes
		}
		remove_effect = {
			#finishing debt
			hidden_effect = {
				#set_country_flag = SPR_cuba_has_cattle_ranch_investments_flag
			}
			if = {
				limit = { has_country_flag = SPR_increase_cattle_land_nationalized_flag }
				set_temp_variable = { money_to_gain = -0.5 }
				add_money_with_tooltip_effect = yes
				315 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = { type = farm level = 1 instant_build = yes }
					set_state_flag = SPR_cuba_has_cattle_ranch_investments_flag
				}
				1350 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = { type = farm level = 1 instant_build = yes }
					set_state_flag = SPR_cuba_has_cattle_ranch_investments_flag
				}
			}
			else = {
				hidden_effect = {
					1350 = {
						set_state_flag = SPR_cuba_has_cattle_ranch_investments_flag
					}
					315 = {
						set_state_flag = SPR_cuba_has_cattle_ranch_investments_flag
					}
				}
			}
		}
	}

	SPR_invest_in_dominican_cattle_decision = {
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_right_hispaniola_tooltip
				OR = {
					owns_state = 319
					319 = { OWNER = { is_subject_of = ROOT } }
				}
				OR = {
					owns_state = 1318
					1318 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_right_hispaniola_has_infrastructure_investments_trigger
				OR = {
					1318 = { has_state_flag = SPR_right_hispaniola_has_infrastructure_investments_flag }
					319 = { has_state_flag = SPR_right_hispaniola_has_infrastructure_investments_flag }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		highlight_states = {
			STATE = 319
		}
		visible = {
			if = { 
				limit = {
					NOT = {
						1318 = { has_state_flag = SPR_dominican_has_cattle_ranch_investments_flag }
						319 = { has_state_flag = SPR_dominican_has_cattle_ranch_investments_flag }
					}
				}
				OR = { 
					has_country_flag = SPR_invest_in_dominican_cattle_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_invest_in_dominican_cattle_flag }
					}
				}
				if = { 
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						1318 = { is_owned_by = DOM }
						319 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 1318
						1318 = { OWNER = { is_subject_of = ROOT } }
					}
					OR = { 
						owns_state = 319
						319 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
		allowed = { 
			OR = {
				tag = SPR 
				tag = DOM
			}
		}
		cost = 100
		days_remove = 180
		fire_only_once = yes

		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_right_hispaniola_tooltip
				AND = {
					NOT = { owns_state = 319 }
					NOT = { 319 = { OWNER = { is_subject_of = ROOT } } }
				}
				AND = {
					NOT = { owns_state = 1318 }
					NOT = { 1318 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
			set_temp_variable = { money_to_gain = -0.3 }
			add_money_with_tooltip_effect = yes
		}
		remove_effect = {
			#finishing debt
			hidden_effect = {
				#set_country_flag = SPR_dominican_has_cattle_ranch_investments_flag
			}
			if = {
				limit = { has_country_flag = SPR_invest_in_dominican_cattle_nationalized_flag }
				set_temp_variable = { money_to_gain = -0.5 }
				add_money_with_tooltip_effect = yes
				319 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = { type = farm level = 1 instant_build = yes }
					set_state_flag = SPR_dominican_has_cattle_ranch_investments_flag
				}
				1318 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = { type = farm level = 1 instant_build = yes }
					set_state_flag = SPR_dominican_has_cattle_ranch_investments_flag
				}
			}
			else = {
				hidden_effect = {
					319 = {
						set_state_flag = SPR_dominican_has_cattle_ranch_investments_flag
					}
					1318 = {
						set_state_flag = SPR_dominican_has_cattle_ranch_investments_flag
					}
				}
			}
		}
	}
	
	SPR_invest_sugar_trade_left_hispaniola_decision = {
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_left_hispaniola_tooltip
				OR = {
					owns_state = 790
					790 = { OWNER = { is_subject_of = ROOT } }
				}
				OR = { 
					owns_state = 318
					318 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_left_hispaniola_has_infrastructure_investments_trigger
				OR = {
					790 = { has_state_flag = SPR_left_hispaniola_has_infrastructure_investments_flag }
					318 = { has_state_flag = SPR_left_hispaniola_has_infrastructure_investments_flag }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		highlight_states = {
			STATE = 315
		}
		visible = {
			if = {
				limit = { 
					NOT = { 
						790 = { has_state_flag = SPR_left_hispaniola_has_sugar_trade_investments_flag }
						318 = { has_state_flag = SPR_left_hispaniola_has_sugar_trade_investments_flag }
					}
				}
				OR = { 
					has_country_flag = SPR_invest_in_sugar_trade_left_hispaniola_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_invest_in_sugar_trade_left_hispaniola_flag }
					}
				}
				if = { 
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						790 = { is_owned_by = DOM }
						318 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 790
						790 = { OWNER = { is_subject_of = ROOT } }
					}
					OR = { 
						owns_state = 318
						318 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
		allowed = { 
			OR = {
				tag = SPR 
				tag = DOM
			}
		}
		cost = 100
		days_remove = 180
		fire_only_once = yes

		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_left_hispaniola_tooltip
				AND = {
					NOT = { owns_state = 790 }
					NOT = { 790 = { OWNER = { is_subject_of = ROOT } } }
				}
				AND = {
					NOT = { owns_state = 318 }
					NOT = { 318 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
			set_temp_variable = { money_to_gain = -0.3 }
			add_money_with_tooltip_effect = yes
		}
		remove_effect = {
			#finishing debt
			if = {
				limit = { has_country_flag = SPR_invest_in_sugar_trade_nationalized_flag }
				set_temp_variable = { money_to_gain = -0.4 }
				add_money_with_tooltip_effect = yes
				790 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = { type = farm level = 1 instant_build = yes }
					set_state_flag = SPR_left_hispaniola_has_sugar_trade_investments_flag
				}
				318 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = { type = farm level = 1 instant_build = yes }
					set_state_flag = SPR_left_hispaniola_has_sugar_trade_investments_flag
				}
			}
			else = {
				hidden_effect = {
					790 = {
						set_state_flag = SPR_left_hispaniola_has_sugar_trade_investments_flag
					}
					318 = {
						set_state_flag = SPR_left_hispaniola_has_sugar_trade_investments_flag
					}
				}
			}
			#hidden_effect = { set_country_flag = SPR_cuba_has_sugar_trade_investments_flag }
			add_ideas = SPR_cuban_trading_boom
		}
	}

	SPR_expand_tobacco_plantations_right_hispaniola_decision = {
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_right_hispaniola_tooltip
				OR = {
					owns_state = 319
					319 = { OWNER = { is_subject_of = ROOT } }
				}
				OR = {
					owns_state = 1318
					1318 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_right_hispaniola_has_infrastructure_investments_trigger
				OR = {
					1318 = { has_state_flag = SPR_right_hispaniola_has_infrastructure_investments_flag }
					319 = { has_state_flag = SPR_right_hispaniola_has_infrastructure_investments_flag }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		highlight_states = {
			STATE = 319
		}
		visible = {
			if = {
				limit = { 
					NOT = { 
						1318 = { has_state_flag = SPR_right_hispaniola_has_tobacco_plantation_investments_flag }
						319 = { has_state_flag = SPR_right_hispaniola_has_tobacco_plantation_investments_flag }
					}
				}
				OR = { 
					has_country_flag = SPR_expand_tobacco_plantations_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_expand_tobacco_plantations_flag }
					}
				}
				if = { 
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						1318 = { is_owned_by = DOM }
						319 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 1318
						1318 = { OWNER = { is_subject_of = ROOT } }
					}
					OR = { 
						owns_state = 319
						319 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
		allowed = { 
			OR = {
				tag = SPR 
				tag = DOM
			}
		}
		cost = 100
		days_remove = 180
		fire_only_once = yes

		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_right_hispaniola_tooltip
				AND = {
					NOT = { owns_state = 319 }
					NOT = { 319 = { OWNER = { is_subject_of = ROOT } } }
				}
				AND = {
					NOT = { owns_state = 1318 }
					NOT = { 1318 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
			set_temp_variable = { money_to_gain = -0.3 }
			add_money_with_tooltip_effect = yes
		}
		remove_effect = {
			#finishing debt
			#hidden_effect = { set_country_flag = SPR_cuba_has_tobacco_plantation_investments_flag }
			if = {
				limit = { has_country_flag = SPR_expand_tobacco_plantations_nationalized_flag }
				set_temp_variable = { money_to_gain = -0.5 }
				add_money_with_tooltip_effect = yes
				319 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = { type = farm level = 1 instant_build = yes }
					set_state_flag = SPR_right_hispaniola_has_tobacco_plantation_investments_flag
				}
				1318 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = { type = farm level = 1 instant_build = yes }
					set_state_flag = SPR_right_hispaniola_has_tobacco_plantation_investments_flag
				}
			}
			else = {
				hidden_effect = {
					319 = {
						set_state_flag = SPR_right_hispaniola_has_tobacco_plantation_investments_flag
					}
					1318 = {
						set_state_flag = SPR_right_hispaniola_has_tobacco_plantation_investments_flag
					}
				}
			}
		}
	}
	
	SPR_develop_santo_domingo_port_decision = {
		icon = generic_construction
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_santo_domingo_tooltip
				OR = {
					owns_state = 1318
					1318 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		visible = {
			if = { 
				limit = { 1318 = { NOT = { has_state_flag = SPR_santo_domingo_port_investment_flag } } }
				OR = {
					has_country_flag = SPR_santo_domingo_port_investment_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_santo_domingo_port_investment_flag }
					}
				}
				if = {
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						1318 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 1318
						1318 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
		allowed = { 
			OR = {
				TAG = SPR 
				TAG = DOM
			}
		}
		cost = 100
		days_remove = 180
		fire_only_once = yes
		highlight_states = {
			STATE = 1318
		}
		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_santo_domingo_tooltip
				AND = {
					NOT = { owns_state = 1318 }
					NOT = { 1318 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
			set_temp_variable = { money_to_gain = -0.3 }
			add_money_with_tooltip_effect = yes
		}
		remove_effect = {
			#finishing debt
			set_temp_variable = { money_to_gain = -0.5 }
			add_money_with_tooltip_effect = yes
			1318 = {
				set_state_flag = SPR_santo_domingo_port_investment_flag
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard 
					level = 1
					instant_build = yes
				}
				add_building_construction = { type = naval_base level = 1 instant_build = yes province = 7660 }
			}
		}
	}
	
	DOM_mission_santo_domingo_railway_concession = {
        icon = railway
        allowed = { 
			OR = {
				TAG = SPR 
				TAG = DOM
			}
		}
        available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_right_hispaniola_tooltip
				OR = {
					owns_state = 319
					319 = { OWNER = { is_subject_of = ROOT } }
				}
				OR = { 
					owns_state = 1318
					1318 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		visible = {
			if = { 
				limit = { 
					319 = { NOT = { has_state_flag = SPR_santo_domingo_railway_concession_flag } } 
					1318 = { NOT = { has_state_flag = SPR_santo_domingo_railway_concession_flag } }
				}
				OR = {
					has_country_flag = SPR_santo_domingo_railway_concession_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_santo_domingo_railway_concession_flag }
					}
				}
				if = {
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						319 = { is_owned_by = DOM }
						1318 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 319
						319 = { OWNER = { is_subject_of = ROOT } }
					}
					OR = {
						owns_state = 1318
						1318 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
        highlight_states = {
			state = 1318
		}
		cost = 100
        fire_only_once = yes
        days_remove = 360

        complete_effect = {
			hidden_effect = {   
				set_temp_variable = { money_to_gain = -0.8 }
				add_money_with_tooltip_effect = yes
			}
		}
		
        remove_effect = {
			hidden_effect = {
				319 = { set_state_flag = SPR_santo_domingo_railway_concession_flag }
				1318 = { set_state_flag = SPR_santo_domingo_railway_concession_flag }
			}
            build_railway = {
				level = 1
				build_only_on_allied = no
				controller_priority = {
					base = 1
				}
				fallback = yes
				path = { 7660 13304 4598 }
				start_province = 7660
				target_province = 4598
			}
        }
		
        ai_will_do = {
			base = 100
			modifier = { 
				factor = 0
				set_temp_variable = { loan_size_to_check = 45}
				has_less_than_specific_loan_size = no
			}
		}
    }
	
	SPR_mission_antillas_corridor_railway_concession = {
        icon = railway
        allowed = { 
			OR = {
				TAG = SPR 
				TAG = DOM
			}
		}
        available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_all_of_cuba_tooltip
				OR = {
					owns_state = 315
					315 = { OWNER = { is_subject_of = ROOT } }
				}
				OR = {
					owns_state = 1350
					1350 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		visible = {
			if = { 
				limit = { 
					315 = { NOT = { has_state_flag = SPR_antillas_corridor_railway_concession_flag } } 
					1350 = { NOT = { has_state_flag = SPR_antillas_corridor_railway_concession_flag } }
				}
				OR = {
					has_country_flag = SPR_antillas_corridor_railway_concession_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_antillas_corridor_railway_concession_flag }
					}
				}
				if = {
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						315 = { is_owned_by = DOM }
						1350 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 315
						315 = { OWNER = { is_subject_of = ROOT } }
					}
					OR = {
						owns_state = 1350
						1350 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
        highlight_states = {
			state = 315
		}
		cost = 100
        fire_only_once = yes
        days_remove = 360

        complete_effect = {
			hidden_effect = {   
				set_temp_variable = { money_to_gain = -0.8 }
				add_money_with_tooltip_effect = yes
			}
		}
		
        remove_effect = {
			hidden_effect = {
				315 = { set_state_flag = SPR_antillas_corridor_railway_concession_flag }
				1350 = { set_state_flag = SPR_antillas_corridor_railway_concession_flag }
			}
            build_railway = {
				level = 1
				build_only_on_allied = no
				controller_priority = {
					base = 1
				}
				fallback = yes
				path = { 10498 7451 10374 4476 7546 1550 }
				start_province = 10498
				target_province = 1550
			}
        }
		
        ai_will_do = {
			base = 100
			modifier = { 
				factor = 0
				set_temp_variable = { loan_size_to_check = 45}
				has_less_than_specific_loan_size = yes
			}
		}
    }
	
	DOM_mission_port_au_prince_railway_concession = {
        icon = railway
        allowed = { 
			OR = {
				TAG = SPR 
				TAG = DOM
			}
		}
        available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_right_hispaniola_tooltip
				OR = {
					owns_state = 790
					790 = { OWNER = { is_subject_of = ROOT } }
				}
				OR = { 
					owns_state = 318
					318 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		visible = {
			if = { 
				limit = { 
					790 = { NOT = { has_state_flag = SPR_port_au_prince_railway_concession_flag } } 
					318 = { NOT = { has_state_flag = SPR_port_au_prince_railway_concession_flag } }
				}
				OR = {
					has_country_flag = SPR_port_au_prince_railway_concession_flag
					AND = { 
						is_subject_of = SPR
						SPR = { has_country_flag = SPR_port_au_prince_railway_concession_flag }
					}
				}
				if = {
					limit = {
						TAG = SPR 
						DOM = { is_subject_of = SPR }
					}
					NOT = {
						790 = { is_owned_by = DOM }
						318 = { is_owned_by = DOM }
					}
				}
				else = {
					OR = {
						owns_state = 790
						790 = { OWNER = { is_subject_of = ROOT } }
					}
					OR = {
						owns_state = 318
						318 = { OWNER = { is_subject_of = ROOT } }
					}
				}
			}
			else = { always = no }
		}
        highlight_states = {
			state = 318
		}
		cost = 110
        fire_only_once = yes
        days_remove = 360

        complete_effect = {
			hidden_effect = {   
				set_temp_variable = { money_to_gain = -0.4 }
				add_money_with_tooltip_effect = yes
			}
		}
		
        remove_effect = {
			hidden_effect = {
				790 = { set_state_flag = SPR_port_au_prince_railway_concession_flag }
				318 = { set_state_flag = SPR_port_au_prince_railway_concession_flag }
			}
            build_railway = {
				level = 1
				build_only_on_allied = no
				controller_priority = {
					base = 1
				}
				fallback = yes
				path = { 4598 13301 13303 4641 }
				start_province = 4598
				target_province = 4641
			}
        }
		
        ai_will_do = {
			base = 100
			modifier = { 
				factor = 0
				set_temp_variable = { loan_size_to_check = 45}
				has_less_than_specific_loan_size = no
			}
		}
    }

	SPR_develop_la_habana_port_decision = {
		icon = generic_construction
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_develop_la_habana_port_decision_trigger
				has_country_flag = SPR_mexican_intervention_flag
			}
			custom_trigger_tooltip = {
				tooltip = SPR_owns_havana_tooltip
				OR = {
					owns_state = 1350
					1350 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_owns_adalusia_tooltip
				OR = {
					owns_state = 169
					169 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_owns_puerto_rico_tooltip
				OR = {
					owns_state = 686
					686 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		visible = {
			has_country_flag = SPR_prepare_the_invasion_flag
			has_country_flag = SPR_mexican_intervention_flag
		}
		allowed = { tag = SPR }
		cost = 100
		days_remove = 90
		fire_only_once = yes
		highlight_states = {
			STATE = 1350
			#STATE = 169
			#STATE = 686
		}
		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_havana_tooltip
				AND = {
					NOT = { owns_state = 1350 }
					NOT = { 1350 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_adalusia_tooltip
				AND = {
					NOT = { owns_state = 169 }
					NOT = { 169 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_puerto_rico_tooltip
				AND = {
					NOT = { owns_state = 686 }
					NOT = { 686 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
			set_temp_variable = { money_to_gain = -0.4 }
			add_money_with_tooltip_effect = yes
		}
		remove_effect = {
			#finishing debt
			set_temp_variable = { money_to_gain = -0.4 }
			add_money_with_tooltip_effect = yes
			1350 = {
				add_building_construction = { type = naval_base level = 1 instant_build = yes province = 7622 }
			}
			686 = {
				add_building_construction = { type = naval_base level = 1 instant_build = yes province = 1440 }
			}
			169 = {
				add_building_construction = { type = infrastructure level = 1 instant_build = yes }
				add_building_construction = { type = naval_base level = 1 instant_build = yes province = 1048 }
			}
		}
	}

	SPR_develop_manila_port_decision = {
		icon = generic_construction
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_develop_manila_port_decision_trigger
				has_country_flag = SPR_cochinchina_intervention_flag
			}
			custom_trigger_tooltip = {
				tooltip = SPR_owns_manila_tooltip
				OR = {
					owns_state = 327
					327 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_owns_adalusia_tooltip
				OR = {
					owns_state = 169
					169 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		visible = {
			has_country_flag = SPR_prepare_cochinchina_invasion_flag
			has_country_flag = SPR_cochinchina_intervention_flag
		}
		allowed = { tag = SPR }
		cost = 100
		days_remove = 90
		fire_only_once = yes
		highlight_states = {
			STATE = 327
			#STATE = 169
		}
		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_manila_tooltip
				AND = {
					NOT = { owns_state = 327 }
					NOT = { 327 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_adalusia_tooltip
				AND = {
					NOT = { owns_state = 169 }
					NOT = { 169 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
			set_temp_variable = { money_to_gain = -0.4 }
			add_money_with_tooltip_effect = yes
			set_country_flag = SPR_develop_manila_port_decision_started
		}
		remove_effect = {
			#finishing debt
			set_temp_variable = { money_to_gain = -0.4 }
			add_money_with_tooltip_effect = yes
			327 = {
				add_building_construction = { type = infrastructure level = 1 instant_build = yes }
				add_building_construction = { type = naval_base level = 1 instant_build = yes province = 10265 }
			}
			169 = {
				add_building_construction = { type = infrastructure level = 1 instant_build = yes }
				add_building_construction = { type = naval_base level = 1 instant_build = yes province = 1048 }
			}
		}
	}

	SPR_develop_fernando_poo_decision = {
		icon = generic_construction
		available = {
			custom_trigger_tooltip = {
				tooltip = SPR_owns_fernando_poo_tooltip
				OR = {
					owns_state = 1198
					1198 = { OWNER = { is_subject_of = ROOT } }
				}
			}
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		}
		visible = {
			OR = {
				has_country_flag = SPR_develop_fernando_poo_flag
				has_country_flag = SPR_develop_the_prison_flag
			}
		}
		allowed = { tag = SPR }
		cost = 100
		days_remove = 90
		fire_only_once = yes
		#highlight_states = {
		#	STATE = 1198
		#}
		cancel_trigger = {
			custom_trigger_tooltip = {
				tooltip = SPR_does_not_own_fernando_poo_tooltip
				AND = {
					NOT = { owns_state = 1198 }
					NOT = { 1198 = { OWNER = { is_subject_of = ROOT } } }
				}
			}
			custom_trigger_tooltip = {
				tooltip = SPR_has_declared_bankruptcy_tooltip
				always = no
			}
		}

		complete_effect = {
			#initial debt
			set_temp_variable = { money_to_gain = -0.4 }
			add_money_with_tooltip_effect = yes
		}
		remove_effect = {
			#finishing debt
			set_temp_variable = { money_to_gain = -0.4 }
			add_money_with_tooltip_effect = yes
			1198 = {
				add_building_construction = { type = infrastructure level = 2 instant_build = yes }
				add_building_construction = { type = naval_base level = 1 instant_build = yes province = 1903 }
			}
		}
	}
}

SPR_decision_category_flavour = {

	SPR_decision_cross_of_the_military_merit = {
	    icon = generic_decision
		
		available = {
		    date > 1864.8.3
	    }

		#allowed = { tag = SPR }

	    cost = 25

		fire_only_once = yes

		days_remove = 45

		complete_effect = {
			add_political_power = 50
			add_war_support = 0.02
		}
	}

	SPR_decision_bridge_valladolid = {
	    icon = generic_construction

	    available = {
		    date > 1864.6.30
			set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
	    }

		#allowed = { tag = SPR }

		cost = 100
		fire_only_once = yes

		days_remove = 180

		complete_effect = {
			hidden_effect = {   
				set_temp_variable = { money_to_gain = -0.4 }
				add_money_with_tooltip_effect = yes
			}
			add_political_power = 50
			add_stability = 0.01
			176 = { add_building_construction = { type = infrastructure level = 1 instant_build = yes } }
		}

		fire_only_once = yes
	}
}

