

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


^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
^Vehicle:
	SpeedMultiplier@HEAVYDAMAGE:
		RequiresCondition: heavy-damage
		Modifier: 75
	Demolishable:
		Condition: being-demolished
	Explodes@sabotuerDemolition:
		RequiresCondition: being-demolished
		Type: CenterPosition
		Weapon: PlasmaSaboteur
		EmptyWeapon: PlasmaSaboteur
	ExternalCondition:
		Condition: unitCapturated
	Targetable:
		TargetTypes: Ground, Vehicle, C4
		RequiresCondition: !unitCapturated
	Targetable@CAPTURED:
		TargetTypes: CapturedUnit, Ground
		RequiresCondition: unitCapturated

^Tank:
	GrantConditionOnDamageState@HEAVY:
		Condition: heavy-damage
		ValidDamageStates: Critical

^Infantry:
	Crushable:
		CrushSound: CRUSH1.WAV
		WarnProbability: 70
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

harvester:
	Buildable:
		BuildDuration: 600

carryall.reinforce:
	Health:
		HP: 20000
	Valued:
		Cost: 1000
	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
	-RevealOnFire:


trooper:
	AutoTargetPriority@bot:
		InvalidTargets: Infantry
		ValidTargets: Vehicle, Defense, Structure, Tank
		Priority: 50
		RequiresCondition: bot-hard
	Buildable:
		BuildDuration: 124
	Valued:
		Cost: 100
	-RevealOnFire:

grenadier:
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: bot-hard
	Buildable:
		BuildDuration: 98
		Prerequisites: ~barracks.atreides, upgrade.barracks, outpost, ~techlevel.medium

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

mpsardaukar:
	Inherits: sardaukar
	Buildable:
		Queue: Infantry
		BuildPaletteOrder: 70
		Prerequisites: ~barracks.harkonnen, upgrade.barracks, outpost, ~techlevel.medium

fremen:
	-GrantConditionOnBotOwner@hardBot:

trike:
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: bot-hard
	AutoTarget:
		MinimumScanTimeInterval: 0
		MaximumScanTimeInterval: 0
	Armament@damage:
		Weapon: HMG
		LocalOffset: 100,0,0
raider:
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: bot-hard
	AutoTarget:
		MinimumScanTimeInterval: 0
		MaximumScanTimeInterval: 0
	Armament@damage:
		Weapon: HMG
		LocalOffset: 100,0,0
	Buildable:
		BuildDuration: 250

stealth_raider:
	Buildable:
		BuildDuration: 265
		Prerequisites: ~light.ordos, upgrade.light, outpost, ~techlevel.medium
	-RevealOnFire:

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

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

combat_tank_o:
	Health:
		HP: 19000

combat_tank_h:
	Health:
		HP: 28500

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
	ThrowsShrapnel:
		Weapons: Debris, Debris2, Debris3
		Pieces: 1, 2
		Range: 2c0, 4c0
	RevealsShroud:
		Range: 5c512
	-RevealOnFire:
	Mobile:
		Speed: 40
	Health:
		HP: 12000

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
	Buildable:
		Queue: Armor
		Prerequisites: ~heavy.missile_tank, upgrade.heavy, high_tech_factory, ~techlevel.high
	Mobile:
		Speed: 58
	-RevealOnFire:
	RevealsShroud:
		Range: 6c0
	Health:
		HP: 14000

devastator:
	-GrantConditionOnBotOwner@hardBot:
	ExternalCondition:
		Condition: unitCapturated
	GrantConditionOnDeploy@REACTOR:
		DeployedCondition: overload
		PauseOnCondition: overload
		RequiresCondition: !unitCapturated
	SpawnActorOnDeath:
		RequiresCondition: !meltdown
	Valued:
		Cost: 1200
	Health:
		HP: 58000
	KillsSelf@MELTDOWN:
		Delay: 150
		RequiresCondition: overload && !unitCapturated
		GrantsCondition: meltdown
	ChangesHealth:
		Step: 40

sonic_tank:
	AutoTargetPriority@bot:
		ValidTargets: Vehicle, Defense, Structure, Infantry
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: bot-hard
	Valued:
		Cost: 1100
	Armament@allydamage:
		Weapon: Sound.Ally
		LocalOffset: 600,0,427
	-RevealOnFire:

deviator:
	AutoTargetPriority@bot:
		ValidTargets: Tank, Vehicle
		InvalidTargets: Infantry, Structure, Defense
		Priority: 50
		RequiresCondition: bot-hard
	RevealsShroud:
		Range: 5c224
	Health:
		HP: 21500
	-RevealOnFire:
	SpawnActorOnDeath@dummygas1:
		Actor: dummygas01
		Offset: 0, 0
	SpawnActorOnDeath@dummygas2:
		Actor: dummygas02
		Offset: 0, 0
	SpawnActorOnDeath@dummygas3:
		Actor: dummygas03
		SpawnAfterDefeat: false
	SpawnActorOnDeath@dummygas4:
		Actor: dummygas04
		SpawnAfterDefeat: false
	SpawnActorOnDeath@dummygas5:
		Actor: dummygas05
		SpawnAfterDefeat: false
	SpawnActorOnDeath@dummygas6:
		Actor: dummygas06
		SpawnAfterDefeat: false
	SpawnActorOnDeath@dummygas7:
		Actor: dummygas07
		SpawnAfterDefeat: false

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


