POR_decision_category_industry = {

	POR_decision_research_lisbons_outskirts = {
		icon = generic_decision
		available = {
			has_completed_focus = POR_focus_lisbon_porto_railway
		}
		fire_only_once = yes 
		days_remove = 180 

		cost = 10

		remove_effect = {
			add_tech_bonus = { bonus = 0.4 uses = 1 category = excavation_tech }
		country_event = {
			id = portugal.18
			}
		}
	}

	POR_decision_invicta_fabric_factory = { 

        icon = generic_construction

		highlight_states = {
			state = 180
		}

		available = {
		    NOT = { 
				OR = { 
					has_country_flag = POR_industry
				}
			}
			num_of_civilian_factories_available_for_projects > 1
			180 = { is_controlled_by = POR }
			has_completed_focus = POR_focus_invicta_fabric_factory
			set_temp_variable = {
				amount_of_money_to_check = 3.5
			}
		has_specific_amount_of_money_with_inflation_included = yes
		}

		#allowed = { tag = POR }

		fire_only_once = yes
		is_good = yes

		days_remove = 180

		modifier = {
			civilian_factory_use = 1
			production_speed_buildings_factor = -0.03
		}
		
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 3.5
			}
		}
		custom_cost_text = eoanb_money_cost_text

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

		remove_effect = { 
			180 = {
				add_building_construction = {
				    type = fabric_weavery 
				    level = 1
				    instant_build = yes
				}
			}
			180 = { add_extra_state_shared_building_slots = 1 }
		}
		
		cancel_trigger = {
			POR = { NOT = { owns_state = 180 } }
		}

		ai_will_do = {
			base = 1000
		}
    }
	
	POR_decision_portuguese_vineyards = { 

        icon = generic_construction

		highlight_states = {
			state = 181
		}

		available = {
		    NOT = { 
				OR = { 
					has_country_flag = POR_industry
				}
			}
			num_of_civilian_factories_available_for_projects > 1
			181 = { is_controlled_by = POR }
			has_completed_focus = POR_focus_expand_vineyards
			set_temp_variable = {
				amount_of_money_to_check = 4
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}	
		
		#allowed = { tag = POR }

		fire_only_once = yes
		is_good = yes

		cost = 50
		days_remove = 360

		modifier = {
			civilian_factory_use = 1
			production_speed_buildings_factor = -0.03
		}

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

        complete_effect = {
			set_temp_variable = { money_to_gain = -4 }
			add_money_with_tooltip_effect = yes	
		    hidden_effect = {
			set_country_flag = { flag = POR_industry value = 1 days = 480 }
		    }
        }

		remove_effect = { 
			181 = {
				add_building_construction = {
				    type = farm
				    level = 1
				    instant_build = yes
				}
			}
			181 = { add_extra_state_shared_building_slots = 1 }
			179 = {
				add_building_construction = {
				    type = farm
				    level = 1
				    instant_build = yes
				}
			}
			179 = { add_extra_state_shared_building_slots = 1 }
		}
		
		cancel_trigger = {
			POR = { NOT = { owns_state = 181 } }
		}

		ai_will_do = {
			base = 1000
		}
    }
	
	POR_decision_santa_clara_royal_workshop = { 

        icon = generic_construction

		highlight_states = {
			state = 112
		}

		available = {
		    NOT = { 
				OR = { 
					has_country_flag = POR_industry
				}
			}
			num_of_civilian_factories_available_for_projects > 2
			112 = { is_controlled_by = POR }
			has_completed_focus = POR_focus_santa_clara_royal_workshop
			set_temp_variable = {
				amount_of_money_to_check = 6
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}

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

		#allowed = { tag = POR }

		fire_only_once = yes
		is_good = yes

		cost = 50
		days_remove = 720

		modifier = {
			civilian_factory_use = 2
			production_speed_buildings_factor = -0.05
		}
		
		complete_effect = {
		set_temp_variable = { money_to_gain = -6 }
			add_money_with_tooltip_effect = yes	
        }

		remove_effect = { 
			112 = {
				add_building_construction = {
				    type = arms_factory
				    level = 1
				    instant_build = yes
				}
			}
			112 = { add_extra_state_shared_building_slots = 1 }
		}
		
		cancel_trigger = {
			POR = { NOT = { owns_state = 112 } }
		}

		ai_will_do = {
			base = 1000
		}
    }
	
	POR_decision_lonia_workshop = { 

        icon = generic_construction

		highlight_states = {
			state = 112
		}

		available = {
			NOT = { 
				OR = { 
					has_country_flag = POR_industry
				}
			}
			num_of_civilian_factories_available_for_projects > 2
			112 = { is_controlled_by = POR }
			has_completed_focus = POR_focus_santa_apolonia_rolay_workshop
			set_temp_variable = {
				amount_of_money_to_check = 6
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}

		#allowed = { tag = POR }

		fire_only_once = yes
		is_good = yes

		cost = 50
		days_remove = 720

		modifier = {
			civilian_factory_use = 2
			production_speed_buildings_factor = -0.05
		}
		
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 6
			}
		}
		custom_cost_text = eoanb_money_cost_text

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

		remove_effect = { 
			112 = {
				add_building_construction = {
				    type = arms_factory
				    level = 1
				    instant_build = yes
				}
			}
			112 = { add_extra_state_shared_building_slots = 1 }
		}
		
		cancel_trigger = {
			POR = { NOT = { owns_state = 180 } }
		}

		ai_will_do = {
			base = 1000
		}
    }
	
	POR_decision_barcarena_workshop = { 

        icon = generic_construction

		highlight_states = {
			state = 112
		}

		available = {
			NOT = { 
				OR = { 
					has_country_flag = POR_industry
				}
			}
			num_of_civilian_factories_available_for_projects > 2
			112 = { is_controlled_by = POR }
			has_completed_focus = POR_focus_barcarena_military_development
			set_temp_variable = {
				amount_of_money_to_check = 6
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}


		fire_only_once = yes
		is_good = yes

		cost = 50
		days_remove = 720

		modifier = {
			civilian_factory_use = 2
			production_speed_buildings_factor = -0.05
		}
	
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 6
			}
		}
		custom_cost_text = eoanb_money_cost_text
		
		complete_effect = {
		    hidden_effect = {
			set_country_flag = { flag = POR_industry value = 1 days = 780 }
		    }
			set_temp_variable = { money_to_gain = -6 }
			add_money_with_tooltip_effect = yes	
        }

		remove_effect = { 
			112 = {
				add_building_construction = {
				    type = arms_factory
				    level = 1
				    instant_build = yes
				}
			}
			112 = { add_extra_state_shared_building_slots = 1 }
		}
		
		cancel_trigger = {
			POR = { NOT = { owns_state = 180 } }
		}

		ai_will_do = {
			base = 1000
		}
    }
	
	POR_decision_porcelain_factory = { 

        icon = generic_construction

		highlight_states = {
			state = 180
		}

		available = {
		    NOT = { 
				OR = { 
					has_country_flag = POR_industry
				}
			}
			num_of_civilian_factories_available_for_projects > 1
			180 = { is_controlled_by = POR }
			has_completed_focus = POR_focus_porcelain_factory
			set_temp_variable = {
				amount_of_money_to_check = 9
				}
			has_specific_amount_of_money_with_inflation_included = yes
		}

		#allowed = { tag = POR }

		fire_only_once = yes
		is_good = yes

		cost = 50
		days_remove = 180

		modifier = {
			civilian_factory_use = 1
			production_speed_buildings_factor = -0.03
		}
		
	custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 9
			}
		}
		custom_cost_text = eoanb_money_cost_text

		complete_effect = {
		    hidden_effect = {
			set_country_flag = { flag = POR_industry value = 1 days = 240 }
		    }
			set_temp_variable = { money_to_gain = -9 }
			add_money_with_tooltip_effect = yes	
        }

		remove_effect = { 
			180 = {
				add_building_construction = {
				    type = industrial_complex
				    level = 1
				    instant_build = yes
				}
			}
			180 = { add_extra_state_shared_building_slots = 1 }
		}
		
		cancel_trigger = {
			POR = { NOT = { owns_state = 180 } }
		}

		ai_will_do = {
			base = 1000
		}
    }
	
	POR_decision_land_confiscation = { 

        icon = generic_construction

		highlight_states = {
			state = 180
		}
		
		#allowed = { tag = POR }

		available = {
			180 = { is_controlled_by = POR }
		}

		visible = {
		    POR = { has_completed_focus = POR_focus_land_confiscation }
		    tag = POR
		}

		fire_only_once = yes
		is_good = yes

		cost = 100
		days_remove = 180

		modifier = {
			civilian_factory_use = 2
			political_power_gain = -0.5
		}
		
		complete_effect = {
        }

		remove_effect = { 
            181 = { add_extra_state_shared_building_slots = 2 }
			179 = { add_extra_state_shared_building_slots = 2 }
			112 = { add_extra_state_shared_building_slots = 3 }
			180 = { add_extra_state_shared_building_slots = 2 }
			add_stability = -0.1
			decrease_ps_by_one = yes
		}
		
		cancel_trigger = {
			POR = { NOT = { owns_state = 180 } }
		}

		ai_will_do = {
			base = 1000
		}
    }

	POR_decision_de_lippe_forts = {

	icon = generic_construction

	available = {
		has_completed_focus = POR_focus_reconstruct_forte_conde_de_lippe
			set_temp_variable = {
				amount_of_money_to_check = 0.5
			}
			has_specific_amount_of_money_with_inflation_included = yes
	}

	fire_only_once = yes

	modifier = {
		civilian_factory_use = 1
		}
	
	custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 0.5
			}
		}
		custom_cost_text = eoanb_money_cost_text

	days_remove = 120

	highlight_states = {
			highlight_state_targets = {
				state = 179
			}
	}

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

	remove_effect = {
			add_war_support = 0.01
			179 = {
				add_building_construction = {
					type = bunker
					level = 1
					instant_build = yes
					province = 3886
				}
			}
		}
	}

	POR_decision_lisbon_porto_railway_line = {
	icon = generic_construction 
	available = {
		has_completed_focus = POR_focus_lisbon_porto_railway
		num_of_civilian_factories_available_for_projects > 1
			set_temp_variable = {
				amount_of_money_to_check = 5
			}
		has_specific_amount_of_money_with_inflation_included = yes
	}
	fire_only_once = yes
	days_remove = 210 

		modifier = {
			civilian_factory_use = 1
		}

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

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

	remove_effect = {
			build_railway = {
				level = 1
				path = { 11805 3861 799 6924 9817 }
			}
		}
	}

	POR_decision_build_military_hospital = {
		icon = generic_construction
		available = {
			has_completed_focus = POR_focus_military_surgery
			num_of_civilian_factories_available_for_projects > 1
			set_temp_variable = {
				amount_of_money_to_check = 2
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}
		fire_only_once = yes 
		days_remove = 365

		modifier = {
			civilian_factory_use = 1
		}

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

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

		remove_effect = {
			country_event = {
				id = portugal.20
			}
		}
	}

	POR_mission_cristal_palace = {
		icon = generic_construction
		fire_only_once = yes 
		days_mission_timeout = 1475

		allowed = { always = no  }
		available = { always = no }
		activation = { always = no }
		priority = 50
		timeout_effect = {
		country_event = {
		id = portugal.42
			}
		}

		complete_effect = {
			add_political_power = -50
		}
	}

	POR_railway_upgrade = {

		icon = generic_political_discourse
		
		#allowed = { tag = POR }

		available = {
			has_idea = NA_B_early_scale_railways
			has_tech = steam_locomotive_3
			has_tech = standardized_gauge
			#traffic signals removed
			has_railway_connection = {
				start_province = 11805
				target_province = 9817
			}
			OR = {
				has_idea = road_spending_level_3
				has_idea = road_spending_level_4
			}
			set_temp_variable = {
				amount_of_money_to_check = 10
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}

		visible = {
			TAG = POR
		}

		fire_only_once = yes
        days_remove = 180
         
        modifier = {
            political_power_gain = -0.05
			consumer_goods_expected_value = 0.05
			production_speed_buildings_factor = -0.05
        }        
       
	custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 10
			}
		}
		custom_cost_text = eoanb_money_cost_text

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

        remove_effect = {
		    swap_ideas = { remove_idea = NA_B_early_scale_railways add_idea = NA_B_small_scale_railways }
		}
       
		ai_will_do = {
			base = 1000
		}
	}

	POR_decision_defend_our_shores = {

		icon = generic_construction
	
		fire_only_once = yes
	
		available = {
			has_completed_focus = POR_focus_defend_our_shores
			num_of_civilian_factories_available_for_projects > 1
			set_temp_variable = {
				amount_of_money_to_check = 2
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}
	
		modifier = {
			civilian_factory_use = 1
			}
		
		custom_cost_trigger = {
				set_temp_variable = {
					amount_of_money_to_check = 2
				}
			}
		custom_cost_text = eoanb_money_cost_text
	
		days_remove = 180
	
		complete_effect = {
			set_temp_variable = { money_to_gain = -2 }
			add_money_with_tooltip_effect = yes	
		}
	
		remove_effect = {
			112={
				add_building_construction = {
					type = coastal_bunker
					level = 1
					instant_build = yes
					province = 11805
				}
			}
			180={
				add_building_construction = {
					type = coastal_bunker
					level = 1
					instant_build = yes
					province = 9817
				}
			}
		}
	}

}

POR_decision_category_colonies = {

	POR_decision_take_control_coloane_island = { 

        icon = generic_construction

		highlight_states = {
			state = 729
		}
		
		#allowed = { tag = POR }

		available = {
			has_completed_focus = POR_focus_develop_macau
			date > 1864.5.1
		}

		visible = {
		    has_completed_focus = POR_focus_develop_macau 
		    tag = POR
		}

		fire_only_once = yes
		is_good = yes

		cost = 50
		days_remove = 180

		modifier = {
			civilian_factory_use = 2
			political_power_gain = -0.5
		}
		
		complete_effect = {
        }

		remove_effect = { 
			POR = { country_event = {
                    id = portugal.33
                    days = 10
                }
            }
		}
		
		cancel_trigger = {
			POR = { NOT = { owns_state = 729 } }
		}

		ai_will_do = {
			base = 1000
		}
    }

	POR_decision_mozambique_coal_depots = { 

        icon = generic_construction

		highlight_states = {
			state = 823
		}
		
		#allowed = { tag = POR }

		available = {
		    NOT = { 
				OR = { 
					has_country_flag = POR_colony
				}
			}
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = POR_focus_mozambique_resources 
		}

		visible = {
		    has_completed_focus = POR_focus_mozambique_resources 
		    tag = POR
		}

		fire_only_once = yes
		is_good = yes

		cost = 50
		days_remove = 270

		modifier = {
			civilian_factory_use = 2
			political_power_gain = -0.5
		}
		
		complete_effect = {
		    hidden_effect = {
				set_temp_variable = { loans_amount = 3 }
				take_loan_without_inflation_effect = yes				
				set_country_flag = { flag = POR_colony value = 1 days = 320 }
		    }
        }

		remove_effect = { 
		    823 = {
				
			}
            823 = {
				add_resource = {
					type = coal
					amount = 3
				}
			}
		}
		
		cancel_trigger = {
			POR = { NOT = { owns_state = 823 } }
		}

		ai_will_do = {
			base = 1000
		}
    }

	POR_decision_mozambique_aluminium = { 

        icon = generic_construction

		highlight_states = {
			state = 823
		}
		
		#allowed = { tag = POR }

		available = {
			NOT = { 
				OR = { 
					has_country_flag = POR_colony
				}
			}
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = POR_focus_mozambique_resources 
		}

		visible = {
		    has_completed_focus = POR_focus_mozambique_resources 
		}

		fire_only_once = yes
		is_good = yes

		cost = 50
		days_remove = 270

		modifier = {
			civilian_factory_use = 2
			political_power_gain = -0.5
		}
		
		complete_effect = {
        }

		remove_effect = { 
		    823 = {
				
			}
            823 = {
				add_resource = {
					type = aluminium
					amount = 3
				}
			}
		}
		
		cancel_trigger = {
			POR = { NOT = { owns_state = 823 } }
		}

		ai_will_do = {
			base = 1000
		}
    }

	
	#Expand the Macau Slave Trade
	eoanb_decision_POR_macau_slaves_expand = {

		icon = generic_decision

		available = {
			controls_state = 729
		}

		visible = {
			TAG = POR
			controls_state = 729
			729 = { has_dynamic_modifier = { modifier = dynmod_POR_macau_slaves } }
		}
		
		#allowed = { tag = POR }

		fire_only_once = yes

		cost = 50

		complete_effect = {
			729 = { remove_dynamic_modifier = { modifier = dynmod_POR_macau_slaves }  }
			729 = { add_dynamic_modifier = { modifier = dynmod_POR_macau_slaves_expanded } }
		}

		ai_will_do = {
			base = 0
		}
	}
	
	#End the Macau Slave Trade
	eoanb_decision_POR_macau_slaves_end = {

		icon = generic_decision

		available = {
			controls_state = 729
		}

		visible = {
			TAG = POR
			controls_state = 729
			729 = { has_dynamic_modifier = { modifier = dynmod_POR_macau_slaves } }
		}

		#allowed = { tag = POR }

		fire_only_once = yes

		cost = 50

		complete_effect = {
			729 = { remove_dynamic_modifier = { modifier = dynmod_POR_macau_slaves }  }
		}

		ai_will_do = {
			base = 1000
			modifier = {
				factor = 0
				date < 1874.2.15
			}
		}
	}
	
	#Try to sell Macau to China
	eoanb_decision_POR_sell_macau_china = {

		icon = generic_decision

		available = {
			controls_state = 729
		}

		visible = {
			TAG = POR
			has_full_control_of_state = 729
			OR = {
				country_exists = QNG
				country_exists = CHI
			}
		}

		#allowed = { tag = POR }

		fire_only_once = yes

		cost = 0

		complete_effect = {
			if = {
				limit = {
					country_exists = QNG
				}
				QNG = { country_event = { id = asiageneraldiplomatic.10 days = 1 } }
			}
			else_if = {
				limit = {
					country_exists = CHI
				}
				CHI = { country_event = { id = asiageneraldiplomatic.10 days = 1 } }
			}
		}

		ai_will_do = {
			base = 0
		}
	}

	#Expand the Bembe mines
	POR_decision_expand_bembe_mines = {
		available = { has_completed_focus = POR_focus_goa_outpost }
		visible = { has_completed_focus = POR_focus_goa_outpost }

		cost = 30
		custom_cost_trigger = {
			set_temp_variable = {
					amount_of_money_to_check = 1
				}
		}
		custom_cost_text = eoanb_money_cost_text

		days_remove = 180

		fire_only_once = yes

		modifier = {
			civilian_factory_use = 1
		}
		
		complete_effect = {
			set_temp_variable = { money_to_gain = -1 }
			add_money_with_tooltip_effect = yes	
		}

		remove_effect = {
			824 = {
				add_resource = {
					type = coal
					amount = 2
				}
			}
		}
		
	}

	#Boost trade in Indian Ocean
	POR_decision_boost_trade_in_indian_ocean = {
		available = { has_completed_focus = POR_focus_goa_outpost }
		visible = { has_completed_focus = POR_focus_goa_outpost }

		cost = 50
		days_remove = 50

		fire_only_once = yes

		complete_effect = {
			add_war_support = -0.02
		}

		remove_effect = {
			add_timed_idea = {
				idea = POR_idea_trading_in_indian_ocean
				days = 180
			}
		}
	}

	POR_decision_increase_inland_rubber_production = {
		available = { has_completed_focus = POR_KON_the_wild_rubber_production }
		visible = { has_completed_focus = POR_KON_the_wild_rubber_production }

		fire_only_once = yes

		days_remove = 100

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

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

		modifier = {
			civilian_factory_use = 1
		}

		remove_effect = {
			1212 = {
				add_resource = {
					type = rubber
					amount = 2
				}
			}
		}
	}
}

	POR_decisions_category_foreign_policy_and_army = {

	POR_decision_buy_guns = {

		icon = generic_decision

		available = {
			has_completed_focus = POR_focus_work_with_britain
			set_temp_variable = {
				amount_of_money_to_check = 2
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}

	fire_only_once = yes

		visible = { 
		if = {
		  has_completed_focus = POR_focus_work_with_britain 
			}
		}

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

		complete_effect = { 
		add_equipment_to_stockpile = {
		type = infantry_equipment
		amount = 3000
			}
		add_timed_idea ={
		 idea = POR_bought_equipment
		 days = 80
			}
		set_temp_variable = { money_to_gain = -2 }
			add_money_with_tooltip_effect = yes	
		}
	}

POR_decision_send_saldanha_to_rome = {

	icon = generic_decision

	fire_only_once = yes

	available = {
		has_completed_focus = POR_focus_learn_from_others
	}

	days_remove = 365

	remove_effect = {
		country_event = portugal.40
	}
}

POR_decision_division_lisbon_1 = {

	icon = generic_decision 

	fire_only_once = yes

	available = {
		has_completed_focus = POR_focus_escola_pratica_de_artilharia
		set_temp_variable = {
				amount_of_money_to_check = 5
			}
			has_specific_amount_of_money_with_inflation_included = yes
	}

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

	days_remove = 200

	remove_effect = {
				112 = {
			create_unit = {
				division = "name = \" Regimento de Infanteria N.10\" division_template = \"Portuguese Infantry\" start_experience_factor = 0.1 start_equipment_factor = 0.5"
				owner = POR
				}
			}
	}

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

}
	POR_decision_division_beja = {

	icon = generic_decision 

	fire_only_once = yes

	available = {
		has_completed_focus = POR_focus_escola_pratica_de_artilharia
		set_temp_variable = {
				amount_of_money_to_check = 5
			}
		has_specific_amount_of_money_with_inflation_included = yes
	}

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

	days_remove = 200

	remove_effect = {
				179 = {
			create_unit = {
				division = "name = \" Regimento de Infanteria N.11\" division_template = \"Portuguese Infantry\" start_experience_factor = 0.1 start_equipment_factor = 0.5"
				owner = POR
				}
			}
	}

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

POR_decision_division_lisbon_2 = {

	icon = generic_decision 

	fire_only_once = yes

	available = {
		has_completed_focus = POR_focus_the_artillery_corps
		set_temp_variable = {
			amount_of_money_to_check = 6
		}
		has_specific_amount_of_money_with_inflation_included = yes
	}

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

	days_remove = 200

	remove_effect = {
				112 = {
			create_unit = {
				division = "name = \" Regimento de Infanteria N.13\" division_template = \"Portuguese Infantry\" start_experience_factor = 0.1 start_equipment_factor = 0.5"
				owner = POR
				}
			}
	}
	complete_effect = {
		set_temp_variable = { money_to_gain = -6 }
			add_money_with_tooltip_effect = yes	
			}
		}
	}

POR_decision_category_portuguese_navy = {

	POR_decision_schedule_gunnery_drills = {

		icon = generic_navy

		fire_only_once = yes

		available = {
			has_completed_focus = POR_focus_artillery_training_ship
		}

		visible = {
			has_completed_focus = POR_focus_artillery_training_ship
		}

		custom_cost_trigger = {
			command_power > 19
		}
		custom_cost_text = eoanb_command_power_20

		complete_effect = {
			hidden_effect = {
			add_command_power = -20
			}
			navy_experience = 10
			add_tech_bonus = {
				bonus = 0.2
				uses = 1
				category = naval_equipment
			}
			set_temp_variable = { money_to_gain = -1 }
			add_money_with_tooltip_effect = yes	
		}
	}

	POR_decision_develop_advanced_naval_gunnery_simulators = {

		icon = generic_navy

		fire_only_once = yes

		available = {
			has_completed_focus = POR_focus_artillery_training_ship
		}

		visible = {
			has_completed_focus = POR_focus_artillery_training_ship
		}
		
		custom_cost_trigger = {
			command_power > 19
		}
		custom_cost_text = eoanb_command_power_20

		complete_effect = {
			hidden_effect = {
			add_command_power = -20
			}
			navy_experience = 15
			add_tech_bonus = {
				bonus = 0.1
				uses = 1
				category = naval_equipment
			}
			set_temp_variable = { money_to_gain = -1 }
			add_money_with_tooltip_effect = yes	
		}
	}

	POR_mission_coastal_fort_lisbon = {
		icon = generic_construction
		fire_only_once = yes 
		days_mission_timeout = 200

		allowed = { always = no  }
		available = { always = no }
		activation = { always = no }
		priority = 50
		timeout_effect = {
			112={
				add_building_construction = {
					type = coastal_bunker
					level = 1
					instant_build = yes
					province = 11805
				}
			}
		}
	}

	POR_decision_sagresh_into_sea = {

		icon = generic_navy

		fire_only_once = yes

		available = {
			has_completed_focus = POR_focus_revolution_in_shipbuilding
			set_temp_variable = {
				amount_of_money_to_check = 2
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}

		visible = {
			has_completed_focus = POR_focus_revolution_in_shipbuilding
		}

		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 2
			}
			command_power > 49
		}
		custom_cost_text = eoanb_money_and_command_power_50

		complete_effect = {
			hidden_effect = {
				add_command_power = -50
				create_equipment_variant = {
					name = "Corvette Class"
					type = ship_hull_corvette_2
					allow_without_tech = yes
					modules = {
					}
				}
			}
			set_temp_variable = { money_to_gain = -2 }
			add_money_with_tooltip_effect = yes	
			create_ship = {
				type = ship_hull_corvette_2
				equipment_variant = "Corvette Class"
				creator = POR
			}
		}
	}

	POR_decision_estefania_into_exploitation = {

		icon = generic_navy

		fire_only_once = yes

		available = {
			has_completed_focus = POR_focus_revolution_in_shipbuilding
			set_temp_variable = {
				amount_of_money_to_check = 2
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}

		visible = {
			has_completed_focus = POR_focus_revolution_in_shipbuilding
		}

		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 2
			}
			command_power > 49
		}
		custom_cost_text = eoanb_money_and_command_power_50

		complete_effect = {
			hidden_effect = {
				add_command_power = -50
				create_equipment_variant = {
					name = "Corvette Class"
					type = ship_hull_corvette_2
					allow_without_tech = yes
					modules = {
					}
				}
			}
			set_temp_variable = { money_to_gain = -2 }
			add_money_with_tooltip_effect = yes	
			create_ship = {
				type = ship_hull_corvette_2
				equipment_variant = "Corvette Class"
				creator = POR
			}
		}
	}
}
