﻿#handgonners = { # Vanilla added them to base lmao
#	type = archers
#	
#	damage = 50
#	toughness = 20
#	pursuit = 0
#	screen = 0
#	
#	
#	can_recruit = {
#		culture = { has_cultural_parameter = unlock_maa_handgonners }
#	}
#
#	terrain_bonus = {
#		hills = { damage = 10 }
#		plains = { toughness = -8 }
#		drylands = { toughness = -8 }
#		desert = { toughness = -8 }
#	}
#
#	counters = {
#		heavy_infantry = 1
#		heavy_cavalry = 1
#		archer_cavalry = 0.5
#	}
#
#	buy_cost = { gold = crossbowmen_recruitment_cost }
#	low_maintenance_cost = { gold = crossbowmen_low_maint_cost }
#	high_maintenance_cost = { gold = crossbowmen_high_maint_cost }
#	provision_cost = @provisions_cost_infantry_moderate
#
#	holy_order_fallback = yes
#
#	stack = 100
#	ai_quality = {
#		value = counter_synergy_ai_weight_archers
#	}
#	icon = handgonners
#}

household_cavalry = {
	type = heavy_cavalry
	
	damage = 125
	toughness = 40
	pursuit = 20
	screen = 10
	
	terrain_bonus = {
		plains = { damage = 30 }
		drylands = { damage = 30 }
		hills = { damage = -10 }
		mountains = { damage = -50 }
		desert_mountains = { damage = -50 }
		arctic = { damage = -10 }
		wetlands = { damage = -80 toughness = -15 pursuit = -20 }
		flooded_forests = { damage = -80 toughness = -15 pursuit = -20 }
	}

	counters = {
		archers = 1
		heavy_infantry = 1
	}

	winter_bonus = {
		normal_winter = { damage = -15 toughness = -5 }
		harsh_winter = { damage = -30 toughness = -10 }
	}
	
	can_recruit = {
		culture = { has_cultural_parameter = unlock_maa_household_cavalry }
	}

	buy_cost = { gold = cataphract_recruitment_cost }
	low_maintenance_cost = { gold = cataphract_low_maint_cost }
	high_maintenance_cost = { gold = cataphract_high_maint_cost }
	
	stack = 50
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = heavy_cavalry
}

household_guards = {
	type = gunpowder
	
	damage = 45
	toughness = 15
	pursuit = 0
	screen = 10
	
	
	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_maa_household_guard }
	}

	terrain_bonus = {
		hills = { damage = 10 }
		plains = { toughness = -8 }
		drylands = { toughness = -8 }
		desert = { toughness = -8 }
	}

	counters = {
		heavy_infantry = 1
		heavy_cavalry = 1
		archer_cavalry = 0.5
	}

	buy_cost = { gold = huscarls_recruitment_cost }
	low_maintenance_cost = { gold = huscarls_low_maint_cost }
	high_maintenance_cost = { gold = huscarls_high_maint_cost }
	provision_cost = @provisions_cost_infantry_moderate

	holy_order_fallback = yes

	ai_quality = {
		value = counter_synergy_ai_weight_gunpowder
	}

	stack = 100
	
	icon = handgonne
}	

kuhjung = { #Copy pasted Conrois, need to think of how to make them unique later
	type = heavy_cavalry

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

	terrain_bonus = {
		plains = { damage = 30 }
		drylands = { damage = 30 }
		farmlands = { damage = 30 }
		hills = { damage = -20 }
		mountains = { damage = -75 }
		desert_mountains = { damage = -75 }
		wetlands = { damage = -75 toughness = -10 pursuit = -10 }
		jungle = { damage = -75 toughness = -10 pursuit = -10 }
	}

	counters = {
		archers = 1
		light_cavalry = 1
	}

	can_recruit = {
		valid_for_maa_trigger = { PARAMETER = unlock_maa_kuhjung }
	}

	winter_bonus = {
		normal_winter = { damage = -15 toughness = -5 }
		harsh_winter = { damage = -25 toughness = -10 }
	}

	buy_cost = { gold = conrois_recruitment_cost }
	low_maintenance_cost = { gold = conrois_low_maint_cost }
	high_maintenance_cost = { gold = conrois_high_maint_cost }
	provision_cost = @provisions_cost_cavalry_cheap

	stack = 50
	ai_quality = { value = @[cultural_maa_extra_ai_score + 35 ] }
	icon = conrois
}