Subsystem: AncientDroneSupport
	Name: #ANCIENTDRONE_NAME
	Description: #ANCIENTDRONE_DESC
	BaseColor: #cccc66 // #7946f9
	TypeColor: #cccc66 // #7946f9
	Picture: SubsystemButtonArt::1
	Elevation: 2

	Tags: HeraldsDLC
	Tags: WeaponBase, MissileBase, Category:Weapons, AncientDroneBase	//, Rotatable
	Tags: Weapon, IsExplosiveWeapon, HasInternals, MainDPS, Homing
	Tags: HeraldsDLC
	Hull: Support, Satellite
	
	Size := HexSize * Hexes
	Range := 300 * 2
	//Speed := 30
	//Speed := 30 * 2
	Tracking := 4
	SupplyCost := Size * 3.0

	Lifetime := 10

	Speed := max(60, Range/Lifetime)

	//DroneCount := 4.0 * floor(pow(Size, 0.33))
	DroneCount := 2.0
	//Damage := (Size * 8) / DroneCount
	Damage := (Size * 6)
	FireDelay := min(0.2, Lifetime / (DroneCount + 1))

	//Pierce := 0.75
	Pierce := 0.6
	IgnoreDR := 0
	Bypass := 0

	//Assert: Size >= 1
		//Message: #ERROR_TOO_SMALL

	//DPS is an estimation
	out DPS := Damage * 2.5 * DroneCount / (Lifetime+5)
	
	Hex.HP := 18 * HexSize
	Hex.Resistance := 0.2
	Hex.Mass := HexSize
	
	Requires:
		Command = 1
	
	Module: Default
	
	Module: Core
		Hex.HP := Hex.HP * 3
		Hex.BuildCost := 5.0 * Hex.BuildCost
		Hex.Mass := 5.0 * Hex.Mass

		//Sprite: MissileLauncher::0
		//DrawMode: 1
		Sprite: AtlanteanDroneLauncher * #ffff99

		Hex.DamageResist := ShipSize / 64.0
		Effect: DamageResist
			Resist = Hex.DamageResist

	Effector: AncientDrones
		Range = Range
		Damage = Damage
		Speed = Speed
		Tracking = Tracking
		SupplyCost = (SupplyCost * Lifetime) / DroneCount
		Lifetime = Lifetime
		DroneCount = DroneCount
		FireDelay = FireDelay
		Pierce = Pierce
		IgnoreDR = IgnoreDR
		Bypass = Bypass

