ideas = {

	trade_laws = { 
		law = yes
		free_trade = {

			available = {
				NOT = {	has_idea = barbarian }
			}

			allowed = {
				NOT = { original_tag = GER }
			}
						
			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
			}
			
			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
					date > 1943.1.1 # at this point we can probably cash in on rubber lack in the world
				}

				# Oil for hitlers oil throne!
#				modifier = {
#					factor = 600
#					tag = ROM
#					is_in_faction_with = GER
#				}
   			}
		}
		
		export_focus = {
			
			available = {
				NOT = {	has_idea = barbarian }
			}

			allowed = {
				NOT = { original_tag = GER }
			}			
			
			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
			}
			
			default = yes
			
			cancel_if_invalid = no

			ai_will_do = {
   				factor = 1

				modifier = {
					factor = 0
					
					is_major = no
					has_war = no
					is_in_faction = no
					OR = {
						# portugal and sweden are special tungsten snowflakes
						tag = POR
						tag = SWE

						# Iraq & Iran are special oil snowflakes
						tag = PER
						tag = IRQ
					}
				}
   			}
		}
		
		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
						}
					}
				}
				NOT = {	has_idea = barbarian }

			}

			allowed = {
				NOT = { original_tag = GER }
			}
		
			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
			}
			
			cancel_if_invalid = no

			ai_will_do = {
   				factor = 1

   				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
				}
   			}
		}
		
		closed_economy = {
			
			allowed = {
				NOT = { original_tag = GER }
			}
			
			available = {
#				has_war = yes
#				NOT = {	has_idea = barbarian }
				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 }
#				}

			}
			
			cost = 250
			removal_cost = -1
			
			
			modifier = {
				min_export = 0
				local_resources_factor = 0.15
				#civilian_intel_to_others = 0.0
			}
			
			on_add = {
				custom_effect_tooltip = closed_economy_TT
			}
			
			cancel_if_invalid = no

			ai_will_do = {
   				factor = 1

   				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
				}
   			}
		}

		others_economy = {
						
			allowed = {
				always = no
				original_tag = GER
			}

#			available = { tag = GER }

			picture = whitewalkericon

			ai_will_do = {
   				factor = 0
   			}
			
			cost = 50
			removal_cost = -1
			
			
			modifier = {
				min_export = 0
				local_resources_factor = 0.25
				industrial_capacity_factory = 0.15
				industrial_capacity_dockyard = 0.15
				production_speed_buildings_factor = 0.15
				research_speed_factor = 0.40
				civilian_intel_to_others = -40.0
			}
			
			allowed_to_remove = no			

		}
	}
}
