#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


# Clone Armies
stormtrooper_army = {
	damage = 2.5
	morale_damage = 3.0
	health = 1.5
	morale = 3.0
	collateral_damage = 2.0
	war_exhaustion = 0.5
	icon = GFX_army_type_imperial
	pop_limited = yes
	has_species = yes
	time = 150

	resources = {
		category = armies
		cost = {
			minerals = 130
			alloys = 20
			energy = 30
		}

		upkeep = {
			energy = 1
			alloys = 1
		}
	}
	
	potential = {
		from = {
			NOR = {
				has_trait = "trait_mechanical"
				has_trait = "trait_machine_unit"
				is_sapient = no
			}
		}
		is_homeworld = yes
		owner = {
			OR = {
				NOT = { has_authority = auth_machine_intelligence }
				has_civic = civic_machine_assimilator
			}
			has_technology = tech_assault_armies
			has_ascension_perk = ap_plentiful_traditions_stormtroopers
		}
	}

	allow = {
		custom_tooltip = {
			text = trooper_limit_tooltip
			owner = {
				NOT = { 
					 check_variable = {
						which = "trooper_count" 
						value = 12
					}
				}
			}
		}
	}
	
	on_queued = {
		owner = {
			change_variable = {
				which = "trooper_count" 
				value = 1
			}
		}
	}
	
	on_unqueued = {
		owner = {
			change_variable = {
				which = "trooper_count" 
				value = -1
			}
		}
	}
}

# Robotic Armies
# Hunter-Killer Armies
cylon_army = {
	damage = 2.5
	morale_damage = 3.0
	health = 1.5
	has_morale = no
	collateral_damage = 2.5
	war_exhaustion = 0.5
	pop_limited = yes
	has_species = yes
	time = 150
	icon = GFX_army_type_machine_assault

	resources = {
		category = armies
		cost = {
			minerals = 130
			alloys = 20
			energy = 30
		}

		upkeep = {
			energy = 1
			alloys = 1
		}
	}

	potential = {
		owner = { 
			has_authority = auth_machine_intelligence
			is_homeworld = yes
			has_technology = tech_assault_armies
			has_ascension_perk = ap_plentiful_traditions_stormtroopers
		}
		from = {
			has_trait = "trait_machine_unit"
		}
	}

	allow = {
		custom_tooltip = {
			text = trooper_limit_tooltip
			owner = {
				NOT = { 
					 check_variable = {
						which = "trooper_count" 
						value = 12
					}
				}
			}
		}
	}
	
	on_queued = {
		owner = {
			change_variable = {
				which = "trooper_count" 
				value = 1
			}
		}
	}
	
	on_unqueued = {
		owner = {
			change_variable = {
				which = "trooper_count" 
				value = -1
			}
		}
	}
}

tank_army = {
	damage = 4.0
	health = 6.0
	has_morale = no
	morale_damage = 1.5
	collateral_damage = 4.0
	war_exhaustion = 4.0
	time = 500
	has_species = no

	icon = GFX_army_type_machine_assault

	resources = {
		category = armies
		cost = {
			minerals = 800
			alloys = 20
			energy = 30
		}

		upkeep = {
			energy = 8
			alloys = 3
		}
	}

	potential = {
		is_homeworld = yes
		owner = { 
			has_technology = tech_assault_armies
			has_ascension_perk = ap_plentiful_traditions_stormtroopers
		}
	}

	allow = {
		custom_tooltip = {
			text = tank_army_troop_limit_tooltip
			owner = {
				NOT = { 
					 check_variable = {
						which = "tank_army_troop_count" 
						value = 9
					}
				}
			}
		}
	}
	
	on_queued = {
		owner = {
			change_variable = {
				which = "tank_army_troop_count" 
				value = 1
			}
		}
	}
	
	on_unqueued = {
		owner = {
			change_variable = {
				which = "tank_army_troop_count" 
				value = -1
			}
		}
	}
}