armored_spearhead = {
    track = armor
    name = SUBDOCTRINE_ARMORED_SPEARHEAD
    description = SUBDOCTRINE_ARMORED_SPEARHEAD_DESC
    icon = GFX_doctrine_armored_spearhead_medium

    xp_cost = 100
    xp_type = army

    available = {
        always = yes
    }
    visible = {
        has_dlc = "La Resistance"
    }

    ai_will_do = {

        base = 1
        modifier = {
            factor = 25
            original_tag = GER
        }
        modifier = {
            factor = 0.5
            is_major = no
        }
    }

    # EFFECTS
    enable_tactic = tactic_breakthrough

    rewards = {
        force_concentration = {
        #1
            category_tanks= {
                max_organisation = 2
                default_morale = 0.2 #RT56RPMITAKA changed from 0.05
            }
        }
        armored_breakthrough_exploits = {
        #2
            category_all_armor = {
                breakthrough = 0.1
            }
        }
        local_reserves = {
        #3
            armored_car = {
                default_morale = 0.1
                max_organisation = 7
            }
            light_armor = {
#                default_morale = 0.1 #RT56RPMITAKA removed this so light tanks are not giga buffed from the change to all tanks
                max_organisation = 3
            }
            category_self_propelled_anti_air_regimental_support = {	#RT56RPMITAKA vanilla change		
                max_organisation = 5
                air_attack = 0.05
			}
        }
        tactical_reconnaissance = {
        #4
            category_all_armor = {
                breakthrough = 0.1
            }
        }
        assault_detachments = {
        #5
            armored_car = {
                default_morale = 0.2
                max_organisation = 3
                breakthrough = 0.2
            }
             category_tanks= {
                max_organisation = 3
                breakthrough = 0.2
            }
        }
    }
}

armored_spearhead_no_lar = {
    track = armor
    name = SUBDOCTRINE_ARMORED_SPEARHEAD
    description = SUBDOCTRINE_ARMORED_SPEARHEAD_DESC
    icon = GFX_doctrine_armored_spearhead_medium

    xp_cost = 100
    xp_type = army

    available = {
        always = yes
    }
    visible = {
        NOT = {
            has_dlc = "La Resistance"
        }
    }

    ai_will_do = {

        base = 1
        modifier = {
            factor = 25
            original_tag = GER
        }
        modifier = {
            factor = 0.5
            is_major = no
        }
    }

    # EFFECTS
    enable_tactic = tactic_breakthrough

    rewards = {
        force_concentration = {
        #1
            category_tanks= {
                max_organisation = 2
                default_morale = 0.05
            }
        }
        armored_breakthrough_exploits = {
        #2
            category_all_armor = {
                breakthrough = 0.1
            }
        }
        local_reserves = {
        #3
            recon = {
                max_organisation = 10
            }

            light_armor = {
                default_morale = 0.1
                max_organisation = 3
            }
        }
        tactical_reconnaissance = {
        #4
            category_all_armor = {
                breakthrough = 0.1
            }
        }
        assault_detachments = {
        #5
            
             category_tanks= {
                max_organisation = 3
                breakthrough = 0.2
            }
        }
    }
}

armored_infantry_support = {
    track = armor
    name = SUBDOCTRINE_ARMORED_INFANTRY_SUPPORT
    description = SUBDOCTRINE_ARMORED_INFANTRY_SUPPORT_DESC
    icon = GFX_doctrine_armored_infantry_support_medium

    xp_cost = 100
    xp_type = army

    available = {
        always = yes
    }

    ai_will_do = {

        base = 1
        modifier = {
            factor = 25
            OR = {
               original_tag = ENG
               original_tag = FRA
            }
        }
        modifier = {
            factor = 0.5
            is_major = no
        }
    }

    # EFFECTS
    enable_tactic = tactic_blitz
    effect = {
        add_tech_bonus = {
            bonus = 1
            uses = 1
            category = cat_heavy_armor
            name = SUBDOCTRINE_ARMORED_INFANTRY_SUPPORT
        }
    }

    #TODO jack look if you can make a script effect for production bonuses

    rewards = {
        mobile_reserves = {
        #1
            medium_armor = {
                breakthrough = 0.05
                soft_attack = 0.1
            }
            heavy_armor = {
                breakthrough = 0.05
                soft_attack = 0.1
            }
        }

        armored_cohorts = {
        #2
            medium_armor = {
                max_organisation = 5
            }
            heavy_armor = {
                max_organisation = 5
            }
            category_tank_destroyer_regimental_support = {	#RT56RPMITAKA vanilla change	
                max_organisation = 5
			}
        }

        maintenance_routines = {
        #3
            armored_engineer = { #RT56RPMITAKA replaced armored_maitenance with armored_engineer
                battalion_mult = {
                    category = category_all_armor
                    max_strength = 3.0 #RT56RPMITAKA changed from 0.15
                    add = yes
                }
            }
        }

        fuel_rationing = {
        #4
            heavy_armor = {
                supply_consumption = -0.08
            }
        }

        mobile_armored_strongpoints = {
        #5
#            category_all_infantry = { #RT56RPMITAKA
#                breakthrough = 0.05
#            }
            category_vehicle_infantry = { #RT56RPMITAKA
                breakthrough = 0.05
            }
            heavy_armor = {
                breakthrough = 0.1
            }
            heavy_sp_anti_air_support = { #RT56RPMITAKA vanilla change
				air_attack = 0.05
			}
        }
    }
}

streamlined_deployment = {
    track = armor
    name = SUBDOCTRINE_STREAMLINED_DEPLOYMENT
    description = SUBDOCTRINE_STREAMLINED_DEPLOYMENT_DESC
    icon = GFX_doctrine_streamlined_deployment_medium

    xp_cost = 100
    xp_type = army

    available = {
        always = yes
    }

        ai_will_do = {

        base = 1
        modifier = {
            factor = 25
            OR = {
                original_tag = SOV 
                original_tag = CHI 
                original_tag = PRC 
            }
        }

    }

    category_all_armor = {
        soft_attack = 0.1
        breakthrough = 0.1
    }


    rewards = {
        flexible_armored_battalions = {

            unit_medium_armor_design_cost_factor = -0.5
            unit_light_armor_design_cost_factor  = -0.5
            light_tank_recon = {
                battalion_mult = {
                    category = category_all_armor
                    max_organisation = 3 #RT56RPMITAKA changed from 2
                    add = yes
                }
            }

        }
        mechanized_wave = {
            mechanized = {
                max_organisation = 5
                default_morale = 0.1
            }
            category_all_armor = {
                default_morale = 0.05
            }
        }
        tank_desant = {
            armored_signal = {
                battalion_mult = {
                    category = category_light_infantry
                    maximum_speed = 0.05
                }
            }
            light_tank_recon = {
                battalion_mult = {
                    category = category_light_infantry
                    maximum_speed = 0.05
                }
            }
        }
        full_front_deployment = {
            category_all_armor = {
                reliability = 0.05
                supply_consumption = -0.02
            }

        }
        continuous_offensives = {
            category_all_armor = {
                default_morale = 0.05
                max_organisation = 3
                breakthrough = 0.1 #RT56RPMITAKA vanilla change may get changed
            }
        }
    }


}

mobile_defense = {
    track = armor
    name = SUBDOCTRINE_MOBILE_DEFENSE
    description = SUBDOCTRINE_MOBILE_DEFENSE_DESC
    icon = GFX_doctrine_mobile_defense_medium

    xp_cost = 100
    xp_type = army

    available = {
        always = yes
    }

        ai_will_do = {

        base = 1
        modifier = {
            factor = 25
            OR = {
                original_tag = USA
                original_tag = FIN
            }
        }

        modifier = {
            factor = 0.5
            is_major = no
        }

    }

    armored_engineer = {
        battalion_mult = {
            category = category_all_armor
            entrenchment = 0.02
            add = yes
        }
    }
    category_all_armor = {
        defense = 0.1
    }

    rewards = {

        mechanized_offensive = {
            mechanized = {
                defense = 0.1
                soft_attack = 0.1
            }
        }

        advance_under_fire = {
            light_armor = {
                breakthrough = 0.1
                default_morale = 0.2
            }
            medium_armor = {
                breakthrough = 0.1
                default_morale = 0.1
            }
        }

        attached_support = {
            assault_engineer = {
                max_organisation = 10
            }
            armored_engineer = {
                max_organisation = 10
            }
            armored_signal = {
                max_organisation = 10
            }
            category_self_propelled_anti_air_regimental_support = {	#RT56RPMITAKA vanilla change		 
                max_organisation = 10
			}
        }

        combined_anti_armor = {
            anti_tank = {
                battalion_mult = {
                    category = category_all_armor
                    hard_attack = 0.05
                    ap_attack = 0.05

                }
            }
            category_tank_destroyer_regimental_support = { #RT56RPMITAKA vanilla change		
                max_organisation = 10 #RT56RPMITAKA vanilla change, changed from 5
#                hard_attack = 0.05 #RT56RPMITAKA vanilla change
#				ap_attack = 0.15 #RT56RPMITAKA vanilla change
			}
        }

        tank_on_tank_engagement = {
            category_all_armor = { #RT56RPMITAKA, category change from vanilla
                hard_attack = 0.1
                soft_attack = 0.1
                ap_attack = 0.05
            }
#            category_all_armor = { #RT56RPMITAKA
#                hard_attack = 0.1
#                soft_attack = 0.1
#                ap_attack = 0.05
#            }
        }    
    }
}

armored_cavalry = {
    track = armor
    name = SUBDOCTRINE_ARMORED_CAVALRY
    description = SUBDOCTRINE_ARMORED_CAVALRY_DESC
    icon = GFX_doctrine_armored_cavalry_medium

    xp_cost = 100
    xp_type = army

    mastery = { #RT56RPMITAKA
        categories = {
            category_vehicle_infantry
        }
        sub_units = {
            armored_car
            light_armor
        }
    }

    available = {
        always = yes
    }
    visible = {
       AND = {
            has_dlc = "No Compromise, No Surrender"
            has_dlc = "La Resistance"
        }
    }

    ai_will_do = {

        base = 1
        modifier = {
            factor = 25
            OR = {
                original_tag = ITA 
                original_tag = JAP 
            }
        }

    }

    armored_car = {
        max_organisation = 10 #RT56RPMITAKA changed from 5
        defense = 0.1
    }
    mechanized =  {
        max_organisation = 5
        defense = 0.05
    }
    # EFFECTS
    rewards = {
        cruiser_tanks = {
            light_armor = {
                maximum_speed = 0.1
                max_organisation = 5
                breakthrough = 0.05
            }
        }
        quick_response_force = {
            motorized_military_police = {
                    battalion_mult = {
                        category = category_vehicle_infantry
                        suppression_factor = 0.05
                    }
    
            }
            armored_car = {
                suppression_factor = 0.2
            }
            motorized = { #RT56RPMITAKA
                combat_width = -0.2
            }
            mechanized = { #RT56RPMITAKA
                combat_width = -0.2
            }
            amphibious_mechanized = { #RT56RPMITAKA
                combat_width = -0.2
            }
        }
        speed_as_armour = {
            light_armor = {
#                maximum_speed = 0.05
                maximum_speed = 0.1 #RT56RPMITAKA
                breakthrough = 0.05
            }
            armored_car = {
                maximum_speed = 0.05
                breakthrough = 0.15 #RT56RPMITAKA changed from 0.10
#                soft_attack = 0.1
                soft_attack = 0.15 #RT56RPMITAKA
    
            }
            mechanized = {
                maximum_speed = 0.05
                breakthrough = 0.05
            }
        }
        fighting_reconnaissance = {
            armored_car_recon = {
                max_organisation = 3
                 soft_attack = 0.05
            }
            light_tank_recon = {
                max_organisation = 2
                soft_attack = 0.05
            }
            anti_tank_battery = { #RT56RPMITAKA vanilla change
                ap_attack = 0.10
            }
            mot_fire_support = { #RT56RPMITAKA vanilla change
                max_organisation = 5
                soft_attack = 0.05
                default_morale = 0.1
            }
            armored_car = { #RT56RPMITAKA
                max_strength = 0.5
            }
        }
        sustained_deployments = {
            armored_car = {
                max_organisation = 5
                soft_attack = 0.05
                default_morale = 0.25 #RT56RPMITAKA changed from 0.20
            }
            light_armor = {
                max_organisation = 5
                soft_attack = 0.1 #RT56RPMITAKA changed from 0.05
                hard_attack = 0.1
#                default_morale = 0.15
                default_morale = 0.20 #RT56RPMITAKA
            }
            mechanized = {
                max_organisation = 5
                soft_attack = 0.05
                default_morale = 0.1 
            }
            motorized = {
                max_organisation = 5
                soft_attack = 0.05
                default_morale = 0.1 
            }
        }
    }
}

armored_cavalry_no_lar = {
    track = armor
    name = SUBDOCTRINE_ARMORED_CAVALRY
    description = SUBDOCTRINE_ARMORED_CAVALRY_DESC
    icon = GFX_doctrine_armored_cavalry_medium

    xp_cost = 100
    xp_type = army

    available = {
        always = yes
    }
    visible = {
        has_dlc = "No Compromise, No Surrender"
        NOT = {
            has_dlc = "La Resistance"
        }
    }

    ai_will_do = {

        base = 1
        modifier = {
            factor = 25
            OR = {
                original_tag = ITA 
                original_tag = JAP 
            }
        }

    }

    motorized = {
        max_organisation = 5
        defense = 0.1
    }
    mechanized =  {
        max_organisation = 5
        defense = 0.05
    }
    # EFFECTS
    rewards = {
        cruiser_tanks = {
            light_armor = {
                maximum_speed = 0.1
                max_organisation = 5
                breakthrough = 0.05
            }
        }
        quick_response_force = {
            motorized_military_police = {
                    battalion_mult = {
                        category = category_vehicle_infantry
                        suppression_factor = 0.05
                    }
    
            }
            
        }
        speed_as_armour = {
            light_armor = {
                maximum_speed = 0.05
                breakthrough = 0.05
            }
            motorized = {
                maximum_speed = 0.05
    
            }
            mechanized = {
                maximum_speed = 0.05
                breakthrough = 0.05
            }
        }
        fighting_reconnaissance = {
            recon = {
                max_organisation = 3
                 soft_attack = 0.05
            }
            light_tank_recon = {
                max_organisation = 2
                soft_attack = 0.05
            }
            anti_tank_battery = { #RT56RPMITAKA vanilla change
                max_organisation = 2
                ap_attack = 0.05
            }
        }
        sustained_deployments = {
            light_armor = {
                max_organisation = 5
                soft_attack = 0.05
                hard_attack = 0.1
                default_morale = 0.15
            }
            mechanized = {
                max_organisation = 5
                soft_attack = 0.05
                default_morale = 0.1 
            }
            motorized = {
                max_organisation = 5
                soft_attack = 0.05
                default_morale = 0.1 
            }
            mot_fire_support = { #RT56RPMITAKA vanilla change
                max_organisation = 5
                soft_attack = 0.05
                default_morale = 0.1
            }
        }
    }
}

tank_destroyer_force = {
     track = armor
    name = SUBDOCTRINE_TANK_DESTROYER_FORCE
    description = SUBDOCTRINE_TANK_DESTROYER_FORCE_DESC
    icon = GFX_doctrine_tank_destroyer_force_medium

    xp_cost = 100
    xp_type = army

    visible = {
        has_dlc = "No Compromise, No Surrender"
    }

    ai_will_do = {

        base = 0

    }  

    category_all_armor = {
        defense = 0.1
        hard_attack = 0.1
        ap_attack = 0.1
    }

    rewards = {

        mobile_anti_tank = {
            mot_anti_tank_brigade = {
                max_organisation = 8
                hard_attack = 0.1
                ap_attack = 0.1
            }

        }
        committed_operational_units = {
            assault_engineer = {
                battalion_mult = {
                    category = category_tank_destroyers
                    reliability = 0.02
#                    soft_attack = 0.05 #RT56RPMITAKA
                    hard_attack = 0.1
                }
            }
        }
        redeployment_priority = {
            category_tank_destroyers = {
                supply_consumption = -0.02
                default_morale = 0.1
            }
        }

        independent_counterattacks = {
            category_tank_destroyers = {
                max_organisation = 3 #RT56RPMITAKA changed from 6
#                initiative = 0.01 #RT56RPMITAKA
            }
        }

        selfsufficient_battalion = {
            armored_signal = {
                battalion_mult = {
                    category = category_tank_destroyers
                    hard_attack = 0.05 #RT56RPMITAKA changed from 0.1
#                    ap_attack = 0.1 #RT56RPMITAKA vanilla changed it to 0.1 from 0.2

                }
            }
            category_tank_destroyer_regimental_support = { #RT56RPMITAKA vanilla change		
                max_organisation = 5
			    hard_attack = 0.1 #RT56RPMITAKA
			    ap_attack = 0.1 #RT56RPMITAKA
		    }
        }
    }
}
