﻿culture_ai_weight_skirmishers = {
	value = -10
	
	if = { # Cultures that favours skirmishers
		limit = {
			culture = {
				OR = {
					has_cultural_pillar = heritage_baltic
					has_cultural_pillar = heritage_ugro_permian
					has_cultural_pillar = heritage_balto_finnic
				}
			}
		}
		add = 20
	}
	if = { # Cultures that dislike skirmishers
		limit = {
			culture = {
				OR = {
					has_cultural_pillar = heritage_central_germanic
					has_cultural_pillar = heritage_frankish
					has_cultural_pillar = heritage_iberian
					has_cultural_pillar = heritage_latin
				}
			}
		}
		add = -60
	}
	
	if = { # Cultures with a special MaA of that type should avoid the base version of the unit
		limit = {
			culture = {
				culture_has_skirmisher_maa = yes
			}
		}
		add = -1000
	}
}

culture_ai_weight_archers = {
	value = 0
	
	if = { # Cultures that favours archers
		limit = {
			culture = {
				OR = {
					has_cultural_pillar = heritage_west_germanic
					has_cultural_pillar = heritage_brythonic
					has_cultural_pillar = heritage_east_african
					has_cultural_pillar = heritage_indo_aryan
					has_cultural_pillar = heritage_dravidian
					has_cultural_pillar = heritage_burman
					has_cultural_pillar = heritage_chinese
				}
			}
		}
		add = 40
	}
	if = { # Cultures that dislike archers
		limit = {
			OR = {
				culture = { has_cultural_pillar = heritage_central_germanic }
				culture = { has_cultural_pillar = heritage_frankish }
			}
		}
		add = -60
	}
	
	if = { # Cultures with a special MaA of that type should avoid the base version of the unit
		limit = {
			culture = {
				culture_has_archer_maa = yes
			}
		}
		add = -1000
	}
}

culture_ai_weight_heavy_infantry = {
	value = 0
	
	if = { # Cultures that favours heavy infantry
		limit = {
			culture = {
				OR = {
					has_cultural_pillar = heritage_central_germanic
					has_cultural_pillar = heritage_north_germanic
					has_cultural_pillar = heritage_west_germanic
					has_cultural_pillar = heritage_east_slavic
				}
			}
		}
		add = 40
	}
	
	if = { # Cultures with a special MaA of that type should avoid the base version of the unit
		limit = {
			culture = {
				culture_has_heavy_infantry_maa = yes
			}
		}
		add = -1000
	}
}

culture_ai_weight_pikemen = {
	value = 0
	
	if = { # Cultures that favours spearmen
		limit = {
			OR = {
				culture = { has_cultural_pillar = heritage_central_germanic }
				culture = { has_cultural_pillar = heritage_latin }
			}
		}
		add = 40
	}
	
	if = { # Cultures with a special MaA of that type should avoid the base version of the unit
		limit = {
			culture = {
				culture_has_pikemen_maa = yes
			}
		}
		add = -1000
	}
}

culture_ai_weight_light_cavalry = {
	value = 20
	
	if = { # Cultures that REALLY like light cavalry
		limit = {
			OR = {
				culture = { has_cultural_pillar = heritage_iranian }
				
				# Steppe cultures
				culture = { has_cultural_pillar = heritage_turkic }
				culture = { has_cultural_pillar = heritage_mongolic }
			}
		}
		add = 80
	}
	if = { # Cultures that favours light cavalry
		limit = {
			culture = {
				OR = {
					has_cultural_pillar = heritage_arabic
					has_cultural_pillar = heritage_iranian
					has_cultural_pillar = heritage_berber
					has_cultural_pillar = heritage_iberian
					has_cultural_pillar = heritage_indo_aryan
				}
			}
		}
		add = 40
	}
	if = { # Cultures that dislike light cavalry
		limit = {
			OR = {
				culture = { has_cultural_pillar = heritage_central_germanic }
				culture = { has_cultural_pillar = heritage_tibetan }
				culture = { has_cultural_pillar = heritage_baltic }
				culture = { has_cultural_pillar = heritage_burman }
				culture = { has_cultural_pillar = heritage_somalian }
			}
		}
		add = -60
	}
	
	if = { # Cultures with a special MaA of that type should avoid the base version of the unit
		limit = {
			culture = {
				culture_has_light_cavalry_maa = yes
			}
		}
		add = -1000
	}
	
	if = { # Cultures with a preference for Camel Riders should buy those over normal light cavalry
		limit = {
			culture = {
				has_innovation = innovation_war_camels
			}
			OR = {
				culture = { has_cultural_pillar = heritage_arabic }
				culture = { has_cultural_pillar = heritage_berber }
			}
		}
		add = -200
	}
}

culture_ai_weight_heavy_cavalry = {
	value = 0
	
	if = { # Cultures that REALLY like heavy cavalry
		limit = {
			OR = {
				culture = { has_cultural_pillar = heritage_iranian }
				
				# Steppe cultures
				culture = { has_cultural_pillar = heritage_turkic }
				culture = { has_cultural_pillar = heritage_mongolic }
			}
		}
		add = 80
	}
	if = { # Cultures that favours heavy cavalry
		limit = {
			OR = {
				culture = { has_cultural_pillar = heritage_central_germanic }
				culture = { has_cultural_pillar = heritage_frankish }
				culture = { has_cultural_pillar = heritage_indo_aryan }
			}
		}
		add = 40
	}
	if = { # Cultures that dislike heavy cavalry
		limit = {
			culture = {
				OR = {
					has_cultural_pillar = heritage_tibetan
					has_cultural_pillar = heritage_baltic
					has_cultural_pillar = heritage_south_slavic
					has_cultural_pillar = heritage_sahelian
					has_cultural_pillar = heritage_senegambian
					has_cultural_pillar = heritage_west_african
					has_cultural_pillar = heritage_yoruba
					has_cultural_pillar = heritage_somalian
					has_cultural_pillar = heritage_east_african
					has_cultural_pillar = heritage_burman
				}
			}
		}
		add = -60
	}
	
	if = { # Cultures with a special MaA of that type should avoid the base version of the unit
		limit = {
			culture = {
				culture_has_heavy_cavalry_maa = yes
			}
		}
		add = -1000
	}
}

counter_synergy_ai_weight_skirmishers = {
	value = 0
	if = {
		limit = {
			number_maa_regiments_of_base_type = {
				type = pikemen
				value >= 3
			}
			NOT = { #no need to add more if i.e. regional or inherited maa of that type already exists
				number_maa_regiments_of_base_type = {
					type = skirmishers
					value >= 1
				}
			}
		}
		add = 60
	}
}

counter_synergy_ai_weight_heavy_cavalry = {
	value = 0
	if = {
		limit = {
			number_maa_regiments_of_base_type = {
				type = heavy_infantry
				value >= 3
			}
			NOT = { #no need to add more if i.e. regional or inherited maa of that type already exists
				number_maa_regiments_of_base_type = {
					type = heavy_cavalry
					value >= 1
				}
			}
		}
		add = 60
	}
}

counter_synergy_ai_weight_archer_cavalry = {
	value = 0
	if = {
		limit = {
			number_maa_regiments_of_base_type = {
				type = archers
				value >= 3
			}
			NOT = { #no need to add more if i.e. regional or inherited maa of that type already exists
				number_maa_regiments_of_base_type = {
					type = archer_cavalry
					value >= 1
				}
			}
		}
		add = 60
	}
}