ideas = {

	economy = {
		law = yes
		use_list_view = yes

		undisturbed_isolation = {


			allowed = {
				always = no
			}
			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.50
				production_speed_industrial_complex_factor = -0.5
				production_speed_arms_factory_factor = -0.5
				production_speed_dockyard_factor = -0.5
				conversion_cost_civ_to_mil_factor = 0.5
				conversion_cost_mil_to_civ_factor = 0.5
				generate_wargoal_tension = 1.00
				join_faction_tension = 0.20
				lend_lease_tension = 0.50
				send_volunteers_tension = 0.20
				guarantee_tension = 0.75
				max_fuel_factor = -0.45
				fuel_gain_factor = -0.6
				agency_upgrade_time = 1.0
			}

			allowed_to_remove = {
				IF = {
					limit = {
						original_tag = USA
					}
					OR = {
						has_war_support > 0.5
						has_war = yes
						has_completed_focus = USA_limited_intervention
					}
				}
				ELSE = {
					OR = {
						has_war_support > 0.5
						has_war = yes
					}
				}
			}

			cancel_if_invalid = no
		}

		isolation = {

			allowed = {
				always = no
			}
			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.4
				production_speed_industrial_complex_factor = -0.4
				production_speed_arms_factory_factor = -0.4
				production_speed_dockyard_factor = -0.4
				conversion_cost_civ_to_mil_factor= 0.4
				conversion_cost_mil_to_civ_factor = 0.4
				generate_wargoal_tension = 1.00
				join_faction_tension = 0.20
				lend_lease_tension = 0.10
				send_volunteers_tension = 0.20
				guarantee_tension = 0.5
				max_fuel_factor = -0.35
				fuel_gain_factor = -0.5
				agency_upgrade_time = 0.8
			}
			allowed_to_remove = {
				IF = {
					limit = {
						original_tag = USA
					}
					OR = {
						has_war_support > 0.75
						has_war = yes
						has_completed_focus = USA_limited_intervention
					}
				}
				ELSE = {
					OR = {
						has_war_support > 0.75
						has_war = yes
					}
				}
			}

			cancel_if_invalid = no
		}

		civilian_economy = {


			cost = 150
			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.35
				production_speed_industrial_complex_factor = -0.3
				production_speed_arms_factory_factor = -0.3
				conversion_cost_civ_to_mil_factor= 0.3
				conversion_cost_mil_to_civ_factor = 0.3
				max_fuel_factor = -0.25
				fuel_gain_factor = -0.4
			}

			default = yes

			cancel_if_invalid = no

			ai_will_do = {
   				factor = 0

   				modifier = {
					add = 2000
					OR = {
						has_idea = undisturbed_isolation
						has_idea = isolation
					}
				}

   				modifier = {
					factor = 0
					has_idea = war_economy
				}
   			}
		}

		low_economic_mobilisation = {

			available = {
				has_war_support > 0.15
				if = {
					limit = {
						original_tag = HUN
						has_dlc = "Death or Dishonor"
					}
					if = {
						limit = {
							has_dlc = "Arms Against Tyranny"
						}
						NOT = { has_idea = HUN_treaty_of_triannon_aat }
					}
					else = {
						NOT = { has_idea = HUN_treaty_of_triannon }
					}
				}
				if = {
					limit = {
						has_completed_focus = USA_limited_intervention
						has_defensive_war = no
					}
					has_war_support > 0.3
					congress_high_support_trigger = yes
				}
				if = {
					limit = {
						original_tag = TUR
						has_dlc = "Battle for the Bosporus"
					}
					NOT = {
						OR = {
							has_active_mission = TUR_etatism_crisis_2
							has_active_mission = TUR_etatism_crisis_3
							has_active_mission = TUR_etatism_crisis_4
						}
					}
				}
			}
			on_add = {
				if = {
					limit = {
						tag = USA
						has_completed_focus = USA_limited_intervention
						has_defensive_war = no
					}
					USA_congress_large_opposition = yes
				}
			}

			cost = 150
			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.3
				production_speed_industrial_complex_factor = -0.1
				production_speed_arms_factory_factor = -0.1
				fuel_gain_factor = -0.25
			}

			cancel_if_invalid = no

			ai_will_do = {
   				factor = 2
				modifier = {
					has_war_support > 0.25
					factor = 0 #don't even look at it if you could be taking partial mob
				}

   				modifier = {
					add = 2500
					OR = {
						has_idea = undisturbed_isolation
						has_idea = isolation
					}
				}

   				modifier = {
					factor = 0
					OR = {
						has_idea = war_economy
						has_idea = partial_economic_mobilisation
					}
				}
   			}
		}

		partial_economic_mobilisation = {

			available = {
				has_war_support > 0.25

				if = {
					limit = {
						original_tag = HUN
						has_dlc = "Death or Dishonor"
					}
					if = {
						limit = {
							has_dlc = "Arms Against Tyranny"
						}
						OR = {
							has_completed_focus = HUN_secret_rearmament
							NOT = { has_idea = HUN_treaty_of_triannon_aat }
						}
					}
					else = {
						OR = {
							has_completed_focus = HUN_secret_rearmament
							NOT = { has_idea = HUN_treaty_of_triannon }
						}
					}
				}
				if = {
					limit = {
						has_completed_focus = USA_limited_intervention
						has_defensive_war = no
					}
					has_war_support > 0.5
					congress_high_support_trigger = yes
				}
				if = {
					limit = {
						original_tag = TUR
						has_dlc = "Battle for the Bosporus"
					}
					NOT = {
						OR = {
							has_active_mission = TUR_etatism_crisis_1
							has_active_mission = TUR_etatism_crisis_3
							has_active_mission = TUR_etatism_crisis_4
						}
					}
				}
			}

			cost = 150
			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.25
				production_speed_arms_factory_factor = 0.1
				conversion_cost_civ_to_mil_factor= -0.1
				conversion_cost_mil_to_civ_factor = -0.1
				fuel_gain_factor = -0.1
			}

			cancel_if_invalid = no
			on_add = {
				if = {
					limit = {
						tag = USA
						has_completed_focus = USA_limited_intervention
						has_defensive_war = no
					}
					USA_congress_large_opposition = yes
				}
			}
			ai_will_do = {
   				factor = 2

   				modifier = {
					factor = 0
					tag = SOV
					is_historical_focus_on = yes
					SPR = { is_ai = yes }
					has_dlc = "La Resistance"
					date < 1937.1.1
				}

   				modifier = {
					factor = 1000
					date > 1937.1.1
					OR = {
						has_idea = civilian_economy
						has_idea = low_economic_mobilisation
					}
					has_war_support < 0.5
					NOT = {
						OR = {
							has_war = yes
							has_government = fascism
							has_government = communism
						}
					}
				}

   				modifier = {
					add = 3000
					OR = {
						has_idea = undisturbed_isolation
						has_idea = isolation
					}
				}

   				modifier = {
					factor = 0.1
					OR = {
						has_idea = war_economy
						AND = {
							has_war_support < 0.5
							OR = {
								has_war = yes
								has_government = fascism
								has_government = communism
							}
						}
					}
				}
   			}
		}

		war_economy = {


			available = {
				has_war_support > 0.5
				OR = {
					has_government = fascism
					has_government = communism
					custom_trigger_tooltip = { tooltip = or_clarification_tooltip always = no }
					AND = {
						has_war = yes
						any_enemy_country = {
							ic_ratio = {
								tag = ROOT
								ratio > 0.4
							}
						}
					}
				}

				if = {
					limit = {
						original_tag = HUN
						has_dlc = "Death or Dishonor"
					}
					if = {
						limit = {
							has_dlc = "Arms Against Tyranny"
						}
						NOT = { has_idea = HUN_treaty_of_triannon_aat }
					}
					else = {
						NOT = { has_idea = HUN_treaty_of_triannon }
					}
				}
				if = {
					limit = {
						has_completed_focus = USA_limited_intervention
						has_defensive_war = no
					}
					has_war_support > 0.75
					congress_high_support_trigger = yes
				}
				if = {
					limit = {
						original_tag = TUR
						has_dlc = "Battle for the Bosporus"
					}
					NOT = {
						OR = {
							has_active_mission = TUR_etatism_crisis_1
							has_active_mission = TUR_etatism_crisis_2
							has_active_mission = TUR_etatism_crisis_4
						}
					}
				}
			}

			cost = 150
			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.2
				production_speed_arms_factory_factor = 0.2
				conversion_cost_civ_to_mil_factor= -0.2
				conversion_cost_mil_to_civ_factor = -0.2
			}

			cancel_if_invalid = no
			on_add = {
				if = {
					limit = {
						tag = USA
						has_completed_focus = USA_limited_intervention
						has_defensive_war = no
					}
					USA_congress_large_opposition = yes
				}
				set_country_flag = {
					flag = recently_changed_to_war_economy_flag
					days = 365
				}
			}
			ai_will_do = {
   				factor = 5

				modifier = {
					factor = 0
					has_country_flag = recently_changed_to_war_economy_flag
					has_idea = tot_economic_mobilisation
					manpower_per_military_factory > 5000
				}

				modifier = {
					factor = 35
					has_war = yes
				}

   				modifier = {
					factor = 1000
					OR = {
						has_idea = undisturbed_isolation
						has_idea = isolation
					}
				}

   				modifier = {
					factor = 10000
					date > 1937.1.1
					OR = {
						has_idea = civilian_economy
						has_idea = low_economic_mobilisation
						has_idea = partial_economic_mobilisation
					}
					has_war_support > 0.5
					OR = {
						has_war = yes
						has_government = fascism
						has_government = communism
					}
				}

				modifier = {
					factor = 1000
					OR = {
						has_idea = volunteer_only
						has_idea = limited_conscription
						has_idea = disarmed_nation
						has_dynamic_modifier = { modifier = SWI_gold_trade_with_switzerland }
					}
				}
   			}
		}

		tot_economic_mobilisation = {


			available = {
				has_war = yes
				has_war_support > 0.8
				any_enemy_country = {
					ic_ratio = {
						tag = ROOT
						ratio > 0.5
					}
				}

				if = {
					limit = {
						original_tag = HUN
						has_dlc = "Death or Dishonor"
					}
					if = {
						limit = {
							has_dlc = "Arms Against Tyranny"
						}
						NOT = { has_idea = HUN_treaty_of_triannon_aat }
					}
					else = {
						NOT = { has_idea = HUN_treaty_of_triannon }
					}
				}
				if = {
					limit = {
						has_completed_focus = USA_limited_intervention
						has_defensive_war = no
					}
					has_war_support > 0.9
					congress_high_support_trigger = yes
				}
				if = {
					limit = {
						original_tag = TUR
						has_dlc = "Battle for the Bosporus"
					}
					NOT = {
						OR = {
							has_active_mission = TUR_etatism_crisis_1
							has_active_mission = TUR_etatism_crisis_2
							has_active_mission = TUR_etatism_crisis_3
						}
					}
				}
			}
			on_add = {
				if = {
					limit = {
						tag = USA
						has_completed_focus = USA_limited_intervention
						has_defensive_war = no
					}
					USA_congress_large_opposition = yes
				}
			}
			ai_will_do = {
   				factor = 1

				modifier = {
					factor = 500
					OR = {
						has_political_power > 175
						political_power_daily > 1.5
					}
				}

				modifier = {
					factor = 1000
					NOT = {
						OR = {
							has_idea = volunteer_only
							has_idea = limited_conscription
							has_idea = disarmed_nation
							has_dynamic_modifier = { modifier = SWI_gold_trade_with_switzerland }
						}
					}
					has_war = yes
					date > 1940.1.1
				}
				

				modifier = {
					factor = 1000
            				OR = {
                				AND = {
                    					has_government = democratic
                    					has_war_support > 0.55
                				}
                				AND = {
                    					has_government = communism
                    					has_war_support > 0.55
                				}
                				AND = {
                    					has_government = fascism
                    					OR = {
                        					has_war_support > 0.55
                        					surrender_progress > 0
                    					}
                				}
                				AND = {
                    					has_government = neutrality
                    					has_war_support > 0.55
                    					has_stability > 0.55
                				}
						surrender_progress > 0.2
            				}
				}


				modifier = {
					factor = 0
					OR = {
						has_idea = volunteer_only
						has_idea = limited_conscription
						has_idea = disarmed_nation
						has_dynamic_modifier = { modifier = SWI_gold_trade_with_switzerland }
					}
				}
   			}

			cost = 150
			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.10
				conscription = -0.03
				production_speed_arms_factory_factor = 0.3
				conversion_cost_civ_to_mil_factor= -0.3
				conversion_cost_mil_to_civ_factor = -0.3
			}

			cancel_if_invalid = no
		}

		new_economic_policy = {

			picture = new_economic_policy

			allowed = {
				always = no
			}
			allowed_to_remove = {
				OR = {
					surrender_progress > 0.75
					NOT = { has_government = communism }
				}
			}

			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.15
				production_speed_buildings_factor = -0.15
				global_building_slots_factor = 0.10

			}

			cancel_if_invalid = no

			ai_will_do = {
   				factor = 0
   			}
		}
		new_economic_policy_2 = {
			name = new_economic_policy

			picture = new_economic_policy

			allowed = {
				always = no
			}
			allowed_to_remove = {
				OR = {
					surrender_progress > 0.75
					NOT = { has_government = communism }
				}
			}

			removal_cost = -1

			modifier = {
				consumer_goods_expected_value = 0.10
				production_speed_buildings_factor = -0.10
				global_building_slots_factor = 0.10
			}

			cancel_if_invalid = no

			ai_will_do = {
   				factor = 0
   			}
		}
	}

	trade_laws = {
		law = yes
		use_list_view = yes

		uncontrolled_exports = {


			allowed = {
				always = no
			}
			removal_cost = -1
			picture = isolation

			rule = {
				can_access_market = no
			}

			modifier = {
				min_export = 0.25
				consumer_goods_expected_value = 0.05
				civilian_intel_to_others = 40.0
				navy_intel_to_others = 40.0
				agency_upgrade_time = 0.15
				cic_construction_boost = 0.15
			}

			allowed_to_remove = {
				OR = {
					has_war = yes
					has_completed_focus = POL_integrate_gdansk_industries
					has_completed_focus = POL_expand_gdynia_seaport
					NOT = {
						owns_state = 85
						owns_state = 807
					}
					any_owned_state = {
						NOT = {
							state = 85
							state = 807
						}
						is_coastal = yes
					}
				}
			}

			on_remove = {
				effect_tooltip =  {
					remove_dynamic_modifier = { modifier = international_city }
				}
				hidden_effect = {
					if = {
						limit = {
							tag = POL
							85 = { is_demilitarized_zone = no }
							has_civil_war = no 
						}
						85 = {
							if = {
								limit = {
									has_dynamic_modifier = { modifier = international_city }
								}
								remove_dynamic_modifier = { modifier = international_city }
							}
						}
					}
				}
			}
			
			cancel_if_invalid = no
		}

		free_trade = {

			available = {
				if = {
					limit = {
						original_tag = SPR
						has_dlc = "La Resistance"
					}
					NOT = { has_completed_focus = SPR_all_must_bear_the_torch }
				}
			}

			cost = 150
			removal_cost = -1

			modifier = {
				min_export = 0.8
				industrial_capacity_factory = 0.15
				industrial_capacity_dockyard = 0.15
				production_speed_buildings_factor = 0.15
				research_speed_factor = 0.10
				civilian_intel_to_others = 40.0
				navy_intel_to_others = 20.0
				cic_construction_boost_factor = 0.05
			}

			cancel_if_invalid = no

			ai_will_do = {
   				factor = 1

   				modifier = {
					factor = 300

					OR = {
						tag = PER
						tag = IRQ
					}
					is_in_faction = no
				}

				modifier = {
					factor = 300
					tag = BRA
				}

				modifier = {
					factor = 0
					tag = USA
					threat > 0.8
				}

				modifier = {
					factor = 400
					original_tag = SWE
					has_war = no
				}

				# Oil for hitlers oil throne!
				modifier = {
					factor = 600
					tag = ROM
					is_in_faction_with = GER
				}

				modifier = {
					factor = 1000
					tag = SOV
					SOV_third_five_year_plan_available = yes
					has_completed_focus = SOV_secure_the_administration
				}

				modifier = {
					factor = 0
					tag = SOV
					has_country_flag = SOV_has_entered_war
				}
				modifier = {
					factor = 1000
					has_idea = LSM_neutrality_idea #Poland should try and escape this as soon as they can
				}
   			}
		}

		export_focus = {

			available = {

				if = {
					limit = {
						original_tag = CHI
						has_dlc = "Waking the Tiger"
					}
					NOT = { has_idea = CHI_nine_power_treaty }
				}
				if = {
					limit = {
						original_tag = SPR
						has_dlc = "La Resistance"
					}
					NOT = { has_completed_focus = SPR_all_must_bear_the_torch }
				}
			}


			cost = 150
			removal_cost = -1

			modifier = {
				min_export = 0.5
				industrial_capacity_factory = 0.1
				industrial_capacity_dockyard = 0.1
				production_speed_buildings_factor = 0.1
				research_speed_factor = 0.05
				civilian_intel_to_others = 20.0
				navy_intel_to_others = 10.0
				cic_construction_boost_factor = 0.1
			}

			default = yes

			cancel_if_invalid = no

			ai_will_do = {
   				factor = 1

				modifier = {
					factor = 2
					tag = USA
					threat > 0.8
				}

				modifier = {
					add = -1
					tag = GER
					has_war = no
					is_historical_focus_on = yes
				}

				modifier = {
					factor = 0

					is_major = no
					has_war = no
					is_in_faction = no
					threat < 0.8
					OR = {
						# portugal and sweden are special tungsten snowflakes
						tag = POR
						tag = SWE

						# Iraq & Iran are special oil snowflakes
						tag = PER
						tag = IRQ

						AND = {
							original_tag = FRA
							has_government = fascism
							has_war = no
						}
					}
				}
				modifier = {
					factor = 1000
					has_idea = uncontrolled_exports #Poland should try and escape this as soon as they can
				}
   			}
		}

		limited_exports = {
			available = {
				OR = {
					AND = {
						has_government = democratic
						has_war = yes
						any_enemy_country = {
							ic_ratio = {
								tag = ROOT
								ratio > 0.2
							}
						}
					}
					AND = {
						NOT = { has_government = democratic }
						OR = {
							has_idea = partial_economic_mobilisation
							has_idea = war_economy
							has_idea = tot_economic_mobilisation
							AND = {
								has_war = yes
								any_enemy_country = {
									ic_ratio = {
										tag = ROOT
										ratio > 0.3
									}
								}
							}
						}
					}
				}


				if = {
					limit = {
						original_tag = CHI
						has_dlc = "Waking the Tiger"
					}
					NOT = { has_idea = CHI_nine_power_treaty }
				}
				if = {
					limit = {
						original_tag = SPR
						has_dlc = "La Resistance"
					}
					NOT = { has_completed_focus = SPR_all_must_bear_the_torch }
				}
			}

			cost = 150
			removal_cost = -1

			modifier = {
				min_export = 0.25
				industrial_capacity_factory = 0.05
				industrial_capacity_dockyard = 0.05
				production_speed_buildings_factor = 0.05
				research_speed_factor = 0.01
				civilian_intel_to_others = 10.0
				navy_intel_to_others = 5
				lend_lease_tension = 0.20
				cic_construction_boost = -0.05
			}

			cancel_if_invalid = no

			ai_will_do = {
   				factor = 1

   				modifier = {
					add = -1

					is_major = no
					is_in_faction = yes
					has_war = yes
				}

   				modifier = {
					factor = 0
					tag = USA
					SOV = { is_ai = no }
					NOT = { has_global_flag = SOV_welfare_disabled }
					GER_is_not_relevant = no
				}

				# minors not at war should want to get the bonuses from free trade
				modifier = {
					add = -1

					is_major = no
					has_war = no
					NOT = {
						AND = {
							OR = {
								tag = POR
								tag = SPR
								tag = SWE
								tag = GXC
							}
							GER = { is_ai = no }
							has_global_flag = disabled_equipment_funnelling
						}
					}
					NOT = {
						AND = {
							OR = {
								tag = GXC
								tag = MAL
								tag = HOL
								tag = USA
							}
							SOV = { is_ai = no }
							has_global_flag = SOV_welfare_disabled
						}
					}		
				}
				modifier = {
					factor = 200
					NOT = { has_government = fascism }
					NOT = { has_idea = closed_economy }
					has_war = yes
					any_country = {
						has_war_with = ROOT
						is_major = yes
					}
					is_major = yes
				}
				modifier = {
					add = 1500

					# revert from closed_economy if we have large allies
					has_idea = closed_economy
					has_large_ally_not_pick_closed_economy = yes
				}

				modifier = {
					factor = 0
					tag = SOV
					date < 1940.6.1
					SOV_third_five_year_plan_available = yes
					NOT = {
						any_country = {
							has_war_with = ROOT
							is_major = yes
						}
					}
					
				}

				modifier = {
					factor = 2000
					OR = {
						tag = POR
						tag = SWE
						tag = SPR
					}
					GER = { is_ai = no }
					has_global_flag = disabled_equipment_funnelling
				}

				modifier = {
					factor = 2000
					OR = {
						tag = USA
						tag = MAL
						tag = RAJ
						tag = HOL
					}
					SOV = { is_ai = no }
					has_global_flag = SOV_welfare_disabled
				}

				modifier = {
					add = 1
					tag = GER
					has_war = yes
				}

				modifier = {
					add = 10
					tag = GER
					is_historical_focus_on = no
				}

				modifier = {
					add = -1
					tag = GER
					has_war = no
					is_historical_focus_on = yes
				}

   				modifier = {
					add = 1500

					OR = {
						AND = {
							has_government = fascism
							is_major = yes
							threat > 0.40
							is_historical_focus_on = no
						}
						AND = {
							has_government = communism
							is_major = yes
							threat > 0.60
							is_historical_focus_on = no
						}
						AND = {
							tag = GER
							date > 1939.1.1
						}
					}
				}
   			}
		}

		closed_economy = {


			available = {
				has_war = yes
				OR = {
					has_government = fascism
					has_government = communism
				}
				OR = {
					has_idea = war_economy
					has_idea = tot_economic_mobilisation
				}
				OR = {
					NOT = {	tag = SOV }
					NOT = { has_opinion_modifier = MR_pact }
				}

				if = {
					limit = {
						original_tag = CHI
						has_dlc = "Waking the Tiger"
					}
					NOT = { has_idea = CHI_nine_power_treaty }
				}
			}

			rule = {
				can_access_market = no
				desc = can_not_access_market_closed_economy
			}

			cost = 150
			removal_cost = -1

			modifier = {
				min_export = 0
				#civilian_intel_to_others = 0.0
				lend_lease_tension = 0.40
				cic_construction_boost = -0.1
			}

			cancel_if_invalid = no

			ai_will_do = {
   				factor = 1

   				modifier = {
					factor = 0

					tag = SOV
					surrender_progress < 0.2
				}

   				modifier = {
					factor = 0

					is_major = no
					is_in_faction = yes
					has_war = yes
				}

				# minors not at war should want to get the bonuses from free trade
				modifier = {
					factor = 0

					is_major = no
					has_war = no
				}

				modifier = {
					factor = 0

					# don't take if we have a reasonable sized ally
					# since they will require our trades
					has_large_ally_not_pick_closed_economy = yes
				}
   			}
		}
	}
}
