#Defensive armies can't transport of the planet
#maintenance is directly scripted here. 0.25 translates to 0.25 monthly cost (excluding other upkeep modifiers)
#morale_damage = 1		# average morale damage of the army, default: auto (calculated from morale * MORALE_DAMAGE_MULT)

# Assault Armies
assault_army = {
	damage = 1.00
	health = 1.00
	morale = 1.00
	morale_damage = 1.00
	collateral_damage = 1.00
	war_exhaustion = 1.00
	time = 18
	maintenance = 1.0
	icon_frame = 2
	prerequisites = { "tech_assault_armies" }
	cost = {
		minerals = 100
	}
	show_tech_unlock_if = { 
		OR = {
			NOT = { has_authority = auth_machine_intelligence }
			has_valid_civic = civic_machine_assimilator
		}
	}
	potential = {
		from = {
			NOR = {
				has_trait = "trait_robotic_1"
				has_trait = "trait_robotic_2"
				has_trait = "trait_robotic_3"
				has_trait = "trait_machine_unit"
				is_sapient = no
			}
		}
		owner = {
			OR = {
				NOT = { has_authority = auth_machine_intelligence }
				has_valid_civic = civic_machine_assimilator
			}
		}
	}
}

# Slave Armies
slave_army = {
	damage = 1.00
	health = 1.00
	morale = 0.75
	morale_damage = 0.75
	collateral_damage = 1.50
	war_exhaustion = 0.50
	time = 12
	maintenance = 0.50
	icon_frame = 10
	
	cost = {
		minerals = 50
	}
	
	prerequisites = { "tech_neural_implants" }
	
	allow = {
		has_building = "building_slave_processing"
	}
	potential = {
		from = {
			NOR = {
				has_trait = "trait_robotic_1"
				has_trait = "trait_robotic_2"
				has_trait = "trait_robotic_3"
				has_trait = "trait_machine_unit"
				is_sapient = no
			}
		}
		owner = {
			NOT = { has_authority = auth_machine_intelligence }
		}
	}
}

# Clone Armies
clone_army = {
	damage = 1.00
	health = 1.00
	morale = 1.00
	collateral_damage = 1.25
	war_exhaustion = 0.50
	time = 6
	maintenance = 0.75
	icon_frame = 7
	pop_limited = no
	
	cost = {
		minerals = 75
	}
	
	prerequisites = { "tech_gene_banks" }
	
	show_tech_unlock_if = { NOT = { has_authority = auth_machine_intelligence } }
	
	allow = {
		has_building = "building_clone_vats"
	}
	potential = {
		from = {
			NOR = {
				has_trait = "trait_robotic_1"
				has_trait = "trait_robotic_2"
				has_trait = "trait_robotic_3"
				has_trait = "trait_machine_unit"
				is_sapient = no
			}
		}
		owner = {
			NOT = { has_authority = auth_machine_intelligence }
		}
	}
}

# Robotic Armies
robotic_army = {
	damage = 1.00
	health = 2.00
	morale_damage = 1.00
	collateral_damage = 1.5
	war_exhaustion = 0.50
	has_morale = no
	time = 18
	maintenance = 1.5
	icon_frame = 4
	has_species = yes
	
	cost = {
		minerals = 150
	}

	potential = {
		from = { has_trait = "trait_robotic_2" }
		owner = {
			NOT = { has_authority = auth_machine_intelligence }
		}
	}
	
	prerequisites = { "tech_droid_workers" }

	allow = {
		owner = { NOT = { has_policy_flag = robots_outlawed } }
	}
}

# Synthetic Armies
android_army = {
	damage = 2.00
	health = 2.50
	has_morale = no
	morale_damage = 1.25
	collateral_damage = 1.5
	war_exhaustion = 0.75
	time = 24
	maintenance = 2.50
	icon_frame = 4
	has_species = yes
	
	cost = {
		minerals = 250
	}

	potential = {
		from = { has_trait = "trait_robotic_3" }
		owner = {
			NOT = { has_authority = auth_machine_intelligence }
		}
	}
	
	prerequisites = { "tech_synthetic_workers" }

	allow = {
		owner = { NOT = { has_policy_flag = ai_outlawed } }
	}
}

# Psionic Armies
psionic_army = {
	damage = 2.0
	morale_damage = 1.5
	health = 1.75
	morale = 2.5
	collateral_damage = 0.5
	war_exhaustion = 3.0
	time = 24
	maintenance = 2.5
	icon_frame = 9
	
	cost = {
		minerals = 250
	}
	
	prerequisites = { "tech_telepathy" }
	potential = {
		from = {
			OR = {
				NOT = { host_has_dlc = "Utopia" }
				OR = {
					has_trait = trait_latent_psionic
					has_trait = trait_psionic
				}
			}
			NOR = {
				has_trait = "trait_robotic_1"
				has_trait = "trait_robotic_2"
				has_trait = "trait_robotic_3"
				has_trait = "trait_machine_unit"
				is_sapient = no
			}
		}
		owner = {
			NOT = { has_authority = auth_machine_intelligence }
		}
	}
}

# Xenomorph Armies
xenomorph_army = {
	damage = 3.0
	morale_damage = 2.0
	collateral_damage = 5.0
	war_exhaustion = 0.25
	health = 2.0
	has_morale = no
	time = 18
	maintenance = 1.5
	icon_frame = 8
	has_species = no
	
	cost = {
		minerals = 150
	}

	potential = {
		owner = {
			NOT = { has_authority = auth_machine_intelligence }
		}
	}
	
	prerequisites = { "tech_morphogenetic_field_mastery" }
}

# Gene Warrior Armies
gene_warrior_army = {
	damage = 2.0
	health = 2.5
	morale = 2.5
	morale_damage = 1.0
	collateral_damage = 0.75
	war_exhaustion = 3.0
	time = 30
	maintenance = 3.0
	icon_frame = 6
	
	cost = {
		minerals = 300
	}
	
	prerequisites = { "tech_gene_seed_purification" }
	potential = {
		from = {
			NOR = {
				has_trait = "trait_robotic_1"
				has_trait = "trait_robotic_2"
				has_trait = "trait_robotic_3"
				has_trait = "trait_machine_unit"
				is_sapient = no
			}
		}
		owner = {
			NOT = { has_authority = auth_machine_intelligence }
		}
	}
}

### Machine Empire Armies

# Hunter-Killer Armies
machine_assault_1 = {
	damage = 1.00
	health = 1.00
	has_morale = no
	morale_damage = 1.00
	collateral_damage = 2.0
	war_exhaustion = 0.5
	time = 18
	maintenance = 1.0
	has_species = yes

	icon_frame = 11
	cost = {
		minerals = 100
	}

	potential = {
		owner = { has_authority = auth_machine_intelligence }
		from = {
			has_trait = "trait_machine_unit"
		}
	}
	
	show_tech_unlock_if = { has_authority = auth_machine_intelligence }
	
	prerequisites = { "tech_assault_armies" }
}

# Battle Frames
machine_assault_2 = {
	damage = 1.5
	health = 2.5
	has_morale = no
	morale_damage = 1.5
	collateral_damage = 2.0
	war_exhaustion = 1.0
	time = 24
	maintenance = 2.0
	has_species = yes

	icon_frame = 11
	cost = {
		minerals = 200
	}

	potential = {
		owner = { has_authority = auth_machine_intelligence }
		from = {
			has_trait = "trait_machine_unit"
		}
	}
	
	prerequisites = { "tech_adaptive_combat_algorithms" }
}

# Mega-Warform
machine_assault_3 = {
	damage = 4.0
	health = 6.0
	has_morale = no
	morale_damage = 1.5
	collateral_damage = 4.0
	war_exhaustion = 4.0
	time = 100
	maintenance = 8.0
	has_species = no

	icon_frame = 11
	cost = {
		minerals = 800
	}

	potential = {
		owner = { has_authority = auth_machine_intelligence }
	}
	
	prerequisites = { "tech_biomechanics" }
}