# Dummy: only for way points
# ignore-creeps = bot-owned && (attack-move || assault-move) used for Bots AutoTargeting
^AutoTargetGround:
	AutoTarget:
		AttackAnythingCondition: stance-attackanything
	AutoTargetPriority@DEFAULT:
		RequiresCondition: !stance-attackanything
		ValidTargets: Infantry, Vehicle, Water, Defense, Tank
		InvalidTargets: NoAutoTarget
	AutoTargetPriority@ATTACKANYTHING:
		RequiresCondition: stance-attackanything
		ValidTargets: Infantry, Vehicle, Water, Structure, Defense, Tank
		InvalidTargets: NoAutoTarget
	AutoTargetPriority@CREEPS:
		ValidTargets: Creep
	
^AutoTargetAll:
	AutoTarget:
		AttackAnythingCondition: stance-attackanything
	AutoTargetPriority@DEFAULT:
		RequiresCondition: !stance-attackanything
		ValidTargets: Infantry, Vehicle, Tank, Water, Air, Defense
		InvalidTargets: NoAutoTarget
	AutoTargetPriority@ATTACKANYTHING:
		RequiresCondition: stance-attackanything
		ValidTargets: Infantry, Vehicle, Tank, Water, Air, Structure, Defense
		InvalidTargets: NoAutoTarget
	AutoTargetPriority@CREEPS:
		ValidTargets: Creep



^Infantry:
	GrantRandomCondition:
		Conditions: inf_cond01, inf_cond02, inf_cond03 # used for different SFX
	Crushable:
		CrushSound: CRUSH1.WAV
		RequiresCondition: inf_cond01
	Crushable@2:
		CrushSound: crush_guy_2.wav
		RequiresCondition: inf_cond02
	Crushable@3:
		CrushSound: crush_guy_4.wav
		RequiresCondition: inf_cond03

^Vehicle:
	GrantConditionOnDamageState@HEAVY:
		Condition: heavy-damage
		ValidDamageStates: Heavy, Critical
	ExternalCondition:
		Condition: unitCapturated #block deploy while devastator is captured with Deviator
	RevealsShroud:
		RequiresCondition: !unitCapturated
	RevealsShroud@whileCaptured
		Range: 3c0
		RequiresCondition: unitCapturated
	SpeedMultiplier@HEAVYDAMAGE:
		RequiresCondition: heavy-damage
		Modifier: 75





^Tank:
	Targetable:
		TargetTypes: Ground, C4, Tank
	-GrantConditionOnDamageState@HEAVY:
	GrantConditionOnDamageState@critical:
		ValidDamageStates: Critical
		Condition: critical-damage
	SpeedMultiplier@HEAVYDAMAGE:
		RequiresCondition: critical-damage
		Modifier: 80


mcv:
	Valued:
		Cost: 2000
	Buildable:
		Prerequisites: repair_pad, ~techlevel.medium
		Queue: Armor
		BuildPaletteOrder: 110
		BuildDuration: 750
	Health:
		HP: 45000
	Armor:
		Type: light
	Mobile:
		Speed: 31
	RevealsShroud:
		Range: 2c768

harvester:
	Buildable:
		Queue: Armor
		Prerequisites: refinery
		BuildDuration: 600
		Description: Collects Spice for processing\n  Explode after death
	Valued:
		Cost: 1200
	WithDockingAnimation:
	Harvester:
		Capacity: 28
		HarvestFacings: 8
		Resources: Spice
		BaleUnloadDelay: 5
		SearchFromProcRadius: 30
		SearchFromHarvesterRadius: 15
		EmptyCondition: harvesterEmpty
	Health:
		HP: 45000
	Mobile:
		Speed: 38
	RevealsShroud:
		Range: 3c768
	Explodes:
		Weapon: UnitExplodeLarge
		EmptyWeapon: UnitExplodeLarge
	SpawnActorOnDeath:
		Actor: harvester.Husk
		OwnerType: InternalName
		EffectiveOwnerFromOwner: true
	ThrowsShrapnel@ShrapnelNotEmpty:
		Weapons: Debris, Debris2, Debris3, Debris4
		Pieces: 4, 9
		Range: 1c0, 6c0
		RequiresCondition: !harvesterEmpty
	ThrowsShrapnel@DeathHandClusterDebris:
		Weapons: DeathHandClusterDebris
		Pieces: 1, 3
		Range: 1c0, 5c0
		RequiresCondition: !harvesterEmpty
	ThrowsShrapnel@ShrapnelEmpty:
		Weapons: Debris, Debris2
		Pieces: 0, 4
		Range: 1c0, 6c0
		RequiresCondition: harvesterEmpty
	ThrowsShrapnel@throwSpice:
		Weapons: HarvesterSpiceExplosion
		Pieces: 1, 4
		Range: 1c0, 5c0
		RequiresCondition: !harvesterEmpty
	ThrowsShrapnel@wheel:
		Weapons: debris_harvester_wheel01, debris_harvester_wheel02
		Pieces: 0, 2
		Range: 3c0, 5c0
	-SpeedMultiplier@HEAVYDAMAGE: # no need. harvester is slower when full.
	-GrantConditionOnDamageState@critical:



trike:
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: ignore-creeps
	Buildable:
		Prerequisites: ~light.trike
		BuildDuration: 225
			Description: Scout\n Excellent visibility\n Strong vs Infantry\n  Weak vs Tanks, Rockets
	Valued:
		Cost: 350
	Selectable:
		Class: trike
	Health:
		HP: 9000
	Armor:
		Type: light
	Mobile:
		Locomotor: light_vehicle
		TurnSpeed: 40
		Speed: 102
	RevealsShroud:
		Range: 7c820
	Armament@damage:
		FireDelay: 0 # sound desynch, ignoring for now, but some armlock delay would be nice
		Weapon: HMG
		LocalOffset: 180,0,110
	Armament@muzzle:
		FireDelay: 0 
		Weapon: HMG_muzzle
		LocalOffset: -544,0,0
		MuzzleSequence: muzzle
	SpeedMultiplier@HEAVYDAMAGE:
		RequiresCondition: heavy-damage
		Modifier: 75

raider:
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: ignore-creeps
	Buildable:
		Prerequisites: ~light.raider
		BuildDuration: 225
		Description: Fast scout \n Excellent visibility \n Strong vs Infantry\n  Weak vs Tanks, Rockets
	Valued:
		Cost: 400
	Tooltip:
		Name: Raider Trike
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 10000
	Armor:
		Type: light
	Mobile:
		Locomotor: light_vehicle
		TurnSpeed: 40
		Speed: 119
	RevealsShroud:
		Range: 7c512
	WithMuzzleOverlay:
	Armament@damage:
		Weapon: HMGo
		LocalOffset: 170,0,0
	Armament@muzzle:
		Weapon: HMGo_muzzle
		LocalOffset: 170,0,0
		MuzzleSequence: muzzle
	SpeedMultiplier@HEAVYDAMAGE:
		RequiresCondition: heavy-damage
		Modifier: 75

quad:
	AutoTargetPriority@bot:
		ValidTargets: Vehicle, Structure, Tank
		InvalidTargets: Infantry
		Priority: 50
		RequiresCondition: ignore-creeps # mean this bot-owned && (attack-move || assault-move)
	Buildable:
		Prerequisites: upgrade.light, ~techlevel.medium
		BuildDuration: 353
		BuildDurationModifier: 100
		Description: Missile Scout\n  Excellent vs Light Armor\n Modest vs Tanks\n Weak vs  Moving Targets, Infantry
	Valued:
		Cost: 450
	Health:
		HP: 11000
	Armor:
		Type: light
	Mobile:
		Locomotor: light_vehicle
		TurnSpeed: 40
		Speed: 86
	RevealsShroud:
		Range: 6c224
	Armament:
		Weapon: Rocket
		LocalOffset: 128,64,64, 128,-64,64
	Explodes:
		Weapon: UnitExplodeSmall
		EmptyWeapon: UnitExplodeSmall
	SpeedMultiplier@HEAVYDAMAGE:
		RequiresCondition: heavy-damage
		Modifier: 75

stealth_raider:
	Inherits: raider
	Buildable:
		Prerequisites: ~light.ordos, upgrade.light, research_centre, ~techlevel.high
		BuildPaletteOrder: 30
		BuildDuration: 270
		Description: Invisible Raider Trike\n Can be detected by infantry(1 cell), Turrets(2 cells), Outpost (5 cells)
	Valued:
		Cost: 500
	Mobile:
		TurnSpeed: 32
		Speed: 100
	Tooltip:
		Name: Stealth Raider Trike
	RevealsShroud:
		Range: 5c512
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Cloak:
		InitialDelay: 45
		CloakDelay: 90
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		IsPlayerPalette: true
		PauseOnCondition: cloak-force-disabled

siege_tank:
	Buildable:
		Queue: Armor
		Prerequisites: upgrade.heavy, ~techlevel.medium
		BuildDuration: 415
		BuildDurationModifier: 100
		Description: Siege Artillery\n  High range, high Inaccuracy\n Strong vs Infantry, Buildings\n  Weak vs Tanks, Quads
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Defense
		InvalidTargets: Tanks
		Priority: 50
		RequiresCondition: ignore-creeps # mean this: bot-owned && (attack-move || assault-move)
	AutoTargetPriority@bot2:
		ValidTargets: Vehicle
		InvalidTargets: Tanks
		Priority: 10
		RequiresCondition: bot-owned
	AttackFrontal:
		ForceFireIgnoresActors: True
		TargetFrozenActors: True
	Valued:
		Cost: 800
	Health:
		HP: 13000
	Armor:
		Type: light
	Mobile:
		Speed: 38
		TurnSpeed: 12
	RevealsShroud:
		Range: 5c768
	Turreted:
		TurnSpeed: 12
		Offset: 0,0,-32
	-RevealOnFire:
	Armament:
		Weapon: 155mm
		Recoil: 150
		RecoilRecovery: 19
		LocalOffset: 512,0,320
		MuzzleSequence: muzzle
	Explodes:
		Weapon: UnitExplodeMed
		EmptyWeapon: UnitExplodeMed
	SpawnActorOnDeath:
		Actor: siege_tank.husk
		OwnerType: InternalName
		EffectiveOwnerFromOwner: true
	ThrowsShrapnel:
		Weapons: DerbisSiegetank, Debris3
		Pieces: 1, 2
		Range: 2c0, 4c0
	ThrowsShrapnel@turret:
		Weapons: derbisSiegetank.turret
		Pieces: 1, 1
		Range: 0c512, 2c0

missile_tank:
	AutoTargetPriority@bot:
		ValidTargets: Tank, Defense, Air
		InvalidTargets: Infantry
		Priority: 50
		RequiresCondition: ignore-creeps
	AutoTargetPriority@bot2:
		ValidTargets: Structure, Vehicle
		InvalidTargets: Infantry
		Priority: 20
		RequiresCondition: ignore-creeps
	AttackFrontal:
		ForceFireIgnoresActors: True
		TargetFrozenActors: true
	GrantRandomCondition:
		Conditions: shrapnel_01, shrapnel_02, shrapnel_03
	Buildable:
		BuildDuration: 512
		Prerequisites: ~heavy.missile_tank, heavy_factory,upgrade.heavy, high_tech_factory, ~techlevel.high
		Description: Rocket Artillery\n Excellent vs moving targets, Tanks\n Strong vs Vehicles, Aircraft\n  Weak vs Infantry, Quads
	Valued:
		Cost: 900
	Mobile:
		Speed: 45 #-speed then default
		TurnSpeed: 18
	Health:
		HP: 14000
	Armor:
		Type: light
	RevealsShroud:
		Range: 5c768
	Armament:
		Weapon: mtank_pri
		LocalOffset: -128,128,171, -128,-128,171
	-RevealOnFire:
	ThrowsShrapnel@01:
		Weapons: Debris, Debris4, Debris3
		Pieces: 0,3
		Range: 1c0, 3c0
		RequiresCondition: shrapnel_01
	ThrowsShrapnel@02:
		Weapons: Debris3, Debris
		Pieces: 1,2
		Range: 2c0, 3c0
		RequiresCondition: shrapnel_02
	ThrowsShrapnel@02_02:
		Weapons: DerbisMissile
		Pieces: 1,3
		Range: 3c0, 5c0
		RequiresCondition: shrapnel_02
	ThrowsShrapnel@03:
		Weapons: DerbisMissile, Debris, Debris4, Debris3
		Pieces: 1,5
		Range: 4c0, 6c0
		RequiresCondition: shrapnel_03
sonic_tank:
	AutoTargetPriority@bot:
		ValidTargets: Vehicle, Defense, Structure, Infantry
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: ignore-creeps
	AttackFrontal:
		TargetFrozenActors: True
		ForceFireIgnoresActors: True
	Buildable:
		Queue: Armor
		Prerequisites: ~heavy.atreides, research_centre, ~techlevel.high
		BuildDuration: 618
		Description: Fires sonic shocks\n  Excellent vs Infantry, Buildings, Turrets\n Modest vs vehicles \n  Weak vs Tanks, Missiles,\n Friendly Fire
	Valued:
		Cost: 1100
	Tooltip:
		Name: Sonic Tank
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 30000
	Armor:
		Type: light
	Mobile:
		TurnSpeed: 15 #faster turnspeed
		Speed: 27
	RevealsShroud:
		Range: 5c768
	Armament:
		Weapon: Sound
		LocalOffset: 600,0,427
	-RevealOnFire:

devastator:
	GrantConditionOnDamageState@forbot:
		Condition: lowhp
		ValidDamageStates: Critical
	GrantCondition@botselfdestruct:
		Condition: overload
		RequiresCondition: lowhp && bot-owned
	Buildable:
		Prerequisites: ~heavy.harkonnen, research_centre, ~techlevel.high
		BuildDuration: 700
		Description: Super Heavy Tank\n  Decent damage vs everthing\n weak vs missile\n SelfDestruction damage 8 square cells
	ExternalCondition:
		Condition: unitCapturated #block deploy while devastator is captured with Deviator
	Valued:
		Cost: 1200
	Health:
		HP: 60000
	Armor:
		Type: heavy
	Mobile:
		TurnSpeed: 12
		Speed: 27
		Locomotor: devastator
		RequiresCondition: !overload
		PauseOnCondition: notmobile
	RevealsShroud:
		Range: 4c768
	Armament:
		Weapon: DevBullet
		LocalOffset: 640,0,32
		MuzzleSequence: muzzle
	Explodes@OVERLOAD:
		Weapon: PlasmaExplosion
		EmptyWeapon: PlasmaExplosion
		RequiresCondition: meltdown
	GrantConditionOnDeploy@REACTOR:
		DeployedCondition: overload
		PauseOnCondition: overload
		RequiresCondition: !unitCapturated
	WithIdleOverlay@OVERLOAD:
		Sequence: active
		RequiresCondition: overload
	WithIdleOverlay@OVERLOAD2:
		Sequence: active-2
		RequiresCondition: overload
	KillsSelf@MELTDOWN:
		Delay: 120
		RequiresCondition: overload
		GrantsCondition: meltdown
	AttractsWorms:
		Intensity: 700
	ChangesHealth:
		Step: 40
		Delay: 3
		StartIfBelow: 50
	-RevealOnFire:
	Selectable:
		DecorationBounds: 44,38,0,0
	AmbientSound@onMeltDown:
		SoundFiles: DevastatorMeltdown01.wav
		RequiresCondition: overload
	ThrowsShrapnel@TrowOnMeldown:
		Weapons: Debris2, DeathHandClusterDebris, Debris4, DerbisSiegetank
		Pieces: 7, 15
		Range: 3c512, 7c0
		RequiresCondition: meltdown
	ThrowsShrapnel@standart:
		Weapons: Debris, Debris3, DerbisSiegetank
		Pieces: 1, 2
		RequiresCondition: !meltdown
	SpawnActorOnDeath:
		RequiresCondition: !meltdown
	SpawnActorOnDeath@crater:
		Actor: crater_big
		RequiresCondition: meltdown
		Offset: -1,0

deviator:
	AutoTargetPriority@bot:
		ValidTargets: Tank, Vehicle
		InvalidTargets: Infantry, Structure, Defense
		Priority: 50
		RequiresCondition: ignore-creeps
	Valued:
		Cost: 1100
	Buildable:
		Prerequisites: ~heavy.ordos, research_centre, ~techlevel.high
		BuildDuration: 618
		Description: Fires a warhead which changes\nthe allegiance of enemy vehicles for 14 sec \n Spread deviator missile cload after dead\n weak vs everythink
	Mobile:
		TurnSpeed: 12
		Speed: 47
	Health:
		HP: 11000
	Armor:
		Type: light
	RevealsShroud:
		Range: 5c112
	RevealOnFire:
		Duration: 50
	Armament:
		Weapon: DeviatorMissile
		LocalOffset: -299,0,85
	ThrowsShrapnel:
		Weapons: DerbisDeviator, Debris4, Debris
		Pieces: 5, 7
		Range: 0c512, 4c512
	SpawnActorOnDeath@dummygas1: # gasLeaks have effects only if husk is alive
		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

^combat_tank:
	GrantRandomCondition:
		Conditions: Husk01, Husk02, Husk03, Husk04 #random dead effects
	AutoTargetPriority@bot:
		InvalidTargets: Infantry
		ValidTargets: Vehicle, Defense, Structure, Tank
		Priority: 40
		RequiresCondition: ignore-creeps
	Buildable:
		Queue: Armor
		BuildDuration: 432
		Description: Main Battle Tank\n  Modest vs Tanks, vehicles\n  Weak vs Infantry, Missiles \n Can crush Infantry
	Valued:
		Cost: 700
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 22000
	Armor:
		Type: heavy
	Mobile:
		Speed: 67
		TurnSpeed: 20
	RevealsShroud:
		Range: 5c512
	Turreted:
		TurnSpeed: 20
		RealignDelay: 0
	Armament:
		Weapon: 80mm_A
		Recoil: 128
		RecoilRecovery: 32
		LocalOffset: 256,0,0
		MuzzleSequence: muzzle
	ThrowsShrapnel:
		Weapons: Debris, Debris3, debris_vehicle02, debris_vehicle01
		Pieces: 0, 2
		Range: 2c0, 4c0

combat_tank_a:
	Inherits: ^combat_tank
	Buildable:
		Prerequisites: ~heavy.atreides_combat
	Mobile:
		TurnSpeed: 20
	Armament:
		Weapon: 80mm_A
	SpawnActorOnDeath:
		Actor: combat_tank_a.husk
		RequiresCondition: Husk01
	SpawnActorOnDeath@husk02:
		Actor: combat_tank_a.husk02
		RequiresCondition: Husk02
	SpawnActorOnDeath@husk03:
		Actor: combat_tank_a.husk03
		RequiresCondition: Husk03
	SpawnActorOnDeath@husk04:
		Actor: combat_tank_a.husk04
		RequiresCondition: Husk04
	ThrowsShrapnel@turret:
		Weapons: debris_turret.atreides
		Pieces: 1,1
		Range: 0c250, 2c512
		RequiresCondition: Husk01
	ThrowsShrapnel@turret01:
		Weapons: debris_turret01.atreides
		Pieces: 1,1
		Range: 1c0, 2c512
		RequiresCondition: Husk02


combat_tank_h:
	Inherits: ^combat_tank
	Buildable:
		Prerequisites: ~heavy.harkonnen_combat
	Armament:
		Weapon: 80mm_H
	Mobile:
		Speed: 57
		TurnSpeed: 17
		Locomotor: tank_harkonnen #faster on dunes
	Health:
		HP: 28000
	SpawnActorOnDeath:
		Actor: combat_tank_h.husk
		RequiresCondition: Husk01
	SpawnActorOnDeath@husk02:
		Actor: combat_tank_h.husk02
		RequiresCondition: Husk02
	SpawnActorOnDeath@husk03:
		Actor: combat_tank_h.husk03
		RequiresCondition: Husk03
	SpawnActorOnDeath@husk04:
		Actor: combat_tank_h.husk04
		RequiresCondition: Husk04
	ThrowsShrapnel@turret:
		Weapons: debris_turret.harkonnen
		Pieces: 1,1
		Range: 0c250, 2c512
		RequiresCondition: Husk01
	ThrowsShrapnel@turret01:
		Weapons: debris_turret01.harkonnen
		Pieces: 1,1
		Range: 1c0, 2c512
		RequiresCondition: Husk02

combat_tank_o:
	Inherits: ^combat_tank
	Buildable:
		Prerequisites: ~heavy.ordos_combat
	Turreted:
		TurnSpeed: 24
	Armament:
		Weapon: 80mm_O
	Mobile:
		Speed: 76
		TurnSpeed: 22
	Health:
		HP: 19000
	SpawnActorOnDeath:
		Actor: combat_tank_o.husk
		RequiresCondition: Husk01
	SpawnActorOnDeath@husk02:
		Actor: combat_tank_o.husk02
		RequiresCondition: Husk02
	SpawnActorOnDeath@husk03:
		Actor: combat_tank_o.husk03
		RequiresCondition: Husk03
	SpawnActorOnDeath@husk04:
		Actor: combat_tank_o.husk04
		RequiresCondition: Husk04
	ThrowsShrapnel@turret:
		Weapons: debris_turret.ordos
		Pieces: 1,1
		Range: 1c0, 2c512
		RequiresCondition: Husk01 || Husk02


carryall.reinforce:
	Inherits: ^Plane #		LandingSounds: adv_carryall_land_1.wav  need local sound implemented
	Valued: #				TakeoffSounds: adv_carryall_takeoff_1.wav
		Cost: 1100
	UpdatesPlayerStatistics:
		AddToAssetsValue: false
	Tooltip:
		Name: Carryall
	Health:
		HP: 11000
	Armor:
		Type: light
	Aircraft:
		CruiseAltitude: 2160
		CruisingCondition: cruising
		Speed: 170
		TurnSpeed: 16
		LandableTerrainTypes: Sand, Rock, Transition, Spice, SpiceSand, Dune, Concrete
		Repulsable: False
		AirborneCondition: airborne
		CanSlide: True
		VTOL: true
		IdleTurnSpeed: 5
		IdleSpeed: 115
	ThrowsShrapnel@derbis:
		Weapons: Debris, Debris2, Debris3, Debris4, debris_vehicle01, debris_vehicle02
		Pieces: 4, 8
		Range: 1c0, 6c0
	ThrowsShrapnel@derbisExplosions:
		Weapons: DeathHandClusterDebris
		Pieces: 1 , 3
		Range: 1c0, 5c0
	ThrowsShrapnel@derbisExplosions2:
		Weapons: DeathHandClusterDebris
		Pieces: 0 , 2
		Range: 1c0, 5c0
	SpawnActorOnDeath@rotor:
		Actor: rotor
		SkipMakeAnimations: false
		Offset: 0, 1
		RequiresCondition: cruising
	HiddenUnderFog:
		AlwaysVisibleRelationships: Ally

carryall.reinforce_with_sound:
	Inherits: carryall.reinforce
	Health:
		HP: 8000
	Carryall:
		BeforeUnloadDelay: 200
		BeforeLoadDelay: 100
	Aircraft:
		MinAirborneAltitude: 400
		TakeoffSounds: adv_carryall_takeoff_1.wav
		LandingSounds: adv_carryall_land_1.wav
		Speed: 140
	RevealsShroud@landing:
		Range: 3c0
		RequiresCondition: !cruising
		Type: CenterPosition
	RevealsShroud@onland:
		Range: 4c0
		RequiresCondition: !airborne
		Type: CenterPosition
	AmbientSound:
		SoundFiles: carryallSound(2).wav
		RequiresCondition: cruising
	SpawnActorOnDeath@LANDING:
		Actor: carryall.huskVTOL_reinforce
	SpawnActorOnDeath@rotor2:
		Actor: rotor
		Offset: 0, 1

light_inf:
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: ignore-creeps
	AutoTargetPriority@bot2:
		ValidTargets: Vehicle
		Priority: 20
		RequiresCondition: bot-owned
	Buildable:
		Queue: Infantry
		BuildDuration: 62
	Valued:
		Cost: 50
	Health:
		HP: 6000
	Mobile:
		Speed: 43
	Armament:
		Weapon: LMG
	WithInfantryBody:
		DefaultAttackSequence: shoot

ordos_light_drop_squadleader:
	Inherits: light_inf
	RenderSprites:
		Image: light_inf
	ProducibleWithLevel:
		Prerequisites: techlevel.medium
		InitialLevels: 4
	UpdatesPlayerStatistics:
		OverrideActor: light_inf
	-Buildable:

ordos_light_drop:
	Inherits: light_inf
	RenderSprites:
		Image: light_inf
	ProducibleWithLevel:
		Prerequisites: techlevel.medium
		InitialLevels: 3
	UpdatesPlayerStatistics:
		OverrideActor: light_inf
	-Buildable:

ordos_trooper_drop:
	Inherits: trooper
	RenderSprites:
		Image: trooper
	ProducibleWithLevel:
		Prerequisites: techlevel.medium
		InitialLevels: 2
	UpdatesPlayerStatistics:
		OverrideActor: trooper
	-Buildable:

trooper:
	AutoTargetPriority@bot:
		InvalidTargets: Infantry
		ValidTargets: Vehicle, Defense, Structure, Tank
		Priority: 50
		RequiresCondition: ignore-creeps
	Buildable:
		Prerequisites: upgrade.barracks, ~techlevel.medium
		BuildDuration: 120
		Description: Anti-tank infantry\n  Strong vs Tanks\n  Weak vs Infantry, Artillery, moving targets 
	Valued:
		Cost: 120
	Health:
		HP: 7000
	RevealsShroud:
		Range: 4c768
	Mobile:
		Speed: 31
	Armament:
		Weapon: Bazooka
		LocalOffset: 128,0,256
	TakeCover:
		ProneOffset: 324,0,-204
	WithInfantryBody:
		DefaultAttackSequence: shoot

engineer:
	Buildable:
		Prerequisites: upgrade.barracks, ~techlevel.medium
		BuildDuration: 160
	Valued:
		Cost: 400
	Health:
		HP: 5000
	RevealsShroud:
		Range: 2c768
	Mobile:
		Speed: 31
	EngineerRepair:
	CaptureManager:
	Captures:
		CaptureTypes: building
	Captures@cliff:
		CaptureTypes: cliff
		ConsumedByCapture: false
		CaptureDelay: 150

grenadier:
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: ignore-creeps # mean this bot-owned && (attack-move || assault-move)
	Buildable:
		Prerequisites: ~barracks.atreides, upgrade.barracks, high_tech_factory, ~techlevel.medium
		BuildDuration: 105
	Valued:
		Cost: 80
	Health:
		HP: 6000
	Mobile:
		Speed: 43
	Armament:
		Weapon: grenade
		LocalOffset: 192,0,224
		FireDelay: 3
	TakeCover:
		ProneOffset: 96,100,-64
	WithInfantryBody:
		DefaultAttackSequence: throw
	Explodes:
		Weapon: GrenDeath
		EmptyWeapon: GrenDeath

mpsardaukar:
	Buildable:
		Prerequisites: ~barracks.harkonnen, upgrade.barracks, starport, ~techlevel.medium
		BuildDuration: 190
		Description: Elite assault infantry of Corrino\n  Strong vs  Vehicles\n Modest vs Infantry\n  Weak vs Artillery, Sonic Beams
	Valued:
		Cost: 200
	Armament@PRIMARY:
		Weapon: M_LMG_H
	Armament@SECONDARY:
		Weapon: M_HMG_H

saboteur:
	Buildable:
		Prerequisites: ~disabled
		Description: Always cloaked. Special Ability: destroy buildings and SelfKill explosion
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	WithDecoration@ScullIcon:
		Image: skullicon
		Sequence: idle
		ValidRelationships: Enemy, Neutral, Ally
		Palette: effect
		Position: BottomRight
		Margin: 5, 6
	Health:
		HP: 6000
	
	Mobile:
		Speed: 43
		PauseOnCondition: SuicideAtt
	Demolition:
		DetonationDelay: 60
		Flashes: 3
		EnterBehaviour: Suicide
	-RevealOnFire:
	Cloak:
		InitialDelay: 85
		CloakDelay: 85
		CloakSound: STEALTH1.WAV
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Damage, Heal
		IsPlayerPalette: true
		PauseOnCondition: cloak-force-disabled
		RequiresCondition: !SuicideAtt
	Explodes@Selfkill:
		Weapon: PlasmaSaboteur
		EmptyWeapon: PlasmaSaboteur
		RequiresCondition: kamikadze
	GrantConditionOnDeploy:
		DeployedCondition: SuicideAtt
		PauseOnCondition: SuicideAtt
	KillsSelf@SuicideKillCount:
		Delay: 50
		RequiresCondition: SuicideAtt
		GrantsCondition: kamikadze
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	Voiced:
		VoiceSet: SaboteurVoice
	AmbientSound@onSuicide:
		SoundFiles: explodeSaboteurEmperor02.wav
		RequiresCondition: SuicideAtt
	-AttackFrontal:
	TakeCover:
		RequiresCondition: SuicideAtt
	SpawnActorOnDeath@crater:
		Actor: crater_big
		RequiresCondition: kamikadze
		Offset: -1,0

fremen:
	Buildable:
		Prerequisites: ~disabled
	Mobile:
		Speed: 43
	Valued:
		Cost: 200 ## actually 0, but spawns from support power at Palace
	Health:
		HP: 7000
	RevealsShroud:
		Range: 4c768
	AutoTarget:
		ScanRadius: 7
		InitialStance: HoldFire
		InitialStanceAI: ReturnFire
	Armament@PRIMARY:
		Weapon: Fremen_S
	Armament@SECONDARY:
		Weapon: Fremen_L
	ChangesHealth@regen:
		Step: 0
		PercentageStep: 4
		Delay: 125
		StartIfBelow: 50
		DamageCooldown: 125	

ornithopter:
	Inherits: ^Plane
	Health:
		HP: 5000
	Aircraft:
		MinAirborneAltitude: 500
		AirborneCondition: airborne
	Targetable@AIRBORNE:
		TargetTypes: Air
		RequiresCondition: airborne
	AmbientSound:
		SoundFiles: ornithopterMotor01.wav
	ThrowsShrapnel@derbis:
		Weapons: Debris, Debris2, debris_vehicle01
		Pieces: 1, 3
		Range: 0c512, 2c0
	HitShape:
		Type: Circle
			Radius: 32
