BAV_decision_category_economy = {

	#Industrializing
	BAV_mission_industrializing = {
		
		icon = generic_factory
		
		allowed = { always = no }
		
		available = { 
			has_stability > 0.5
			has_tech = interchange_parts
			has_idea = NA_B_medium_scale_railways
			OR = {
				has_idea = GEC_idea_gewerbefreiheit
				has_idea = GEC_idea_gewerbeordnung
			}
			num_of_factories > 5
		}
		
		activation = { always = no }
		
		days_mission_timeout = 3000
		
		timeout_effect = {
		    add_political_power = -100
		}
		
		complete_effect = {
		    swap_ideas = { remove_idea = agrarian add_idea = industrializing }	
		}
	}

	#Enact Free Enterprise
	BAV_decision_enact_free_enterprise = {

		icon = eng_trade_unions_support
		
		#allowed = { tag = BAV }

		available = {
			OR = {
				has_completed_focus = BAV_focusoncivilianindustry
				has_completed_focus = BAV_focusonmilitaryindustry
				has_completed_focus = BAV_reformthecountry
			}
			has_tech = tech_humanities_saint_simonianism
		}

		visible = {
			has_idea = GEC_idea_weakened_zunftwesen
		}

		fire_only_once = yes
		
		cost = 75
		
		days_remove = 180

		modifier = {
			political_power_gain = -0.1
			stability_weekly_factor = -0.003
		}
		
		complete_effect = {
			add_stability = -0.02
			decrease_ps_by_one = yes
		}
		
		remove_effect = {
			swap_ideas = { remove_idea = GEC_idea_weakened_zunftwesen add_idea = GEC_idea_gewerbefreiheit }
			set_temp_variable = { eoanb_prestige_change = 3 }
			eoanb_change_prestige_score = yes
			unlock_decision_tooltip = BAV_decision_establish_an_industrial_code
		}
		
		ai_will_do = {
			base = 100
		}
	}

	#Establish an Industrial Code
	BAV_decision_establish_an_industrial_code = {

		icon = eng_trade_unions_support
		
		#allowed = { tag = BAV }

		available = {
			OR = {
				AND = {
					has_completed_focus = BAV_uselocalresources
					has_completed_focus = BAV_newcropsandfields
				}
				AND = {
					has_completed_focus = BAV_investinthearmy
					has_completed_focus = BAV_newfactorylayout
				}
				has_completed_focus = BAV_industrialreforms
			}
			has_tech = tech_humanities_workers_rights
		}

		visible = {
			has_idea = GEC_idea_gewerbefreiheit
		}

		fire_only_once = yes
		
		cost = 50
		
		days_remove = 180

		modifier = {
			political_power_gain = -0.05
		}
		
		complete_effect = {
			add_stability = 0.03
		}
		
		remove_effect = {
			swap_ideas = { remove_idea = GEC_idea_gewerbefreiheit add_idea = GEC_idea_gewerbeordnung }
			set_temp_variable = { eoanb_prestige_change = 3 }
			eoanb_change_prestige_score = yes
		}
		
		ai_will_do = {
			base = 100
		}
	}
	
	#Railway Upgrade
	BAV_decision_railway_upgrade = {

		icon = railway
		
		#allowed = { tag = BAV }

		available = {
			has_completed_focus = BAV_extendludwigsdnordbahn
			52 = { infrastructure > 6 }
			53 = { infrastructure > 5 }
			54 = { infrastructure > 6 }
			has_railway_level = {
				state = 52
				level = 2
			}
			has_railway_level = {
				state = 53
				level = 1
			}
			has_railway_level = {
				state = 54
				level = 2
			}
			custom_trigger_tooltip = {
				tooltip = BAV_decision_railway_upgrade_trigger_tt
				hidden_trigger = {
					has_railway_connection = {
						start_province = 532
						target_province = 11544
					}
					has_railway_connection = {
						start_province = 707
						target_province = 692
					}
				}
			}
			has_tech = steam_locomotive_3
			has_tech = standardized_gauge
			has_tech = train_1855
		}

		visible = {
			has_idea = NA_B_small_scale_railways
		}

		fire_only_once = yes
		
		custom_cost_trigger = {
			set_temp_variable = {
				amount_of_money_to_check = 1
			}
			has_specific_amount_of_money_with_inflation_included = yes
		}
		custom_cost_text = eoanb_money_cost_text
		
		days_remove = 365
			
		modifier = {
			political_power_gain = -0.05
		}
		
		complete_effect = {
			if = {  
				limit = { 
					has_idea = road_spending_level_1 
				} 
				swap_ideas = { remove_idea = road_spending_level_1 add_idea = road_spending_level_2 }
			}
			else_if = {
				limit = {
					has_idea = road_spending_level_2
				}
				swap_ideas = { remove_idea = road_spending_level_2 add_idea = road_spending_level_3 } 
			}
			else_if = {
				limit = {
					has_idea = road_spending_level_3
				}
				swap_ideas = { remove_idea = road_spending_level_3 add_idea = road_spending_level_4 } 
			}
			set_temp_variable = { money_to_gain = -1 }
			add_money_with_inflation_included_with_tooltip_effect = yes
		}
		
		remove_effect = {
			swap_ideas = { remove_idea = NA_B_small_scale_railways add_idea = NA_B_medium_scale_railways }
			set_temp_variable = {
				eoanb_prestige_change = 1
			}
			eoanb_change_prestige_score = yes
			EOANBSYS_institutions_innovative_add_one = yes
			set_temp_variable = {
				unemployment_value = -0.0002
			}
			add_unemployment_effect = yes
		}
		
		ai_will_do = {
			base = 1000
		}
	}
}

BAV_decision_category_common_policy = {

	#WUR
	#BAD

	#FRK
	#HSD
	#THU
	#SAX
	#HAN
	
	#Common Policy Wurttemberg
	BAV_decision_common_policy_wurttemberg = {

		icon = generic_political_discourse

		available = {
			has_stability > 0.5
		}

		visible = {
			country_exists = WUR
			NOT = { 
				OR = {
					WUR = { has_opinion_modifier = bav_common_policy }
					BAV = { has_military_access_to = WUR }
					WUR = { has_opinion_modifier = bav_tried_common_policy }
				}
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			custom_effect_tooltip = BAV_customeffect_decision_common_policy
			
			hidden_effect = {
				WUR = {
					country_event = { id = bavariaevent.5 days = 3 }
				}
			}
		}

		ai_will_do = {
			factor = 60
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
	BAV_decision_common_policy_baden = {

		icon = generic_political_discourse

		available = {
			has_stability > 0.5
		}

		visible = {
			country_exists = BAD
			NOT = { 
				OR = {
					BAD = { has_opinion_modifier = bav_common_policy }
					BAV = { has_military_access_to = BAD }
					BAD = { has_opinion_modifier = bav_tried_common_policy }
				}
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			custom_effect_tooltip = BAV_customeffect_decision_common_policy
			
			hidden_effect = {
				BAD = {
					country_event = { id = bavariaevent.5 days = 3 }
				}
			}
		}

		ai_will_do = {
			factor = 60
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
	BAV_decision_common_policy_frankfurt = {

		icon = generic_political_discourse

		available = {
			has_stability > 0.5
		}

		visible = {
			country_exists = FRK
			NOT = { 
				OR = {
					FRK = { has_opinion_modifier = bav_common_policy }
					BAV = { has_military_access_to = FRK }
					FRK = { has_opinion_modifier = bav_tried_common_policy }
				}
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			custom_effect_tooltip = BAV_customeffect_decision_common_policy
			
			hidden_effect = {
				FRK = {
					country_event = { id = bavariaevent.5 days = 3 }
				}
			}
		}

		ai_will_do = {
			factor = 60
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
	BAV_decision_common_policy_hessen = {

		icon = generic_political_discourse

		available = {
			has_stability > 0.5
		}

		visible = {
			country_exists = HSD
			NOT = { 
				OR = {
					HSD = { has_opinion_modifier = bav_common_policy }
					BAV = { has_military_access_to = HSD }
					HSD = { has_opinion_modifier = bav_tried_common_policy }
				}
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			custom_effect_tooltip = BAV_customeffect_decision_common_policy
			
			hidden_effect = {
				HSD = {
					country_event = { id = bavariaevent.5 days = 3 }
				}
			}
		}

		ai_will_do = {
			factor = 60
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
	BAV_decision_common_policy_thuringia = {

		icon = generic_political_discourse

		available = {
			has_stability > 0.5
		}

		visible = {
			country_exists = THU
			NOT = { 
				OR = {
					THU = { has_opinion_modifier = bav_common_policy }
					BAV = { has_military_access_to = THU }
					THU = { has_opinion_modifier = bav_tried_common_policy }
				}
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			custom_effect_tooltip = BAV_customeffect_decision_common_policy
			
			hidden_effect = {
				THU = {
					country_event = { id = bavariaevent.5 days = 3 }
				}
			}
		}

		ai_will_do = {
			factor = 60
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
	BAV_decision_common_policy_saxony = {

		icon = generic_political_discourse

		available = {
			has_stability > 0.5
		}

		visible = {
			country_exists = SAX
			NOT = { 
				OR = {
					SAX = { has_opinion_modifier = bav_common_policy }
					BAV = { has_military_access_to = SAX }
					SAX = { has_opinion_modifier = bav_tried_common_policy }
				}
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			custom_effect_tooltip = BAV_customeffect_decision_common_policy
			
			hidden_effect = {
				SAX = {
					country_event = { id = bavariaevent.5 days = 3 }
				}
			}
		}

		ai_will_do = {
			factor = 60
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
	BAV_decision_common_policy_hannover = {

		icon = generic_political_discourse

		available = {
			has_stability > 0.5
		}

		visible = {
			country_exists = HAN
			NOT = { 
				OR = {
					HAN = { has_opinion_modifier = bav_common_policy }
					BAV = { has_military_access_to = HAN }
					HAN = { has_opinion_modifier = bav_tried_common_policy }
				}
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			custom_effect_tooltip = BAV_customeffect_decision_common_policy
			
			hidden_effect = {
				HAN = {
					country_event = { id = bavariaevent.5 days = 3 }
				}
			}
		}

		ai_will_do = {
			factor = 60
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
	BAV_decision_invite_WUR_BAD_trias = {
		icon = generic_political_discourse

		available = {
			has_stability > 0.5
		}

		visible = {
			country_exists = WUR
			country_exists = BAD
			WUR = {
				has_idea = BAV_foreign_accepted_trias
			}
			BAD = {
				has_idea = BAV_foreign_accepted_trias
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			custom_effect_tooltip = BAV_customeffect_decision_invite_trias
			
			hidden_effect = {
				WUR = {
					country_event = { id = bavariafocus.45 days = 3 }
				}
			}
		}

		ai_will_do = {
			factor = 60
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
	BAV_decision_invite_FRK_trias = {
		icon = generic_political_discourse

		available = {
			has_stability > 0.5
		}

		visible = {
			has_idea = BAV_member_trias
			country_exists = FRK
			has_completed_focus = BAV_extendthetrias
			FRK = {
				has_idea = BAV_foreign_accepted_trias
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			custom_effect_tooltip = BAV_customeffect_decision_invite_trias
			
			hidden_effect = {
				FRK = {
					country_event = { id = bavariafocus.50 days = 3 }
				}
				if = {
					limit = {
						has_completed_focus = BAV_athirddeutschland
					}
					FRK = {
						country_event = { id = bavariafocus.9 days = 4 }
					}
				}
			}
		}

		ai_will_do = {
			factor = 60
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
	BAV_decision_invite_HES_trias = {
		icon = generic_political_discourse

		available = {
			has_stability > 0.5
		}

		visible = {
			has_idea = BAV_member_trias
			country_exists = HES
			has_completed_focus = BAV_extendthetrias
			HES = {
				has_idea = BAV_foreign_accepted_trias
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			custom_effect_tooltip = BAV_customeffect_decision_invite_trias
			
			hidden_effect = {
				HES = {
					country_event = { id = bavariafocus.50 days = 3 }
				}
				if = {
					limit = {
						has_completed_focus = BAV_athirddeutschland
					}
					HES = {
						country_event = { id = bavariafocus.9 days = 4 }
					}
				}
			}
		}

		ai_will_do = {
			factor = 60
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
	BAV_decision_invite_THU_trias = {
		icon = generic_political_discourse

		available = {
			has_stability > 0.5
		}

		visible = {
			has_idea = BAV_member_trias
			country_exists = THU
			has_completed_focus = BAV_extendthetrias
			THU = {
				has_idea = BAV_foreign_accepted_trias
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			custom_effect_tooltip = BAV_customeffect_decision_invite_trias
			
			hidden_effect = {
				THU = {
					country_event = { id = bavariafocus.50 days = 3 }
				}
				if = {
					limit = {
						has_completed_focus = BAV_athirddeutschland
					}
					THU = {
						country_event = { id = bavariafocus.9 days = 4 }
					}
				}
			}
		}

		ai_will_do = {
			factor = 60
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
	BAV_decision_invite_SAX_trias = {
		icon = generic_political_discourse

		available = {
			has_stability > 0.5
		}

		visible = {
			has_idea = BAV_member_trias
			country_exists = SAX
			has_completed_focus = BAV_extendthetrias
			SAX = {
				has_idea = BAV_foreign_accepted_trias
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			custom_effect_tooltip = BAV_customeffect_decision_invite_trias
			
			hidden_effect = {
				SAX = {
					country_event = { id = bavariafocus.50 days = 3 }
				}
				if = {
					limit = {
						has_completed_focus = BAV_athirddeutschland
					}
					SAX = {
						country_event = { id = bavariafocus.9 days = 4 }
					}
				}
			}
		}

		ai_will_do = {
			factor = 60
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
	BAV_decision_invite_HAN_trias = {
		icon = generic_political_discourse

		available = {
			has_stability > 0.5
		}

		visible = {
			has_idea = BAV_member_trias
			country_exists = HAN
			has_completed_focus = BAV_extendthetrias
			HAN = {
				has_idea = BAV_foreign_accepted_trias
			}
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			custom_effect_tooltip = BAV_customeffect_decision_invite_trias
			
			hidden_effect = {
				HAN = {
					country_event = { id = bavariafocus.50 days = 3 }
				}
				if = {
					limit = {
						has_completed_focus = BAV_athirddeutschland
					}
					HAN = {
						country_event = { id = bavariafocus.9 days = 4 }
					}
				}
			}
		}

		ai_will_do = {
			factor = 60
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
}