# Keep DJI units in territories
KR_keep_DJI_units_home = {
	reversed = yes
	
	enable_reverse = {
		DJI = { is_in_faction_with = GER }
	}
	enable = {
		is_in_faction_with = DJI
		NOT = {
			tag = DJI
			
		}
	}
	target_array = GER.faction_members

	abort_when_not_enabled = yes

	ai_strategy = {
		type = dont_defend_ally_borders
		id = "DJI"
		value = 100
	}
}
KR_keep_DJI_units_home_2 = {
	enable = {
		is_in_faction_with = DJI
		NOT = {
			tag = DJI
			
		}
		DJI = { is_subject_of = GER }
	}

	abort_when_not_enabled = yes

	ai_strategy = {
		type = dont_defend_ally_borders
		id = "DJI"
		value = 100
	}
}

KR_DJI_prewar_strategy = {
	allowed = {
		tag = DJI
	}
	enable = {
		is_subject_of = GER
	}

	abort_when_not_enabled = yes

	ai_strategy = {
		type = area_priority
		id = benelux
		value = -1000
	}
	ai_strategy = {
		type = area_priority
		id = germany
		value = -1000
	}
	ai_strategy = {
		type = area_priority
		id = east_africa
		value = 500
	}
	ai_strategy = {
		type = area_priority
		id = middle_east
		value = 500
	}
	ai_strategy = {
		type = area_priority
		id = india
		value = 500
	}
}

gwa_ignore_indian_islands = {
	allowed = {
		tag = DJI
	}
	enable = {
		any_owned_state = {
			OR = {
				region = 60 #West Indian Ocean
				region = 71 #East Indian Ocean
				region = 74 #South East Indian Ocean
				region = 85 #South West Indian Ocean
				region = 99 #Far Eastern Indian Ocean
				region = 101 #Bay of Bengal
				region = 102 #East African Coast
				region = 193 #Madagascar
			}
		}
		NOT = {
			has_war_with = PRF
			has_war_with = DEH
			has_war_with = BHC
			has_war_with = JAP
			has_war_with = SIA
		}
	}
	
	abort_when_not_enabled = yes

	ai_strategy = {
		type = area_priority
		id = indian_ocean
		value = -200
	}
}

DJI_naval_focus = {
	allowed = {
		original_tag = DJI
	}
	enable = {
		has_navy_size = { size > 0 }
	}
	abort_when_not_enabled = yes

	ai_strategy = {
		type = dockyard_to_military_factory_ratio
		value = 20
	}
	ai_strategy = {
		type = naval_invasion_focus
		value = 55
	}
