#### COMBAT TACTICS ###########################################################
#
# NOTE: tactics must start with "tactic_" in their name to work with techs.
###############################################################################

phases = { # phase = no is the standard phase
	close_combat
	tactical_withdrawal
	seize_bridge
	hold_bridge
}

#####################
### Basic Tactitcs###
#####################

tactic_basic_attack = {

	is_attacker = yes
	trigger = { # combined scope for both country and combatant
		is_attacker = yes
		phase = no
	}
	
	active = yes

	base = { factor = 4 }
	picture = attack
	
	countered_by = tactic_counterattack #You can only be countered by 1 tactic

	attacker = 0.05
}
tactic_basic_defend = {
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = no
	}
	
	active = yes
	
	base = { factor = 4 }
	picture = defend
	
	defender = 0.05
	countered_by = tactic_insurgent_assault
}
tactic_counterattack = { # counters basic attack, assault
	is_attacker = no
	trigger = {
		is_attacker = no
		skill_advantage > 0
		phase = no
	}
	
	active = yes
	
	base = { factor = 4 }
	picture = counterattack
	
	defender = 0.25
}
tactic_assault = { #starts close_combat phase
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
	}
	
	active = yes
	
	base = { factor = 2 } #Revisit ideally this should be more common in urban terrain
	
	picture = assault
	countered_by = tactic_counterattack
	
	phase = close_combat #changes phase to close combat
	
	attacker = 0.25			#attacker gets a bonus to doing damage
}

tactic_breakthrough = { #counters ambush
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
		OR = {
			hardness > 0.5
			skill_advantage > 1
		}
	}
	
	active = no
	
	base = { factor = 4 }
	picture = breakthrough
	
	countered_by = tactic_backhand_blow
	
	attacker_movement_speed = 0.5
	attacker = 0.25
	defender = -0.15
}
tactic_ambush = { #counters shock
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = no
		OR = {
			skill_advantage > 1
			skill > 2
			has_trait = trickster
		}
	}
	
	active = yes
	
	base = { factor = 4 }
	picture = ambush
	countered_by = tactic_breakthrough
	
	attacker = -0.25
}
tactic_backhand_blow = { #counters breakthrough
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = no
		OR = {
			skill > 4
			AND = {
				has_trait = defensive_doctrine
				skill > 3
			}
		}
	}
	
	base = { factor = 4 }
	picture = backhand_blow
	
	attacker_movement_speed = -0.3
	attacker = -0.2
	defender = 0.25
}



#close combat tactics here
tactic_cc_attack = { 
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = close_combat
	}
	
	active = yes
	
	base = { factor = 4 }
	picture = cc_attack
	display_phase = close_combat

	attacker = 0.1			#attacker gets a bonus to doing damage
	defender = 0.05
}
tactic_cc_defend = { 
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = close_combat
	}
	
	active = yes
	
	base = { factor = 4 }
	picture = cc_defend
	display_phase = close_combat

	attacker = 0.05
	defender = 0.1			#defender gets a bonus to doing damage
}
tactic_cc_storm = { 
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = close_combat
	}
	
	active = yes
	
	base = { factor = 2 }
	picture = cc_storm
	display_phase = close_combat

	attacker = 0.2			#attacker gets a bonus to doing damage
	defender = 0.2
}
tactic_cc_local_strong_point = { 
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = close_combat
	}
	
	active = yes
	display_phase = close_combat

	base = { factor = 2 }
	picture = cc_local_strong_point
	
	attacker = -0.2			#attacker gets a penalty to doing damage
}
tactic_cc_withdraw = { #changes phase back to no
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = close_combat
	}
	
	active = yes
	
	base = { factor = 1 }
	picture = cc_withdraw
	display_phase = close_combat

	phase = no #changes phase to no
	
	attacker = -0.05
	defender = -0.05
}

tactic_encirclement = {
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
		frontage_full = yes
		has_reserves = yes
		OR = {
			skill_advantage > 0
			has_trait = panzer_leader
			has_trait = trickster
		}
	}
	
	active = yes
	
	base = { factor = 4 }
	picture = encircle
	countered_by = tactic_tactical_withdrawal

	combat_width = 0.5		#increased combat_width
	attacker = 0.25
	defender = 0.05
}
tactic_delay = {
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = no
	}
	
	active = no
	
	base = { factor = 4 }
	picture = delay
	countered_by = tactic_shock
	
	attacker_movement_speed = -0.25		#
	attacker = -0.25
	defender = -0.15
}
tactic_shock = { #counters delay
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
	}
	
	active = yes
	
	base = { factor = 4 }
	picture = shock
	countered_by = tactic_ambush
	
	defender = -0.25
}
tactic_tactical_withdrawal = { #counters encirclement - starts tactical_withdrawal phase
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = no
		OR = {
			skill_advantage > 0
			has_trait = trickster
		}
	}
	
	active = yes
	
	base = { factor = 4 }
	picture = withdraw
	
	phase = tactical_withdrawal
	
	combat_width = -0.25
	attacker = -0.25
	defender = -0.05
}


#tactical withdrawal tactics
tactic_tw_attack = { 
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = tactical_withdrawal
	}
	
	base = { factor = 4 }
	picture = tw_attack
	display_phase = tactical_withdrawal
	
	combat_width = -0.25	
	attacker = -0.25
	defender = -0.1
}
tactic_tw_defend = { 
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = tactical_withdrawal
	}
	
	base = { factor = 4 }
	picture = tw_defend
	display_phase = tactical_withdrawal
	
	combat_width = -0.25		
	attacker = -0.3
	defender = -0.05
}
tactic_tw_chase = { 
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = tactical_withdrawal
	}
	
	base = { factor = 4 }
	picture = tw_chase
	display_phase = tactical_withdrawal
	
	
	combat_width = -0.25		
	attacker = -0.15
	defender = -0.05
}
tactic_tw_evade = { 
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = tactical_withdrawal
	}
	
	base = { factor = 4 }
	picture = tw_evade
	display_phase = tactical_withdrawal
	
	
	combat_width = -0.25		
	attacker = -0.4
	defender = -0.1
}
tactic_tw_intercept = { #changes phase to no
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = tactical_withdrawal
	}
	
	base = { factor = 4 }
	picture = tw_intercept
	display_phase = tactical_withdrawal
	
	phase = no
		
	attacker = -0.05
	defender = -0.1
}

#Siege bridge phase
tactic_seize_bridge = { 
	is_attacker = yes
	trigger = {
		is_attacker = yes
		has_combat_modifier = river_crossing
		phase = no
		OR = {
			skill > 3
			AND = {
				has_trait = offensive_doctrine
				skill > 2
			}
		}
	}
	
	base = { factor = 2 }
	picture = seize_bridge
	
	phase = seize_bridge
	
	attacker_movement_speed = 0.1
	combat_width = -0.25
	attacker = 0.2
	defender = -0.05
}
tactic_attacker_sb_hold = { 
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = seize_bridge
	}
	
	base = { factor = 4 }
	picture = attacker_sb_hold
	display_phase = seize_bridge
	
	combat_width = -0.25
	attacker = 0.2
}
tactic_attacker_sb_skillful_defence = { 
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = seize_bridge
		skill > 4
	}
	
	base = { factor = 4 }
	picture = attacker_sb_skillful_defence
	display_phase = seize_bridge

	combat_width = -0.25
	attacker = 0.2
	defender = -0.1
}
tactic_defender_sb_assault = { 
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = seize_bridge
	}
	
	base = { factor = 4 }
	picture = defender_sb_assault
	display_phase = seize_bridge

	combat_width = -0.25
	defender = -0.05
}
tactic_defender_sb_reckless_assault = { 
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = seize_bridge
		skill < 3
	}
	
	base = { factor = 4 }
	picture = defender_sb_reckless_assault
	display_phase = seize_bridge

	combat_width = -0.25
	attacker = 0.25
	defender = -0.1
}
tactic_defender_sb_retake_bridge = { 
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = seize_bridge
		OR = {
			skill > 2
			has_trait = trickster
		}
	}
	
	countered_by = tactic_attacker_sb_skillful_defence
	phase = hold_bridge
	
	base = { factor = 4 }
	picture = defender_sb_retake_bridge
	display_phase = seize_bridge

	combat_width = -0.25
	attacker = 0.1
	defender = -0.05
}
tactic_hold_bridge = { 
	is_attacker = no
	trigger = {
		has_combat_modifier = river_crossing
		is_attacker = no
		phase = no
		OR = {
			skill > 2
			has_trait = defensive_doctrine
		}
	}
	
	base = { factor = 2 }
	picture = tactic_hold_bridge
	
	phase = hold_bridge
	
	attacker_movement_speed = 0.1
	combat_width = -0.25
	attacker = 0.2
	defender = -0.05
}

#hold_bridge phase
tactic_attacker_hb_attack = { 
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = hold_bridge
	}
	
	base = { factor = 4 }
	picture = attacker_hb_attack
	display_phase = hold_bridge

	combat_width = -0.25
	attacker = 0.1
}
tactic_attacker_hb_rush = { 
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = hold_bridge
		skill > 4
	}
	
	base = { factor = 4 }
	picture = attacker_hb_rush
	display_phase = hold_bridge

	combat_width = -0.25
	attacker = 0.2
}
tactic_attacker_hb_storm = { 
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = hold_bridge
	}
	
	base = { factor = 2 }
	picture = attacker_hb_storm
	display_phase = hold_bridge

	countered_by = tactic_defender_hb_skillful_defence
	
	phase = seize_bridge
	
	combat_width = -0.25
	attacker = 0.2
	defender = 0.05
}
tactic_defender_hb_hold = { 
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = hold_bridge
		skill < 3
	}
	
	base = { factor = 2 }
	picture = defender_hb_hold
	display_phase = hold_bridge

	combat_width = -0.25
	attacker = 0.2
	defender = -0.1
}
tactic_defender_hb_skillful_defence = { 
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = hold_bridge
		OR = {
			skill > 2
			has_trait = trickster
		}
	}
	
	base = { factor = 2 }
	picture = defender_hb_skillful_defence
	display_phase = hold_bridge
	
	combat_width = -0.25
	attacker = 0.1
	defender = 0.05
}

#################
### Doctrines ###
#################

#Air Land Battle
tactic_blitz = { #phase = no, counter = tactic_elastic_defense
	is_attacker = yes
	trigger = {
		is_attacker = yes
		hardness > 0.5
		phase = no
		OR = {
			skill > 2
			has_trait = panzer_leader
			skill_advantage > 1
		}
	}
	
	active = no
	
	base = { factor = 4 }
	picture = blitz
	countered_by = tactic_elastic_defense
	
	attacker_movement_speed = 0.5
	attacker = 0.15
	defender = -0.15
}

#Grand Battle Plan - can also get massed_artillery in mass armored assult doctrine
tactic_planned_attack = { #phase = no, no counter
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
	}
	
	active = no
	
	base = { factor = 4 }
	picture = tactic_planned_attack
	
	attacker = 0.15 
}

#mass armored assult
tactic_relentless_assault = { #Deep battle attacker tactic
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
	}
	
	active = no
	
	base = { factor = 4 }
	picture = tactic_relentless_assault
	
	attacker_movement_speed = 0.15
	attacker = 0.2
	defender = 0.05	
}
tactic_barrage = { #aka massed artillery, phase = no, no counter
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
	}
	
	active = no
	
	base = { factor = 4 }
	picture = tactic_barrage
	
	attacker = 0.1
	defender = -0.2	
}
	

#Infilitartion Assult - can also get massed_artillery in mass armored assult doctrine
tactic_infantry_charge = { #aka infiltration assult, phase = no, no counter
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
	}
	
	active = no
	
	base = { factor = 4 }
	picture = tactic_infantry_charge
	
	attacker = 0.1 
	defender = -0.05
}

tactic_elastic_defense = { #phase = no, no counter
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = no
		OR = {
			has_trait = defensive_doctrine
			skill > 2
		}
	}
	
	active = no
	
	base = { factor = 4 }
	picture = elastic_defence
	
	attacker_movement_speed = -0.25
	attacker = -0.15
	defender = 0.10
}



tactic_danger_close_combat = { #People's army defender tactic. also for German volksturm branch.
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = close_combat
		OR = {
			skill > 2
			has_trait = trickster
		}
	}
	
	active = no
	
	base = { factor = 12 }
	picture = tactic_guerrilla_tactics
	
	combat_width = -0.5
	attacker = -0.7
	defender = -0.6
}
tactic_tunnel_warfare = { #People's army defender tactic. also for German volksturm branch.
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = no
		OR = {
			not = { is_fighting_in_terrain = marsh }
		}
		OR = {
			skill > 2
			has_trait = trickster
		}
	}
	
	active = no
	
	base = { factor = 12 }
	picture = tactic_guerrilla_tactics
	
	countered_by = tactic_tunnel_rats
	
	combat_width = -0.5
	attacker = -0.7
	defender = -0.6
}
tactic_guerrilla_tactics = { #People's army defender tactic. also for German volksturm branch.
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = no
		OR = {
			skill > 2
			has_trait = trickster
		}
	}
	
	active = no
	
	base = { factor = 12 }
	picture = tactic_guerrilla_tactics
	combat_width = -0.5
	attacker = -0.7
	defender = -0.6
	countered_by = tactic_cordon_and_search
	
}
tactic_insurgent_assault = { #People's army defender tactic. also for German volksturm branch.
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
		OR = {
			skill > 2
			has_trait = trickster
		}
	}
	
	active = no
	
	base = { factor = 12 }
	picture = tactic_guerrilla_tactics
	
	
	attacker = 0.25
}
Mimicking_operations = { #People's army defender tactic. also for German volksturm branch.
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
		OR = {
			skill > 2
			has_trait = trickster
		}
	}
	
	active = no
	
	base = { factor = 12 }
	picture = tactic_guerrilla_tactics
	#countered_by = area_defense
	
	attacker = 0.25
}


tactic_human_wave_tactics = { #People's army attacker tactic
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
		frontage_full = yes
		has_reserves = yes
	}
	
	active = no
	
	base = { factor = 4 }
	picture = tactic_human_wave_tactics
	
	combat_width = 0.5
	attacker = 0.1 
	defender = 0.1
}

tactic_banzai_charge = { #Special Japan attacker tactic
	is_attacker = yes
	trigger = {
		tag = JAP
		is_attacker = yes
		phase = no
	}
	
	active = yes
	
	countered_by = tactic_overwhelming_fire
	
	base = { factor = 4 }
	picture = tactic_banzai_charge
	
	attacker_movement_speed = 0.1
	attacker = 0.25 
	defender = 0.1
}


tactic_unexpected_thrust = { #Mobile warfare attacker tactic
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
	}
	
	active = no
	
	base = { factor = 4 }
	picture = tactic_unexpected_thrust
	
	attacker_movement_speed = 0.15
	attacker = 0.15 
}


tactic_overwhelming_fire = { # Counters Banzai charge
	is_attacker = no
	trigger = {
		is_attacker = no
		phase = no
	}
	
	active = no
	
	base = { factor = 2 }
	picture = tactic_overwhelming_fire
	
	attacker = -0.1
	defender = 0.1
}

tactic_tunnel_rats = { #People's army defender tactic. also for German volksturm branch.
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
		OR = {
			not = { is_fighting_in_terrain = marsh }
		}
		OR = {
			skill > 2
			has_trait = trickster
		}
	}
	
	active = no
	
	base = { factor = 4 }
	picture = tactic_guerrilla_tactics
	
	combat_width = -0.5
	attacker = -0.7
	defender = -0.6
}

tactic_cordon_and_search = { #People's army defender tactic. also for German volksturm branch.
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
		OR = {
			not = { is_fighting_in_terrain = marsh }
		}
		OR = {
			skill > 2
			has_trait = trickster
		}
	}
	
	active = no
	
	base = { factor = 4 }
	picture = tactic_guerrilla_tactics
	
	combat_width = -0.25
	attacker = -0.3
	defender = -0.2
}
Rhizome_Manoeuver = { #People's army defender tactic. also for German volksturm branch.
	is_attacker = yes
	trigger = {
		is_attacker = yes
		phase = no
		OR = {
			skill > 2
			has_trait = trickster
		}
	}
	
	active = no
	
	base = { factor = 12 }
	picture = tactic_guerrilla_tactics
	
	
	attacker = 0.25
}


