^Infantry:
	DetectCloaked:
		Range: 2c0

^BotLogicEngineer:
	ExternalCondition@giveControl:
		Condition: reject_control
	ScriptTags:
	RejectsOrders:
		RequiresCondition: reject_control

^Vehicle:
	RevealOnFire:

^AutoTargetGround:
	AutoTarget:
		AttackAnythingCondition: stance-attackanything
	AutoTargetPriority@DEFAULT:
		ValidTargets: Infantry, Vehicle, Water, Defense, Tank
	AutoTargetPriority@ATTACKANYTHING:
		ValidTargets: Infantry, Vehicle, Water, Structure, Defense, Tank
	AutoTargetPriority@CREEPS:
		ValidTargets: Creep

^AutoTargetAll:
	AutoTarget:
		AttackAnythingCondition: stance-attackanything
	AutoTargetPriority@DEFAULT:
		RequiresCondition: !stance-attackanything
		ValidTargets: Infantry, Vehicle, Tank, Water, Air, Defense
	AutoTargetPriority@ATTACKANYTHING:
		RequiresCondition: stance-attackanything
		ValidTargets: Infantry, Vehicle, Tank, Water, Air, Structure, Defense
	AutoTargetPriority@CREEPS:
		ValidTargets: Creep

^AutoTargetGroundAssaultMove:
	GrantConditionOnBotOwner@hardBot:
		Condition: bot-hard
		Bots: hard-eco, hard-defense

^AutoTargetAllAssaultMove:
	GrantConditionOnBotOwner@hardBot:
		Condition: bot-hard
		Bots: hard-eco, hard-defense


thumper:
	Buildable:
		Queue: Infantry
		BuildPaletteOrder: 150

engineer:
	Inherits@botLogic: ^BotLogicEngineer
	Buildable:
		Prerequisites: upgrade.barracks, ~techlevel.medium
		BuildDuration: 160
		BuildPaletteOrder: 80
	Captures@cliff:
		CaptureTypes: cliff
		ConsumedByCapture: false
		CaptureDelay: 150
	Captures@husks:
		CaptureTypes: husk


carryall.reinforce:
	Health:
		HP: 20000
	Aircraft:
		Speed: 170
		TurnSpeed: 16
		IdleTurnSpeed: 5
		IdleSpeed: 115

ornithopter:
	Health:
		HP: 8000

ornithopter_a:
	Inherits: ornithopter
	RenderSprites:
		Image: ornithopter
	-AttackBomber:
	Aircraft:
		AltitudeVelocity: 2c0
	AttackAircraft:
		AttackType: Strafe
		StrafeRunLength: 4c0
		OpportunityFire: false
		ForceFireIgnoresActors: true
		Voice: Attack
		FacingTolerance: 512
		PersistentTargeting: false
		AbortOnResupply: true
	Armament:
		Weapon: OrniBomb_multipass
		PauseOnCondition: !ammo
	Health:
		HP: 8000
	Armor:
		Type: light
	Aircraft:
		Speed: 224
		TurnSpeed: 10
		Repulsable: False
		CruiseAltitude: 1920
	AmmoPool:
		Ammo: 15
		AmmoCondition: ammo
	Valued:
		Cost: 500

light_inf:
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: bot-hard
	AutoTargetPriority@bot2:
		ValidTargets: Vehicle
		Priority: 20
		RequiresCondition: bot-hard


trooper:
	AutoTargetPriority@bot:
		InvalidTargets: Infantry
		ValidTargets: Vehicle, Defense, Structure, Tank
		Priority: 50
		RequiresCondition: bot-hard

grenadier:
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: bot-hard

sardaukar:
	AutoTargetPriority@bot:
		ValidTargets: Vehicle, Tank, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: bot-hard

fremen:
	-GrantConditionOnBotOwner@hardBot:

trike:
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: bot-hard
raider:
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: bot-hard

quad:
	AutoTargetPriority@bot:
		ValidTargets: Vehicle, Structure, Tank
		InvalidTargets: Infantry
		Priority: 50
		RequiresCondition: bot-hard

^combat_tank:
	AutoTargetPriority@bot:
		InvalidTargets: Infantry
		ValidTargets: Vehicle, Defense, Structure, Tank
		Priority: 10
		RequiresCondition: bot-hard
	Health:
		HP: 22000

combat_tank_o:
	Health:
		HP: 19000

combat_tank_h:
	Health:
		HP: 28000

siege_tank:
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Defense
		InvalidTargets: Tanks
		Priority: 50
		RequiresCondition: bot-hard
	AutoTargetPriority@bot2:
		ValidTargets: Vehicle
		InvalidTargets: Tanks
		Priority: 10
		RequiresCondition: bot-hard

missile_tank:
	AutoTargetPriority@bot:
		ValidTargets: Tank, Defense, Air
		InvalidTargets: Infantry
		Priority: 50
		RequiresCondition: bot-hard
	AutoTargetPriority@bot2:
		ValidTargets: Structure, Vehicle
		InvalidTargets: Infantry
		Priority: 20
		RequiresCondition: bot-hard
	Armament@antiAir:
		Weapon: mtank_air
		LocalOffset: -128,128,171, -128,-128,171

devastator:
	-GrantConditionOnBotOwner@hardBot:
	ExternalCondition:
		Condition: unitCapturated
	GrantConditionOnDeploy@REACTOR:
		DeployedCondition: overload
		PauseOnCondition: overload
		RequiresCondition: !unitCapturated
	SpawnActorOnDeath:
		RequiresCondition: !meltdown

sonic_tank:
	AutoTargetPriority@bot:
		ValidTargets: Vehicle, Defense, Structure, Infantry
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: bot-hard

deviator:
	AutoTargetPriority@bot:
		ValidTargets: Tank, Vehicle
		InvalidTargets: Infantry, Structure, Defense
		Priority: 50
		RequiresCondition: bot-hard

saboteur:
	Buildable:
		Description: Always cloaked. \n Destroy buildings \n SelfKill explosion
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	WithDecoration@ScullIcon:
		Image: skullicon
		Sequence: idle
		ValidRelationships: Enemy, Neutral, Ally
		Palette: effect
		Position: BottomRight
		Margin: 5, 6
	Mobile:
		PauseOnCondition: SuicideAtt
	Cloak:
		InitialDelay: 100
		CloakDelay: 100
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Damage, Heal
		RequiresCondition: !SuicideAtt
	Explodes@Selfkill:
		Weapon: PlasmaExplosion
		EmptyWeapon: PlasmaExplosion
		RequiresCondition: kamikadze
	GrantConditionOnDeploy:
		DeployedCondition: SuicideAtt
		PauseOnCondition: SuicideAtt
	KillsSelf@SuicideKillCount:
		Delay: 70
		RequiresCondition: SuicideAtt
		GrantsCondition: kamikadze
	Voiced:
		VoiceSet: SaboteurVoice
	AmbientSound@onSuicide:
		SoundFiles: audio/explodeSaboteurEmperor02.wav
		RequiresCondition: SuicideAtt
	TakeCover:
		RequiresCondition: SuicideAtt

sonic_tank:
	Armament@allydamage:
		Weapon: Sound.Ally
		LocalOffset: 600,0,427

