

add_namespace = aidpemil

# AI disband ships
country_event = {
	id = aidpemil.1
	title = aidpemil.1.t
	desc = aidpemil.1.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = yes

	trigger = { is_ai = yes }

	option = {
		name = aidpenavydisband_option.1.a
		destroy_ships = {
   		type = screen
  		count = ai_wants_ships
		}
		destroy_ships = {
   		type = capital
  		count = ai_wants_ships
		}
		destroy_ships = {
   		type = submarine
  		count = ai_wants_ships
		}

		}
	
	}
## AI disband planes
country_event = {
	id = aidpemil.2
	title = aidpemil.2.t
	desc = aidpemil.2.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = yes

	trigger = { is_ai = yes }

	option = {
		name = aidpenavydisband_option.1.a
		set_equipment_fraction = 0.5
		every_controlled_state = { limit = { air_base > 5 }
		set_building_level = {
		type = air_base
		level = 5
		instant_build = yes
				}
		
			}
		country_event = {
  				  id = aidpemil.3
				  days = 3
				}

		}
	
	}
	
country_event = {
	id = aidpemil.3
	title = aidpemil.3.t
	desc = aidpemil.3.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = yes

	trigger = { is_ai = yes }

	option = {
		name = aidpenavydisband_option.1.a
		if = { limit = { has_equipment = {
		fighter_equipment > 4000
		} }
		add_equipment_to_stockpile = {
		type = fighter_equipment
		amount = -4000
				}
			}
				
		if = { limit = { has_equipment = {
		cv_fighter_equipment > 4000
		} }
		add_equipment_to_stockpile = {
		type = cv_fighter_equipment
		amount = -4000
				}
		
			}
		if = { limit = { has_equipment = {
		CAS_equipment > 4000
		} }
		add_equipment_to_stockpile = {
		type = CAS_equipment
		amount = -4000
				}
		
			}
		if = { limit = { has_equipment = {
		nav_bomber_equipment > 4000
		} }
		add_equipment_to_stockpile = {
		type = nav_bomber_equipment
		amount = -4000
				}
		
			}
		if = { limit = { has_equipment = {
		cv_nav_bomber_equipment > 4000
		} }
		add_equipment_to_stockpile = {
		type = cv_nav_bomber_equipment
		amount = -4000
				}
		
			}
		if = { limit = { has_equipment = {
		jet_fighter_equipment > 4000
		} }
		add_equipment_to_stockpile = {
		type = jet_fighter_equipment
		amount = -4000
				}
		
			}
		if = { limit = { has_equipment = {
		tac_bomber_equipment > 4000
		} }
		add_equipment_to_stockpile = {
		type = tac_bomber_equipment
		amount = -4000
				}
		
			}
		if = { limit = { has_equipment = {
		jet_tac_bomber_equipment > 4000
		} }
		add_equipment_to_stockpile = {
		type = jet_tac_bomber_equipment
		amount = -4000
				}
		
			}
		if = { limit = { has_equipment = {
		heavy_fighter_equipment > 4000
		} }
		add_equipment_to_stockpile = {
		type = heavy_fighter_equipment
		amount = -4000
				}
		
			}
		if = { limit = { has_equipment = {
		strat_bomber_equipment > 4000
		} }
		add_equipment_to_stockpile = {
		type = strat_bomber_equipment
		amount = -4000
				}
		
			}
		if = { limit = { has_equipment = {
		jet_strat_bomber_equipment > 4000
		} }
		add_equipment_to_stockpile = {
		type = jet_strat_bomber_equipment
		amount = -4000
				}
		
			}
			

		}
	
	}

