﻿# standard costs
@maa_buy_cost = 150
@maa_low_maintenance_cost = 1.0
@maa_high_maintenance_cost = 5.0
@cultural_maa_extra_ai_score = 60
@cultural_maa_extra_extra_ai_score = 80


#### Byzantine Army
####### Phase One: "Themata"
########### Imperial Army

byz_kataphraktoi = {
	type = heavy_cavalry
	
	damage = 125
	toughness = 49
	pursuit = 15
	screen = 15
	
	terrain_bonus = {
		plains = { damage = 30 }
		drylands = { damage = 30 }
		hills = { damage = -15 }
		mountains = { damage = -60 }
		desert_mountains = { damage = -80 toughness = -10 pursuit = -15 }
		desert = { damage = -50 toughness = -5 pursuit = -10 }
		wetlands = { damage = -100 toughness = -20 pursuit = -15 screen = -15 }
	}

	era_bonus = {
		culture_era_high_medieval = {
			damage = 15
			toughness = 4
		}
		culture_era_late_medieval = {
			damage = 24
			toughness = 6
		}
	}

	counters = {
		heavy_infantry = 1
		heavy_cavalry = 0.1
	}

	winter_bonus = {
		normal_winter = { damage = -15 toughness = -5 }
		harsh_winter = { damage = -30 toughness = -10 }
	}
	
	can_recruit = {
		AND = {
			OR = {
				highest_held_title_tier = tier_kingdom
				highest_held_title_tier = tier_empire
			}
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
				top_liege = {
					OR = {
						has_title = title:e_byzantium
						has_title = title:e_roman_empire
					} 
				}
			}
			culture = {
				AND = {
					OR = {
						OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
				}
			}
		}
	}

	buy_cost = { gold = kataphraktoi_recruitment_cost }
	low_maintenance_cost = { gold = kataphraktoi_low_maint_cost }
	high_maintenance_cost = { gold = kataphraktoi_high_maint_cost }
	
	max_sub_regiments = 20
	stack = 50
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = byz_kataphraktoi
}

byz_scholarii = {
	type = heavy_cavalry
	
	damage = 135
	toughness = 52
	pursuit = 13
	screen = 15
	
	terrain_bonus = {
		plains = { damage = 30 }
		drylands = { damage = 30 }
		hills = { damage = -15 }
		mountains = { damage = -60 }
		desert_mountains = { damage = -80 toughness = -10 pursuit = -15 }
		desert = { damage = -50 toughness = -5 pursuit = -10 }
		wetlands = { damage = -100 toughness = -20 pursuit = -15 }
	}

	era_bonus = {
		culture_era_high_medieval = {
			damage = 15
			toughness = 4
		}
		culture_era_late_medieval = {
			damage = 24
			toughness = 6
		}
	}

	counters = {
		heavy_infantry = 1
		heavy_cavalry = 0.4
	}

	winter_bonus = {
		normal_winter = { damage = -15 toughness = -5 }
		harsh_winter = { damage = -30 toughness = -10 }
	}
	
	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_roman_empire
				has_title = title:e_byzantium
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
					NOT = {
						has_innovation_flag = pronoian_army
					}
				}
			}
		}
	}

	buy_cost = { gold = scholarii_recruitment_cost }
	low_maintenance_cost = { gold = scholarii_low_maint_cost }
	high_maintenance_cost = { gold = scholarii_high_maint_cost }
	
	max_sub_regiments = 6
	stack = 50
	ai_quality = { value = @cultural_maa_extra_extra_ai_score }
	icon = byz_scholarii
}

byz_excubitors = {
	type = heavy_infantry
	
	damage = 43
	toughness = 36
	pursuit = 0
	screen = 35
	
	counters = {
		pikemen = 1
		heavy_infantry = 1
		light_cavalry = 0.2
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_roman_empire
				has_title = title:e_byzantium
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
					NOT = {
						has_innovation_flag = varangoi_army
					}
				}
			}
		}
	}
	
	buy_cost = { gold = excubitors_recruitment_cost }
	low_maintenance_cost = { gold = excubitors_low_maint_cost }
	high_maintenance_cost = { gold = excubitors_high_maint_cost }
	
	max_sub_regiments = 5
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = byz_excubitors
}

byz_varrangoi = { #Early Medieval Era
	type = heavy_infantry
	
	damage = 48
	toughness = 36
	pursuit = 15
	screen = 15
	
	terrain_bonus = {
		farmlands = { damage = 6 toughness = 4 }
		plains = { damage = 6 toughness = 4 }
		hills = { damage = 6 toughness = 4 }
		desert = { damage = -8 toughness = -6 pursuit = -15 }
		desert_mountains = { toughness = -4 pursuit = -10 }
	}

	counters = {
		pikemen = 1
		heavy_infantry = 0.4
		heavy_cavalry  = 0.7
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_roman_empire
				has_title = title:e_byzantium
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = varangoi_army
				}
			}
		}
	}
	
	buy_cost = { gold = varrangoi_recruitment_cost }
	low_maintenance_cost = { gold = varrangoi_low_maint_cost }
	high_maintenance_cost = { gold = varrangoi_high_maint_cost }
	
	max_sub_regiments = 8
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = byz_varrangoi
}

########### Provincial Army

byz_imperial_toxotai = {
	type = archers
	
	damage = 26
	toughness = 18
	pursuit = 0
	screen = 10
	
	terrain_bonus = {
		hills = { damage = 10 toughness = 4 }
		forest = { toughness = 4 screen = 4 }
		taiga = { toughness = 4 screen = 4 }
	}

	counters = {
		skirmishers = 1
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
				top_liege = {
					OR = {
						has_title = title:e_byzantium
						has_title = title:e_roman_empire
					} 
				}
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
				}
			}
			NOT = {
				OR = {
					any_held_title = {
						AND = {
							tier = tier_county
							any_county_in_region = {
								region = world_asia_minor
								count >= 1
								holder = root
							}
							any_neighboring_county = {
								NOT = {
									target_is_de_facto_liege_or_above = title:e_byzantium
								}
							}
						}
					}
					AND = {
						any_held_title = {
							any_county_in_region = {
								region = world_asia_minor
								count >= 1
								holder = root
							}
						}
						OR = {
							any_neighboring_realm_same_rank_owner = {
								NOT = {
									top_liege = { has_title = title:e_byzantium }
								} 
							}
							liege = {
								AND = {
									any_neighboring_realm_same_rank_owner = {
										NOT = {
											top_liege = { has_title = title:e_byzantium }
										}
									}
									NOT = {
										has_title = title:e_byzantium
									}
								}
							}
						}
					}
				}
			}
		}
	}

	buy_cost = { gold = bowmen_recruitment_cost }
	low_maintenance_cost = { gold = bowmen_low_maint_cost }
	high_maintenance_cost = { gold = bowmen_high_maint_cost }
	
	
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_archers }
	icon = byz_imperial_toxotai
}

byz_menavlatoi = {
	type = pikemen
	
	damage = 25
	toughness = 34
	pursuit = 0
	screen = 10
	
	terrain_bonus = {
		plains = { damage = 10 }
		drylands = { damage = 10 }
	}

	counters = {
		light_cavalry = 2.5
		heavy_cavalry = 2
		camel_cavalry = 2
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
				top_liege = {
					OR = {
						has_title = title:e_byzantium
						has_title = title:e_roman_empire
					} 
				}
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
					NOT = {
						has_innovation_flag = pronoian_army
					}
				}
			}
		}	
	}

	buy_cost = { gold = menavlatoi_recruitment_cost }
	low_maintenance_cost = { gold = menavlatoi_low_maint_cost }
	high_maintenance_cost = { gold = menavlatoi_high_maint_cost }
	
	max_sub_regiments = 4
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_pikemen }
	icon = byz_menavlatoi
}

byz_prokousatores = {
	type = light_cavalry
	
	damage = 27
	toughness = 23
	pursuit = 40
	screen = 15
	
	terrain_bonus = {
		plains = { damage = 15 }
		drylands = { damage = 15 }
		hills = { damage = -10 }
		mountains = { damage = -10 pursuit = -30 }
		desert_mountains = { damage = -15 pursuit = -30 }
		wetlands = { damage = -15 toughness = -10 pursuit = -40 screen = -15 }
	}
	
	counters = {
		archers = 1
		skirmishers = 0.2
	}

	winter_bonus = {
		harsh_winter = { damage = -5 toughness = -5 }
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
				top_liege = {
					OR = {
						has_title = title:e_byzantium
						has_title = title:e_roman_empire
					} 
				}
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
					NOT = {
						has_innovation_flag = pronoian_army
					}
				}
			}
			NOT = {
				OR = {
					any_held_title = {
						AND = {
							tier = tier_county
							OR = {
								any_county_in_region = {
									region = world_asia_minor
									count >= 1
									holder = root
								}
								any_county_in_region = {
									region = world_middle_east_jerusalem
									count >= 1
									holder = root
								}
								any_county_in_region = {
									region = world_europe_south
									count >= 1
									holder = root
								}
							}
							any_neighboring_county = {
								NOT = {
									target_is_de_facto_liege_or_above = title:e_byzantium
								}
							}
						}
					}
					AND = {
						any_held_title = {
							OR = {
								any_county_in_region = {
									region = world_asia_minor
									count >= 1
									holder = root
								}
								any_county_in_region = {
									region = world_middle_east_jerusalem
									count >= 1
									holder = root
								}
								any_county_in_region = {
									region = world_europe_south
									count >= 1
									holder = root
								}
							}
						}
						OR = {
							any_neighboring_realm_same_rank_owner = {
								NOT = {
									top_liege = { has_title = title:e_byzantium }
								} 
							}
							liege = {
								AND = {
									any_neighboring_realm_same_rank_owner = {
										NOT = {
											top_liege = { has_title = title:e_byzantium }
										}
									}
									NOT = {
										has_title = title:e_byzantium
									}
								}
							}
						}
					}
				}
			}
		}
	}

	buy_cost = { gold = prokousatores_recruitment_cost }
	low_maintenance_cost = { gold = prokousatores_low_maint_cost }
	high_maintenance_cost = { gold = prokousatores_high_maint_cost }
	
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_light_cavalry }
	icon = byz_prokousatores
}

byz_skoutatoi = {
	type = heavy_infantry
	
	damage = 35
	toughness = 29
	pursuit = 0
	screen = 15
	
	counters = {
		pikemen = 1
		light_cavalry = 0.5
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
				top_liege = {
					OR = {
						has_title = title:e_byzantium
						has_title = title:e_roman_empire
					} 
				}
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
					NOT = {
						has_innovation_flag = pronoian_army
					}
				}
			}
		}
	}
	
	buy_cost = { gold = skoutatoi_recruitment_cost }
	low_maintenance_cost = { gold = skoutatoi_low_maint_cost }
	high_maintenance_cost = { gold = skoutatoi_high_maint_cost }
	
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_heavy_infantry }
	icon = byz_skoutatoi
}

byz_kastrophylakes = {
	type = heavy_infantry
	
	damage = 34
	toughness = 32
	pursuit = 15
	screen = 20
	
	counters = {
		pikemen = 1
		archers = 1
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			top_liege = {  
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
				}
			}
			NOT = {
				OR = {
					any_held_title = {
						AND = {
							tier = tier_county
							OR = {
								any_county_in_region = {
									region = world_asia_minor
									count >= 1
									holder = root
								}
								any_county_in_region = {
									region = world_middle_east_jerusalem
									count >= 1
									holder = root
								}
								any_county_in_region = {
									region = world_europe_south
									count >= 1
									holder = root
								}
							}
							any_neighboring_county = {
								NOT = {
									target_is_de_facto_liege_or_above = title:e_byzantium
								}
							}
						}
					}
					AND = {
						any_held_title = {
							OR = {
								any_county_in_region = {
									region = world_asia_minor
									count >= 1
									holder = root
								}
								any_county_in_region = {
									region = world_middle_east_jerusalem
									count >= 1
									holder = root
								}
								any_county_in_region = {
									region = world_europe_south
									count >= 1
									holder = root
								}
							}
						}
						OR = {
							any_neighboring_realm_same_rank_owner = {
								NOT = {
									top_liege = { has_title = title:e_byzantium }
								} 
							}
							liege = {
								AND = {
									any_neighboring_realm_same_rank_owner = {
										NOT = {
											top_liege = { has_title = title:e_byzantium }
										}
									}
									NOT = {
										has_title = title:e_byzantium
									}
								}
							}
						}
					}
				}
			}
		}
	}
	
	buy_cost = { gold = kastrophylakes_recruitment_cost }
	low_maintenance_cost = { gold = kastrophylakes_low_maint_cost }
	high_maintenance_cost = { gold = kastrophylakes_high_maint_cost }
	
	max_sub_regiments = 8
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = byz_kastrophylakes
}

byz_bucellarii = {
	type = heavy_cavalry
	
	damage = 85
	toughness = 36
	pursuit = 28
	screen = 35
	
	terrain_bonus = {
		plains = { damage = 30 }
		drylands = { damage = 30 }
		hills = { damage = -20 }
		mountains = { damage = -35 }
		desert_mountains = { damage = -35 }
		wetlands = { damage = -55 toughness = -10 pursuit = -28 screen = -25 }
	}

	era_bonus = {
		culture_era_high_medieval = {
			damage = 15
			toughness = 2
		}
		culture_era_late_medieval = {
			damage = 24
			toughness = 6
		}
	}

	counters = {
		archers = 1
		light_cavalry = 0.3
	}

	winter_bonus = {
		normal_winter = { damage = -5 toughness = -5 }
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			top_liege = {  
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
					NOT = {
						has_innovation_flag = pronoian_army
					}
				}
			}
		}
	}

	buy_cost = { gold = heavy_cavalry_recruitment_cost }
	low_maintenance_cost = { gold = heavy_cavalry_low_maint_cost }
	high_maintenance_cost = { gold = heavy_cavalry_high_maint_cost }
	
	max_sub_regiments = 20
	stack = 50
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = byz_bucellarii
}

byz_ippotoxotai = {
	type = archer_cavalry
	
	damage = 34
	toughness = 29
	pursuit = 35
	screen = 45
	
	terrain_bonus = {
		plains = { damage = 20 }
		drylands = { damage = 20 }
		wetlands = { damage = -25 pursuit = -35 screen = -25 }
		mountains = { damage = -30 pursuit = -35 }
		desert_mountains = { damage = -30 pursuit = -35 }
	}

	counters = {
		skirmishers = 1
		heavy_infantry = 0.5
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
				top_liege = {  
				    OR = {
					    has_title = title:e_byzantium
					    has_title = title:e_roman_empire
				    }
			    }
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
					NOT = {
						has_innovation_flag = pronoian_army
					}
				}
			}
		}
	}

	buy_cost = { gold = ippotoxotai_recruitment_cost }
	low_maintenance_cost = { gold = ippotoxotai_low_maint_cost }
	high_maintenance_cost = { gold = ippotoxotai_high_maint_cost }
	
	max_sub_regiments = 8
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = byz_ippotoxotai
}

########### Border Troops

byz_droungo = {
	type = heavy_infantry
	
	damage = 30
	toughness = 32
	pursuit = 15
	screen = 15

	terrain_bonus = {
		mountains = { damage = 6 toughness = 8 screen = 5 }
		desert_mountains = { damage = 6 toughness = 6 screen = 5 }
		hills = { damage = 4 pursuit = 5 }
	}
	
	counters = {
		pikemen = 1
		archers = 1
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			top_liege = {  
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			OR = {
				culture = { 
				    AND = {
					    this = culture:greek
					    has_innovation_flag = tagmata_army
						NOT = {
							has_innovation_flag = pronoian_army
						}
				    }
			    }
				top_liege = {
					culture = { 
				        AND = {
							OR ={
								any_parent_culture_or_above = {
							        this = culture:greek
						        }
						        this = culture:greek
								this = culture:roman 
							}
					        has_innovation_flag = tagmata_army
							NOT = {
								has_innovation_flag = pronoian_army
							}
				        }
			        }
				}
			}
			OR = {
				any_held_title = {
					AND = {
						tier = tier_county
						OR = {
							any_county_in_region = {
								region = world_asia_minor
								count >= 1
								holder = root
							}
							any_county_in_region = {
								region = world_europe_south
								count >= 1
								holder = root
							}
						}
						any_neighboring_county = {
							NOT = {
								target_is_de_facto_liege_or_above = title:e_byzantium
							}
						}
					}
				}
				AND = {
					any_held_title = {
						OR = {
							any_county_in_region = {
								region = world_asia_minor
								count >= 1
								holder = root
							}
							any_county_in_region = {
								region = world_europe_south
								count >= 1
								holder = root
							}
						}
					}
					OR = {
						any_neighboring_realm_same_rank_owner = {
							NOT = {
								top_liege = { has_title = title:e_byzantium }
							} 
						}
						liege = {
							AND = {
								any_neighboring_realm_same_rank_owner = {
									NOT = {
										top_liege = { has_title = title:e_byzantium }
									}
								}
								NOT = {
									has_title = title:e_byzantium
								}
							}
						}
					}
				}
			}
		}
	}
	
	buy_cost = { gold = kastrophylakes_recruitment_cost }
	low_maintenance_cost = { gold = kastrophylakes_low_maint_cost }
	high_maintenance_cost = { gold = kastrophylakes_high_maint_cost }
	
	max_sub_regiments = 5
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_heavy_infantry }
	icon = byz_droungo
}

############### Eastern Border

byz_akritai = {
	type = skirmishers
	
	damage = 16
	toughness = 19
	pursuit = 14
	screen = 12
	
	terrain_bonus = {
		mountains = { damage = 6 toughness = 8 screen = 5 }
		desert_mountains = { damage = 6 toughness = 8 screen = 5 }
		hills = { damage = 4 }
	}

	counters = {
		heavy_infantry = 1
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			top_liege = {  
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			OR = {
				culture = { 
				    AND = {
					    this = culture:greek
					    has_innovation_flag = tagmata_army
				    }
			    }
				top_liege = {
					culture = { 
				        AND = {
					        OR ={
								any_parent_culture_or_above = {
							        this = culture:greek
						        }
						        this = culture:greek
								this = culture:roman 
							}
					        has_innovation_flag = tagmata_army
				        }
			        }
				}
			}
			OR = {
				any_held_title = {
					AND = {
						tier = tier_county
						OR = {
							any_county_in_region = {
								region = world_asia_minor
								count >= 1
								holder = root
							}
							any_county_in_region = {
								region = world_middle_east_jerusalem
								count >= 1
								holder = root
							}
						}
						any_neighboring_county = {
							NOT = {
								target_is_de_facto_liege_or_above = title:e_byzantium
							}
						}
					}
				}
				AND = {
					any_held_title = {
						OR = {
							any_county_in_region = {
								region = world_asia_minor
								count >= 1
								holder = root
							}
							any_county_in_region = {
								region = world_middle_east_jerusalem
								count >= 1
								holder = root
							}
						}
					}
					OR = {
						any_neighboring_realm_same_rank_owner = {
							NOT = {
								top_liege = { has_title = title:e_byzantium }
							} 
						}
						liege = {
							AND = {
								any_neighboring_realm_same_rank_owner = {
									NOT = {
										top_liege = { has_title = title:e_byzantium }
									}
								}
								NOT = {
									has_title = title:e_byzantium
								}
							}
						}
					}
				}
			}
			NOT = {
				OR = {
					has_title = title:e_byzantium
					any_county_in_region = {
					    region = world_europe_south
						count >= 1
						holder = root
				    }
				}
			}
		}
	}

	buy_cost = { gold = akritai_recruitment_cost }
	low_maintenance_cost = { gold = akritai_low_maint_cost }
	high_maintenance_cost = { gold = akritai_high_maint_cost }
	
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_skirmishers }
	icon = byz_akritai
}

byz_sphendonetai = {
	type = archers
	
	damage = 18
	toughness = 13
	pursuit = 0
	screen = 0
	
	terrain_bonus = {
		hills = { damage = 10 toughness = 4 }
		mountains = { damage = 14 toughness = 6 screen = 10 }
		desert_mountains = { damage = 14 toughness = 6 screen = 10 }
	}

	counters = {
		skirmishers = 1
		heavy_infantry = 0.2
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			top_liege = {  
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			OR = {
				culture = { 
				    AND = {
					    this = culture:greek
					    has_innovation_flag = tagmata_army
				    }
			    }
				top_liege = {
					culture = { 
				        AND = {
					        OR ={
								any_parent_culture_or_above = {
							        this = culture:greek
						        }
						        this = culture:greek
								this = culture:roman 
							}
					        has_innovation_flag = tagmata_army
				        }
			        }
				}
			}
			OR = {
				any_held_title = {
					AND = {
						tier = tier_county
						any_county_in_region = {
							region = world_asia_minor
							count >= 1
							holder = root
						}
						any_neighboring_county = {
							NOT = {
								target_is_de_facto_liege_or_above = title:e_byzantium
							}
						}
					}
				}
				AND = {
					any_held_title = {
						any_county_in_region = {
							region = world_asia_minor
							count >= 1
							holder = root
						}
					}
					OR = {
						any_neighboring_realm_same_rank_owner = {
							NOT = {
								top_liege = { has_title = title:e_byzantium }
							} 
						}
						liege = {
							AND = {
								any_neighboring_realm_same_rank_owner = {
									NOT = {
										top_liege = { has_title = title:e_byzantium }
									}
								}
								NOT = {
									has_title = title:e_byzantium
								}
							}
						}
					}
				}
			}
			NOT = {
				OR = {
					has_title = title:e_byzantium
					any_county_in_region = {
					    region = world_europe_south
						count >= 1
						holder = root
				    }
				}
			}
		}
	}

	buy_cost = { gold = bowmen_recruitment_cost }
	low_maintenance_cost = { gold = bowmen_low_maint_cost }
	high_maintenance_cost = { gold = bowmen_high_maint_cost }
	
	
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_archers }
	icon = byz_sphendonetai
}

byz_trapezitai = {
	type = light_cavalry
	
	damage = 27
	toughness = 18
	pursuit = 35
	screen = 50
	
	terrain_bonus = {
		hills = { damage = 10 toughness = 10 }
		plains = { damage = 10 }
		drylands = { damage = 10 }
		mountains = { damage = -8 toughness = 4 pursuit = -10 }
		desert_mountains = { damage = -8 pursuit = -15 }
		wetlands = { damage = -15 toughness = -10 pursuit = -20 screen = -20 }
	}
	
	counters = {
		archers = 1
		heavy_infantry = 0.3
	}

	winter_bonus = {
		harsh_winter = { damage = -5 toughness = -2 }
	}

	can_recruit = {
		AND = {
			OR = {
				culture = { 
				    AND = {
					    this = culture:greek
					    has_innovation_flag = tagmata_army
				    }
			    }
				top_liege = {
					culture = { 
				        AND = {
					        OR ={
								any_parent_culture_or_above = {
							        this = culture:greek
						        }
						        this = culture:greek
								this = culture:roman 
							}
					        has_innovation_flag = tagmata_army
				        }
			        }
				}
			}
			NOT = { 
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			top_liege = {  
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			OR = {
				any_held_title = {
				    AND = {
						tier = tier_county
						OR = {
							any_county_in_region = {
					            region = world_asia_minor
							    count >= 1
							    holder = root
				            }
							any_county_in_region = {
					            region = world_middle_east_jerusalem
							    count >= 1
							    holder = root
				            }
						}
					    any_neighboring_county = {
					        NOT = {
						        target_is_de_facto_liege_or_above = title:e_byzantium
					        }
				        }
				    }
			    }
				AND = {
					any_held_title = {
						OR = {
							any_county_in_region = {
					            region = world_asia_minor
							    count >= 1
							    holder = root
				            }
							any_county_in_region = {
					            region = world_middle_east_jerusalem
							    count >= 1
							    holder = root
				            }
						}
					}
					OR = {
						any_neighboring_realm_same_rank_owner = {
				            NOT = {
					            top_liege = { has_title = title:e_byzantium }
				            } 
			            }
						liege = {
							AND = {
								any_neighboring_realm_same_rank_owner = {
								    NOT = {
					                    top_liege = { has_title = title:e_byzantium }
				                    }
							    }
								NOT = {
									has_title = title:e_byzantium
								}
							}
						}
					}
				}
			}
			NOT = {
				OR = {
					has_title = title:e_byzantium
					any_county_in_region = {
					    region = world_europe_south
						count >= 1
						holder = root
				    }
				}
			}
		}
	}

	buy_cost = { gold = light_cavalry_recruitment_cost }
	low_maintenance_cost = { gold = light_cavalry_low_maint_cost }
	high_maintenance_cost = { gold = light_cavalry_high_maint_cost }
	
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_light_cavalry }
	icon = byz_trapezitai
}

############### Eastern Border

byz_apelatai = {
	type = skirmishers
	
	damage = 16
	toughness = 18
	pursuit = 14
	screen = 15
	
	terrain_bonus = {
		forest = { damage = 4 toughness = 6 }
		mountains = { damage = 5 toughness = 6 }
		hills = { damage = 4 }
	}

	counters = {
		heavy_infantry = 1
		light_cavalry = 0.1
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			top_liege = {  
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			OR = {
				culture = { 
				    AND = {
					    this = culture:greek
					    has_innovation_flag = tagmata_army
				    }
			    }
				top_liege = {
					culture = { 
				        AND = {
					        OR ={
								any_parent_culture_or_above = {
							        this = culture:greek
						        }
						        this = culture:greek
								this = culture:roman 
							}
					        has_innovation_flag = tagmata_army
				        }
			        }
				}
			}
			OR = {
				any_held_title = {
					AND = {
						tier = tier_county
						any_county_in_region = {
							region = world_europe_south
							count >= 1
							holder = root
						}
						any_neighboring_county = {
							NOT = {
								target_is_de_facto_liege_or_above = title:e_byzantium
							}
						}
					}
				}
				AND = {
					any_held_title = {
						any_county_in_region = {
							region = world_europe_south
							count >= 1
							holder = root
						}
					}
					OR = {
						any_neighboring_realm_same_rank_owner = {
							NOT = {
								top_liege = { has_title = title:e_byzantium }
							} 
						}
						liege = {
							AND = {
								any_neighboring_realm_same_rank_owner = {
									NOT = {
										top_liege = { has_title = title:e_byzantium }
									}
								}
								NOT = {
									has_title = title:e_byzantium
								}
							}
						}
					}
				}
			}
			NOT = {
				OR = {
					has_title = title:e_byzantium
					any_county_in_region = {
						region = world_asia_minor
						count >= 1
						holder = root
					}
					any_county_in_region = {
						region = world_middle_east_jerusalem
						count >= 1
						holder = root
					}
				}
			}
		}
	}

	buy_cost = { gold = akritai_recruitment_cost }
	low_maintenance_cost = { gold = akritai_low_maint_cost }
	high_maintenance_cost = { gold = akritai_high_maint_cost }
	
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_skirmishers }
	icon = byz_apelatai
}

byz_tasinarioi = {
	type = light_cavalry
	
	damage = 28
	toughness = 20
	pursuit = 30
	screen = 50
	
	terrain_bonus = {
		hills = { damage = 10 toughness = 10 }
		plains = { damage = 10 }
		drylands = { damage = 10 }
		mountains = { damage = -8 toughness = 4 pursuit = -10 }
		desert_mountains = { damage = -8 pursuit = -15 }
		wetlands = { damage = -15 toughness = -10 pursuit = -20 screen = -20 }
	}
	
	counters = {
		archers = 1
		skirmishers = 0.3
	}

	winter_bonus = {
		harsh_winter = { damage = -5 toughness = -2 }
	}

	can_recruit = {
		AND = {
			OR = {
				culture = { 
				    AND = {
					    this = culture:greek
					    has_innovation_flag = tagmata_army
				    }
			    }
				top_liege = {
					culture = { 
				        AND = {
					        OR ={
								any_parent_culture_or_above = {
							        this = culture:greek
						        }
						        this = culture:greek
								this = culture:roman 
							}
					        has_innovation_flag = tagmata_army
				        }
			        }
				}
			}
			NOT = { 
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			top_liege = {  
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			OR = {
				any_held_title = {
				    AND = {
						tier = tier_county
						any_county_in_region = {
							region = world_europe_south
							count >= 1
							holder = root
						}
					    any_neighboring_county = {
					        NOT = {
						        target_is_de_facto_liege_or_above = title:e_byzantium
					        }
				        }
				    }
			    }
				AND = {
					any_held_title = {
						any_county_in_region = {
							region = world_europe_south
							count >= 1
							holder = root
						}
					}
					OR = {
						any_neighboring_realm_same_rank_owner = {
				            NOT = {
					            top_liege = { has_title = title:e_byzantium }
				            } 
			            }
						liege = {
							AND = {
								any_neighboring_realm_same_rank_owner = {
								    NOT = {
					                    top_liege = { has_title = title:e_byzantium }
				                    }
							    }
								NOT = {
									has_title = title:e_byzantium
								}
							}
						}
					}
				}
			}
			NOT = {
				OR = {
					has_title = title:e_byzantium
					any_county_in_region = {
						region = world_asia_minor
						count >= 1
						holder = root
					}
					any_county_in_region = {
						region = world_middle_east_jerusalem
						count >= 1
						holder = root
					}
				}
			}
		}
	}

	buy_cost = { gold = light_cavalry_recruitment_cost }
	low_maintenance_cost = { gold = light_cavalry_low_maint_cost }
	high_maintenance_cost = { gold = light_cavalry_high_maint_cost }
	
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_light_cavalry }
	icon = byz_tasinarioi
}

########### Degraded Imperial Army

byz_chonsarioi = {
	type = skirmishers
	
	damage = 13
	toughness = 16
	pursuit = 10
	screen = 15
	
	terrain_bonus = {
		forest = { damage = 4 toughness = 6 }
		hills = { damage = 4 }
	}

	counters = {
		heavy_infantry = 1
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium 
					has_title = title:e_roman_empire
					top_liege = {  
				        OR = {
					        has_title = title:e_byzantium
					        has_title = title:e_roman_empire
				        }
			        }
				}
			}
			culture = { 
				AND = {
					OR = {
						this = culture:greek
				        this = culture:arberian 
				        this = culture:gothic 
				        this = culture:pontic
				        this = culture:tsakonian
						this = culture:roman
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
					NOT = {
						has_innovation_flag = bulg_army
					}
				}
			}
		}
	}

	buy_cost = { gold = skirmisher_recruitment_cost }
	low_maintenance_cost = { gold = skirmisher_low_maint_cost }
	high_maintenance_cost = { gold = skirmisher_high_maint_cost }
	
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_skirmishers }
	icon = byz_chonsarioi
}

byz_toxotai = {
	type = archers
	
	damage = 24
	toughness = 10
	pursuit = 0
	screen = 0
	
	terrain_bonus = {
		hills = { damage = 10 toughness = 4 }
		forest = { toughness = 4 screen = 4 }
		taiga = { toughness = 4 screen = 4 }
	}

	counters = {
		skirmishers = 1
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium 
					has_title = title:e_roman_empire
					top_liege = {  
				        OR = {
					        has_title = title:e_byzantium
					        has_title = title:e_roman_empire
				        }
			        }
				}
			}
			culture = { 
				AND = {
					OR = {
						this = culture:greek
				        this = culture:arberian 
				        this = culture:gothic 
				        this = culture:pontic
				        this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
					NOT = {
						has_innovation_flag = bulg_army
					}
				}
			}
		}
	}

	buy_cost = { gold = bowmen_recruitment_cost }
	low_maintenance_cost = { gold = bowmen_low_maint_cost }
	high_maintenance_cost = { gold = bowmen_high_maint_cost }
	
	
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_archers }
	icon = bowmen
}

byz_ippoakritai = {
	type = light_cavalry
	
	damage = 26
	toughness = 15
	pursuit = 40
	screen = 25
	
	terrain_bonus = {
		plains = { damage = 15 }
		drylands = { damage = 15 }
		mountains = { damage = -10 pursuit = -20 }
		desert_mountains = { damage = -15 pursuit = -20 }
		wetlands = { damage = -15 toughness = -10 pursuit = -40 screen = -25 }
	}
	
	counters = {
		archers = 1
		heavy_infantry = 0.2
	}

	winter_bonus = {
		harsh_winter = { damage = -5 toughness = -2 }
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium 
					has_title = title:e_roman_empire
					top_liege = {  
				        OR = {
					        has_title = title:e_byzantium
					        has_title = title:e_roman_empire
				        }
			        }
				}
			}
			culture = { 
				AND = {
					OR = {
						this = culture:greek
				        this = culture:arberian 
				        this = culture:gothic 
				        this = culture:pontic
				        this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
					NOT = {
						has_innovation_flag = bulg_army
					}
				}
			}
		}
	}

	buy_cost = { gold = ippoakritai_recruitment_cost }
	low_maintenance_cost = { gold = ippoakritai_low_maint_cost }
	high_maintenance_cost = { gold = ippoakritai_high_maint_cost }
	
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_light_cavalry }
	icon = byz_ippoakritai
}

byz_kontaratoi = {
	type = heavy_infantry
	
	damage = 28
	toughness = 23
	pursuit = 0
	screen = 15
	
	counters = {
		light_cavalry = 1
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium 
					has_title = title:e_roman_empire
					top_liege = {  
				        OR = {
					        has_title = title:e_byzantium
					        has_title = title:e_roman_empire
				        }
			        }
				}
			}
			culture = { 
				AND = {
					OR = {
						this = culture:greek
				        this = culture:arberian 
				        this = culture:gothic 
				        this = culture:pontic
				        this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
					NOT = {
						has_innovation_flag = bulg_army
					}
				}
			}
		}
	}
	
	buy_cost = { gold = kontaratoi_recruitment_cost }
	low_maintenance_cost = { gold = kontaratoi_low_maint_cost }
	high_maintenance_cost = { gold = kontaratoi_high_maint_cost }
	
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_heavy_infantry }
	icon = byz_kontaratoi
}

byz_clivanophoroi = {
	type = heavy_cavalry
	
	damage = 105
	toughness = 39
	pursuit = 15
	screen = 0
	
	terrain_bonus = {
		plains = { damage = 30 }
		drylands = { damage = 30 }
		hills = { damage = -20 }
		mountains = { damage = -75 }
		desert_mountains = { damage = -75 }
		wetlands = { damage = -75 toughness = -10 pursuit = -15 }
	}

	era_bonus = {
		culture_era_high_medieval = {
			damage = 15
			toughness = 4
		}
		culture_era_late_medieval = {
			damage = 24
			toughness = 6
		}
	}

	counters = {
		archers = 1
	}

	winter_bonus = {
		normal_winter = { damage = -10 toughness = -5 }
		harsh_winter = { damage = -20 toughness = -10 }
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium 
					has_title = title:e_roman_empire
					top_liege = {  
				        OR = {
					        has_title = title:e_byzantium
					        has_title = title:e_roman_empire
				        }
			        }
				}
			}
			culture = { 
				AND = {
					OR = {
						this = culture:greek
				        this = culture:arberian 
				        this = culture:gothic 
				        this = culture:pontic
				        this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
					NOT = {
						has_innovation_flag = bulg_army
					}
				}
			}
		}
	}

	buy_cost = { gold = clivanophoroi_recruitment_cost }
	low_maintenance_cost = { gold = clivanophoroi_low_maint_cost }
	high_maintenance_cost = { gold = clivanophoroi_high_maint_cost }
	
	stack = 50
	ai_quality = { value = CRA_culture_ai_weight_heavy_cavalry }
	icon = byz_clivanophoroi
}

byz_optimatoi = {
	type = heavy_infantry
	
	damage = 40
	toughness = 32
	pursuit = 15
	screen = 29
	
	counters = {
		pikemen = 1
		heavy_infantry = 0.4
		light_cavalry = 0.2
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium 
					has_title = title:e_roman_empire
					top_liege = {  
				        OR = {
					        has_title = title:e_byzantium
					        has_title = title:e_roman_empire
				        }
			        }
				}
			}
			culture = { 
				AND = {
					OR = {
						this = culture:greek
				        this = culture:arberian 
				        this = culture:gothic 
				        this = culture:pontic
				        this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = tagmata_army
					NOT = {
						has_innovation_flag = bulg_army
					}
				}
			}
		}
	}
	
	buy_cost = { gold = optimatoi_recruitment_cost }
	low_maintenance_cost = { gold = optimatoi_low_maint_cost }
	high_maintenance_cost = { gold = optimatoi_high_maint_cost }
	
	max_sub_regiments = 5
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = byz_optimatoi
}

################################################################
################################################################

####### Phase Two: "Pronoia"
########### Imperial Army

byz_peltast = {
	type = skirmishers

	damage = 18
	toughness = 14
	pursuit = 10
	screen = 10

	terrain_bonus = {
		forest = { damage = 4 toughness = 6 }
		taiga = { damage = 4 toughness = 6 }
	}

	counters = {
		heavy_infantry = 1
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = pronoian_army
				}
			}
		}
	}

	buy_cost = { gold = akritai_recruitment_cost }
	low_maintenance_cost = { gold = akritai_low_maint_cost }
	high_maintenance_cost = { gold = akritai_high_maint_cost }

	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_skirmishers }
	icon = peltast
}

byz_koursores = {
	type = light_cavalry

	damage = 32
	toughness = 31
	pursuit = 25
	screen = 40

	terrain_bonus = {
		plains = { damage = 15 }
		drylands = { damage = 15 }
		hills = { damage = -10 }
		mountains = { damage = -20 pursuit = -20 }
		desert_mountains = { damage = -25 pursuit = -20 }
		wetlands = { damage = -25 toughness = -10 pursuit = -25 screen = -40 }
	}

	counters = {
		archers = 1
		heavy_infantry = 0.2
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = pronoian_army
				}
			}
		}
	}

	buy_cost = { gold = koursores_recruitment_cost }
	low_maintenance_cost = { gold = koursores_low_maint_cost }
	high_maintenance_cost = { gold = koursores_high_maint_cost }

	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_light_cavalry }
	icon = byz_koursores
}

byz_pelekyphoroi = {
	type = heavy_infantry
	
	damage = 46
	toughness = 41
	pursuit = 0
	screen = 25
	
	terrain_bonus = {
		farmlands = { damage = 6 toughness = 4 }
		plains = { damage = 6 toughness = 4 }
		hills = { damage = 6 toughness = 4 }
		desert = { damage = -8 toughness = -6 pursuit = -15 }
		desert_mountains = { toughness = -4 pursuit = -10 }
	}

	counters = {
		pikemen = 1
		heavy_infantry = 0.4
		heavy_cavalry  = 0.7
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = varangoi_army
					has_innovation_flag = pronoian_army
				}
			}
		}
	}
	
	buy_cost = { gold = pelekyphoroi_recruitment_cost }
	low_maintenance_cost = { gold = pelekyphoroi_low_maint_cost }
	high_maintenance_cost = { gold = pelekyphoroi_high_maint_cost }
	
	max_sub_regiments = 8
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = byz_pelekyphoroi
}

byz_archon = {
	type = heavy_cavalry
	
	damage = 130
	toughness = 51
	pursuit = 18
	screen = 25
	
	terrain_bonus = {
		plains = { damage = 30 }
		drylands = { damage = 30 }
		hills = { damage = -15 }
		mountains = { damage = -60 }
		desert_mountains = { damage = -80 toughness = -10 pursuit = -18 }
		desert = { damage = -50 toughness = -5 pursuit = -10 }
		wetlands = { damage = -100 toughness = -20 pursuit = -18 screen = -25 }
	}

	era_bonus = {
		culture_era_high_medieval = {
			damage = 15
			toughness = 4
		}
		culture_era_late_medieval = {
			damage = 24
			toughness = 6
		}
	}

	counters = {
		heavy_infantry = 1
	}

	winter_bonus = {
		normal_winter = { damage = -15 toughness = -5 }
		harsh_winter = { damage = -30 toughness = -10 }
	}
	
	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = pronoian_army
				}
			}
		}
	}

	buy_cost = { gold = archon_recruitment_cost }
	low_maintenance_cost = { gold = archon_low_maint_cost }
	high_maintenance_cost = { gold = archon_high_maint_cost }
	
	max_sub_regiments = 8
	stack = 50
	ai_quality = { value = @cultural_maa_extra_extra_ai_score }
	icon = byz_archon
}

byz_turkopouloi = {
	type = archer_cavalry
	
	damage = 45
	toughness = 29
	pursuit = 47
	screen = 30
	
	terrain_bonus = {
		plains = { damage = 20 }
		drylands = { damage = 20 }
		wetlands = { damage = -30 pursuit = -35 screen = -25 }
		mountains = { damage = -30 pursuit = -35 }
		desert_mountains = { damage = -30 pursuit = -35 }
	}

	counters = {
		skirmishers = 1
		archers = 0.3
		heavy_infantry = 0.7
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = pronoian_army
				}
			}
		}
	}

	buy_cost = { gold = turkopouloi_recruitment_cost }
	low_maintenance_cost = { gold = turkopouloi_low_maint_cost }
	high_maintenance_cost = { gold = turkopouloi_high_maint_cost }
	
	max_sub_regiments = 8
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = byz_turkopouloi
}

byz_latinikon = {
	type = heavy_cavalry
	
	damage = 115
	toughness = 41
	pursuit = 30
	screen = 0
	
	terrain_bonus = {
		plains = { damage = 15 }
		drylands = { damage = 10 }
		hills = { damage = -20 }
		mountains = { damage = -35 pursuit = -15 }
		desert_mountains = { damage = -35 toughness = -8 pursuit = -15 }
		wetlands = { damage = -35 toughness = -10 pursuit = -30 }
	}

	era_bonus = {
		culture_era_late_medieval = {
			damage = 24
			toughness = 6
		}
	}

	counters = {
		archers = 1
		skirmishers = 0.5
		light_cavalry = 0.5
	}

	winter_bonus = {
		normal_winter = { damage = -10 toughness = -5 }
		harsh_winter = { damage = -20 toughness = -10 }
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = pronoian_army
				}
			}
			current_year >= 1089
		}
	}

	buy_cost = { gold = latinikon_recruitment_cost }
	low_maintenance_cost = { gold = latinikon_low_maint_cost }
	high_maintenance_cost = { gold = latinikon_high_maint_cost }
	
	max_sub_regiments = 6
	stack = 50
	ai_quality = { value = CRA_culture_ai_weight_heavy_cavalry }
	icon = byz_latinikon
}

########### Provincial Army

byz_akontistai = {
	type = skirmishers

	damage = 13
	toughness = 16
	pursuit = 10
	screen = 19

	terrain_bonus = {
		forest = { damage = 4 toughness = 6 }
		taiga = { damage = 4 toughness = 6 }
	}

	counters = {
		heavy_infantry = 1
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			top_liege = {  
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = pronoian_army
				}
			}
		}
	}

	buy_cost = { gold = skirmisher_recruitment_cost }
	low_maintenance_cost = { gold = skirmisher_low_maint_cost }
	high_maintenance_cost = { gold = skirmisher_high_maint_cost }

	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_skirmishers }
	icon = byz_akontistai
}

byz_mourta = {
	type = archers

	damage = 28
	toughness = 20
	pursuit = 0
	screen = 10

	terrain_bonus = {
		hills = { damage = 12 toughness = 4 }
		forest = { toughness = 4 screen = 4 }
		taiga = { toughness = 4 screen = 4 }
	}

	counters = {
		skirmishers = 1
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
				top_liege = {  
				    OR = {
					    has_title = title:e_byzantium
					    has_title = title:e_roman_empire
				    }
			    }
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = pronoian_army
				}
			}
		}
	}

	buy_cost = { gold = mourta_recruitment_cost }
	low_maintenance_cost = { gold = mourta_low_maint_cost }
	high_maintenance_cost = { gold = mourta_high_maint_cost }

	max_sub_regiments = 8
	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_archers }
	icon = byz_mourta
}

byz_stratiotai = {
	type = light_cavalry

	damage = 28
	toughness = 25
	pursuit = 35
	screen = 15

	terrain_bonus = {
		plains = { damage = 15 }
		drylands = { damage = 15 }
		hills = { damage = -10 }
		mountains = { damage = -20 pursuit = -20 }
		desert_mountains = { damage = -25 pursuit = -30 }
		wetlands = { damage = -25 toughness = -10 pursuit = -35 screen = -15 }
	}

	counters = {
		archers = 1
		skirmishers = 0.2
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			top_liege = {  
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = pronoian_army
				}
			}
		}
	}

	buy_cost = { gold = prokousatores_recruitment_cost }
	low_maintenance_cost = { gold = prokousatores_low_maint_cost }
	high_maintenance_cost = { gold = prokousatores_high_maint_cost }

	stack = 100
	ai_quality = { value = CRA_culture_ai_weight_light_cavalry }
	icon = byz_stratiotai
}

byz_kontop = {
	type = heavy_infantry
	
	damage = 35
	toughness = 29
	pursuit = 0
	screen = 20
	
	counters = {
		pikemen = 1
		light_cavalry = 0.8
		camel_cavalry = 0.2
	}

	can_recruit = {
		AND = {
			OR = {
				has_title = title:e_byzantium
				has_title = title:e_roman_empire
				top_liege = {  
				    OR = {
					    has_title = title:e_byzantium
					    has_title = title:e_roman_empire
				    }
			    }
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = pronoian_army
				}
			}
		}
	}
	
	buy_cost = { gold = skoutatoi_recruitment_cost }
	low_maintenance_cost = { gold = skoutatoi_low_maint_cost }
	high_maintenance_cost = { gold = skoutatoi_high_maint_cost }
	
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = byz_kontop
}

byz_pronoiarii = {
	type = heavy_cavalry
	
	damage = 115
	toughness = 39
	pursuit = 28
	screen = 0
	
	terrain_bonus = {
		plains = { damage = 30 }
		drylands = { damage = 30 }
		hills = { damage = -20 }
		mountains = { damage = -35 }
		desert_mountains = { damage = -35 }
		wetlands = { damage = -55 toughness = -10 pursuit = -28 }
	}

	era_bonus = {
		culture_era_late_medieval = {
			damage = 24
			toughness = 6
		}
	}

	counters = {
		archers = 1
		light_cavalry = 0.3
	}

	winter_bonus = {
		normal_winter = { damage = -5 toughness = -5 }
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			top_liege = {  
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = pronoian_army
				}
			}
		}
	}

	buy_cost = { gold = pronoiarii_recruitment_cost }
	low_maintenance_cost = { gold = pronoiarii_low_maint_cost }
	high_maintenance_cost = { gold = pronoiarii_high_maint_cost }
	
	max_sub_regiments = 20
	stack = 50
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = byz_pronoiarii
}

byz_skythikoi = {
	type = archer_cavalry
	
	damage = 39
	toughness = 23
	pursuit = 45
	screen = 20
	
	terrain_bonus = {
		plains = { damage = 20 }
		drylands = { damage = 20 }
		wetlands = { damage = -30 pursuit = -35 screen = -20 }
		mountains = { damage = -30 pursuit = -35 }
		desert_mountains = { damage = -30 pursuit = -45 }
	}

	counters = {
		skirmishers = 1
		heavy_infantry = 1
	}

	can_recruit = {
		AND = {
			NOT = { 
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			top_liege = {  
				OR = {
					has_title = title:e_byzantium
					has_title = title:e_roman_empire
				}
			}
			culture = {
				AND = {
					OR = {
						has_cultural_pillar = heritage_byzantine
						has_cultural_pillar = heritage_latin
					}
					OR = {
						this = culture:greek
						this = culture:arberian
						this = culture:gothic
						this = culture:pontic
						this = culture:tsakonian
						this = culture:roman 
						any_parent_culture_or_above = {
							this = culture:greek
						}
					}
					has_innovation_flag = pronoian_army
				}
			}
		}
	}

	buy_cost = { gold = ippotoxotai_recruitment_cost }
	low_maintenance_cost = { gold = ippotoxotai_low_maint_cost }
	high_maintenance_cost = { gold = ippotoxotai_high_maint_cost }
	
	max_sub_regiments = 8
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = byz_skythikoi
}

#byz_doryphoroi = {
	#type = archer_cavalry

	#damage = 28
	#toughness = 27
	#pursuit = 30
	#screen = 25

	#terrain_bonus = {
		#plains = { damage = 15 }
		#drylands = { damage = 15 }
		#jungle = { damage = -20 pursuit = -20 }
		#wetlands = { damage = -25 pursuit = -30 }
		#mountains = { damage = -25 pursuit = -30 }
		#desert_mountains = { damage = -25 pursuit = -30 }
	#}

	#counters = {
		#skirmishers = 1
		#heavy_infantry = 1
	#}

	#can_recruit = {
		#culture = { has_cultural_innovation = innovation_Byz_army }
	#}

	#buy_cost = { gold = horse_archers_recruitment_cost }
	#low_maintenance_cost = { gold = horse_archers_low_maint_cost }
	#high_maintenance_cost = { gold = horse_archers_high_maint_cost }

	#stack = 100
	#ai_quality = { value = @cultural_maa_extra_ai_score }
	#icon = doryphoroi
#}