generic_cas = {
	category = air

	roles = {
		air_cas
	}

	priority = {
		factor = 1000
	}

	early_cas_1933 = {
		priority = {
			factor = 1
			modifier = {
				has_tech = basic_small_airframe
				factor = 0 #let's not waste XP here
			}
		}

		target_variant = {
			match_value = 500
			type = small_plane_cas_airframe_0
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = engine_1_1x
				special_type_slot_1 = empty
				special_type_slot_2 = empty
			}
		}
	}

	basic_cas_1936 = {
		priority = {
			factor = 100
			modifier = {
				has_tech = improved_small_airframe
				factor = 0 #let's not waste XP here
			}
		}
		target_variant = {
			match_value = 1000
			type = small_plane_cas_airframe_1
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = engine_2_1x
				special_type_slot_1 = dive_brakes_small
				special_type_slot_2 = fuel_tanks_small
			}
		}
	}

	improved_cas_1940 = {
		priority = {
			factor = 100
			modifier = {
				has_tech = advanced_small_airframe
				factor = 0 #let's not waste XP here
			}
			modifier = { 
				has_tech = rocket_artillery 
				has_tech = antitank1
				factor = 0
			}
		}
		target_variant = {
			match_value = 1500
			type = small_plane_cas_airframe_2
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				fixed_auxiliary_weapon_slot_2 = bomb_locks
				engine_type_slot = engine_3_1x
				special_type_slot_1 = dive_brakes_small
				special_type_slot_2 = drop_tanks
				special_type_slot_3 = armor_plate_small
			}
		}
	}

	improved_cas_1940_rockets = {
		priority = {
			factor = 100
			modifier = {
				has_tech = advanced_small_airframe
				factor = 0 #let's not waste XP here
			}
			modifier = { 
				OR = {
					NOT = {has_tech = rocket_artillery}
					NOT = {has_tech = antitank1}
				}
				factor = 0
			}
		}
		target_variant = {
			match_value = 1500
			type = small_plane_cas_airframe_2
			modules = {
				fixed_main_weapon_slot = {
					any_of = {
						tank_buster_2
						tank_buster_1
					}
				}
				fixed_auxiliary_weapon_slot_1 = rocket_rails
				fixed_auxiliary_weapon_slot_2 = rocket_rails
				engine_type_slot = engine_3_1x
				special_type_slot_1 = dive_brakes_small
				special_type_slot_2 = drop_tanks
				special_type_slot_3 = armor_plate_small
			}
		}
	}

	advanced_cas_1944 = {
		priority = {
			factor = 100
			modifier = {
				has_tech = modern_small_airframe
				factor = 0 #let's not waste XP here
			}
		}
		target_variant = {
			match_value = 2500
			type = small_plane_cas_airframe_3
			modules = {
				fixed_main_weapon_slot = {
					any_of = {
						heavy_bomb_locks
						bomb_locks
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = {
						heavy_bomb_locks
						bomb_locks
					}
				}
				fixed_auxiliary_weapon_slot_2 = {
					any_of = {
						heavy_bomb_locks
						bomb_locks
					}
				}
				fixed_auxiliary_weapon_slot_3 = empty
				engine_type_slot = engine_4_1x
				special_type_slot_1 = dive_brakes_small
				special_type_slot_2 = drop_tanks
				special_type_slot_3 = self_sealing_fuel_tanks_small
				special_type_slot_4 = armor_plate_small
			}
		}
	}

	modern_cas_1945 = {
		priority = {
			factor = 100
		}

		target_variant = {
			match_value = 4000
			type = small_plane_cas_airframe_4
			modules = {
				fixed_main_weapon_slot = {
					any_of = {
						heavy_bomb_locks
						bomb_locks
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = {
						heavy_bomb_locks
						bomb_locks
					}
				}
				fixed_auxiliary_weapon_slot_2 = {
					any_of = {
						heavy_bomb_locks
						bomb_locks
					}
				}
				fixed_auxiliary_weapon_slot_3 = {
					any_of = {
						heavy_bomb_locks
						bomb_locks
					}
				}
				engine_type_slot = jet_engine_2x
				special_type_slot_1 = dive_brakes_small
				special_type_slot_2 = drop_tanks
				special_type_slot_3 = self_sealing_fuel_tanks_small
				special_type_slot_4 = armor_plate_small
			}
		}
	}
}
