﻿# standard costs
@maa_buy_cost = 150
@maa_low_maintenance_cost = 1.0
@maa_high_maintenance_cost = 5.0
@cultural_maa_extra_ai_score = 80 # Equivalent to having 8 extra regiments beyond what the code scoring would indicate (see NEGATIVE_SCORE_PER_EXISTING_REGIMENT)

# 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

landsknecht = {
	type = pikemen
	
	damage = 30
	toughness = 24
	pursuit = 0
	screen = 0
	
	terrain_bonus = {
		mountains = { damage = 5 toughness = 12 }
		desert_mountains = { damage = 5 toughness = 12 }
		hills = { damage = 3 toughness = 8 }
	}

	counters = {
		pikemen = 0.5
		peasant_militia = 1
		light_cavalry = 2
		heavy_cavalry = 2
	}

	buy_cost = { gold = landsknecht_recruitment_cost }
	low_maintenance_cost = { gold = landsknecht_low_maint_cost }
	high_maintenance_cost = { gold = landsknecht_high_maint_cost }
	provision_cost = @provisions_cost_infantry_cheap
	
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = 0s_landsknechts
}

longbowmen = {
	type = archers
	can_recruit = {
		valid_for_maa_trigger = { PARAMETER = unlock_maa_longbowmen }
	}
	
	damage = 20
	toughness = 8
	pursuit = 0
	screen = 0
	
	terrain_bonus = {
		hills = { damage = 12 toughness = 4 }
	}

	counters = {
		skirmishers = 1
		heavy_cavalry = 1
	}

	buy_cost = { gold = longbowmen_recruitment_cost }
	low_maintenance_cost = { gold = longbowmen_low_maint_cost }
	high_maintenance_cost = { gold = longbowmen_high_maint_cost }
	provision_cost = @provisions_cost_infantry_moderate
	
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = 0s_longbowmen
}

goedendag = {
	type = skirmishers
	
	damage = 13
	toughness = 18
	pursuit = 0
	screen = 16
	
	counters = {
		heavy_infantry = 1
		heavy_cavalry = 1
	}

	buy_cost = { gold = goedendag_recruitment_cost }
	low_maintenance_cost = { gold = goedendag_low_maint_cost }
	high_maintenance_cost = { gold = goedendag_high_maint_cost }
	provision_cost = @provisions_cost_infantry_cheap
	
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = 0s_goedendag
}

gendarme = {
	type = heavy_cavalry
	
	damage = 125
	toughness = 40
	pursuit = 20
	screen = 10
	
	terrain_bonus = {
		plains = { damage = 30 }
		drylands = { damage = 30 }
		hills = { damage = -10 }
		jungle = { damage = -25 }
		mountains = { damage = -50 }
		desert_mountains = { damage = -50 }
		wetlands = { damage = -75 }
	}

	counters = {
		archers = 1
		gunpowder = 1
	}

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

	buy_cost = { gold = gendarme_recruitment_cost }
	low_maintenance_cost = { gold = gendarme_low_maint_cost }
	high_maintenance_cost = { gold = gendarme_high_maint_cost }
	provision_cost = @provisions_cost_cavalry_expensive
	
	stack = 50
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = 0s_gendarme
}

chasseur = {
	type = light_cavalry
	
	damage = 40
	toughness = 15
	pursuit = 40
	screen = 15
	
	terrain_bonus = {
		plains = { damage = 10 }
		drylands = { damage = 10 }
		desert = { damage = 10 }
		hills = { damage = -5 }
		mountains = { damage = -25 }
		desert_mountains = { damage = -25 }
		wetlands = { damage = -30 toughness = -10 pursuit = -25 screen = -15 }
	}

	counters = {
		archers = 1
		gunpowder = 1
	}

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

	buy_cost = { gold = chasseur_recruitment_cost }
	low_maintenance_cost = { gold = chasseur_low_maint_cost }
	high_maintenance_cost = { gold = chasseur_high_maint_cost }
	provision_cost = @provisions_cost_cavalry_moderate
	
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = 0s_chasseur
}

picchieri = {
	type = pikemen
	
	damage = 40
	toughness = 24
	pursuit = 0
	screen = 0
	
	terrain_bonus = {
		mountains = { toughness = 12 }
		desert_mountains = { toughness = 12 }
		hills = { toughness = 10 }
	}

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

	buy_cost = { gold = picchieri_recruitment_cost }
	low_maintenance_cost = { gold = picchieri_low_maint_cost }
	high_maintenance_cost = { gold = picchieri_high_maint_cost }
	provision_cost = @provisions_cost_infantry_cheap
	
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = 0s_picchieri
}

caballero = {
	type = light_cavalry
	
	damage = 22
	toughness = 16
	pursuit = 30
	screen = 50
	
	terrain_bonus = {
		hills = { damage = 15 toughness = 10 }
		plains = { damage = 10 }
		drylands = { damage = 10 }
		mountains = { damage = -8 pursuit = -10 }
		desert_mountains = { damage = -12 pursuit = -20 }
		wetlands = { damage = -15 toughness = -10 pursuit = -20 screen = -20 }
	}

	counters = {
		archers = 1
		gunpowder = 1
	}

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

	buy_cost = { gold = caballero_recruitment_cost }
	low_maintenance_cost = { gold = caballero_low_maint_cost }
	high_maintenance_cost = { gold = caballero_high_maint_cost }
	provision_cost = @provisions_cost_cavalry_cheap
	
	stack = 100
	ai_quality = { value = @[cultural_maa_extra_ai_score + 20] }
	icon = 0s_caballero
}

hobelar = {
	type = light_cavalry
	
	damage = 22
	toughness = 15
	pursuit = 50
	screen = 30
	
	terrain_bonus = {
		forest = { damage = 15 }
		hills = { damage = 10 }
		mountains = { damage = -10 pursuit = -30 }
		desert_mountains = { damage = -15 pursuit = -30 }
		wetlands = { damage = -10 pursuit = -20 screen = -15 }
	}

	counters = {
		archers = 1
		gunpowder = 1
	}

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

	buy_cost = { gold = hobelar_recruitment_cost }
	low_maintenance_cost = { gold = hobelar_low_maint_cost }
	high_maintenance_cost = { gold = hobelar_high_maint_cost }
	provision_cost = @provisions_cost_cavalry_cheap
	
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = 0s_hobelars
}

schiltron = {
	type = pikemen
	
	damage = 36
	toughness = 28
	pursuit = 0
	screen = 0
	
	terrain_bonus = {
		mountains = { toughness = 12 }
		desert_mountains = { toughness = 12 }
		hills = { toughness = 8 }
		plains = { damage = 8 }
	}

	counters = {
		light_cavalry = 1
		heavy_cavalry = 1
	}

	buy_cost = { gold = schiltron_recruitment_cost }
	low_maintenance_cost = { gold = schiltron_low_maint_cost }
	high_maintenance_cost = { gold = schiltron_high_maint_cost }
	provision_cost = @provisions_cost_infantry_moderate
	
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = 0s_schiltron
}

mulaththamun = { #Murabit Cavalry
	type = light_cavalry
	
	damage = 22
	toughness = 15
	pursuit = 30
	screen = 40
	
	terrain_bonus = {
		drylands = { damage = 10 toughness = 5 screen = 10 pursuit = 5 }
		desert = { damage = 10 toughness = 5 screen = 20 pursuit = 10 }
		plains = { damage = 10 toughness = 3 screen = 5 pursuit = 5 }
		oasis = { damage = 10 }
		
		mountains = { damage = -8 pursuit = -10 }
		desert_mountains = { damage = -12 pursuit = -20 }
		wetlands = { damage = -15 toughness = -10 pursuit = -20 screen = -20
		}
	}

	counters = {
		archers = 1
		gunpowder = 1
	}

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

	can_recruit = {
		valid_for_maa_trigger = { PARAMETER = unlock_maa_mulaththamun }
	}

	buy_cost = { gold = mulaththamun_recruitment_cost }
	low_maintenance_cost = { gold = mulaththamun_low_maint_cost }
	high_maintenance_cost = { gold = mulaththamun_high_maint_cost }
	provision_cost = @provisions_cost_cavalry_cheap
	
	stack = 100
	ai_quality = { value = @[cultural_maa_extra_ai_score + 20] }
	icon = 0s_mulathanum
}

paiks = { #Indian Footmen - carrying bows but also swords and spears.
	type = archers
	
	damage = 28
	toughness = 16
	pursuit = 10
	screen = 10
	
	terrain_bonus = {
		jungle = { damage = 15 toughness = 15 pursuit = 10 screen = 10 }
		forest = { damage = 15 pursuit = 5 screen = 5 }
		hills = { damage = 10 toughness = 10 }
	}

	counters = {
		elephant_cavalry = 1
	}

	buy_cost = { gold = paiks_recruitment_cost }
	low_maintenance_cost = { gold = paiks_low_maint_cost }
	high_maintenance_cost = { gold = paiks_high_maint_cost }
	provision_cost = @provisions_cost_infantry_moderate
	
	stack = 100
	ai_quality = { value = @[cultural_maa_extra_ai_score - 40] }

	icon = paiks
}

druzhina = {
	type = heavy_infantry
	
	damage = 40
	toughness = 30
	pursuit = 0
	screen = 30
	
	counters = {
		pikemen = 1
		peasant_militia = 2
	}

	can_recruit = {
		valid_for_maa_trigger = { PARAMETER = unlock_maa_druzhina }
		NOT = {
			culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban }
		}
	}
	
	buy_cost = { gold = druzhina_recruitment_cost }
	low_maintenance_cost = { gold = druzhina_low_maint_cost }
	high_maintenance_cost = { gold = druzhina_high_maint_cost }
	provision_cost = @provisions_cost_infantry_moderate
	
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = 0s_druzhina
}

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

	counters = {
		archers = 1
		gunpowder = 1
	}

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

	can_recruit = {
		valid_for_maa_trigger = { PARAMETER = unlock_maa_hussar }
	}

	buy_cost = { gold = hussar_recruitment_cost }
	low_maintenance_cost = { gold = hussar_low_maint_cost }
	high_maintenance_cost = { gold = hussar_high_maint_cost }
	provision_cost = @provisions_cost_cavalry_cheap
	
	stack = 100
	ai_quality = { value = @[cultural_maa_extra_ai_score + 10] }
	icon = 0s_hussar
}

zbrojnosh = {
	type = heavy_infantry
	
	damage = 34
	toughness = 20
	pursuit = 0
	screen = 10

	terrain_bonus = {
		hills = { damage = 8 toughness = 5 }
		mountains = { damage = 6 }
		forest = { damage = 6 }
		wetlands = { damage = -10 pursuit = -10 }
	}

	counters = {
		pikemen = 1
		peasant_militia = 2
		archers = 1
	}
	
	can_recruit = {
		valid_for_maa_trigger = { PARAMETER = unlock_maa_zbrojnosh }
		NOT = {
			culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban }
		}
	}
	
	buy_cost = { gold = zbrojnosh_recruitment_cost }
	low_maintenance_cost = { gold = zbrojnosh_low_maint_cost }
	high_maintenance_cost = { gold = zbrojnosh_high_maint_cost }
	provision_cost = @provisions_cost_infantry_expensive
	
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = 0s_zbrojnosh
}

praetorian = {
	type = heavy_infantry
	
	damage = 60
	toughness = 30
	pursuit = 0
	screen = 20
	
	counters = {
		pikemen = 1
		peasant_militia = 2
	}
	
	buy_cost = { gold = praetorian_recruitment_cost }
	low_maintenance_cost = { gold = praetorian_low_maint_cost }
	high_maintenance_cost = { gold = praetorian_high_maint_cost }
	provision_cost = @provisions_cost_infantry_bankrupting
	
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = 0s_palatini
}

metsanvartija = {
	type = archers
	
	damage = 30
	toughness = 14
	pursuit = 10
	screen = 10
	
	terrain_bonus = {
		forest = { damage = 10 toughness = 4 }
		taiga = { damage = 10 toughness = 4 }
	}

	counters = {
		skirmishers = 1
	}
	
	winter_bonus = {
		normal_winter = { toughness = 4 screen = 8 }
		harsh_winter = { toughness = 4 screen = 8 }
	}

	can_recruit = {
		valid_for_maa_trigger = { PARAMETER = unlock_maa_metsanvartija }
	}

	buy_cost = { gold = metsanvartija_recruitment_cost }
	low_maintenance_cost = { gold = metsanvartija_low_maint_cost }
	high_maintenance_cost = { gold = metsanvartija_high_maint_cost }
	provision_cost = @provisions_cost_infantry_cheap
	
	stack = 100
	ai_quality = { value = @cultural_maa_extra_ai_score }
	icon = metsanvartija
}

handpicked_faithful = {
	type = heavy_infantry

	damage = 38
	toughness = 28
	pursuit = 5
	screen = 5

	can_recruit = {
		domicile ?= { has_domicile_parameter = camp_unlocks_handpicked_faithful_maa_type }
		NOT = {
			culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban }
		}
	}

	terrain_bonus = {
		hills = { damage = 6 toughness = 4 }
		forest = { damage = 6 toughness = 4 }
		jungle = { damage = 6 toughness = 4 }
	}

	counters = {
		pikemen = 1
		peasant_militia = 2
		heavy_cavalry = 1
	}

	buy_cost = { gold = handpicked_faithful_recruitment_cost }
	low_maintenance_cost = { gold = handpicked_faithful_low_maint_cost }
	high_maintenance_cost = { gold = handpicked_faithful_high_maint_cost }
	provision_cost = @provisions_cost_infantry_moderate

	stack = 100
	ai_quality = {
		value = @[cultural_maa_extra_ai_score + 50]
		add = counter_synergy_ai_weight_heavy_infantry
	}
	illustration = {
		trigger = {
			should_use_asian_maa_graphics = yes
		}

		reference = handpicked_faithful_asia
	}

	illustration = {
		reference = handpicked_faithful
	}
}


