# Robotic Armies
robotic_defense_army = {
	defensive = yes
	is_pop_spawned = yes
	damage = 1.00
	health = 1.25
	morale_damage = 1.00
	collateral_damage = 0.0
	war_exhaustion = 0.0 # No WE from defense armies
	has_morale = no
	icon = GFX_army_type_robot
	has_species = yes

	potential = {
		from = { 
			has_trait = "trait_mechanical"
		}
		owner = {
			NOT = { has_authority = auth_machine_intelligence }
			NOT = {
				has_technology = tech_synthetic_workers
			}
		}
	}

	resources = {
		category = armies
		produces = {
			trigger = {
				exists = owner
				owner = { has_active_tradition = tr_unyielding_resistance_is_frugal }
			}
			unity = 0.5
		}
	}

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

android_defense_army = {
	defensive = yes
	is_pop_spawned = yes
	damage = 1.25
	health = 1.5
	morale_damage = 1.00
	collateral_damage = 0.0
	war_exhaustion = 0.0 # No WE from defense armies
	has_morale = no
	icon = GFX_army_type_robot
	has_species = yes
	use_armynames_from = robotic_defense_army

	potential = {
		from = { 
			has_trait = "trait_mechanical"
			NOR = {
				has_trait = trait_latent_psionic
				has_trait = trait_psionic
			}
		}
		owner = {
			NOT = { has_authority = auth_machine_intelligence }
			has_technology = tech_synthetic_workers
		}
	}

	resources = {
		category = armies
		produces = {
			trigger = {
				exists = owner
				owner = { has_active_tradition = tr_unyielding_resistance_is_frugal }
			}
			unity = 0.5
		}
	}
	
	allow = {
		owner = { NOT = { has_policy_flag = robots_outlawed } }
	}
}

android_defense_army_extsynth = {
	defensive = yes
	is_pop_spawned = yes
	damage = 2.00
	health = 1.5
	morale_damage = 2.00
	collateral_damage = 0.0
	war_exhaustion = 0.0 # No WE from defense armies
	has_morale = no
	icon = GFX_army_type_robot
	has_species = yes
	use_armynames_from = defense_army

	potential = {
		from = { 
			has_trait = "trait_mechanical"
			OR = {
				has_trait = trait_latent_psionic
				has_trait = trait_psionic
			}
		}
		owner = {
			NOT = { has_authority = auth_machine_intelligence }	
		}
	}

	resources = {
		category = armies
		produces = {
			trigger = {
				exists = owner
				owner = { has_active_tradition = tr_unyielding_resistance_is_frugal }
			}
			unity = 0.5
		}
	}
	
	allow = {
		owner = { NOT = { has_policy_flag = robots_outlawed } }
	}
}
####
# 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 = 90
	icon = GFX_army_type_robot
	has_species = yes

	resources = {
		category = armies
		cost = {
			minerals = 150
		}

		upkeep = {
			energy = 1.5
		}
	}

	potential_country = {
		NOT = { has_authority = auth_machine_intelligence }
	}

	potential = {
		from = { 
			has_trait = "trait_mechanical"
		}
		owner = {
			NOT = {
				has_technology = tech_synthetic_workers
			}
		}
	}
	
	prerequisites = { "tech_droid_workers" }

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

	ai_weight = {
		base = 100
		modifier = {
			set = 0
			OR = {
				NOT = { has_policy_flag = robots_outlawed }
				has_technology = tech_telepathy
				has_technology = tech_gene_seed_purification
				NAND = {
					has_ai_personality_behaviour = robot_liberator
					has_technology = tech_droid_workers
				}
			}
			is_fallen_empire = no
		}
		modifier = {
			set = 0
			is_fallen_empire = yes
			NOT = { has_ethic = ethic_fanatic_materialist }
		}
	}
}

# Synthetic Armies
android_army = {
	damage = 1.50
	health = 2.50
	morale_damage = 1.00
	collateral_damage = 1.5
	war_exhaustion = 0.50
	has_morale = no
	time = 90
	icon = GFX_army_type_robot
	has_species = yes
	use_armynames_from = robotic_army
	
	resources = {
		category = armies
		cost = {
			minerals = 150
		}

		upkeep = {
			energy = 1.5
		}
	}

	potential_country = {
		NOT = { has_authority = auth_machine_intelligence }
	}

	potential = {
		from = { 
			has_trait = "trait_mechanical"
			NOR = {
				has_trait = trait_latent_psionic
				has_trait = trait_psionic
			}
		}
	}

	prerequisites = { "tech_synthetic_workers" }

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

	ai_weight = {
		base = 100
		modifier = {
			set = 0
			OR = {
				NOT = { has_policy_flag = robots_outlawed }
				has_technology = tech_telepathy
				has_technology = tech_gene_seed_purification
				NAND = {
					has_ai_personality_behaviour = robot_liberator
					has_technology = tech_droid_workers
				}
			}
			is_fallen_empire = no
		}
		modifier = {
			set = 0
			is_fallen_empire = yes
			NOT = { has_ethic = ethic_fanatic_materialist }
		}
	}
}

# Psionic Armies
psionic_army_extsynth = {
	damage = 2.25
	morale_damage = 2.00
	health = 2.50
	has_morale = no
	collateral_damage = 1.5
	war_exhaustion = 0.50
	time = 90
	icon = GFX_army_type_psionic
	use_armynames_from = psionic_army 

	resources = {
		category = armies
		cost = {
			minerals = 150
		}

		upkeep = {
			energy = 1.5
		}
	}

	potential_country = {
		has_country_flag = synthetic_empire
	}
	
	potential = {
		from = {
			OR = {
				has_trait = trait_latent_psionic
				has_trait = trait_psionic
			}
			NOR = {
				has_trait = "trait_machine_unit"
				is_sapient = no
			}
			has_trait = "trait_mechanical"
		}
	}
	
	allow = {
		owner = { NOT = { has_policy_flag = robots_outlawed } }
	}

	ai_weight = {
		base = 100
		modifier = {
			set = 0
			OR = {
				NOT = { has_policy_flag = robots_outlawed }
				has_technology = tech_telepathy
				has_technology = tech_gene_seed_purification
				NAND = {
					has_ai_personality_behaviour = robot_liberator
					has_technology = tech_droid_workers
				}
			}
			is_fallen_empire = no
		}
		modifier = {
			set = 0
			is_fallen_empire = yes
			NOT = { has_ethic = ethic_fanatic_materialist }
		}
	}
}
###
# Robotic Armies
robotic_occupation_army = {
	defensive = yes
	occupation = yes
	damage = 1.00
	health = 1.25
	morale_damage = 1.00
	collateral_damage = 0.0
	war_exhaustion = 0.0 # No WE from occupation armies
	has_morale = no
	icon = GFX_army_type_robot
	has_species = yes

	potential = {
		from = { 
			has_trait = "trait_mechanical"
		}
		owner = {
			NOT = { has_authority = auth_machine_intelligence }
			NOT = {
				has_technology = tech_synthetic_workers
			}
		}
	}

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

android_occupation_army = {
	defensive = yes
	occupation = yes
	damage = 1.50
	health = 1.50
	morale_damage = 1.00
	collateral_damage = 0.0
	war_exhaustion = 0.0 # No WE from occupation armies
	has_morale = no
	icon = GFX_army_type_robot
	has_species = yes
	use_armynames_from = robotic_occupation_army

	potential = {
		from = { 
			has_trait = "trait_mechanical"
			NOR = {
				has_trait = trait_latent_psionic
				has_trait = trait_psionic
			}
			NOR = {
				has_trait = "trait_machine_unit"
				is_sapient = no
			}
		}
		owner = {
			NOT = { has_authority = auth_machine_intelligence }
			has_technology = tech_synthetic_workers
		}
	}

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

android_occupation_army_extsynth = {
	defensive = yes
	occupation = yes
	damage = 2.00
	health = 1.50
	morale_damage = 2.00
	collateral_damage = 0.0
	war_exhaustion = 0.0 # No WE from occupation armies
	has_morale = no
	icon = GFX_army_type_robot
	has_species = yes
	use_armynames_from = occupation_army 

	potential = {
		from = { 
			OR = {
				has_trait = trait_latent_psionic
				has_trait = trait_psionic
			}
			NOR = {
				has_trait = "trait_machine_unit"
				is_sapient = no
			}
			has_trait = "trait_mechanical"
		}
		owner = {
			NOT = { has_authority = auth_machine_intelligence }
		}
	}

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