#################
### Diplomacy ###
#################
JAP_hates_reichspakt = {
	reversed = yes

	enable_reverse = {
		JAP = {
			is_faction_leader = yes
			GER = { #nested because of the PREV in both_socialist_or_both_not_socialist
				is_faction_leader = yes
				both_socialist_or_both_not_socialist = yes
			}
		}
	}
	enable = {
		is_in_faction_with = GER
	}
	abort_when_not_enabled = yes

	target_array = GER.faction_members

	ai_strategy = {
		type = antagonize
		id = JAP
		value = 1000
	}
	ai_strategy = {
		type = diplo_action_acceptance
		target = market_access_rights
		id = JAP
		value = -1000
	}
}
JAP_hates_chinese_claimants = {
	reversed = yes

	enable = {
		JAP = {
			exists = yes
			is_subject = no
			NOT = { is_ally_with = ROOT }
			is_in_array = { occupied_countries = KOR }
		}
	}
	abort_when_not_enabled = yes

	target_array = global.china_tags_array

	ai_strategy = {
		type = antagonize
		id = JAP
		value = 1000
	}
	ai_strategy = {
		type = diplo_action_acceptance
		target = market_access_rights
		id = JAP
		value = -1000
	}
}

################
### Military ###
################
JAP_naval_focus = {
	allowed = {
		original_tag = JAP
	}
	enable = { always = yes }
	abort_when_not_enabled = yes

	ai_strategy = {
		type = dockyard_to_military_factory_ratio
		value = 40
	}
}

JAP_home_islands_are_safe_for_now = {
	allowed = {
		original_tag = JAP
	}
	enable = {
		enemies_naval_strength_ratio < 1.5
	}
	abort_when_not_enabled = yes

	ai_strategy = {
		type = garrison
		value = -25
	}
}

JAP_WAR_WITH_CHI = {
	allowed = {
		original_tag = JAP
	}
	enable = {
		JAP = {
			has_war = yes
			any_enemy_country = { is_chinese_tag = yes }
		}
	}
	abort_when_not_enabled = yes

	ai_strategy = {
		type = naval_invasion_focus
		value = -99
	}
}

JAP_dont_spread_out_troops_if_fighting_china = {
	reversed = yes

	enable_reverse = {
		JAP = {
			has_war = yes
			any_enemy_country = { is_chinese_tag = yes }
		}
	}
	enable = {
		is_in_faction_with = JAP
		NOT = { is_chinese_tag = yes }
	}
	abort_when_not_enabled = yes

	target_array = JAP.faction_members

	ai_strategy = {
		type = dont_defend_ally_borders
		id = JAP
		value = 100
	}
}
