ABC_army_effort = {
	
	r56_organize_military_maneuvers = {
		state_target = yes
		target_root_trigger = {
			has_country_flag = ABC_i_am_generic_army
			has_completed_focus = ABC_doctrine_effort
			has_war = no
		}
		target_array = ROOT.controlled_states
		target_array = ROOT.core_states
		target_trigger = {
			FROM = {
				is_core_of = ROOT
				is_fully_controlled_by = ROOT
			}
		}
		icon = hol_draw_up_staff_plans
		fire_only_once = no

		custom_cost_text = r56_10_command_power_cost	
		custom_cost_trigger = {
			command_power > 9.99			
		}

		days_remove = 21
		days_re_enable = 90
		on_map_mode = map_only
		
		ai_will_do = {
			base = 50
			modifier = {	#no-no-no, not where we have many divisions!
				factor = 0.01
				divisions_in_state = { state = FROM size > 2 }
			}
			modifier = {	#no need for xp, so why waste more pp?
				add = -50
				has_army_experience > 100
			}
		}
		
		modifier = {
			experience_gain_army = 0.35
		}

		visible = {
			has_country_flag = ABC_i_am_generic_army
			has_completed_focus = ABC_doctrine_effort
			has_war = no
			divisions_in_state = { state = FROM size > 0 }
		}
		available = {
			has_war = no
			has_completed_focus = ABC_doctrine_effort_2
			divisions_in_state = { state = FROM size > 0 }
			NOT = { 
				has_country_flag = MON_already_doing_military_maneuvers
			}
		}
		complete_effect = {
			add_command_power = -10	
			custom_effect_tooltip = GEN_90_days_tt
			set_country_flag = MON_already_doing_military_maneuvers
			FROM = {
				add_dynamic_modifier = { modifier = r56_military_exercises  }
			}
		}

		cancel_trigger = {
			divisions_in_state = { state = FROM size < 1 }
		}
		cancel_effect = {
			FROM = {
				remove_dynamic_modifier = { modifier = r56_military_exercises  }
			}
			clr_country_flag = MON_already_doing_military_maneuvers
		}
		remove_effect = {
			FROM = {
				remove_dynamic_modifier = { modifier = r56_military_exercises  }
			}
			clr_country_flag = MON_already_doing_military_maneuvers
		}
	}
	
	r56_adopt_camelry = {

		icon = generic_cavalry
	
		cost = 10
		
		days_remove = 150
		
		custom_cost_text = form_camel_corps_cost	
		custom_cost_trigger = {
			has_army_experience > 49
			has_political_power > 9
		}
		available = {
			has_army_experience > 49
			has_political_power > 9
			any_character = {
				has_trait = desert_fox
			}
			any_state = {
				OR = {
					is_core_of = MRT
					is_core_of = MLI
					is_core_of = NGR
					is_core_of = CHA
					is_core_of = MOR
					is_core_of = ALG
					is_core_of = TUN
					is_core_of = PAL
					is_core_of = EGY
					is_core_of = LBA
					is_core_of = SYR
					is_core_of = IRQ
					is_core_of = SAU
					is_core_of = OMA
					is_core_of = AFG
					is_core_of = PER
					is_core_of = KUW
					is_core_of = QAT
					is_core_of = UAE
					is_core_of = YEM
					is_core_of = TMS
					is_core_of = TAJ
				}
				is_controlled_by = ROOT
			}
		}
		
		visible = {
			has_dlc = "Battle for the Bosporus"
			NOT = {
				has_tech = camelry	
			}
			any_state = {	
				is_controlled_by = ROOT
				OR = {
					is_core_of = MRT
					is_core_of = MLI
					is_core_of = NGR
					is_core_of = CHA
					is_core_of = MOR
					is_core_of = ALG
					is_core_of = TUN
					is_core_of = PAL
					is_core_of = EGY
					is_core_of = LBA
					is_core_of = SYR
					is_core_of = IRQ
					is_core_of = SAU
					is_core_of = OMA
					is_core_of = AFG
					is_core_of = PER
					is_core_of = KUW
					is_core_of = QAT
					is_core_of = UAE
					is_core_of = YEM
					is_core_of = TMS
					is_core_of = TAJ
				}
			}
		}
		
		remove_effect = {
			custom_effect_tooltip = TUR_unlock_camelry_effect_tt
			hidden_effect = { 
				set_technology = { camelry = 1 } 
				load_oob = camel_template
			} 
		}		
		complete_effect = {
			army_experience = -50
			add_political_power = -10
			
		}
	}
	ABC_training_exercise = {

		icon = generic_operation

		available = {
			has_completed_focus = ABC_army_reform
			has_war = no
		}

		cost = 5

		ai_will_do = {
			factor = 0.1
		}

		
		ai_will_do = {
			factor = 1
			}

		visible = {
			has_country_flag = ABC_i_am_generic_army
		}

		modifier = {
			experience_gain_army = 0.05
		}

		days_remove = 100

		days_re_enable = 365

		complete_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = -100
			}
		}

		remove_effect = {
			army_experience = 5
		}		
	}

	ABC_motorize_the_army  = {

		icon = rubber

		available = {
			has_tech = motorised_infantry
			OR = {
				has_completed_focus = ABC_motorization_effort
				has_completed_focus = LUX_introduce_motorization_technologies
				#has_completed_focus = r56_RAJ_motorization_effort
			}
			
		}

		
		ai_will_do = {
			factor = 0.1
		}

		cost = 25

		
		ai_will_do = {
			factor = 1
		}

		visible = {
			has_country_flag = ABC_i_am_generic_army
			has_completed_focus = ABC_army_modernization
		}

		fire_only_once = yes

		modifier = {
			industrial_capacity_factory = -0.05
		}

		days_remove = 30

		remove_effect = {
			add_ideas = ABC_motorized_effort_idea
		}		
	}

	ABC_tank_research = {

		icon = generic_tank

		available = {
			OR = {
				has_tech = gwtank
				has_tech = gwtank_chassis
			}
			has_completed_focus = ABC_establish_a_armor_corp
		}

		ai_will_do = {
			factor = 0.1
		}

		cost = 25
		
		ai_will_do = {
			factor = 1
		}

		visible = {
			has_country_flag = ABC_i_am_generic_army	
			has_completed_focus = ABC_army_modernization
		}


		modifier = {
			industrial_capacity_factory = -0.05
		}

		days_remove = 30

		days_re_enable = 480

		complete_effect = {
			add_equipment_to_stockpile = { 
				type = light_tank_chassis 
				amount = -5 
			}
		}

		remove_effect = {
			add_tech_bonus = {
				name = armor_bonus
				bonus = 0.15
				uses = 1
				category = armor
			}
		}		
	}

	ABC_small_arms_research = {

		icon = generic_industry

		available = {
			has_completed_focus = ABC_equipment_effort
			has_completed_focus = ABC_army_modernization
		}
		
		ai_will_do = {
			factor = 0.1
		}

		cost = 25

		
		ai_will_do = {
			factor = 1
		}

		visible = {
			has_country_flag = ABC_i_am_generic_army
			
			has_completed_focus = ABC_army_modernization
		}

		modifier = {
			industrial_capacity_factory = -0.05
		}

		days_re_enable = 800

		days_remove = 30

		complete_effect = {
			add_equipment_to_stockpile = { 
			type = infantry_equipment
			amount = -25
			}
		}

		remove_effect = {
			add_tech_bonus = {
				name = infantry_artillery_bonus
				bonus = 0.15
				uses = 1
				category = infantry_weapons
			}
		}	
	}
}
