qol_market_md_air = {

#################
###### fighter ######	
#################

		market_buy_fighter_enable = {
			priority =10

			

		icon = generic_form_nation

		allowed = {
				NOT = {
					 has_country_flag = fighter_enable_buy_qol_flag
				}
				has_country_flag = buying_air_qol
		}
		available = {
				NOT = {
					 has_country_flag = fighter_enable_buy_qol_flag
				}
				has_country_flag = buying_air_qol
		}
		visible = {
			has_country_flag = buying_air_qol
				NOT = {
					 has_country_flag = fighter_enable_buy_qol_flag
				}	

		}

		cost = 0
		days_re_enable = 0
		ai_will_do = {
			factor = 0
		}
		complete_effect = {
			set_country_flag = fighter_enable_buy_qol_flag
		}			
		}


		market_buy_fighter_disable = {
			priority =10

			
		icon = generic_form_nation

		allowed = {
				 has_country_flag = fighter_enable_buy_qol_flag	
				 has_country_flag = buying_air_qol
		}
		available = {
				 has_country_flag = fighter_enable_buy_qol_flag
				 has_country_flag = buying_air_qol
		}
		visible = {
			 has_country_flag = buying_air_qol
			 has_country_flag = fighter_enable_buy_qol_flag			 
		}

		cost = 0
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = small_plane_airframe 
					ratio <  0.25
				} 
			}
		}
		complete_effect = {
			clr_country_flag = fighter_enable_buy_qol_flag
		}			
		}


market_buy_fighter1 = {

		icon = generic_form_nation
			priority =9

			
		allowed = {
		}
		available = {
			 has_country_flag = fighter_enable_buy_qol_flag
			 has_country_flag = buying_air_qol
			FROM = {
				num_of_military_factories > 20
			}
			FROM = { has_country_flag = qol_accept_fighter_orders_flag}
			FROM = {
				has_equipment = {
					fighter_equipment_1  > 30
				}
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			 
		}
		visible = {
			has_country_flag = show_old_qol
			has_country_flag = fighter_enable_buy_qol_flag
			has_country_flag = buying_air_qol
			FROM = {
				num_of_military_factories > 20
			}
			FROM = { has_country_flag = qol_accept_fighter_orders_flag}
			FROM = {
				has_equipment = {
					fighter_equipment_1 > 30
				}
				has_tech = fighter_equipment_1				
			}
			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1}
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
			}
			FROM = { has_country_flag = qol_accept_fighter_orders_flag}
			FROM = {
				has_equipment = {
					fighter_equipment_1  > 30
				}		
				has_tech = early_fighter 
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 60
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = small_plane_airframe 
					ratio <  0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = fighter_equipment_1 
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = fighter_equipment_1 
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1 }
				FROM = { add_to_variable = { eoc_treasury = 1 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}	

market_buy_fighter2 = {

		icon = generic_form_nation
			priority =9

			
		allowed = {
		}
		available = {
			 has_country_flag = fighter_enable_buy_qol_flag
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_fighter_orders_flag
				has_equipment = {
					fighter_equipment_2  > 30
				}
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			 
		}
		visible = {
			has_country_flag = show_old_qol
			has_country_flag = fighter_enable_buy_qol_flag
			FROM = {
				num_of_military_factories > 20
			}
			FROM = { has_country_flag = qol_accept_fighter_orders_flag}
			FROM = {
				has_equipment = {
					fighter_equipment_2 > 30
				}
			}		
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1.3}
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
			
				has_country_flag = qol_accept_fighter_orders_flag
				has_equipment = {
					fighter_equipment_2 > 30
				}
				has_tech = fighter1  				
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 60
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = small_plane_airframe 
					ratio <  0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = fighter_equipment_2 
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = fighter_equipment_2
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1.3 }
				FROM = { add_to_variable = { eoc_treasury = 1.3 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}

market_buy_fighter3 = {

		icon = generic_form_nation
			priority =9

			
		allowed = {
		}
		available = {
	
			has_country_flag = fighter_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_fighter_orders_flag}
			FROM = {
				has_equipment = {
					fighter_equipment_3  > 30
				}
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_modern_qol
			has_country_flag = fighter_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_fighter_orders_flag}
			FROM = {
				has_equipment = {
					fighter_equipment_3 > 30
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1.6 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_fighter_orders_flag
				has_equipment = {
					fighter_equipment_3 > 30
				}
				has_tech = fighter3  
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 60
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = small_plane_airframe 
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = fighter_equipment_3
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = fighter_equipment_3
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1.6 }
				FROM = { add_to_variable = { eoc_treasury = 1.6 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}
	
	
#################
###### CAS ######	
#################
	
		market_buy_cas_enable = {

			priority =8

			
		icon = generic_form_nation

		allowed = {
				NOT = {
					 has_country_flag = cas_enable_buy_qol_flag
				}
				has_country_flag = buying_air_qol
		}
		available = {
				NOT = {
					 has_country_flag = cas_enable_buy_qol_flag
				}
				has_country_flag = buying_air_qol
		}
		visible = {
				has_country_flag = buying_air_qol
				NOT = {
					 has_country_flag = cas_enable_buy_qol_flag
				}				
		}

		cost = 0
		days_re_enable = 0
		ai_will_do = {
			factor = 0
		}
		complete_effect = {
			set_country_flag = cas_enable_buy_qol_flag
		}			
		}


		market_buy_cas_disable = {
			priority =8

			
		icon = generic_form_nation

		allowed = {
				 has_country_flag = cas_enable_buy_qol_flag	
		}
		available = {
				 has_country_flag = cas_enable_buy_qol_flag
		}
		visible = {
			 has_country_flag = buying_air_qol
			 has_country_flag = cas_enable_buy_qol_flag
		}

		cost = 0
		days_re_enable = 0
		ai_will_do = {
			factor = 0
		}
		complete_effect = {
			clr_country_flag = cas_enable_buy_qol_flag
		}			
		}
	
	
	
market_buy_cas1 = {

		icon = generic_form_nation
			priority =7

			
		allowed = {
		}
		available = {
			has_country_flag = cas_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_mr_orders_flag}
			FROM = {
				has_equipment = {
					CAS_equipment_1   > 30
				}		
				has_opinion = {
					target = ROOT
					value > 50
				}	
			}			
		}
		visible = {
			has_country_flag = show_old_qol
			has_country_flag = cas_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_mr_orders_flag}
			FROM = {
				has_equipment = {
					CAS_equipment_1  > 30
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_mr_orders_flag
				has_equipment = {
					CAS_equipment_1  > 30
				}
				has_tech = CAS1  
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = small_plane_airframe  
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = CAS_equipment_1 
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = CAS_equipment_1 
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1 }
				FROM = { add_to_variable = { eoc_treasury = 1 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}	
		}
		
	}	
	
market_buy_cas2 = {

		icon = generic_form_nation
			priority =7

			
		allowed = {
		}
		available = {
			has_country_flag = cas_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_mr_orders_flag}
			FROM = {
				has_equipment = {
					CAS_equipment_2   > 30
				}	
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_old_qol
			has_country_flag = cas_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_mr_orders_flag}
			FROM = {
				has_equipment = {
					CAS_equipment_2  > 30
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_mr_orders_flag
				has_equipment = {
					CAS_equipment_2  > 30
				}
				has_tech = CAS2
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = small_plane_airframe  
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = CAS_equipment_2
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = CAS_equipment_2 
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1.3 }
				FROM = { add_to_variable = { eoc_treasury = 1.3 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}	
	
market_buy_cas3 = {

		icon = generic_form_nation
			priority =7

			
		allowed = {
		}
		available = {
			has_country_flag = cas_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_mr_orders_flag}
			FROM = {
				has_equipment = {
					CAS_equipment_3   > 30
				}
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_modern_qol
			has_country_flag = cas_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_mr_orders_flag}
			FROM = {
				has_equipment = {
					CAS_equipment_3  > 30
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1.3 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_mr_orders_flag
				has_equipment = {
					CAS_equipment_3  > 30
				}
				has_tech = CAS3 
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = small_plane_airframe  
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = CAS_equipment_3 
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = CAS_equipment_3 
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1.6 }
				FROM = { add_to_variable = { eoc_treasury = 1.6 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}		



###########################	
###### Medium Bomber ######	
###########################	
	
	
		market_buy_medium_bomber_enable = {
			priority =6

			
		icon = generic_form_nation

		allowed = {
				NOT = {
					 has_country_flag = medium_bomber_enable_buy_qol_flag
				}
				has_country_flag = buying_air_qol
		}
		available = {
				NOT = {
					 has_country_flag = medium_bomber_enable_buy_qol_flag
				}
				has_country_flag = buying_air_qol
		}
		visible = {
			 has_country_flag = buying_air_qol
				NOT = {
					 has_country_flag = medium_bomber_enable_buy_qol_flag
				}	 
		}

		cost = 0
		days_re_enable = 0
		ai_will_do = {
			factor = 0
		}
		complete_effect = {
			set_country_flag = medium_bomber_enable_buy_qol_flag
		}			
		}


		market_buy_medium_bomber_disable = {


		icon = generic_form_nation
			priority =6

			
		allowed = {
				 has_country_flag = medium_bomber_enable_buy_qol_flag	
				 has_country_flag = buying_air_qol
		}
		available = {
				 has_country_flag = medium_bomber_enable_buy_qol_flag
				 has_country_flag = buying_air_qol
		}
		visible = {
			 has_country_flag = buying_air_qol
			 has_country_flag = medium_bomber_enable_buy_qol_flag			 
		}

		cost = 0
		days_re_enable = 0
		ai_will_do = {
			factor = 0
		}
		complete_effect = {
			clr_country_flag = medium_bomber_enable_buy_qol_flag
		}			
		}
		


market_buy_medium_bomber1 = {

		icon = generic_form_nation
			priority =5

			
		allowed = {
		}
		available = {
			has_country_flag = medium_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_medium_bomber_orders_flag}
			FROM = {
				has_equipment = {
					tac_bomber_equipment_1    > 30
				}	
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_old_qol
			has_country_flag = medium_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_medium_bomber_orders_flag}
			FROM = {
				has_equipment = {
					tac_bomber_equipment_1   > 30
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_medium_bomber_orders_flag
				has_equipment = {
					tac_bomber_equipment_1   > 30
				}
				has_tech = early_bomber
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = medium_plane_airframe   
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = tac_bomber_equipment_1  
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = tac_bomber_equipment_1  
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1 }
				FROM = { add_to_variable = { eoc_treasury = 1 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}	
		
market_buy_medium_bomber2 = {

		icon = generic_form_nation
			priority =5

			
		allowed = {
		}
		available = {
			has_country_flag = medium_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_medium_bomber_orders_flag}
			FROM = {
				has_equipment = {
					tac_bomber_equipment_2    > 30
				}	
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_old_qol
			has_country_flag = medium_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_medium_bomber_orders_flag}
			FROM = {
				has_equipment = {
					tac_bomber_equipment_2  > 30
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1.3 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_medium_bomber_orders_flag
				has_equipment = {
					tac_bomber_equipment_2   > 30
				}
				has_tech = tactical_bomber1   
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = medium_plane_airframe   
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = tac_bomber_equipment_2  
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = tac_bomber_equipment_2  
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1.3 }
				FROM = { add_to_variable = { eoc_treasury = 1.3 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}	

market_buy_medium_bomber3 = {

		icon = generic_form_nation
			priority =5

			
		allowed = {
		}
		available = {
			has_country_flag = medium_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_medium_bomber_orders_flag}
			FROM = {
				has_equipment = {
					tac_bomber_equipment_3   > 30
				}	
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_modern_qol
			has_country_flag = medium_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_medium_bomber_orders_flag}
			FROM = {
				has_equipment = {
					tac_bomber_equipment_3   > 30
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1.6 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_medium_bomber_orders_flag
				has_equipment = {
					tac_bomber_equipment_3   > 30
				}
				has_tech = tactical_bomber2   
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = medium_plane_airframe   
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = tac_bomber_equipment_3  
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = tac_bomber_equipment_3  
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1.6 }
				FROM = { add_to_variable = { eoc_treasury = 1.6 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}	
		


###########################
###### Large Bomber  ######	
###########################
	
	
		market_buy_large_bomber_enable = {

			priority =4

			
		icon = generic_form_nation

		allowed = {
				NOT = {
					 has_country_flag = large_bomber_enable_buy_qol_flag
				}
				has_country_flag = buying_air_qol
		}
		available = {
				NOT = {
					 has_country_flag = large_bomber_enable_buy_qol_flag
				}
				has_country_flag = buying_air_qol
		}
		visible = {
			 has_country_flag = buying_air_qol
				NOT = {
					 has_country_flag = large_bomber_enable_buy_qol_flag
				}	 
		}

		cost = 0
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = large_plane_airframe    
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			set_country_flag = large_bomber_enable_buy_qol_flag
		}			
		}


		market_buy_large_bomber_disable = {


		icon = generic_form_nation
			priority =4

			
		allowed = {
				 has_country_flag = large_bomber_enable_buy_qol_flag	
				 has_country_flag = buying_air_qol
		}
		available = {
				 has_country_flag = large_bomber_enable_buy_qol_flag
				 has_country_flag = buying_air_qol
		}
		visible = {
			 has_country_flag = buying_air_qol
			 has_country_flag = large_bomber_enable_buy_qol_flag			 
		}

		cost = 0
		days_re_enable = 0
		ai_will_do = {
			factor = 0
		}
		complete_effect = {
			clr_country_flag = large_bomber_enable_buy_qol_flag
		}			
		}
		


market_buy_large_bomber1 = {

		icon = generic_form_nation
			priority =3

			
		allowed = {
		}
		available = {
			has_country_flag = large_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_large_bomber_orders_flag}
			FROM = {
				has_equipment = {
					strat_bomber_equipment_1     > 40
				}	
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_old_qol
			has_country_flag = large_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_large_bomber_orders_flag}
			FROM = {
				has_equipment = {
					strat_bomber_equipment_1    > 40
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 0.12 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 40
				has_country_flag = qol_accept_large_bomber_orders_flag
				has_equipment = {
					strat_bomber_equipment_1    > 40
				}
				has_tech = strategic_bomber1    
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = large_plane_airframe    
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = strat_bomber_equipment_1   
					amount = -40
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = strat_bomber_equipment_1   
					amount = 40
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 0.12 }
				FROM = { add_to_variable = { eoc_treasury = 0.12 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}	
		
market_buy_large_bomber2 = {

		icon = generic_form_nation
			priority =3
			
		allowed = {
		}
		available = {
			has_country_flag = large_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_large_bomber_orders_flag}
			FROM = {
				has_equipment = {
					strat_bomber_equipment_2    > 40
				}
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_old_qol
			has_country_flag = large_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_large_bomber_orders_flag}
			FROM = {
				has_equipment = {
					strat_bomber_equipment_2  > 40
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 0.16 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 40
				has_country_flag = qol_accept_large_bomber_orders_flag
				has_equipment = {
					strat_bomber_equipment_2   > 40
				}
				has_tech = strategic_bomber2   
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = large_plane_airframe    
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = strat_bomber_equipment_2  
					amount = -40
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = strat_bomber_equipment_2  
					amount = 40
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 0.16 }
				FROM = { add_to_variable = { eoc_treasury = 0.16 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}	

market_buy_large_bomber3 = {

		icon = generic_form_nation
			priority =3

			
		allowed = {
		}
		available = {
			has_country_flag = large_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_large_bomber_orders_flag}
			FROM = {
				has_equipment = {
					strat_bomber_equipment_1   > 40
				}
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_modern_qol
			has_country_flag = large_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_large_bomber_orders_flag}
			FROM = {
				has_equipment = {
					strat_bomber_equipment_1   > 40
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 0.32 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 40
				has_country_flag = qol_accept_large_bomber_orders_flag
				has_equipment = {
					strat_bomber_equipment_1   > 40
				}
				has_tech = strategic_bomber3   
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = large_plane_airframe    
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = strat_bomber_equipment_1  
					amount = -40
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = strat_bomber_equipment_1  
					amount = 40
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 0.32 }
				FROM = { add_to_variable = { eoc_treasury = 0.32 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}


############################
###### Air Transport #######	
############################	
	
	
		market_buy_air_transport_enable = {
			priority =2

			

		icon = generic_form_nation

		allowed = {
				NOT = {
					 has_country_flag = air_transport_enable_buy_qol_flag
				}
				has_country_flag = buying_air_qol
		}
		available = {
				NOT = {
					 has_country_flag = air_transport_enable_buy_qol_flag
				}
				has_country_flag = buying_air_qol
		}
		visible = {
			 has_country_flag = buying_air_qol
				NOT = {
					 has_country_flag = air_transport_enable_buy_qol_flag
				}	 
		}

		cost = 0
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = transport_plane_equipment      
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			set_country_flag = air_transport_enable_buy_qol_flag
		}			
		}


		market_buy_air_transport_disable = {


		icon = generic_form_nation
			priority =2

			
		allowed = {
				 has_country_flag = air_transport_enable_buy_qol_flag	
				 has_country_flag = buying_air_qol
		}
		available = {
				 has_country_flag = air_transport_enable_buy_qol_flag
				 has_country_flag = buying_air_qol
		}
		visible = {
			 has_country_flag = buying_air_qol
			 has_country_flag = air_transport_enable_buy_qol_flag			 
		}

		cost = 0
		days_re_enable = 0
		ai_will_do = {
			factor = 0
		}
		complete_effect = {
			clr_country_flag = air_transport_enable_buy_qol_flag
		}			
		}
		


market_buy_air_transport1 = {

		icon = generic_form_nation
			priority =1

			
		allowed = {
		}
		available = {
			has_country_flag = air_transport_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_air_transport_orders_flag}
			FROM = {
				has_equipment = {
					transport_plane_equipment_1     > 30
				}	
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_old_qol
			has_country_flag = air_transport_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_air_transport_orders_flag}
			FROM = {
				has_equipment = {
					transport_plane_equipment_1    > 30
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_air_transport_orders_flag
				has_equipment = {
					transport_plane_equipment_1    > 30
				}
				has_tech = transport_plane1    
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = transport_plane_equipment     
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = transport_plane_equipment_1   
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = transport_plane_equipment_1   
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1 }
				FROM = { add_to_variable = { eoc_treasury = 1 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}	
		
market_buy_air_transport2 = {

		icon = generic_form_nation
			priority =1

			
		allowed = {
		}
		available = {
			has_country_flag = air_transport_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_air_transport_orders_flag}
			FROM = {
				has_equipment = {
					transport_plane_equipment_2    > 30
				}
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_old_qol
			has_country_flag = air_transport_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_air_transport_orders_flag}
			FROM = {
				has_equipment = {
					transport_plane_equipment_2  > 30
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1.3 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_air_transport_orders_flag
				has_equipment = {
					transport_plane_equipment_2   > 30
				}
				has_tech = transport_plane2   
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = transport_plane_equipment      
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = transport_plane_equipment_2  
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = transport_plane_equipment_2  
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1.3 }
				FROM = { add_to_variable = { eoc_treasury = 1.3 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}	

market_buy_air_transport3 = {

		icon = generic_form_nation
			priority =1

			
		allowed = {
		}
		available = {
			has_country_flag = air_transport_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_air_transport_orders_flag}
			FROM = {
				has_equipment = {
					transport_plane_equipment_3   > 30
				}
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_modern_qol
			has_country_flag = air_transport_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_air_transport_orders_flag}
			FROM = {
				has_equipment = {
					transport_plane_equipment_3   > 30
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1.6 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_air_transport_orders_flag
				has_equipment = {
					transport_plane_equipment_3   > 30
				}
				has_tech = transport_plane3   
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = transport_plane_equipment      
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = transport_plane_equipment_3  
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = transport_plane_equipment_3  
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1.6 }
				FROM = { add_to_variable = { eoc_treasury = 1.6 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}

###########################
###### Naval Bomber #######	
###########################	
	
	
		market_buy_naval_bomber_enable = {
			priority =2

			

		icon = generic_form_nation

		allowed = {
				NOT = {
					 has_country_flag = naval_bomber_enable_buy_qol_flag
				}
				has_country_flag = buying_air_qol
		}
		available = {
				NOT = {
					 has_country_flag = naval_bomber_enable_buy_qol_flag
				}
				has_country_flag = buying_air_qol
		}
		visible = {
			 has_country_flag = buying_air_qol
				NOT = {
					 has_country_flag = naval_bomber_enable_buy_qol_flag
				}	 
		}

		cost = 0
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = transport_plane_equipment     
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			set_country_flag = naval_bomber_enable_buy_qol_flag
		}			
		}


		market_buy_naval_bomber_disable = {


		icon = generic_form_nation
			priority =2

			
		allowed = {
				 has_country_flag = naval_bomber_enable_buy_qol_flag	
				 has_country_flag = buying_air_qol
		}
		available = {
				 has_country_flag = naval_bomber_enable_buy_qol_flag
				 has_country_flag = buying_air_qol
		}
		visible = {
			 has_country_flag = buying_air_qol
			 has_country_flag = naval_bomber_enable_buy_qol_flag			 
		}

		cost = 0
		days_re_enable = 0
		ai_will_do = {
			factor = 0
		}
		complete_effect = {
			clr_country_flag = naval_bomber_enable_buy_qol_flag
		}			
		}
		


market_buy_naval_bomber1 = {

		icon = generic_form_nation
			priority =1

			
		allowed = {
		}
		available = {
			has_country_flag = naval_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_naval_bomber_orders_flag}
			FROM = {
				has_equipment = {
					nav_bomber_equipment_1     > 30
				}	
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_old_qol
			has_country_flag = naval_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_naval_bomber_orders_flag}
			FROM = {
				has_equipment = {
					nav_bomber_equipment_1    > 30
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_naval_bomber_orders_flag
				has_equipment = {
					nav_bomber_equipment_1    > 30
				}
				has_tech = naval_bomber1    
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = small_plane_airframe      
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = nav_bomber_equipment_1   
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = nav_bomber_equipment_1   
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1 }
				FROM = { add_to_variable = { eoc_treasury = 1 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}	
		
market_buy_naval_bomber2 = {

		icon = generic_form_nation
			priority =1

			
		allowed = {
		}
		available = {
			has_country_flag = naval_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_naval_bomber_orders_flag}
			FROM = {
				has_equipment = {
					nav_bomber_equipment_2    > 30
				}
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_old_qol
			has_country_flag = naval_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_naval_bomber_orders_flag}
			FROM = {
				has_equipment = {
					nav_bomber_equipment_2  > 30
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1.3 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_naval_bomber_orders_flag
				has_equipment = {
					nav_bomber_equipment_2   > 30
				}
				has_tech = naval_bomber2   
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = small_plane_airframe      
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = nav_bomber_equipment_2  
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = nav_bomber_equipment_2  
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1.3 }
				FROM = { add_to_variable = { eoc_treasury = 1.3 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}	

market_buy_naval_bomber3 = {

		icon = generic_form_nation
			priority =1

			
		allowed = {
		}
		available = {
			has_country_flag = naval_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_naval_bomber_orders_flag}
			FROM = {
				has_equipment = {
					nav_bomber_equipment_3   > 30
				}
				has_opinion = {
					target = ROOT
					value > 50
				}					
			}			
		}
		visible = {
			has_country_flag = show_modern_qol
			has_country_flag = naval_bomber_enable_buy_qol_flag
			FROM = { has_country_flag = qol_accept_naval_bomber_orders_flag}
			FROM = {
				has_equipment = {
					nav_bomber_equipment_3   > 30
				}			
			}			
		}
		custom_cost_trigger = {
			check_variable = { eoc_treasury > 1.6 }
		}
		target_trigger = {
			FROM = {
				num_of_military_factories > 20
				has_country_flag = qol_accept_naval_bomber_orders_flag
				has_equipment = {
					nav_bomber_equipment_3   > 30
				}
				has_tech = naval_bomber3   
			}
		}
		cost = 10
		days_remove = 60
		days_re_enable = 0
		ai_will_do = {
			base = 0
			modifier = {
				add = 200
				has_war = yes
				enemies_strength_ratio > 1 #strength
				#num_of_military_factories < 25 #factories 
			}
			modifier = {
				add = 100
				stockpile_ratio = {
					archetype = small_plane_airframe      
					ratio < 0.25
				} 
			}
		}
		complete_effect = {
			FROM = {
				add_equipment_to_stockpile = {
					type = nav_bomber_equipment_3  
					amount = -30
					producer = FROM
				}
				add_to_variable = {number_contracts_sell_var = 1 }
			}
			add_to_variable = {number_contracts_buy_var = 1 }
		}
		remove_effect = {
			ROOT = {
				add_equipment_to_stockpile = {
					type = nav_bomber_equipment_3  
					amount = 30
					producer = FROM
				}
			}
			hidden_effect = {
				subtract_from_variable = { eoc_treasury = 1.6 }
				FROM = { add_to_variable = { eoc_treasury = 1.6 } }
				FROM = { subtract_from_variable = { number_contracts_sell_var = 1 } }
				subtract_from_variable = { number_contracts_buy_var = 1 }
			}				
		}
		
	}



}