@cultural_maa_extra_ai_score_1 = -30 # value = minus 3 regiments 
@cultural_maa_extra_ai_score_2 = 10
@cultural_maa_extra_ai_score_3 = 40
@cultural_maa_extra_ai_score_4 = 100

martial_artist_cultivator = {
    type = skirmishers
    
    damage = 35
    toughness = 35
    pursuit = 5
    screen = 5
        
    can_recruit = {
        cultivation_martial_arts_can_recruit_cultivator = yes
    }
    
    terrain_bonus = {
        farmlands = { damage = 8 toughness = 4 }
        plains = { damage = 8 toughness = 4 }
        terraced_hills = { damage = 10 toughness = 8 }
        hills = { damage = 10 toughness = 8 }
    }
    
    counters = {
        pikemen = 1
        peasant_militia = 3
        archers = 4
        heavy_infantry = 1
        skirmishers = 2
        light_cavalry = 1
    }
    
    buy_cost = { prestige = 30 piety = 50 }
    low_maintenance_cost = { piety = 0.2 }
    high_maintenance_cost = { piety = 0.5 }
    provision_cost = 0
    
    holy_order_fallback = no
    allowed_in_hired_troops = no
    
    stack = 100
    ai_quality = { value = @cultural_maa_extra_ai_score_1 }

    icon = martial_artist_cultivator
}

martial_artist_army_1 = {
    type = skirmishers
    
    damage = 45
    toughness = 45
    pursuit = 5
    screen = 5
        
    can_recruit = {
        cultivation_martial_arts_can_recruit_martial_artist = yes
    }
    
    terrain_bonus = {
        farmlands = { damage = 8 toughness = 4 }
        plains = { damage = 8 toughness = 4 }
        terraced_hills = { damage = 10 toughness = 8 }
        hills = { damage = 10 toughness = 8 }
    }
    
    counters = {
        pikemen = 1
        peasant_militia = 3
        archers = 4
        heavy_infantry = 1
        skirmishers = 2
        light_cavalry = 1
    }
    
    buy_cost = { piety = 100 }
    low_maintenance_cost = { piety = 0.4 }
    high_maintenance_cost = { piety = 1 }
    provision_cost = 0
    
    holy_order_fallback = no
    allowed_in_hired_troops = no
    
    stack = 100
    ai_quality = { value = @cultural_maa_extra_ai_score_1 }

    icon = martial_artist_army_1
}

martial_artist_army_2 = {
    type = heavy_infantry
    
    damage = 50
    toughness = 50
    pursuit = 10
    screen = 10
        
    can_recruit = {
        OR = { 
			has_trait = cultivation_qi_refining
			has_trait = cultivation_qi_building
			has_trait = cultivation_core_formation
			has_trait = cultivation_nascent_soul
			has_trait = cultivation_heavenly_being
			has_trait = cultivation_four_axis
			has_trait = cultivation_integration
			has_trait = cultivation_star_shattering
			has_trait = cultivation_sacred_vessel
			has_trait = cultivation_entering_nirvana
			has_trait = cultivation_true_immortal
        }    
        cultivation_martial_arts_can_recruit_martial_artist = yes
    }
    
    terrain_bonus = {
        farmlands = { damage = 8 toughness = 4 }
        plains = { damage = 8 toughness = 4 }
        terraced_hills = { damage = 10 toughness = 8 }
        hills = { damage = 10 toughness = 8 }
    }
    
    counters = {
        pikemen = 1
        peasant_militia = 3
        archers = 4
        heavy_infantry = 1
        skirmishers = 2
        light_cavalry = 1
    }
    
    buy_cost = { piety = 250 }
    low_maintenance_cost = { piety = 0.5 }
    high_maintenance_cost = { piety = 1.0 }
    provision_cost = 0
    
    holy_order_fallback = no
    allowed_in_hired_troops = no
    
    stack = 100
    ai_quality = { value = @cultural_maa_extra_ai_score_1 }

    icon = martial_artist_army_2
}

martial_artist_army_3 = {
    type = heavy_infantry
    
    damage = 60
    toughness = 60
    pursuit = 15
    screen = 15
        
    can_recruit = {
        OR = { 
			has_trait = cultivation_qi_building
			has_trait = cultivation_core_formation
			has_trait = cultivation_nascent_soul
			has_trait = cultivation_heavenly_being
			has_trait = cultivation_four_axis
			has_trait = cultivation_integration
			has_trait = cultivation_star_shattering
			has_trait = cultivation_sacred_vessel
			has_trait = cultivation_entering_nirvana
			has_trait = cultivation_true_immortal
        }    
        cultivation_martial_arts_can_recruit_martial_artist = yes
    }
    
    terrain_bonus = {
        farmlands = { damage = 8 toughness = 4 }
        plains = { damage = 8 toughness = 4 }
        terraced_hills = { damage = 10 toughness = 8 }
        hills = { damage = 10 toughness = 8 }
    }
    
    counters = {
        pikemen = 1
        peasant_militia = 3
        archers = 4
        heavy_infantry = 1
        skirmishers = 2
        light_cavalry = 1
    }
    
    buy_cost = { piety = 350 }
    low_maintenance_cost = { piety = 0.7 }
    high_maintenance_cost = { piety = 2 }
    provision_cost = 0
    
    holy_order_fallback = no
    allowed_in_hired_troops = no
    
    stack = 100
    ai_quality = { value = @cultural_maa_extra_ai_score_1 }

    icon = martial_artist_army_3
}

zombie_army_1 = {
    type = peasant_militia
    
    damage = 15
    toughness = 25
    pursuit = 20
    screen = 20
    siege_value = 0.01
    siege_tier = 1
    
    can_recruit = {
        cultivation_martial_arts_can_recruit_zombie = yes
    }
    
    terrain_bonus = {
        farmlands = { damage = 8 toughness = 4 }
        plains = { damage = 8 toughness = 4 }
        terraced_hills = { damage = 12 toughness = 8 }
        hills = { damage = 12 toughness = 8 }
    }
    
    counters = {
        pikemen = 0.75
        peasant_militia = 3.5
        heavy_infantry = 1
        skirmishers = 0.5
        light_cavalry = 1
        heavy_cavalry = 0.25
    }
    
    buy_cost = { piety = 150 }
    low_maintenance_cost = { piety = 0 }
    high_maintenance_cost = { piety = 1 }
    provision_cost = 0
    
    holy_order_fallback = no
    allowed_in_hired_troops = no
    
    stack = 200
    ai_quality = { value = @cultural_maa_extra_ai_score_2 }

    icon = zombie_army_1
}

zombie_army_2 = {
    type = peasant_militia
    
    damage = 25
    toughness = 45
    pursuit = 20
    screen = 20
    siege_value = 0.06
    siege_tier = 2
    
    can_recruit = {
        OR = {
			has_trait = cultivation_qi_building
			has_trait = cultivation_core_formation
			has_trait = cultivation_nascent_soul
			has_trait = cultivation_heavenly_being
			has_trait = cultivation_four_axis
			has_trait = cultivation_integration
			has_trait = cultivation_star_shattering
			has_trait = cultivation_sacred_vessel
			has_trait = cultivation_entering_nirvana
			has_trait = cultivation_true_immortal
        }    
        cultivation_martial_arts_can_recruit_zombie = yes
    }
    
    terrain_bonus = {
        farmlands = { damage = 8 toughness = 4 }
        plains = { damage = 8 toughness = 4 }
        terraced_hills = { damage = 12 toughness = 8 }
        hills = { damage = 12 toughness = 8 }
    }
    
    counters = {
        pikemen = 0.75
        peasant_militia = 3.5
        heavy_infantry = 1
        skirmishers = 0.5
        light_cavalry = 1
        heavy_cavalry = 0.25
    }
    
    buy_cost = { piety = 200 }
    low_maintenance_cost = { piety = 0 }
    high_maintenance_cost = { piety = 2 }
    provision_cost = 0
    
    holy_order_fallback = no
    allowed_in_hired_troops = no
    
    stack = 150
    ai_quality = { value = @cultural_maa_extra_ai_score_3 }

    icon = zombie_army_2
}

zombie_army_3 = {
    type = skirmishers
    
    damage = 30
    toughness = 60
    pursuit = 30
    screen = 30
    siege_value = 0.1
    siege_tier = 3
    
    can_recruit = {
        OR = {
			has_trait = cultivation_core_formation
			has_trait = cultivation_nascent_soul
			has_trait = cultivation_heavenly_being
			has_trait = cultivation_four_axis
			has_trait = cultivation_integration
			has_trait = cultivation_star_shattering
			has_trait = cultivation_sacred_vessel
			has_trait = cultivation_entering_nirvana
			has_trait = cultivation_true_immortal
        }    
        cultivation_martial_arts_can_recruit_zombie = yes
    }
    
    terrain_bonus = {
        farmlands = { damage = 8 toughness = 4 }
        plains = { damage = 8 toughness = 4 }
        terraced_hills = { damage = 12 toughness = 8 }
        hills = { damage = 12 toughness = 8 }
    }
    
    counters = {
        pikemen = 0.75
        peasant_militia = 3.5
        heavy_infantry = 1
        skirmishers = 0.5
        light_cavalry = 1
        heavy_cavalry = 0.25
    }
    
    buy_cost = { gold = 50 piety = 300 }
    low_maintenance_cost = { piety = 0.1 }
    high_maintenance_cost = { piety = 3 }
    provision_cost = 0
    
    holy_order_fallback = no
    allowed_in_hired_troops = no
    
    stack = 100
    ai_quality = { value = @cultural_maa_extra_ai_score_4 }

    icon = zombie_army_3
}

zombie_army_4 = {
    type = heavy_infantry
    
    damage = 1000
    toughness = 400
    pursuit = 35
    screen = 35
    siege_value = 0.2
    siege_tier = 4
    
    can_recruit = {
        OR = {    
			has_trait = cultivation_nascent_soul
			has_trait = cultivation_heavenly_being
			has_trait = cultivation_four_axis
			has_trait = cultivation_integration
			has_trait = cultivation_star_shattering
			has_trait = cultivation_sacred_vessel
			has_trait = cultivation_entering_nirvana
			has_trait = cultivation_true_immortal
        }
        cultivation_martial_arts_can_recruit_zombie = yes    
    }    
    terrain_bonus = {
        farmlands = { damage = 8 toughness = 4 }
        plains = { damage = 8 toughness = 4 }
        terraced_hills = { damage = 12 toughness = 8 }
        hills = { damage = 12 toughness = 8 }
    }
    
    counters = {
        pikemen = 0.75
        peasant_militia = 3.5
        heavy_infantry = 1
        skirmishers = 0.5
        light_cavalry = 1
        heavy_cavalry = 0.25
    }
    
    buy_cost = { gold = 100 piety = 500 }
    low_maintenance_cost = { piety = 0.3 }
    high_maintenance_cost = { piety = 3 }
    provision_cost = 0
    
    holy_order_fallback = no
    allowed_in_hired_troops = no
    
    stack = 10
    ai_quality = { value = @cultural_maa_extra_ai_score_4 }

    icon = zombie_army_4
}

zombie_army_5 = {
    type = heavy_infantry
    
    damage = 3200
    toughness = 1500
    pursuit = 24
    screen = 27
    siege_value = 0.4
    
    siege_tier = 4
    
    can_recruit = {
        OR = {    
			has_trait = cultivation_four_axis
			has_trait = cultivation_integration
			has_trait = cultivation_star_shattering
			has_trait = cultivation_sacred_vessel
			has_trait = cultivation_entering_nirvana
			has_trait = cultivation_true_immortal
        }
        cultivation_martial_arts_can_recruit_zombie = yes
    }
    
    terrain_bonus = {
        farmlands = { damage = 8 toughness = 4 }
        plains = { damage = 8 toughness = 4 }
        terraced_hills = { damage = 12 toughness = 8 }
        hills = { damage = 12 toughness = 8 }
    }
    
    counters = {
        pikemen = 0.75
        peasant_militia = 3.5
        heavy_infantry = 1
        skirmishers = 0.5
        light_cavalry = 1
        heavy_cavalry = 0.25
    }
    
    buy_cost = { gold = 200 piety = 750 }
    low_maintenance_cost = { piety = 0.5 }
    high_maintenance_cost = { piety = 4 }
    provision_cost = 0
    
    holy_order_fallback = no
    allowed_in_hired_troops = no
    
    stack = 5
    ai_quality = { value = @cultural_maa_extra_ai_score_4 }

    icon = zombie_army_5
}

immortal_army_1 = {
    type = heavy_infantry
    
    damage = 4000
    toughness = 1000
    pursuit = 100
    screen = 100
    siege_value = 1.0
    
    siege_tier = 1
    
    can_recruit = {
        OR = {    
			has_trait = cultivation_four_axis
			has_trait = cultivation_integration
			has_trait = cultivation_star_shattering
			has_trait = cultivation_sacred_vessel
			has_trait = cultivation_entering_nirvana
			has_trait = cultivation_true_immortal
        }
        cultivation_martial_arts_can_recruit_immortal = yes
    }
    
    terrain_bonus = {
        farmlands = { damage = 8 toughness = 4 }
        plains = { damage = 8 toughness = 4 }
        terraced_hills = { damage = 12 toughness = 8 }
        hills = { damage = 12 toughness = 8 }
    }
    
    counters = {
        pikemen = 4
        peasant_militia = 7
        archers = 8
        heavy_infantry = 4
        skirmishers = 6
        light_cavalry = 5
        heavy_cavalry = 4
    }
    
    buy_cost = { piety = 1000 }
    low_maintenance_cost = { prestige = 0.5 }
    high_maintenance_cost = { prestige = 1 }
    provision_cost = 0
    
    holy_order_fallback = no
    allowed_in_hired_troops = no
    
    stack = 10
    ai_quality = { value = @cultural_maa_extra_ai_score_4 }

    icon = immortal_army_1
}

immortal_army_2 = {
    type = heavy_infantry
    
    damage = 3000
    toughness = 2000
    pursuit = 100
    screen = 100
    siege_value = 1.0
    
    siege_tier = 2
    
    can_recruit = {
        OR = {    
			has_trait = cultivation_four_axis
			has_trait = cultivation_integration
			has_trait = cultivation_star_shattering
			has_trait = cultivation_sacred_vessel
			has_trait = cultivation_entering_nirvana
			has_trait = cultivation_true_immortal
        }
        cultivation_martial_arts_can_recruit_immortal = yes    
    }
    
    terrain_bonus = {
        farmlands = { damage = 8 toughness = 4 }
        plains = { damage = 8 toughness = 4 }
        terraced_hills = { damage = 12 toughness = 8 }
        hills = { damage = 12 toughness = 8 }
    }
    
    counters = {
        pikemen = 2
        peasant_militia = 4
        archers = 4
        heavy_infantry = 2
        skirmishers = 3
        light_cavalry = 3
        heavy_cavalry = 2
    }
    
    buy_cost = { piety = 1500 }
    low_maintenance_cost = { piety = 0.5 }
    high_maintenance_cost = { piety = 1 }
    provision_cost = 0
    
    holy_order_fallback = no
    allowed_in_hired_troops = no
    
    stack = 10
    ai_quality = { value = @cultural_maa_extra_ai_score_4 }

    icon = immortal_army_2
}