# befriend
# conquer
# antagonize
# build_ship
# build_army
# unit_ratio
# build_building
# research_tech
# garrison
# protect
# influence
# contain
# area_priority

war_cooperation = {
	enable = {
		tag = CHN
		OR = {
		has_completed_focus = offer_puppet
		has_completed_focus = conquest
		}
	}
	abort = {
		OLE = { exists = no }
	}

	ai_strategy = {
		type = antagonize
		id = "OLE"
		value = 200
	}
	ai_strategy = {
		type = conquer
		id = "OLE"
		value = 200
	}
}
CHN_unit_production = {
	enable = {
		original_tag = CHN
	}
	abort = {
		always = no
	}

	ai_strategy = {
		type = role_ratio
		id = garrison
		value = 8 #30 to 8
	}

	ai_strategy = {
		type = role_ratio
		id = paratroopers
		value = 0
	}

	ai_strategy = {
		type = role_ratio
		id = mountaineers
		value = 2
	}

	ai_strategy = {
		type = role_ratio
		id = marines
		value = 0
	}

	ai_strategy = {
		type = role_ratio
		id = cavalry
		value = 0
	}

	ai_strategy = {
		type = role_ratio
		id = motorized
		value = 20 #because doctrine this = 2
	}

	ai_strategy = {
		type = role_ratio
		id = mechanized
		value = 15 #because doctrine this = 0
	}

	ai_strategy = {
		type = role_ratio
		id = armor
		value = 15 #because doctrine this = 10
	}

	ai_strategy = {
		type = role_ratio
		id = infantry
		value = 53 #88 to 70
	}

	ai_strategy = {
		type = role_ratio
		id = magical_infantry
		value = 10
	}

	ai_strategy = {
		type = role_ratio
		id = jager
		value = 12
	}

	#Air unit factors
	ai_strategy = {
		type = unit_ratio
		id = fighter
		value = 70
	}

	ai_strategy = {
		type = unit_ratio
		id = cas
		value = -35 #because doctrine this = 15
	}

	ai_strategy = {
		type = unit_ratio
		id = tactical_bomber
		value = 5
	}

	ai_strategy = {
		type = unit_ratio
		id = strategic_bomber
		value = 5
	}

	ai_strategy = {
		type = unit_ratio
		id = naval_bomber
		value = 5
	}


	# Naval unit factors
	ai_strategy = {
		type = unit_ratio
		id = capital_ship
		value = 35
	}

	ai_strategy = {
		type = unit_ratio
		id = submarine
		value = -150 #because doctrine this = 50
	}

	ai_strategy = {
		type = unit_ratio
		id = screen_ship
		value = 20
	}

	ai_strategy = {
		type = unit_ratio
		id = convoy
		value = 20
	}

	ai_strategy = {
		type = equipment_production_factor
		id = fighter
		value = 20
	}

	ai_strategy = {
		type = equipment_production_factor
		id = infantry
		value = 50 #30 to 50
	}

	ai_strategy = {
		type = equipment_production_factor
		id = artillery
		value = 40 #20 to 40
	}

	ai_strategy = {
		type = equipment_production_factor
		id = armor
		value = 20
	}
}

CHN_anti_armor = {
	enable = {
		original_tag = CHN
		ai_wants_divisions > 5 #Decreasing the amount of motorized the AI wants

		any_enemy_country = {
			ROOT = {
				estimated_intel_max_armor = {
					tag = PREV
					value > 25
				}
			}
		}
	}
	abort = {
		ai_wants_divisions < 6 #Decreasing the amount of motorized the AI wants
	}

	ai_strategy = {
		type = role_ratio
		id = anti_armor
		value = 15
	}
}

CHN_armored_production = {
	enable = {
		date > 1010.1.1
		original_tag = CHN
		ai_wants_divisions > 24 #Decreasing the amount of tanks the AI wants
	}
	abort = {
		ai_wants_divisions < 25 #Decreasing the amount of tanks the AI wants
	}

	ai_strategy = {
		type = role_ratio
		id = armor
		value = 5
	}
}

CHN_highered_armored_production = {
	enable = {
		original_tag = CHN
		num_of_military_factories > 109
	}
	abort = {
		num_of_military_factories < 110
	}

	ai_strategy = {
		type = role_ratio
		id = armor
		value = 10
	}
}

CHN_dont_waste_xp_until_medium_armor = {
	enable = {
		original_tag = CHN
	}

	abort = {
		has_template_majority_unit = medium_armor
	}

	ai_strategy = {
		type = template_prio
		id = paratrooper
		value = -100
	}

	ai_strategy = {
		type = template_prio
		id = mountaineers
		value = -100
	}
}

CHN_super_boost_light_for_med_armor = {

	enable = {
		original_tag = CHN
		has_tech = basic_medium_tank
		NOT = { has_template_ai_majority_unit = medium_armor }
	}

	abort = {
		has_template_ai_majority_unit = medium_armor
	}

	# lets do changes more often during this period too
	ai_strategy = {
		type = template_xp_reserve
		value = -125
	}

	# this is gateway
	ai_strategy = {
		type = template_prio
		id = light_armor
		value = 100
	}

	ai_strategy = {
		type = template_prio
		id = medium_armor
		value = 150
	}

	# Germany is set up to change their SS division into medium armor.
	ai_strategy = {
		type = template_prio
		id = motorized
		value = 200
	}
}

CHN_super_boost_light_for_modern_armor = {

	enable = {
		original_tag = CHN
		has_tech = main_battle_tank
		NOT = { has_template_ai_majority_unit = modern_armor }
	}

	abort = {
		has_template_ai_majority_unit = modern_armor
	}

	# lets do changes more often during this period too
	ai_strategy = {
		type = template_xp_reserve
		value = -125
	}

	# this is gateway
	ai_strategy = {
		type = template_prio
		id = medium_armor
		value = 100
	}

	ai_strategy = {
		type = template_prio
		id = modern_armor
		value = 150
	}
}


CHN_template_design = {
	enable = {

		original_tag = CHN
		date < 1011.1.1
	}
	abort = {
		date > 1011.1.1
	}

	ai_strategy = {
		type = template_prio
		id = motorized
		value = -50
	}

	ai_strategy = {
		type = template_prio
		id = cavalry
		value = -100
	}

	ai_strategy = {
		type = template_prio
		id = light_armor
		value = 30
	}

	ai_strategy = {
		type = template_prio
		id = medium_armor
		value = 50
	}

	ai_strategy = {
		type = template_prio
		id = heavy_armor
		value = -50
	}

	ai_strategy = {
		type = template_prio
		id = paratroopers
		value = -50
	}
}

war_with_olenia = {
	enable = {
		tag = CHN
		OR = {
			has_completed_focus = pressure_olenia
			has_war_with = OLE
		}
		country_exists = OLE
	}
	abort = {
		NOT = { country_exists = OLE }
	}

	ai_strategy = {
		type = invade
		id = "OLE"
		value = 300
	}

	ai_strategy = {
		type = conquer
		id = "OLE"
		value = 500
	}

  ai_strategy = {
		type = role_ratio
		id = mountaineers
		value = 12
	}
}
