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

ZSL_unit_production = {
	enable = {
		original_tag = ZSL
	}
	abort = {
		always = no
	}	
	ai_strategy = {
		type = role_ratio
		id = garrison
		value = 4
	}
	# Old garrison system against resistance
	# ai_strategy = {
	# 	type = role_ratio
	# 	id = suppression
	# 	value = 6
	# }	
	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 = -100
	}
	ai_strategy = {
		type = role_ratio
		id = motorized
		value = -200 #because doctrine this = 2
	}
	ai_strategy = {
		type = role_ratio
		id = mechanized
		value = -5 #because doctrine this = 0
	}
	ai_strategy = {
		type = role_ratio
		id = armor
		value = -17 #because doctrine this = 3
	}
	ai_strategy = {
		type = role_ratio
		id = infantry
		value = 70 #88 to 70
	}	
	#Air unit factors
	ai_strategy = {
		type = unit_ratio
		id = fighter
		value = 100
	}	
	ai_strategy = {
		type = unit_ratio
		id = cas
		value = -35 #because doctrine this = 15
	}	
	ai_strategy = {
		type = unit_ratio
		id = tactical_bomber
		value = -40
	}		
	ai_strategy = {
		type = unit_ratio
		id = naval_bomber
		value = 5
	}	
	# Naval unit factors
	ai_strategy = {
		type = unit_ratio
		id = capital_ship
		value = 15
	}
	ai_strategy = {
		type = unit_ratio
		id = submarine
		value = -50 #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 = 180
	}
	ai_strategy = {
		type = equipment_production_factor
		id = cas
		value = -65
	}
	ai_strategy = {
		type = equipment_production_factor
		id = tactical_bomber
		value = -80
	}
	ai_strategy = {
		type = equipment_production_factor
		id = naval_bomber
		value = -120
	}
	ai_strategy = {
		type = equipment_production_factor
		id = strategic_bomber
		value = -200
	}	
	ai_strategy = {
		type = equipment_production_factor
		id = infantry
		value = 0 #30 to 50
	}
	ai_strategy = {
		type = equipment_production_factor
		id = anti_tank
		value = 20
	}
	ai_strategy = {
		type = equipment_production_factor
		id = anti_air
		value = 50
	}	
	ai_strategy = {
		type = equipment_production_factor
		id = artillery
		value = 85 #20 to 40
	}	
	ai_strategy = {
		type = equipment_production_factor
		id = armor
		value = -10 
	} 
	ai_strategy = {
		type = equipment_production_factor
		id = motorized
		value = -70
	}
	ai_strategy = {
		type = equipment_production_min_factories
		id = artillery
		value = 3
	}
	ai_strategy = {
		type = equipment_production_min_factories
		id = fighter
		value = 4
	}
	ai_strategy = {
		type = equipment_variant_production_factor
		id = strategic_bomber
		value = -100
	}
	ai_strategy = {
		type = equipment_variant_production_factor
		id = support_equipment
		value = 30
	}
}
ZSL_anti_armor = {
	enable = {
		original_tag = ZSL
		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
	}
}
ZSL_armored_production = {
	enable = {
		date > 1989.1.1
		original_tag = ZSL
		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
	}
}
ZSL_halt_light_armor_production_in_transitioning = {
	enable = {
		original_tag = ZSL
		has_template_majority_unit = medium_armor
		OR = {
			has_equipment = { light_tank_chassis > 600 }
			date > 1989.1.1
		}		
	}	
	abort = { always = no }
	ai_strategy = {
		type = equipment_variant_production_factor
		id = light_tank_chassis
		value = -100
	}
}
ZSL_highered_armored_production = {
	enable = {
		original_tag = ZSL
		num_of_military_factories > 109
	}
	abort = {
		num_of_military_factories < 110
	}

	ai_strategy = {
		type = role_ratio
		id = armor
		value = 10
	}
}
ZSL_dont_waste_xp_until_medium_armor = {
	enable = {
		original_tag = ZSL		
	}
	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
	}
}
ZSL_super_boost_light_for_med_armor = {
	allowed = {
		original_tag = ZSL
	}
	enable = {
		OR = {
			has_tech = basic_medium_tank
			has_tech = basic_medium_tank_chassis
		}
		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 = land_xp_spend_priority
		id = division_template
		value = 100
	}
	# 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
	}
}
ZSL_super_boost_light_for_modern_armor = {
	allowed = {
		original_tag = ZSL
	}
	enable = {
		OR = {
			has_tech = main_battle_tank
			has_tech = main_battle_tank_chassis
		}
		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 = land_xp_spend_priority
		id = division_template
		value = 100
	}
	# this is gateway
	ai_strategy = {
		type = template_prio
		id = medium_armor
		value = 100
	}
	ai_strategy = {
		type = template_prio
		id = modern_armor
		value = 150
	}
}
ZSL_template_design = {
	enable = {	
		original_tag = ZSL
		date < 1990.1.1				
	}
	abort = { 
		date > 1990.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_hazaria = {
	enable = {
		tag = ZSL
		has_completed_focus = slav_south
		country_exists = ZKR
	}
	abort = {
		NOT = { country_exists = ZKR }
	}	
	ai_strategy = {
		type = antagonize
		id = ZKR
		value = 200
	}
}
war_with_ZPE = {
	enable = {
		tag = ZSL
		has_completed_focus = slav_east_pretenzii
		country_exists = ZPE
	}
	abort = {
		NOT = { country_exists = ZPE }
	}	
	ai_strategy = {
		type = antagonize
		id = ZPE
		value = 300
	}
	ai_strategy = {
		type = conquer
		id = ZPE
		value = 300
	}
}
#war_with_ZUF = {
#	enable = {
#		tag = ZSL
#		has_completed_focus = slav_east_pretenzii
#		country_exists = ZUF
#	}
#	abort = {
#		NOT = { country_exists = ZUF }
#	}
#	
#	ai_strategy = {
#		type = antagonize
#		id = "ZUF"
#		value = 200
#	}
#	ai_strategy = {
#		type = conquer
#		id = "ZUF"
#		value = 400
#	}
#}
war_with_ZOR = {
	enable = {
		tag = ZSL
		has_completed_focus = slav_east_pretenzii
		country_exists = ZOR
	}
	abort = {
		NOT = { country_exists = ZOR }
	}
	
	ai_strategy = {
		type = antagonize
		id = ZOR
		value = 200
	}
	ai_strategy = {
		type = conquer
		id = ZOR
		value = 200
	}
}
war_with_ZBA = {
	enable = {
		tag = ZSL
		has_completed_focus = slav_z_3
		country_exists = ZBA
	}
	abort = {
		NOT = { country_exists = ZBA }
	}	
	ai_strategy = {
		type = antagonize
		id = ZBA
		value = 50
	}
}
war_with_ZPA = { ## дорогу в персию!
	enable = {
		tag = ZSL
		is_subject = no
		has_war_with = ZPA
		is_neighbor_of = ZKZ
		NOT = {
			is_in_faction_with = ZKZ
		}
	}
	abort_when_not_enabled = yes	
	ai_strategy = {
		type = antagonize
		id = ZKZ
		value = 200
	}
	ai_strategy = {
		type = conquer
		id = ZKZ
		value = 200
	}
	ai_strategy = {
		type = declare_war
		id = ZKZ
		value = 80
	}
}
friend_kievanrus = {
	enable = {
		tag = ZSL		
		country_exists = ZKI
	}
	abort = {
		has_war_with = ZKI
	}	
	ai_strategy = {
		type = befriend
		id = ZKI
		value = 50
	}
}
zabei_na_omnikov = {
	enable = {
		tag = ZSL		
		country_exists = ZIK
		ZIK = { has_government = communism }	
		NOT = {
			has_war_with = ZIK
		}
	}
	abort_when_not_enabled = yes	
	ai_strategy = {
		type = ignore
		id = ZIK
		value = 75
	}
}

zsl_less_naval_focused_nation = {
	enable = {
		tag = ZSL
		date > "1986.1.1" 
		not = {
			has_dlc = "Man the Guns"
		}
	}
	abort = {		
		date > "1991.1.1" 
	}
	ai_strategy = {
		type = unit_ratio
		id = capital_ship
		value = -3
	}
	ai_strategy = {
		type = unit_ratio
		id = submarine
		value = -3
	}
	ai_strategy = {
		type = unit_ratio
		id = screen_ship
		value = -3
	}
	ai_strategy = {
		type = unit_ratio
		id = convoy
		value = -3
	}
}
ZSL_area_priority = {
	enable = {
		original_tag = ZSL
	}
	abort = { always = no }
	ai_strategy = {
		type = area_priority
		id = europe
		value = 150 #more focus here
	}	
	ai_strategy = {
		type = area_priority
		id = north_america
		value = -10
	}	
	ai_strategy = {
		type = area_priority
		id = south_america
		value = -10
	}	
	ai_strategy = {
		type = area_priority
		id = asia
		value = 20
	}	
	ai_strategy = {
		type = area_priority
		id = middle_east
		value = 30
	}	
	ai_strategy = {
		type = area_priority
		id = africa
		value = -90
	}	
	ai_strategy = {
		type = area_priority
		id = pacific
		value = -120 #less focus here
	}	
	ai_strategy = {
		type = area_priority
		id = oceania
		value = -120
	}
}

net_volonteram_v_rim = {
	enable = {		
		tag = ZSL
		country_exists = ZRI		
	}
	abort = {
		date > 1995.6.1
	}
	ai_strategy = {
		type = send_volunteers_desire
		id = ZRI
		value = -500
	}
}

net_volonteram_v_persia = {
	enable = {		
		tag = ZSL
		country_exists = ZPA		
	}
	abort = {
		date > 1995.6.1
	}
	ai_strategy = {
		type = send_volunteers_desire
		id = ZPA
		value = -500
	}
}	

ZSL_industry_we_are_the_baddies = {
	enable = {
		tag = ZSL
		date > 1987.8.1
		date < 1990.1.1		
	}
	abort = {
		date > 1990.1.1
	}
	ai_strategy = {
		type = added_military_to_civilian_factory_ratio
		value = 5
	}
	ai_strategy = {
		type = air_factory_balance
		value = 5 
	} 
}	