﻿# standard costs
@maa_buy_cost = 150
@maa_low_maintenance_cost = 1.0
@maa_high_maintenance_cost = 5.0

# Must be synced between files with the values located at "# Provisions Costs #".
@provisions_cost_infantry_cheap = 3
@provisions_cost_infantry_moderate = 7
@provisions_cost_infantry_expensive = 12
@provisions_cost_infantry_bankrupting = 15

@provisions_cost_cavalry_cheap = 7
@provisions_cost_cavalry_moderate = 15
@provisions_cost_cavalry_expensive = 21
@provisions_cost_cavalry_bankrupting = 30

@provisions_cost_special_cheap = 6
@provisions_cost_special_moderate = 12
@provisions_cost_special_expensive = 18
@provisions_cost_special_bankrupting = 24

light_footmen = {
	type = skirmishers

	damage = 10
	#AGOT Modified
	# toughness = 16
	toughness = 15
	pursuit = 10
	#AGOT Modified
	# screen = 16
	screen = 15

	terrain_bonus = {
		#AGOT Modified/Added
		#forest = { damage = 4 toughness = 6 }
		#taiga = { damage = 4 toughness = 6 }
		#jungle = { damage = 4 toughness = 6 }
		forest = { damage = 4 toughness = 6 }
		taiga = { damage = 4 toughness = 6 }
		cloudforest = { damage = 4 toughness = 6 }
		taiga_bog = { toughness = -5 }
		the_bog = { toughness = -5 screen = -5 }

		majorroad_forest = { damage = 4 toughness = 6 }
		minorroad_forest = { damage = 4 toughness = 6 }
		majorroad_taiga = { damage = 4 toughness = 6 }
		minorroad_taiga = { damage = 4 toughness = 6 }
		majorroad_cloudforest = { damage = 4 toughness = 6 }
		minorroad_cloudforest = { damage = 4 toughness = 6 }
		majorroad_taiga_bog = { toughness = -5 }
		minorroad_taiga_bog = { toughness = -5 }
		majorroad_the_bog = { toughness = -5 screen = -5 }
		minorroad_the_bog = { toughness = -5 screen = -5 }
	}

	counters = {
		heavy_infantry = 1
	}

	can_recruit = {
		NOR = {
			government_has_flag = government_is_nomadic
			government_has_flag = government_is_herder
			#AGOT Added
			government_has_flag = government_is_nw
		}
	}

	should_show_when_unavailable = {
		government_allows = subject_men_at_arms
	}

	buy_cost = { gold = skirmisher_recruitment_cost }
	low_maintenance_cost = { gold = skirmisher_low_maint_cost }
	high_maintenance_cost = { gold = skirmisher_high_maint_cost }
	provision_cost = @provisions_cost_infantry_cheap

	holy_order_fallback = yes

	stack = 150
	ai_quality = { value = culture_ai_weight_skirmishers }

	illustration = {
		trigger = {
			should_use_asian_maa_graphics = yes
		}

		reference = skirmishers_asia
	}

	illustration = {
		trigger = {
			should_use_mena_maa_graphics = yes
		}
		reference = skirmishers_mena
	}

	illustration = {
		reference = skirmishers
	}
}

bowmen = {
	type = archers

	damage = 25
	toughness = 10
	pursuit = 0
	screen = 0

	terrain_bonus = {
		#AGOT Modified/Added
		#hills = { damage = 10 toughness = 4 }
		#forest = { toughness = 4 screen = 4 }
		#taiga = { toughness = 4 screen = 4 }
		hills = { damage = 10 toughness = 4 }
		forest = { toughness = 4 screen = 4 }
		cloudforest = { toughness = 4 screen = 4 }
		taiga = { toughness = 4 screen = 4 }
		the_bog = { toughness = -10 screen = -10 }

		majorroad_hills = { damage = 10 toughness = 4 }
		minorroad_hills = { damage = 10 toughness = 4 }
		majorroad_forest = { toughness = 4 screen = 4 }
		minorroad_forest = { toughness = 4 screen = 4 }
		majorroad_cloudforest = { toughness = 4 screen = 4 }
		minorroad_cloudforest = { toughness = 4 screen = 4 }
		majorroad_taiga = { toughness = 4 screen = 4 }
		minorroad_taiga = { toughness = 4 screen = 4 }
		majorroad_the_bog = { toughness = -10 screen = -10 }
		minorroad_the_bog = { toughness = -10 screen = -10 }
	}

	counters = {
		pikemen = 1
		skirmishers = 1
	}

	can_recruit = {
		NOR = {
			government_has_flag = government_is_nomadic
			government_has_flag = government_is_herder
			#AGOT Added
			government_has_flag = government_is_nw
		}
	}

	should_show_when_unavailable = {
		government_allows = subject_men_at_arms
	}

	buy_cost = { gold = bowmen_recruitment_cost }
	low_maintenance_cost = { gold = bowmen_low_maint_cost }
	high_maintenance_cost = { gold = bowmen_high_maint_cost }
	provision_cost = @provisions_cost_infantry_moderate

	holy_order_fallback = yes

	stack = 100
	ai_quality = {
		value = culture_ai_weight_archers
		add = counter_synergy_ai_weight_archers
	}

	illustration = {
		trigger = {
			should_use_asian_maa_graphics = yes
		}

		reference = bowmen_asia
	}

	illustration = {
		trigger = {
			should_use_mena_maa_graphics = yes
		}
		reference = bowmen_mena
	}

	illustration = {
		reference = bowmen
	}
}

light_horsemen = {
	type = light_cavalry

	#AGOT Modified
	#damage = 22
	damage = 20
	toughness = 15
	pursuit = 30
	screen = 30

	terrain_bonus = {
		#AGOT Modified/Added
		#plains = { damage = 15 }
		#drylands = { damage = 15 }
		#hills = { damage = -5 }
		#mountains = { damage = -10 pursuit = -20 }
		#desert_mountains = { damage = -15 pursuit = -20 }
		#wetlands = { damage = -15 toughness = -10 pursuit = -30 screen = -30 }
		farmlands = { damage = 15 pursuit = 5 }
		plains = { damage = 15 pursuit = 5 }
		drylands = { damage = 15 }
		hills = { damage = -5 }
		mountains = { damage = -10 pursuit = -20 }
		desert_mountains = { damage = -10 pursuit = -20 }
		glacier = { damage = -10 pursuit = -20 }
		frozen_flats = { pursuit = -5 }
		wetlands = { damage = -5 toughness = -5 pursuit = -5 screen = -5 }
		the_bog = { damage = -15 toughness = -10 pursuit = -30 screen = -30 }

		majorroad_farmlands = { damage = 15 pursuit = 5 }
		minorroad_farmlands = { damage = 15 pursuit = 5 }
		majorroad_plains = { damage = 15 pursuit = 5 }
		minorroad_plains = { damage = 15 pursuit = 5 }
		majorroad_drylands = { damage = 15 }
		minorroad_drylands = { damage = 15 }
		majorroad_hills = { damage = -5 }
		minorroad_hills = { damage = -5 }
		majorroad_mountains = { damage = -10 pursuit = -20 }
		minorroad_mountains = { damage = -10 pursuit = -20 }
		majorroad_desert_mountains = { damage = -10 pursuit = -20 }
		minorroad_desert_mountains = { damage = -10 pursuit = -20 }
		majorroad_glacier = { damage = -10 pursuit = -20 }
		minorroad_glacier = { damage = -10 pursuit = -20 }
		majorroad_frozen_flats = { pursuit = -5 }
		minorroad_frozen_flats = { pursuit = -5 }
		majorroad_wetlands = { damage = -5 toughness = -5 pursuit = -5 screen = -5 }
		minorroad_wetlands = { damage = -5 toughness = -5 pursuit = -5 screen = -5 }
		majorroad_the_bog = { damage = -15 toughness = -10 pursuit = -30 screen = -30 }
		minorroad_the_bog = { damage = -15 toughness = -10 pursuit = -30 screen = -30 }
	}

	counters = {
		#AGOT Modified
		#archers = 1
		archers = 2
		#AGOT Disabled
		# gunpowder = 1
	}

	can_recruit = {
		NOR = {
			government_has_flag = government_is_nomadic
			government_has_flag = government_is_herder
			#AGOT Added
			government_has_flag = government_is_nw
			AND = {
				capital_province ?= {
					geographical_region = world_westeros_beyond_the_wall
				}
				government_has_flag = government_is_tribal
			}
		}
	}

	should_show_when_unavailable = {
		government_allows = subject_men_at_arms
		NOT = { has_access_to_maa = steppe_raiders }
	}

	access_through_subject = {
		NOT = { has_access_to_maa = steppe_raiders }
	}

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

	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 }
	provision_cost = @provisions_cost_cavalry_cheap

	holy_order_fallback = yes

	stack = 100
	ai_quality = {
		value = culture_ai_weight_light_cavalry
		add = counter_synergy_ai_weight_light_cavalry
	}

	illustration = {
		trigger = {
			should_use_asian_maa_graphics = yes
		}

		reference = light_cavalry_asia
	}

	#AGOT Added
	illustration = {
		trigger = {
			should_use_mena_maa_graphics = yes
		}
		reference = light_cav_mena
	}

	illustration = {
		reference = light_cavalry
	}
}

pikemen_unit = {
	type = pikemen

	#AGOT Modified
	# damage = 22
	# toughness = 24
	damage = 20
	toughness = 25
	pursuit = 0
	screen = 0

	terrain_bonus = {
		#AGOT Modified/Added
		#mountains = { toughness = 12 }
		#desert_mountains = { toughness = 12 }
		#hills = { toughness = 8 }
		mountains = { toughness = 12 }
		desert_mountains = { toughness = 12 }
		hills = { toughness = 8 }
		floodplains = { toughness = -5 }
		wetlands = { toughness = -5 screen = -5 }
		taiga_bog = { toughness = -5 }
		the_bog = { toughness = -10 screen = -10 }

		majorroad_mountains = { toughness = 12 }
		minorroad_mountains = { toughness = 12 }
		majorroad_desert_mountains = { toughness = 12 }
		minorroad_desert_mountains = { toughness = 12 }
		majorroad_hills = { toughness = 8 }
		minorroad_hills = { toughness = 8 }
		majorroad_floodplains = { toughness = -5 }
		minorroad_floodplains = { toughness = -5 }
		majorroad_wetlands = { toughness = -5 screen = -5 }
		minorroad_wetlands = { toughness = -5 screen = -5 }
		majorroad_taiga_bog = { toughness = -5 }
		minorroad_taiga_bog = { toughness = -5 }
		majorroad_the_bog = { toughness = -10 screen = -10 }
		minorroad_the_bog = { toughness = -10 screen = -10 }
	}

	counters = {
		light_cavalry = 1
		#AGOT Modified
		#heavy_cavalry = 1
		heavy_cavalry = 2
		camel_cavalry = 1
		elephant_cavalry = 1
	}

	can_recruit = {
		NOR = {
			government_has_flag = government_is_nomadic
			government_has_flag = government_is_herder
			#AGOT Added
			government_has_flag = government_is_nw
		}
	}

	should_show_when_unavailable = {
		government_allows = subject_men_at_arms
	}

	buy_cost = { gold = pikemen_recruitment_cost }
	low_maintenance_cost = { gold = pikemen_low_maint_cost }
	high_maintenance_cost = { gold = pikemen_high_maint_cost }
	#AGOT Modified
	#provision_cost = @provisions_cost_infantry_expensive
	provision_cost = @provisions_cost_infantry_moderate

	holy_order_fallback = yes

	stack = 100
	ai_quality = {
		value = culture_ai_weight_pikemen
		add = counter_synergy_ai_weight_pikemen
	}

	illustration = {
		trigger = {
			should_use_asian_maa_graphics = yes
		}

		reference = pikemen_asia
	}

	#AGOT Added
	illustration = {
		trigger = {
			should_use_mena_maa_graphics = yes
		}
		reference = pikemen_mena
	}

	illustration = {
		reference = pikemen
	}
}

#Tribal Era
armored_footmen = {
	type = heavy_infantry

	#AGOT Modified
	# damage = 32
	# toughness = 22
	damage = 35
	toughness = 25
	pursuit = 0
	screen = 0

	counters = {
		peasant_militia = 2
		#AGOT Added
		pikemen = 1
	}

	#AGOT Added
	terrain_bonus = {
		mountains = { toughness = 8 }
		desert_mountains = { toughness = 8 }
		hills = { toughness = 5 }
		floodplains = { toughness = -5 }
		wetlands = { toughness = -5 screen = -5 }
		taiga_bog = { toughness = -5 }
		the_bog = { toughness = -10 screen = -10 }

		majorroad_mountains = { toughness = 8 }
		minorroad_mountains = { toughness = 8 }
		majorroad_desert_mountains = { toughness = 8 }
		minorroad_desert_mountains = { toughness = 8 }
		majorroad_hills = { toughness = 5 }
		minorroad_hills = { toughness = 5 }
		majorroad_floodplains = { toughness = -5 }
		minorroad_floodplains = { toughness = -5 }
		majorroad_wetlands = { toughness = -5 screen = -5 }
		minorroad_wetlands = { toughness = -5 screen = -5 }
		majorroad_taiga_bog = { toughness = -5 }
		minorroad_taiga_bog = { toughness = -5 }
		majorroad_the_bog = { toughness = -10 screen = -10 }
		minorroad_the_bog = { toughness = -10 screen = -10 }
	}

	can_recruit = {
		culture = {
			#AGOT Modfied
			# has_innovation = innovation_quilted_armor
			has_innovation = innovation_agot_mail
		}
		NOT = {
			culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban }
		}
		NOR = {
			government_has_flag = government_is_nomadic
			government_has_flag = government_is_herder
			#AGOT Added
			government_has_flag = government_is_nw
		}
	}

	should_show_when_unavailable = {
		government_allows = subject_men_at_arms
	}

	buy_cost = { gold = heavy_infantry_recruitment_cost }
	low_maintenance_cost = { gold = heavy_infantry_low_maint_cost }
	high_maintenance_cost = { gold = heavy_infantry_high_maint_cost }
	#AGOT Modified
	#provision_cost = @provisions_cost_infantry_moderate
	provision_cost = @provisions_cost_infantry_expensive

	holy_order_fallback = yes

	stack = 100
	ai_quality = {
		value = culture_ai_weight_heavy_infantry
		add = counter_synergy_ai_weight_heavy_infantry
	}

	illustration = {
		trigger = {
			should_use_asian_maa_graphics = yes
		}

		reference = heavy_infantry_asia
	}

	#AGOT Added
	illustration = {
		trigger = {
			should_use_mena_maa_graphics = yes
		}
		reference = heavy_inf_mena
	}

	illustration = {
		reference = heavy_infantry
	}
}

onager = {
	type = siege_weapon
	fights_in_main_phase = no

	damage = 0
	toughness = 12

	#AGOT Modified
	# siege_tier = 1
	# siege_value = 0.2
	siege_tier = 2
	siege_value = 0.3

	can_recruit = {
		culture = {
			has_innovation = innovation_catapult
			#AGOT Disabled
			# NOR = {
			# 	has_cultural_pillar = heritage_chinese
			# 	has_cultural_pillar = heritage_korean
			# 	has_cultural_pillar = heritage_japonic
			# }
		}
		NOR = {
			government_has_flag = government_is_nomadic
			government_has_flag = government_is_herder
		}
	}

	should_show_when_unavailable = {
		government_allows = subject_men_at_arms
	}

	#AGOT Modified
	# buy_cost = { gold = onager_recruitment_cost }
	# low_maintenance_cost = { gold = onager_low_maint_cost }
	# high_maintenance_cost = { gold = onager_high_maint_cost }
	# provision_cost = @provisions_cost_special_cheap
	buy_cost = { gold = mangonel_recruitment_cost }
	low_maintenance_cost = { gold = mangonel_low_maint_cost }
	high_maintenance_cost = { gold = mangonel_high_maint_cost }
	provision_cost = @provisions_cost_special_moderate

	stack = 10
	allowed_in_hired_troops = no
}

#Medieval Era
armored_horsemen = {
	type = heavy_cavalry

	damage = 100
	toughness = 35
	pursuit = 20
	screen = 0

	terrain_bonus = {
		#AGOT Modified/Added
		#plains = { damage = 30 }
		#drylands = { damage = 30 }
		#hills = { damage = -20 }
		#mountains = { damage = -75 }
		#desert_mountains = { damage = -75 }
		#wetlands = { damage = -75 toughness = -10 pursuit = -10 }
		plains = { damage = 30 pursuit = 5 }
		farmlands = { damage = 30 pursuit = 5 }
		hills = { damage = -20 pursuit = -5 }
		mountains = { damage = -75 pursuit = -10 }
		desert_mountains = { damage = -75 pursuit = -10 }
		glacier = { damage = -75 pursuit = -10 }
		frozen_flats = { pursuit = -10 }
		wetlands = { damage = -45 pursuit = -10 screen = -10 }
		the_bog = { damage = -75 toughness = -20 pursuit = -20 screen = -10 }

		majorroad_plains = { damage = 30 pursuit = 5 }
		minorroad_plains = { damage = 30 pursuit = 5 }
		majorroad_farmlands = { damage = 30 pursuit = 5 }
		minorroad_farmlands = { damage = 30 pursuit = 5 }
		majorroad_mountains = { damage = -75 pursuit = -10 }
		minorroad_mountains = { damage = -75 pursuit = -10 }
		majorroad_hills = { damage = -20 pursuit = -5 }
		minorroad_hills = { damage = -20 pursuit = -5 }
		majorroad_desert_mountains = { damage = -75 pursuit = -10 }
		minorroad_desert_mountains = { damage = -75 pursuit = -10 }
		majorroad_glacier = { damage = -75 pursuit = -10 }
		minorroad_glacier = { damage = -75 pursuit = -10 }
		majorroad_frozen_flats = { damage = -75 pursuit = -10 }
		minorroad_frozen_flats = { damage = -75 pursuit = -10 }
		majorroad_wetlands = { damage = -45 pursuit = -10 screen = -10 }
		minorroad_wetlands = { damage = -45 pursuit = -10 screen = -10 }
		majorroad_the_bog = { damage = -75 toughness = -20 pursuit = -20 screen = -10 }
		minorroad_the_bog = { damage = -75 toughness = -20 pursuit = -20 screen = -10 }
	}

	counters = {
		archers = 1
		#AGOT Disabled
		# gunpowder = 1
		#AGOT Added
	}

	can_recruit = {
		culture = {
			has_innovation = innovation_arched_saddle
		}
		NOR = {
			government_has_flag = government_is_nomadic
			government_has_flag = government_is_herder
			#AGOT Added
			government_has_flag = government_is_nw
		}
		NOT = {
			culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban }
		}
	}

	should_show_when_unavailable = {
		government_allows = subject_men_at_arms
		culture = { has_cultural_era_or_later = culture_era_early_medieval }
		NOT = { has_access_to_maa = nomad_lancers }
	}

	access_through_subject = {
		NOT = { has_access_to_maa = nomad_lancers }
	}

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

	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 }
	provision_cost = @provisions_cost_cavalry_expensive

	stack = 50
	ai_quality = { value = culture_ai_weight_heavy_cavalry }

	illustration = {
		trigger = {
			should_use_asian_maa_graphics = yes
		}

		reference = heavy_cavalry_asia
	}

	#AGOT Added
	illustration = {
		trigger = {
			should_use_mena_maa_graphics = yes
		}
		reference = heavy_cav_mena
	}

	illustration = {
		reference = heavy_cavalry
	}
}

mangonel = {
	type = siege_weapon
	fights_in_main_phase = no

	damage = 0
	toughness = 12

	#AGOT Modified
	# siege_tier = 2
	# siege_value = 0.3
	siege_tier = 3
	siege_value = 0.4

	can_recruit = {
		culture = {
			has_innovation = innovation_mangonel
			#AGOT Disabled
			# NOR = {
			# 	has_cultural_pillar = heritage_chinese
			# 	has_cultural_pillar = heritage_korean
			# 	has_cultural_pillar = heritage_japonic
			# }
		}
		NOR = {
			government_has_flag = government_is_nomadic
			government_has_flag = government_is_herder
		}
	}

	should_show_when_unavailable = {
		government_allows = subject_men_at_arms
		culture = { has_cultural_era_or_later = culture_era_early_medieval }
	}

	#AGOT Modified
	# buy_cost = { gold = mangonel_recruitment_cost }
	# low_maintenance_cost = { gold = mangonel_low_maint_cost }
	# high_maintenance_cost = { gold = mangonel_high_maint_cost }
	# provision_cost = @provisions_cost_special_moderate
	buy_cost = { gold = trebuchet_recruitment_cost }
	low_maintenance_cost = { gold = trebuchet_low_maint_cost }
	high_maintenance_cost = { gold = trebuchet_high_maint_cost }
	provision_cost = @provisions_cost_special_expensive

	stack = 10
	allowed_in_hired_troops = no
}

#High Medieval Era
crossbowmen = {
	type = archers

	#AGOT Modified
	# damage = 42
	# toughness = 18
	damage = 45
	toughness = 20
	pursuit = 0
	screen = 0

	terrain_bonus = {
		#AGOT Modified/Added
		#hills = { damage = 10 }
		#plains = { toughness = -8 }
		#drylands = { toughness = -8 }
		#desert = { toughness = -8 }
		hills = { damage = 8 }
		plains = { toughness = -10 }
		drylands = { toughness = -10 }
		desert = { toughness = -10 }
		the_bog = { toughness = -10 screen = -10 }
		canyon = { toughness = -10 }
		glacier = { toughness = -10 }
		frozen_flats = { toughness = -10 }

		majorroad_hills = { damage = 8 }
		minorroad_hills = { damage = 10 }
		majorroad_plains = { toughness = -10 }
		minorroad_plains = { toughness = -10 }
		majorroad_drylands = { toughness = -10 }
		minorroad_drylands = { toughness = -10 }
		majorroad_desert = { toughness = -10 }
		minorroad_desert = { toughness = -10 }
		majorroad_the_bog = { toughness = -10 screen = -10 }
		minorroad_the_bog = { toughness = -10 screen = -10 }
		majorroad_canyon = { toughness = -10 }
		minorroad_canyon = { toughness = -10 }
		majorroad_glacier = { toughness = -10 }
		minorroad_glacier = { toughness = -10 }
		majorroad_frozen_flats = { toughness = -10 }
		minorroad_frozen_flats = { toughness = -10 }
	}

	counters = {
		heavy_infantry = 1
		heavy_cavalry = 1
		#AGOT Modified
		#archer_cavalry = 0.5
		elephant_cavalry = 1
	}

	can_recruit = {
		culture = {
			has_innovation = innovation_advanced_bowmaking
		}
		NOR = {
			government_has_flag = government_is_nomadic
			government_has_flag = government_is_herder
			#AGOT Added
			government_has_flag = government_is_nw
		}
	}

	should_show_when_unavailable = {
		government_allows = subject_men_at_arms
		culture = { has_cultural_era_or_later = culture_era_high_medieval }
	}

	buy_cost = { gold = crossbowmen_recruitment_cost }
	low_maintenance_cost = { gold = crossbowmen_low_maint_cost }
	high_maintenance_cost = { gold = crossbowmen_high_maint_cost }
	#AGOT Modified
	#provision_cost = @provisions_cost_infantry_moderate
	provision_cost = @provisions_cost_infantry_expensive

	ai_quality = {
		value = culture_ai_weight_crossbowmen
	}

	holy_order_fallback = yes

	stack = 100

	illustration = {
		trigger = {
			should_use_asian_maa_graphics = yes
		}

		reference = crossbowmen_asia
	}

	#AGOT Added
	illustration = {
		trigger = {
			should_use_mena_maa_graphics = yes
		}
		reference = dornish_crossbows
	}

	illustration = {
		reference = crossbowmen
	}
}

trebuchet = {
	type = siege_weapon
	fights_in_main_phase = no

	damage = 0
	toughness = 12

	#AGOT Modified
	# siege_tier = 3
	# siege_value = 0.4
	siege_tier = 4
	siege_value = 0.6

	can_recruit = {
		culture = {
			has_innovation = innovation_trebuchet
			#AGOT Disabled
			# NOR = {
			# 	has_cultural_pillar = heritage_chinese
			# 	has_cultural_pillar = heritage_korean
			# 	has_cultural_pillar = heritage_japonic
			# }
		}
		NOR = {
			government_has_flag = government_is_nomadic
			government_has_flag = government_is_herder
		}
		
	}

	should_show_when_unavailable = {
		government_allows = subject_men_at_arms
		culture = { has_cultural_era_or_later = culture_era_high_medieval }
	}

	#AGOT Modified
	# buy_cost = { gold = trebuchet_recruitment_cost }
	# low_maintenance_cost = { gold = trebuchet_low_maint_cost }
	# high_maintenance_cost = { gold = trebuchet_high_maint_cost }
	# provision_cost = @provisions_cost_special_expensive
	buy_cost = { gold = bombard_recruitment_cost }
	low_maintenance_cost = { gold = bombard_low_maint_cost }
	high_maintenance_cost = { gold = bombard_high_maint_cost }
	provision_cost = @provisions_cost_special_bankrupting

	stack = 10
	allowed_in_hired_troops = no

}

#Late Medieval Era
#AGOT Disabled
# bombard = {
# 	type = siege_weapon
# 	fights_in_main_phase = no

# 	damage = 0
# 	toughness = 12

# 	siege_tier = 4
# 	siege_value = 0.6

# 	can_recruit = {
# 		culture = {
# 			has_cultural_parameter = unlock_late_medieval_gunpowder_units
# 			NOR = {
# 				has_cultural_pillar = heritage_chinese
# 				has_cultural_pillar = heritage_korean
# 				has_cultural_pillar = heritage_japonic
# 			}
# 		}
# 		NOR = {
# 			government_has_flag = government_is_nomadic
# 			government_has_flag = government_is_herder
# 		}
# 	}

# 	should_show_when_unavailable = {
# 		government_allows = subject_men_at_arms
# 		culture = { has_cultural_era_or_later = culture_era_late_medieval }
# 	}

# 	buy_cost = { gold = bombard_recruitment_cost }
# 	low_maintenance_cost = { gold = bombard_low_maint_cost }
# 	high_maintenance_cost = { gold = bombard_high_maint_cost }
# 	provision_cost = @provisions_cost_special_bankrupting

# 	stack = 10
# 	allowed_in_hired_troops = no
# }

#AGOT Disabled
# handgunners = {
# 	type = gunpowder

# 	damage = 52
# 	toughness = 12
# 	pursuit = 0
# 	screen = 5

# 	can_recruit = {
# 		gunpowder_raise_limit_existing_gunpowder_units < gunpowder_raise_limit_existing_gunpowder_buildings	# one powder magazine must be owned to support three handgunner regiments, regardless of maa size
# 		culture = { has_cultural_parameter = unlock_late_medieval_gunpowder_units }
# 	}

# 	terrain_bonus = {
# 		wetlands = { damage = -10 }
# 		floodplains = { damage = -5 }
# 	}

# 	counters = {
# 		heavy_infantry = 1
# 	}

# 	buy_cost = { gold = handgunner_recruitment_cost }
# 	low_maintenance_cost = { gold = handgunner_low_maint_cost }
# 	high_maintenance_cost = { gold = handgunner_high_maint_cost }
# 	provision_cost = @provisions_cost_infantry_moderate

# 	ai_quality = {
# 		value = counter_synergy_ai_weight_gunpowder
# 	}

# 	stack = 100

# 	icon = handgonne

# }

# Special
house_guard = {
	type = heavy_infantry
	can_recruit = {
		dynasty ?= {
			has_dynasty_perk = warfare_legacy_5
		}
		NOT = {
			culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban }
		}
		#AGOT Added
		NOT = { government_has_flag = government_is_nw }
	}

	damage = 40
	#AGOT Modified
	#toughness = 32
	toughness = 30
	pursuit = 0
	#AGOT Modified
	#screen = 24
	screen = 25

	counters = {
		pikemen = 2
		peasant_militia = 4
		archers = 2
	}

	buy_cost = { gold = 50 }
	low_maintenance_cost = { gold = 0 }
	high_maintenance_cost = { gold = 1 }
	provision_cost = @provisions_cost_infantry_expensive

	max_regiments = 1

	stack = 100
	ai_quality = { value = 100 }

	illustration = {
		trigger = {
			should_use_asian_maa_graphics = yes
		}

		reference = heavy_infantry_asia
	}

	#AGOT Added
	illustration = {
		trigger = {
			should_use_mena_maa_graphics = yes
		}
		reference = heavy_inf_mena
	}

	illustration = {
		reference = heavy_infantry
	}
}

pikemen_militia = {
	type = peasant_militia

	damage = 12
	toughness = 16
	pursuit = 10
	screen = 0

	terrain_bonus = {
		mountains = { toughness = 8 }
		desert_mountains = { toughness = 8 }
		hills = { toughness = 4 }
		farmlands = { toughness = 8 }
		floodplains = { toughness = 8 }
		terraced_hills = { toughness = 8 }
	}

	counters = {
		light_cavalry = 1
		heavy_cavalry = 0.5
		camel_cavalry = 1
	}

	special_recruit_only = yes

	buy_cost = { gold = 0 }
	low_maintenance_cost = { gold = 0 }
	high_maintenance_cost = { gold = 0 }
	provision_cost = @provisions_cost_infantry_expensive

	stack = 100
	ai_quality = { value = -100 }

	allowed_in_hired_troops = no
	illustration = {
		trigger = {
			should_use_asian_maa_graphics = yes
		}
		reference = pikemen_militia_asia
	}

	#AGOT Added
	illustration = {
		trigger = {
			should_use_mena_maa_graphics = yes
		}
		reference = militia_mena
	}
	
	illustration = {
		reference = pikemen_militia
	}
}
