#空军生产
aircraft_production_ratio = {
	enable = {
		num_of_military_factories > 30
		has_air_experience >3 
        has_tech = basic_small_airframe
	}
	abort_when_not_enabled = yes
	ai_strategy = { type = air_factory_balance value = 30 }
}
early_air_production_no = {  
    enable = {
        num_of_military_factories < 30
	}
	abort_when_not_enabled = yes

        ai_strategy = {
		type = air_factory_balance
		value = -999
	}
        ai_strategy = {
		type = unit_ratio
		id = fighter
		value = -999
	}
        ai_strategy = {
		type = unit_ratio
		id = cas
		value = -999
	}
        ai_strategy = {
		type = equipment_production_factor
		id = fighter
		value = -999
	}
         ai_strategy = {
		type = equipment_production_factor
		id = cas
		value = -999
	}
        ai_strategy = {
		type = unit_ratio
		id = strategic_bomber
		value = -999
	}  
}
early_air_production_basic = {
	enable = {
		date < 1940.1.1
                num_of_military_factories > 30
                num_of_military_factories < 60
                has_air_experience >3 
                has_tech = range_improvements
	}
	abort_when_not_enabled = yes
        ai_strategy = {
		type = air_factory_balance
		value = -10
	}
	ai_strategy = {
		type = unit_ratio
		id = fighter
		value = 60
	}
        ai_strategy = {
		type = unit_ratio
		id = cas
		value = 20
	}
      	ai_strategy = {
		type = equipment_production_min_factories
		id = cas
		value = 1
	}
	ai_strategy = {
		type = equipment_production_min_factories
		id = fighter
		value = 1
	}
}

early_air_production_specialised = {
	enable = {
		date < 1940.1.1
		num_of_military_factories > 59
                num_of_military_factories < 80
                has_air_experience >3 
                has_tech = range_improvements
	}
	abort_when_not_enabled = yes

	ai_strategy = {
		type = unit_ratio
		id = fighter
		value = 60
	}
        ai_strategy = {
		type = unit_ratio
		id = cas
		value = 30
	}
        ai_strategy = {
		type = equipment_production_min_factories
		id = cas
		value = 2
	}
	ai_strategy = {
		type = equipment_production_min_factories
		id = fighter
		value = 2
	}
	ai_strategy = {
		type = unit_ratio
		id = strategic_bomber
		value = -999
	}

	ai_strategy = {
		type = unit_ratio
		id = scout_plane
		value = 0
	}
}

early_air_production_full = {
	enable = {
		date < 1940.1.1
		num_of_military_factories > 80
        has_air_experience >3 
        has_tech = range_improvements
	}
	abort_when_not_enabled = yes

	ai_strategy = {
		type = equipment_production_min_factories
		id = fighter
		value = 3
	}

	ai_strategy = {
		type = unit_ratio
		id = fighter
		value = 60
	}
        ai_strategy = {
		type = unit_ratio
		id = cas
		value = 40
	}
        ai_strategy = {
		type = unit_ratio
		id = heavy_fighter
		value = -10
	}
	ai_strategy = {
		type = equipment_production_min_factories
		id = cas
		value = 3
	}

	ai_strategy = {
		type = unit_ratio
		id = strategic_bomber
		value = -99
	}
        ai_strategy = {
		type = equipment_production_min_factories
		id = strategic_bomber
		value = -99
	}
	ai_strategy = {
		type = equipment_production_factor
		id = strategic_bomber
		value = -99
	}
}

late_air_production = {
	enable = {
		date > 1940.1.1
        num_of_military_factories > 30
		has_air_experience >3 
        has_tech = basic_small_airframe
        has_design_based_on = small_plane_airframe
	}
    abort_when_not_enabled = yes
	ai_strategy = {
		type = unit_ratio
		id = fighter
		value = 100
	}
    	ai_strategy = {
		type = equipment_production_min_factories
		id = fighter
		value = 5
	}

	ai_strategy = {
		type = unit_ratio
		id = cas
		value = 100	
        }
	ai_strategy = {
		type = equipment_production_min_factories
		id = cas
		value = 4
	}

	ai_strategy = {
		type = unit_ratio
		id = tactical_bomber
		value = -50
	}
	ai_strategy = {
		type = equipment_production_factor
		id = tactical_bomber
		value = -50
	}

	ai_strategy = {
		type = unit_ratio
		id = strategic_bomber
		value = -50
	}
     
	ai_strategy = {
		type = equipment_production_factor
		id = heavy_fighter
		value = -50
	}
	ai_strategy = {
		type = unit_ratio
		id = heavy_fighter
		value = -50
	}
}

default_spyplanes_production = {
	enable = {
		is_major = yes
        num_of_factories > 50
	}

	abort_when_not_enabled = yes

	ai_strategy = {
		type = unit_ratio
		id = scout_plane
		value = 1
	}

	ai_strategy = {
		type = equipment_production_min_factories
		id = scout_plane
		value = 1
	}
}

minors_dont_spy = {
	enable = {
		has_design_based_on = medium_plane_scout_plane_airframe
		is_major = no
	}

	abort_when_not_enabled = yes

	ai_strategy = {
		type = unit_ratio
		id = scout_plane
		value = -10
	}
}

build_some_more_transport_planes = {
	allowed = {
		is_major = yes
	}
	enable = {
		num_of_military_factories > 50
	}
	abort_when_not_enabled = yes

	ai_strategy = {
		type = equipment_production_min_factories
		id = air_transport
		value = 1
	}
}
build_some_CV = {
	enable = {
		has_navy_size = {
				unit = carrier
 	  			size > 1
		}
                num_of_military_factories > 30
                has_air_experience >3 
	}
	abort_when_not_enabled = yes
        ai_strategy = {
		type = unit_ratio
		id = cv_naval_bomber
		value = 5
	}
	ai_strategy = {
		type = equipment_production_min_factories
		id = cv_naval_bomber
		value = 1
	}
}
#特定国家
air_production_AUS = {
	enable = {
                tag = AUS
		date > 1938.1.1
                num_of_military_factories > 30
                has_air_experience >3 
                has_tech = range_improvements
	}
	abort_when_not_enabled = yes
        ai_strategy = {
		type = air_factory_balance
		value = 20
	}
}
#特定国家
air_production_ENG = {
	enable = {
                tag = ENG
		date > 1938.1.1
                num_of_military_factories > 30
                has_air_experience >3 
                has_tech = range_improvements
	}
	abort_when_not_enabled = yes
        ai_strategy = {
		type = air_factory_balance
		value = 20
	}
}




