tunisia_modernizing_category = {
	### Missions ###
	TUN_mission_preparing_modernazition_plans = {
		
		allowed = { always = no }
		
		available = {
			custom_trigger_tooltip = {
				tooltip = tun_modernize_tunis_tt
				NOT = {
					has_country_flag = tun_modernize_tunis
				}
			}
		}
		
		activation = { always = no }
		priority = 100
		is_good = yes
		days_mission_timeout = 365
		ai_will_do = { base = 1000 }
		
		timeout_effect = {
			clr_country_flag =  tun_modernize_tunis
			country_event = {
				id = tunisia.26
			}
		}
	}

	TUN_mission_finish_phase_one = {
		
		allowed = { always = no }
		available = {
			custom_trigger_tooltip = {
				tooltip = tun_finished_phase_one_yay_tt
				has_country_flag = tun_finished_phase_one_yay
			}
		}
		
		activation = { always = no }
		priority = 100
		is_good = yes
		days_mission_timeout = 730
		ai_will_do = { base = 1000 }
		
		timeout_effect = {
			add_stability = -0.05
			add_political_power = -50
			hidden_effect = {
				clr_country_flag = tun_conducted_land_surveys
				clr_country_flag = tun_made_city_maps
				clr_country_flag = tun_modernize_tunis
				clr_country_flag = tun_people_estimates
				clr_country_flag = tun_prepare_urban_plans
				clr_country_flag = tun_start_phase_one
				set_country_flag = tun_start_phase_2
			}
		}
		complete_effect = {
			add_stability = 0.05
			add_political_power = 100
			hidden_effect = {
				clr_country_flag = tun_conducted_land_surveys
				clr_country_flag = tun_made_city_maps
				clr_country_flag = tun_modernize_tunis
				clr_country_flag = tun_people_estimates
				clr_country_flag = tun_prepare_urban_plans
				clr_country_flag = tun_start_phase_one
				set_country_flag = tun_start_phase_2
			}
		}
	}

	TUN_mission_finish_phase_two = {
		
		allowed = { always = no }
		available = {
			custom_trigger_tooltip = {
				tooltip = tun_finished_phase_two_yay_tt
				has_country_flag = tun_finished_phase_two_yay
			}
		}
		
		activation = { always = no }
		priority = 100
		is_good = yes
		days_mission_timeout = 1825
		ai_will_do = { base = 1000 }
		
		timeout_effect = {
			add_stability = -0.05
			add_political_power = -50
			hidden_effect = {
				clr_country_flag = tun_tore_down_the_walls
				clr_country_flag = tun_lay_down_foundations
				clr_country_flag = tun_created_printing_house
				clr_country_flag = tun_renovated_madrass
				clr_country_flag = tun_renovated_roads
				clr_country_flag = tun_built_aquaduct
				clr_country_flag = tun_start_phase_2
				set_country_flag = tun_start_phase_3
			}
		}
		complete_effect = {
			add_stability = 0.05
			add_political_power = 100
			hidden_effect = {
				clr_country_flag = tun_tore_down_the_walls
				clr_country_flag = tun_lay_down_foundations
				clr_country_flag = tun_created_printing_house
				clr_country_flag = tun_renovated_madrass
				clr_country_flag = tun_renovated_roads
				clr_country_flag = tun_built_aquaduct
				clr_country_flag = tun_start_phase_2
				set_country_flag = tun_start_phase_3
			}
		}
	}

	TUN_mission_finish_phase_three = {
		
		allowed = { always = no }
		available = {
			custom_trigger_tooltip = {
				tooltip = tun_finished_phase_three_yay_tt
				has_country_flag = tun_finished_phase_three_yay
			}
		}
		
		activation = { always = no }
		priority = 100
		is_good = yes
		days_mission_timeout = 1825
		ai_will_do = { base = 1000 }
		
		timeout_effect = {
			add_stability = -0.1
			add_political_power = -100
			hidden_effect = {
				clr_country_flag = tun_sewage_system
				clr_country_flag = tun_expanded_greenery
				clr_country_flag = tun_railway_flag
				clr_country_flag = tun_european_teachers
				clr_country_flag = tun_ulema_teachers
				clr_country_flag = tun_gas_lamps
				clr_country_flag = tun_invited_european_industrialists
				clr_country_flag = tun_start_phase_3
				clr_country_flag = tun_finished_phase_one_yay
				clr_country_flag = tun_finished_phase_two_yay
				clr_country_flag = tun_finished_phase_three_yay
			}
		}
		complete_effect = {
			add_stability = 0.1
			add_political_power = 150
			hidden_effect = {
				
			}
		}
	}

	### Phase 1 ###

	# Discuss Plans with Ulemas
	TUN_decision_discuss_plans_with_ulemas = {
		icon = generic_factory
		available = {
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_start_phase_one
		}

		fire_only_once = yes
		cost = 30
		days_remove = 60
		ai_will_do = { base = 1000 }
		
		remove_effect = {
			add_stability = 0.05
		}
	}


	# Make New City Maps
	TUN_decision_make_new_city_maps = {
		icon = generic_factory
		available = {
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_start_phase_one
		}

		fire_only_once = yes
		cost = 30
		days_remove = 60 
		ai_will_do = { base = 1000 }

		remove_effect = {
			EOANBSYS_institutions_innovative_add_two = yes
			set_country_flag = tun_made_city_maps
			unlock_decision_tooltip = TUN_decision_prepare_urban_plans_for_the_city
		}
	}


	# Conduct Land Survey
	TUN_decision_conduct_land_survey = {
		icon = generic_factory
		available = {
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_start_phase_one
		}

		fire_only_once = yes
		cost = 30
		days_remove = 60
		ai_will_do = { base = 1000 }

		remove_effect = {
			EOANBSYS_institutions_innovative_add_five = yes
			set_country_flag = tun_conducted_land_surveys
			unlock_decision_tooltip = TUN_decision_conduct_town_people_estimates
		}
	}


	# Discuss Plans with Europeans
	TUN_decision_discuss_plans_with_the_europeans = {
		icon = generic_factory 
		
		available = {
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_start_phase_one
		}

		fire_only_once = yes
		cost = 30
		days_remove = 60
		ai_will_do = { base = 1000 }
		
		remove_effect = {
			add_political_power = 100
		}
	}
	# Prepare Urban Plans for the City
	TUN_decision_prepare_urban_plans_for_the_city = {
		icon = generic_factory
		available = {
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_made_city_maps
		}

		fire_only_once = yes
		cost = 40
		days_remove = 60
		ai_will_do = { base = 1000 }
		
		remove_effect = {
			EOANBSYS_institutions_innovative_add_three = yes
			set_country_flag = tun_prepare_urban_plans
			unlock_decision_tooltip = TUN_decision_finish_phase_1
		}
	}

	# Conduct Town People Estimates
	TUN_decision_conduct_town_people_estimates = {
		icon = generic_factory
		available = {
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_conducted_land_surveys
		}

		fire_only_once = yes
		cost = 30
		days_remove = 60
		ai_will_do = { base = 1000 }	
		
		remove_effect = {
			EOANBSYS_institutions_humanitive_add_two = yes
			set_country_flag = tun_people_estimates
			unlock_decision_tooltip = TUN_decision_finish_phase_1
		}
	}

	# Finish Phase 1
	TUN_decision_finish_phase_1 = {
		icon = generic_factory
		
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.05
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			AND = {
				has_country_flag = tun_people_estimates
				has_country_flag = tun_prepare_urban_plans
			}
		}

		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 = 60
		ai_will_do = { base = 1000 }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.05 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			458 = {
				add_dynamic_modifier = {
					modifier = TUN_modifier_marseille_of_the_desert
				}
			}
			add_to_variable = {
				var = TUN_md_psbf
				value = 0.05
				tooltip = production_speed_buildings_factor_tooltip
			}
			add_to_variable = {
				var = TUN_md_scf
				value = -0.01
				tooltip = supply_consumption_factor_tooltip
			}
			set_country_flag = tun_finished_phase_one_yay
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	### Phase 2 ###
	TUN_start_phase_2 = {
		icon = generic_factory
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_finished_phase_one_yay
		}

		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
		ai_will_do = { base = 1000 }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}	
		remove_effect = {
			country_event = {
				id = tunisia.27
				days = 5
			}
			set_country_flag = tun_started_phase_two
			unlock_decision_tooltip = TUN_invite_european_specialists
			unlock_decision_tooltip = TUN_tear_down_the_old_walls
			unlock_decision_tooltip = TUN_reform_town_jurisdical_system
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	# Tear Down Old City Walls
	TUN_tear_down_the_old_walls = {
		icon = generic_factory
		
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_started_phase_two
		}

		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
		ai_will_do = { base = 1000 }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			458 = {
				add_extra_state_shared_building_slots = 1
			}
			set_country_flag = tun_tore_down_the_walls
			unlock_decision_tooltip = TUN_laid_down_foundations
			unlock_decision_tooltip = TUN_create_tunisian_printing_house
			unlock_decision_tooltip = TUN_prepare_modern_fortifications
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	# Invite European Specialists
	TUN_invite_european_specialists = {
		icon = generic_factory
		
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_started_phase_two
		}

		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
		ai_will_do = { base = 1000 }
	
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			add_tech_bonus = {
				bonus = 0.5
				uses = 1
				category = humanities_tech
			}
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	# Reform Town Jurisdical System
	TUN_reform_town_jurisdical_system = {
		icon = generic_factory
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_started_phase_two
		}

		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
		ai_will_do = { base = 1000 }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			add_political_power = 100
			add_stability = -0.08
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	# Laid Down Foundations for New Suburbs
	TUN_laid_down_foundations = {
		icon = generic_factory

		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_tore_down_the_walls
		}

		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
		ai_will_do = { base = 1000 }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			458 = {
				add_extra_state_shared_building_slots = 1
			}
			set_country_flag = tun_lay_down_foundations
			unlock_decision_tooltip = TUN_renovate_main_roads
			unlock_decision_tooltip = TUN_build_new_aquaduct
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	# Create Tunisian Printing House
	TUN_create_tunisian_printing_house = {
		icon = generic_factory
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
			has_completed_focus = TUN_first_tunisian_newspaper
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_tore_down_the_walls
		}
	
		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
		ai_will_do = { base = 1000 }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			news_event = {
				id = tunisia.28
				days = 3
			}
			set_country_flag = tun_created_printing_house
			unlock_decision_tooltip = TUN_renovate_the_madrasas
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	# Prepare Modern Tunis Fortification
	TUN_prepare_modern_fortifications = {
		icon = generic_factory 
		
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
			has_completed_focus = TUN_tunis_fortification
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_tore_down_the_walls
		}
	
		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
		ai_will_do = { base = 1000 }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			add_war_support = 0.03
			add_command_power = 15
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	# Renovate Main Roads
	TUN_renovate_main_roads = {
		icon = generic_factory
		
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = TUN_laid_down_foundations
		}
	
		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
		ai_will_do = { base = 1000 }

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			set_temp_variable = { eoanb_prestige_change = 5 }
			eoanb_change_prestige_score = yes
			EOANBSYS_institutions_innovative_add_three = yes
			set_country_flag = tun_renovated_roads
			unlock_decision_tooltip = TUN_decision_finish_phase_two
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	# Build New Town Aquaduct
	TUN_build_new_aquaduct = {
		icon = generic_factory
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}

		}
		visible = {
			has_capitulated = no
			has_country_flag = TUN_laid_down_foundations
		}
	
		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
		ai_will_do = { base = 1000 }

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			add_stability = 0.02
			EOANBSYS_institutions_humanitive_add_two = yes
			set_country_flag = tun_built_aquaduct
			unlock_decision_tooltip = TUN_decision_finish_phase_two
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	TUN_renovate_the_madrasas = {

		icon = generic_political_actions
		allowed = { always = yes }
		available = {
			set_temp_variable = { amount_of_money_to_check = 0.03 }
			has_specific_amount_of_money_with_inflation_included = yes
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_created_printing_house
		}

		ai_will_do = { base = 1 }
		fire_only_once = yes
		days_remove = 60
		priority = 1
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.03 }
		}
		custom_cost_text = eoanb_money_cost_text	

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
		}
		remove_effect = {
			add_ideas = { TUN_madrasas_renovated }
			set_country_flag = tun_renovated_madrass
			unlock_decision_tooltip = TUN_decision_finish_phase_two
		}
	}

	TUN_decision_finish_phase_two = {
		icon = generic_political_actions
		allowed = { always = yes }
		available = {
			set_temp_variable = { amount_of_money_to_check = 0.03 }
			has_specific_amount_of_money_with_inflation_included = yes
			hidden_trigger = {
				has_country_flag = tun_renovated_madrass
				has_country_flag = tun_built_aquaduct
				has_country_flag = TUN_renovate_main_roads
			}
		}
		visible = {
			AND = {
				has_country_flag = tun_renovated_madrass
				has_country_flag = tun_renovated_roads
				has_country_flag = tun_built_aquaduct
			}
		}

		ai_will_do = { base = 1 }
		fire_only_once = yes
		days_remove = 60
		priority = 1
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
		}
		custom_cost_text = eoanb_money_cost_text	

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
		}
		remove_effect = {
			add_to_variable = {
				var = TUN_md_psbf
				value = 0.02
				tooltip = production_speed_buildings_factor_tooltip
			}
			add_to_variable = {
				var = TUN_md_scf
				value = -0.02
				tooltip = supply_consumption_factor_tooltip
			}
			set_country_flag = tun_finished_phase_two_yay
		}
	}

	### Phase 3 ###
	TUN_start_phase_3 = {
		icon = generic_factory
		
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_finished_phase_two_yay
		}

		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
		ai_will_do = { base = 1000 }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			country_event = {
				id = tunisia.29
				days = 5
			}
			set_country_flag = tun_started_phase_three
			unlock_decision_tooltip = TUN_construct_sewage_system
			unlock_decision_tooltip = TUN_install_gas_streetlamps
			unlock_decision_tooltip = TUN_tunis_goulette_railway
			unlock_decision_tooltip = TUN_sadiki_college
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	#Construct Sewage System
	TUN_construct_sewage_system = {
		icon = generic_factory
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_started_phase_three
		}

		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
		ai_will_do = { base = 1000 }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			EOANBSYS_institutions_innovative_add_three = yes
			set_technology = {tech_humanities_sewage_system = 1}
			set_country_flag = tun_sewage_system
			unlock_decision_tooltip = TUN_expand_towns_greenery
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	#Instal Gas Street Lamps
	TUN_install_gas_streetlamps = {
		icon = generic_factory
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_started_phase_three
		}

		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
		ai_will_do = { base = 1000 }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			EOANBSYS_institutions_humanitive_add_two = yes
			set_technology = {tech_humanities_metropolitan = 1}
			set_country_flag = tun_gas_lamps
			unlock_decision_tooltip = TUN_expand_towns_greenery
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	#Tunis-Goulette Railway
	TUN_tunis_goulette_railway = {
		icon = generic_factory
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_started_phase_three
		}

		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
		ai_will_do = { base = 1000 }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			navy_experience = 25
			set_temp_variable = { money_to_gain = 0.5 }
			add_money_with_tooltip_effect = yes
			set_country_flag = tun_railway_flag
			unlock_decision_tooltip = TUN_invite_european_industrialists
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	#Sadiki College
	TUN_sadiki_college = {
		icon = generic_factory
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_started_phase_three
		}

		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
		ai_will_do = { base = 1000 }

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			add_research_slot = 1
			set_country_flag = tun_colllege_flag
			unlock_decision_tooltip = TUN_invite_european_teachers
			unlock_decision_tooltip = TUN_ulema_teachers
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	#Task Ulemas To Search for Teachers
	TUN_ulema_teachers = {
		icon = generic_factory
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
			custom_trigger_tooltip = {
				tooltip = tun_college_tt
				AND = {
					has_country_flag = tun_colllege_flag
					NOT = {
						has_country_flag = tun_european_teachers
					}
				}
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_colllege_flag
		}

		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
		ai_will_do = { base = 1000 }

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			clr_country_flag = tun_colllege_flag
			set_country_flag = tun_ulema_teachers
			add_stability = 0.05
			add_opinion_modifier = { 
				target = OTO
				modifier = medium_increase 
			}
			add_opinion_modifier = { 
				target = MOR
				modifier = medium_increase 
			}
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	#Invite European Teachers
	TUN_invite_european_teachers = {
		icon = generic_factory
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
			custom_trigger_tooltip = {
				tooltip = tun_college_tt
				AND = {
					has_country_flag = tun_colllege_flag
					NOT = {
						has_country_flag = tun_ulema_teachers
					}
				}
			}
			
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_colllege_flag
		}

		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
		ai_will_do = { base = 1000 }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			clr_country_flag = tun_colllege_flag
			set_country_flag = tun_european_teachers
			EOANBSYS_institutions_humanitive_add_five = yes
			set_temp_variable = { eoanb_prestige_change = 3 }
			eoanb_change_prestige_score = yes
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	#Expand Towns Greenery
	TUN_expand_towns_greenery = {
		icon = generic_factory
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			AND = {
				has_country_flag = tun_sewage_system
				has_country_flag = tun_gas_lamps
			}
		}

		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
		ai_will_do = { base = 1000 }
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			add_stability = 0.02
			EOANBSYS_institutions_innovative_add_two = yes
			set_temp_variable = { eoanb_prestige_change = 2 }
			eoanb_change_prestige_score = yes
			set_country_flag = tun_expanded_greenery
			unlock_decision_tooltip = TUN_finish_phase_3
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	#Invite European Industrialists
	TUN_invite_european_industrialists = {
		icon = generic_factory
		
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.03
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_railway_flag
		}

		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 = 200
		ai_will_do = { base = 1000 }

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.03 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			458 = {
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 1
			}
			set_country_flag = tun_invited_european_industrialists
			unlock_decision_tooltip = TUN_finish_phase_3
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}

	#Finish Phase 3
	TUN_finish_phase_3 = {
		icon = generic_factory
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.1
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
			TUN_al_fariq_hussein = {
				is_hired_as_advisor = yes
			}
		}
		visible = {
			has_capitulated = no
			has_country_flag = tun_finished_phase_two_yay
		}

		fire_only_once = yes
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 0.1
			}
		}
		custom_cost_text = eoanb_money_cost_text
		days_remove = 200
		ai_will_do = { base = 1000 }

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.1 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			add_to_variable = {
				var = TUN_md_psbf
				value = 0.03
				tooltip = production_speed_buildings_factor_tooltip
			}
			add_to_variable = {
				var = TUN_md_scf
				value = -0.02
				tooltip = supply_consumption_factor_tooltip
			}
			set_country_flag = tun_finished_phase_three_yay
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
		}
	}
}

tunisia_economy_category = {

	TUN_decision_renew_old_infrastructures = {
		icon = generic_factory
		available = {
			set_temp_variable = {
				amount_of_money_to_check = 0.3
			}
			has_specific_amount_of_money_with_inflation_included = yes
			NOT = { has_country_flag = eoanb_industry_development_ongoing_flag }
		}
		visible = {
			has_capitulated = no
			has_completed_focus = TUN_renew_old_infrastructures
		}

		ai_will_do = { base = 1000 }
		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 = {
			consumer_goods_expected_value = 0.15
		}
		complete_effect = {
			set_temp_variable = { money_to_gain = -0.3 }
			add_money_with_tooltip_effect = yes
			custom_effect_tooltip = eoanb_industry_development_ongoing_effect_tt
			hidden_effect = { 
				set_country_flag = eoanb_industry_development_ongoing_flag 
			}
		}
		remove_effect = {
			458 = {
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 1
			}
			hidden_effect = { clr_country_flag = eoanb_industry_development_ongoing_flag }
			EOANBSYS_institutions_innovative_add_two = yes
		}
	}

	TUN_develop_tunis = {
		icon = generic_political_actions
		allowed = { always = yes }
		available = {
			has_completed_focus = TUN_improved_agriculture_infastructure
			set_temp_variable = { mount_of_money_to_check = 0.25 }
			has_specific_amount_of_money_with_inflation_included = yes
		}
		visible = { has_completed_focus = TUN_improved_agriculture_infastructure }
		ai_will_do = { base = 1 }
			
			
		fire_only_once = yes
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 0.25
			}
		}
		custom_cost_text = eoanb_money_cost_text	

		complete_effect = {
			458 = { add_extra_state_shared_building_slots = 1 }
			set_temp_variable = { money_to_gain = -0.25 }
			add_money_with_tooltip_effect = yes		
		}
	}

	TUN_develop_tunis_agriculture = {
		icon = generic_political_actions
		allowed = { always = yes }
		available = {
			has_completed_focus = TUN_improved_agriculture_infastructure
			set_temp_variable = { amount_of_money_to_check = 0.15 }
			has_specific_amount_of_money_with_inflation_included = yes
		}
		visible = { has_completed_focus = TUN_improved_agriculture_infastructure }

		ai_will_do = { base = 1 }
		fire_only_once = yes
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 0.15
			}
		}
		custom_cost_text = eoanb_money_cost_text	

		complete_effect = {
			458 = { 
				add_building_construction = {
					type = farm
					level = 1
					instant_build = yes
				}
			}
			set_temp_variable = { money_to_gain = -0.15 }
			add_money_with_tooltip_effect = yes		
		}
	}

	TUN_decsion_issue_debased_currency = {
		icon = generic_political_actions
		allowed = { always = yes }
		available = { has_completed_focus = TUN_issue_debased_currency }
		visible = { has_completed_focus = TUN_issue_debased_currency }

		ai_will_do = { base = 1 }
		fire_only_once = yes
		days_remove = 20
		priority = 1

		remove_effect = {
			set_temp_variable = { inflation_to_gain = 0.05 }
			add_inflation_with_tooltip_effect = yes
			set_temp_variable = { money_to_gain = 0.5 }
			add_money_with_inflation_included_with_tooltip_effect = yes
		}
	}
		
	TUN_decision_issue_bonds = {
			icon = generic_political_actions
			allowed = { always = yes }
			available = { has_completed_focus = TUN_issue_bonds }
			visible = { has_completed_focus = TUN_issue_bonds }

			ai_will_do = { base = 1 }
			fire_only_once = yes
			days_remove = 20
			priority = 1

		remove_effect = {
			set_temp_variable = { inflation_to_gain = 0.03 }
			add_inflation_with_tooltip_effect = yes
			set_temp_variable = {  money_to_gain = 2 }
			add_money_with_inflation_included_with_tooltip_effect = yes
		}
	}

	TUN_decision_tunis_bizerte_road = {
		icon = generic_political_actions

		available = {
			has_completed_focus = TUN_tunis_bizerte_road
			set_temp_variable = { amount_of_money_to_check = 0.1 }
			has_specific_amount_of_money_with_inflation_included = yes
		}
		visible = { has_completed_focus = TUN_tunis_bizerte_road }

		fire_only_once = yes
		ai_will_do = { base = 1 }
		days_remove = 150
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.1 }
		}
		custom_cost_text = eoanb_money_cost_text	

		complete_effect = {
			458 = {  
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			set_temp_variable = { money_to_gain = -0.1 }
			add_money_with_tooltip_effect = yes 
			if = {
				limit = { NOT = { has_tech = mass_transit_early } }
				set_technology = { mass_transit_early = 1 }
			}
			if = {
				limit = { has_tech = mass_transit_early } 
				set_technology = { tech_humanities_roadworks = 1 }
			}
			if = {
				limit = { has_tech = tech_humanities_roadworks } 
				set_technology = { iron_railways = 1 }
			}
		}
	}

	TUN_decision_school_science_and_math = {
		icon = generic_political_actions
		visible = { has_completed_focus = TUN_school_for_science_and_math }
		available = {
			has_completed_focus = TUN_school_for_science_and_math
			set_temp_variable = { amount_of_money_to_check = 0.15 }
			has_specific_amount_of_money_with_inflation_included = yes
		}

		ai_will_do = { base = 1 }
		fire_only_once = yes
		days_remove = 90
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 0.15
			}
		}
		custom_cost_text = eoanb_money_cost_text	

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.15 }
			add_money_with_tooltip_effect = yes	
			TUN = {
				add_ideas = { TUN_idea_school_science_and_math }
			}
		}
	}
	TUN_bizerte_repair_shop = {
		available = {
			set_temp_variable = { amount_of_money_to_check = 0.8 }
			has_specific_amount_of_money_with_inflation_included = yes
		}
		visible = {
			has_completed_focus = TUN_bizerte_repair_shops
		}
		
		custom_cost_trigger = {
			set_temp_variable = {
				 amount_of_money_to_check = 0.8
			}
		}
		custom_cost_text = eoanb_money_cost_text
		fire_only_once = yes
		days_remove = 90

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.8 }
			add_money_with_tooltip_effect = yes	
		}
		remove_effect = {
			458 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
			}
		}
	}

	TUN_la_goulette_shipyard = {
		available = {
			set_temp_variable = { amount_of_money_to_check = 0.8 }
			has_specific_amount_of_money_with_inflation_included = yes
		}
		visible = {
			has_completed_focus = TUN_expanding_la_goulette_shipyards
		}

		fire_only_once = yes
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.8 }
		}
		custom_cost_text = eoanb_money_cost_text
		days_remove = 90

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.8 }
			add_money_with_tooltip_effect = yes	
		}
		remove_effect = {
			458 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
			}
		}
	}

	TUN_shipyard_in_tunis = {
		visible = {
			has_completed_focus = TUN_focus_navy
		}
		available = {
			set_temp_variable = { amount_of_money_to_check = 1.2x}
			has_specific_amount_of_money_with_inflation_included = yes
		}
		
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 1.2 }
		}
		custom_cost_text = eoanb_money_cost_text
		days_remove = 90
		fire_only_once = yes

		complete_effect = {
			set_temp_variable = { money_to_gain = -1.2 }
			add_money_with_tooltip_effect = yes	
		}
		remove_effect = {
			458 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
		}
	}
	TUN_decision_establish_municipality_of_tunis = {
		available = {
			set_temp_variable = { amount_of_money_to_check = 0.3 }
			has_specific_amount_of_money_with_inflation_included = yes
		}
		visible = {
			has_completed_focus = TUN_municipality_of_tunis
		}

		fire_only_once = yes
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.3 }
		}
		custom_cost_text = eoanb_money_cost_text

		cost = 20
		days_remove = 45

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.3 }
			add_money_with_tooltip_effect = yes	
		}
		remove_effect = {
			add_research_slot = 1
		}
	}
	TUN_decision_renovate_palace = {
		available = {
			set_temp_variable = { amount_of_money_to_check = 0.4 }
			has_specific_amount_of_money_with_inflation_included = yes
		}
		visible = {
			has_completed_focus = TUN_great_mosque_of_tunis_renovations
		}
		fire_only_once = yes
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.4 }
		}
		custom_cost_text = eoanb_money_cost_text
		days_remove = 90

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.4 }
			add_money_with_tooltip_effect = yes	
		}
		remove_effect = {
			country_event = { id = tunisia.15 }
		}
	}
	TUN_decision_renovate_great_mosque = {
		available = {
			set_temp_variable = { amount_of_money_to_check = 0.6 }
			has_specific_amount_of_money_with_inflation_included = yes
		}
		visible = {
			has_completed_focus = TUN_great_mosque_of_tunis_renovations
		}

		fire_only_once = yes
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.6 }
		}
		custom_cost_text = eoanb_money_cost_text
		days_remove = 120

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.6 }
			add_money_with_tooltip_effect = yes	
		}
		remove_effect = {
			country_event = { id = tunisia.14 }
		}
	}
	TUN_decision_partner_anglo_tunisia_bank = {
		visible = {
			has_completed_focus = TUN_anglo_tunisia_bank
		}

		fire_only_once = yes
		cost = 30
		days_remove = 10

		remove_effect = {
			custom_effect_tooltip = TUN_winds_of_change_tt
			add_to_variable = {
				var = TUN_wc_sf
				value = -0.015
				tooltip = stability_factor_tooltip
			}
			add_to_variable = {
				var = TUN_wc_icf
				value = 0.01
				tooltip = money_income_factor_tooltip
			}
			set_country_flag = TUN_anglo_tunisian_bank
		}
	}
	TUN_decision_support_anglo_tunisia_bank = {
		available = {
			set_temp_variable = { amount_of_money_to_check = 1 }
			has_specific_amount_of_money_with_inflation_included = yes
		}
		visible = {
			has_country_flag = TUN_anglo_tunisia_bank
		}

		days_remove = 120
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 1 }
		}
		custom_cost_text = eoanb_money_cost_text
		fire_only_once = yes

		complete_effect = {
			set_temp_variable = { money_to_gain = -1 }
			add_money_with_tooltip_effect = yes	
		}
		remove_effect = {
			add_offsite_building = { type = industrial_complex level = 1 }
		}
	}
}

tunisia_defense_category = {

	TUN_decision_british_gunboats = {
		icon = generic_naval

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

		visible = { has_completed_focus = TUN_anglo_tunisian_convention }
		days_remove = 180
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 3.5 }
		}
		custom_cost_text = eoanb_money_cost_text
		ai_will_do = {
			base = 1000
		}
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -3.5 }
			add_money_with_tooltip_effect = yes
			create_equipment_variant = {
				name = "HMS Gunboat"
				type = ship_hull_gunboat_2
				name_group = GR_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
				}
			}
		}
		remove_effect = {
			navy_experience = 5
			create_ship = {
				type = ship_hull_gunboat_2
				equipment_variant = "HMS Gunboat"
				creator = TUN
				name = "HMS Gunboat 1"
			}
		}
	}

	TUN_decision_cherish_french_immigrantion = {
	
		visible = {
			has_completed_focus = TUN_immigrant_labour_force
		}
		
		fire_only_once = yes
		cost = 75
		days_remove = 90
		
		remove_effect = {
			458 = {
				add_extra_state_shared_building_slots = 1
			}
		}
	}
	
	TUN_decision_open_to_italians = {
	
		visible = {
			has_completed_focus = TUN_immigrant_labour_force
		}
		
		fire_only_once = yes
		cost = 75
		days_remove = 90
		
		complete_effect = {
			set_temp_variable = { money_to_gain = 0.8 }
			add_money_with_tooltip_effect = yes	
		}
	}

	TUN_mission_bardo_school_finances = {
		
		allowed = { always = no }
		
		available = {
			set_temp_variable = { amount_of_money_to_check = 0.5 }
			has_less_than_specific_amount_of_money = yes
			TUN_ecole_militare_bardo = {
				is_hired_as_advisor = yes
			}
		}
		
		activation = { always = no }
		priority = 100
		is_good = yes	
		days_mission_timeout = 4300
		
		
		timeout_effect = {
			decrease_slider_army = yes
			retire_character = TUN_ecole_militare_bardo
			random_list = {
				50 = {
					add_war_support = -0.15
				}
				50 = {
					army_experience = -75
				}
			}
		}
		
		complete_effect = {
			increase_slider_army = yes
			random_list = {
				50 = {
					add_war_support = 0.15
				}
				50 = {
					army_experience = 75
				}
			}
		}
		
		ai_will_do = {
			base = 1000
		}
	}

	TUN_build_forts_Tunis = {
		visible = {
			has_completed_focus = TUN_tunis_fortification
		}

		days_remove = 90
		fire_only_once = yes
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.2 }
		}

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.2 }
			add_money_with_tooltip_effect = yes	
		}
		remove_effect = {
			458 = {
				add_building_construction = {
					type = bunker
					level = 2
					instant_build = yes
					province = 11969
				}
			}
		}
	}

	TUN_build_coastal_forts_Tunis = {
		visible = {
			has_completed_focus = TUN_tunis_fortification
		}

		days_remove = 90
		fire_only_once = yes
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.2 }
		}

		complete_effect = {
			set_temp_variable = { money_to_gain = -0.2 }
			add_money_with_tooltip_effect = yes	
		}
		remove_effect = {
			458 = {
				add_building_construction = {
					type = coastal_bunker
					level = 2
					instant_build = yes
					province = 11969
				}
			}
		}
	}
	TUN_mission_cultural_reforms = {
		allowed = { always = no }
		available = { has_completed_focus = TUN_tunisian_culture_in_europe }
		activation = { always = no }

		priority = 100
		is_good = yes
		days_mission_timeout = 120
		ai_will_do = { base = 1000 }
		
		timeout_effect = {
			add_stability = -0.05
			add_political_power = -30
		}
		complete_effect = {
			add_stability = 0.05
			add_political_power = 30
		}
	}
}