#MISC AND BALANCE CHANGES
^AutoTargetGround:
	AutoTarget:
		AttackAnythingCondition: stance-attackanything
	AutoTargetPriority@DEFAULT:
		RequiresCondition: !stance-attackanything
		ValidTargets: Infantry, Vehicle, Creep, Water, Defense, KwisatzHaderach, Wormrider
		InvalidTargets: NoAutoTarget
	AutoTargetPriority@ATTACKANYTHING:
		RequiresCondition: stance-attackanything
		ValidTargets: Infantry, Vehicle, Creep, Water, Structure, Defense, KwisatzHaderach, Wormrider
		InvalidTargets: NoAutoTarget
^AutoTargetAll:
	AutoTarget:
		AttackAnythingCondition: stance-attackanything
	AutoTargetPriority@DEFAULT:
		RequiresCondition: !stance-attackanything
		ValidTargets: Infantry, Vehicle, Creep, Water, Air, Defense, KwisatzHaderach, Wormrider
		InvalidTargets: NoAutoTarget
	AutoTargetPriority@ATTACKANYTHING:
		RequiresCondition: stance-attackanything
		ValidTargets: Infantry, Vehicle, Creep, Water, Air, Structure, Defense, KwisatzHaderach, Wormrider
		InvalidTargets: NoAutoTarget
^AutoTargetAir:
	AutoTarget:
		AttackAnythingCondition: stance-attackanything
	AutoTargetPriority@DEFAULT:
		RequiresCondition: !stance-attackanything
		ValidTargets: Air
		InvalidTargets: NoAutoTarget
	AutoTargetPriority@ATTACKANYTHING:
		RequiresCondition: stance-attackanything
		ValidTargets: Air
		InvalidTargets: NoAutoTarget
^AutoTargetAirAssaultMove:
	Inherits: ^AutoTargetAir
	AutoTargetPriority@DEFAULT:
		RequiresCondition: !stance-attackanything && !assault-move
	AutoTargetPriority@ATTACKANYTHING:
		RequiresCondition: stance-attackanything || assault-move
	AttackMove:
		AssaultMoveCondition: assault-move
^Infantry:
	ExternalCondition:
		Condition: Inspired
	ProximityExternalCondition:
		Condition: MeleeRange
		Range: 1c256
		ValidStances: Enemy
	-Targetable:
	Targetable@UNINSPIRED:
		TargetTypes: Ground, Infantry, Uninspired
		RequiresCondition: !Inspired
	Targetable@INSPIRED:
		TargetTypes: Ground, Infantry
		RequiresCondition: Inspired
^Vehicle:
	Crushable:
		CrushClasses: vehicle
quad:
	RenderSprites:
		Image: quad_rocket
trooper:
	Buildable:
		Prerequisites: barracks
engineer:
	#..so it cant be transported by the troop crawler
	Passenger:
		CargoType: dangerousInfantry
mcv:
	Buildable:
		Description: Deploys into another Construction Yard\n  Unarmed\n  Builds buildings and defenses.
mobile_crane:
	Inherits: mcv
	Buildable:
		Prerequisites: ~disabled
		Description: Deploys into a Crane.\n  Unarmed\n  Builds only basic buildings.
	Tooltip:
		Name: Mobile Crane
	Mobile:
		Speed: 50
	Transforms:
		Facing: 16
		IntoActor: crane
		Offset: 0,-1
		TransformSounds: BUILD1.WAV
		NoTransformNotification: CannotDeploy
	Selectable:
		Class: mcv
		Priority: 3
#ATREIDES UNITS
trike_a:
	Inherits: trike
	Buildable:
		Prerequisites: ~light.atreides
		Description: Fast scout with gun turret \n  Strong vs Infantry\n  Weak vs Tanks, Aircraft
	Tooltip:
		Name: Atreides Trike
	Turreted:
		TurnSpeed: 10
		Offset: -200,0,30
		RealignDelay: 0
	-AttackFrontal:
	WithMuzzleOverlay:
	AttackTurreted:
	WithSpriteTurret:
	Armament@damage:
		Weapon: HMG
		LocalOffset: -200,0,0
		MuzzleSequence: muzzle
	Armament@muzzle:
		Weapon: HMG_muzzle
		LocalOffset: -200,0,0
		MuzzleSequence: muzzle
	RenderSprites:
		Image: trike_a
light_thopter:
	Inherits: ornithopter
	Inherits@AUTOTARGET: ^AutoTargetAirAssaultMove
	Valued:
		Cost: 700
	Buildable:
		Queue: Aircraft
		Prerequisites: high_tech_factory, ~techlevel.medium
		BuildPaletteOrder: 30
		BuildDuration: 400
		BuildDurationModifier: 40
		Description: Agile Airborne Scout\n Armed with anti air beam weapons.
	Health:
		HP: 7000
	Tooltip:
		Name: Light Thopter
	-RejectsOrders:
	-Interactable:
	AttackFrontal:
	AutoTarget:
	-Armament:
	Armament@Beam:
		Weapon: BeamCannon
	-AmmoPool:
	-AttackBomber:
	Aircraft:
		AirborneCondition: airborne
		MinAirborneAltitude: 50
		CanHover: True
		VTOL: True
		Speed: 150
		TurnSpeed: 20
		Repulsable: True
		RepulsionSpeed: 40
	RevealsShroud:
		Range: 6c768
		Type: CenterPosition
	Targetable:
		TargetTypes: Air
	Selectable:
		Bounds: 36,28,0,2
		Class: light_thopter
		DecorationBounds: 40,29,0,1
	WithSpriteControlGroupDecoration:
	SelectionDecorations:
	Voiced:
		VoiceSet: VehicleVoice
	RenderSprites:
		Image: ornithopter
	WithFacingSpriteBody:
		RequiresCondition: airborne
	WithFacingSpriteBody@landed:
		Name: landedbody
		Sequence: landed
		RequiresCondition: !airborne
	Repairable:
		RepairActors: repair_pad
advanced_harvester_a:
	Inherits: harvester
	Inherits@GAINSEXPERIENCE: ^GainsExperience
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Buildable:
		Prerequisites: refinery, ~heavy.atreides
		Description: Collects Spice for processing\n  Armed with a turret
	ProducibleWithLevel:
		InitialLevels: 1
	Tooltip:
		Name: Advanced Harvester
	Selectable:
		Class: combat_harvester
	Turreted:
		TurnSpeed: 5
		RealignDelay: 0
	AttackTurreted:
	WithMuzzleOverlay:
	WithSpriteTurret:
	Armament@damage:
		Weapon: HMG
		LocalOffset: -200,0,0
		MuzzleSequence: muzzle
	Armament@muzzle:
		Weapon: HMG_muzzle
		LocalOffset: -200,0,0
		MuzzleSequence: muzzle
	AutoTarget:
	WithMuzzleOverlay:
	RenderSprites:
		Image: harvester_a
combat_tank_a:
	ProducibleWithLevel:
		InitialLevels: 1
siege_tank_a:
	Inherits: siege_tank
	Buildable:
		Prerequisites: ~heavy.atreides, upgrade.heavy, ~techlevel.medium
	ProducibleWithLevel:
		InitialLevels: 1
	RenderSprites:
		Image: siege_tank
missile_tank_a:
	Inherits: missile_tank
	ProducibleWithLevel:
		InitialLevels: 1
	Buildable:
		Prerequisites: ~heavy.atreides, upgrade.heavy, research_centre, ~techlevel.high
	RenderSprites:
		Image: missile_tank
sonic_tank:
	ProducibleWithLevel:
		InitialLevels: 1
	Buildable:
		Prerequisites: ~heavy.atreides, research_centre, ~techlevel.house
loyalist:
	Inherits: ^Infantry
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Buildable:
		Queue: Infantry
		Prerequisites: ~barracks.atreides, upgrade.barracks, ~techlevel.high, high_tech_factory
		BuildPaletteOrder: 80
		BuildDuration: 68
		BuildDurationModifier: 60
		Description: Strong and fast Anti-Vehicular infantry\n  Strong vs Tanks\n  Weak vs Infantry
	Valued:
		Cost: 170
	Tooltip:
		Name: Atreides Loyalist
	Health:
		HP: 9000
	Mobile:
		Speed: 43	
	RevealsShroud:
		Range: 4c768
	Armament:
		Weapon: HandheldRocket
		FireDelay: 5
	AttackFrontal:
	WithInfantryBody:
		DefaultAttackSequence: shoot
		IdleSequences: idle1
	RenderSprites:
		Image: loyalist
propaganda_corps:
	Inherits: ^Infantry
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Valued:
		Cost: 200
	Buildable:
		Queue: Infantry
		BuildPaletteOrder: 90
		Prerequisites: ~barracks.atreides, upgrade.barracks, ~techlevel.house, palace.atreides
		BuildAtProductionType: Elite
		BuildDuration: 81
		BuildDurationModifier: 60
		Description: Elite Atreides Infantry which inspires troops\n  Strong vs Infantry.\n  Weak vs Vehicles.\n  Prevents sourrounding allies from going prone. 
	Tooltip:
		Name: Propaganda Corps
	Health:
		HP: 8000
	Mobile:
		Speed: 43
	Armament:
		Weapon: LMG
	AttackFrontal:
	WithInfantryBody:
		DefaultAttackSequence: shoot
		IdleSequences: idle1
	ProximityExternalCondition:
		Condition: Inspired
		Range: 3c511
		ValidStances: Ally
	-TakeCover:
	-MustBeDestroyed:
	RenderSprites:
		Image: propaganda_corps
paul_atreides:
	Inherits: ^Infantry
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	#Paul isnt Infantry so he can be "eaten" by worms and thereby transform into a worm-rider
	Targetable@UNINSPIRED:
		TargetTypes: Ground, KwisatzHaderach, Uninspired
		RequiresCondition: !Inspired
	Targetable@INSPIRED:
		TargetTypes: Ground, KwisatzHaderach
		RequiresCondition: Inspired
	Health:
		HP: 22500
	Mobile:
		Speed: 43
	Passenger:
		CargoType: dangerousInfantry
	PortableChrono:
		ChargeDelay: 800
		MaxDistance: 10
		TargetCursor: move
	Tooltip:
		Name: Paul Atreides
	Valued:
		Cost: 2500				
	RevealsShroud:
		Range: 6c768
	ProximityExternalCondition@spawnFremen:
		Condition: spawnFremen
		Range: 6c0
		ValidStances: Enemy
	GrantConditionOnTerrain:
		TerrainTypes: Sand, Dune, SpiceSand, Spice
		Condition: HiddeninSand
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	Cloak:
		InitialDelay: 0
		CloakDelay: 85
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Dock, Damage
		IsPlayerPalette: true
		CloakSound: veil.wav
		UncloakSound: unveil.wav
		RequiresCondition: !cloak-force-disabled && HiddeninSand
	ExternalCondition@MELEE:
		Condition: MeleeRange
	WithInfantryBody:
		AttackSequences: 
			primary: shoot
			secondary: close_combat
	Armament@PRIMARY:
		Weapon: RiotGun
		FireDelay: 3
	Armament@SECONDARY:
		Name: secondary
		RequiresCondition: MeleeRange
		Weapon: WeirdingWay
	AttackFrontal:
	Voiced:
		VoiceSet: FremenLeader
	AttractsWorms:
		Intensity: 1000
	RenderSprites:
		Image: paul_atreides
worm_rider:
	Inherits@1: ^ExistsInWorld
	Inherits@2: ^GainsExperience
	Inherits@3: ^SpriteActor
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Huntable:
	Mobile:
		TurnSpeed: 5
		Locomotor: wormrider
		Speed: 50
	SelectionDecorations:
	WithSpriteControlGroupDecoration:
	Selectable:
		Bounds: 40,45
	Targetable:
		TargetTypes: Ground, Wormrider
	AttackMove:
	DrawLineToTarget:
	HiddenUnderFog:
	ActorLostNotification:
	Guard:
		Voice: Guard
	Guardable:
	WithFacingSpriteBody:
	MustBeDestroyed:
	Voiced:
		VoiceSet: FremenVoice
	RevealOnFire:
	Valued:
		Cost: 3500
	Tooltip:
		Name: Wormrider
	Health:
		HP: 150000
	HitShape:
	Armor:
		Type: heavy
	RevealsShroud:
		Range: 7c768
	Explodes:
		Weapon: UnitExplodeSmall
		EmptyWeapon: UnitExplodeSmall
	Transforms:
		IntoActor: wormdetonation_dummy
		Facing: 0
	Turreted@PRIMARY:
		Turret: primary
		Offset: -600,0,200
		TurnSpeed: 20
	Turreted@SECONDARY:
		Turret: secondary
		Offset: -50,-150,350
		TurnSpeed: 20
	Armament@PRIMARY:
		Turret: primary
		Weapon: sound
		Recoil: 30
		RecoilRecovery: 15
	Armament@SECONDARY:
		Name: secondary
		Turret: secondary
		Weapon: sound
		Recoil: 30
		RecoilRecovery: 15
	AttackTurreted:
	WithSpriteTurret@PRIMARY:
		Turret: primary
	WithSpriteTurret@SECONDARY:
		Turret: secondary
	QuantizeFacingsFromSequence:
		Sequence: stand
	WithFacingSpriteBody:
		Sequence: stand
	WithMoveAnimation:
		MoveSequence: walk
	RenderSprites: 
		Image: worm_rider
wormdetonation_dummy:
	EditorOnlyTooltip:
		Name: wpdummy
	AlwaysVisible:
	Interactable:
	Immobile:
		OccupiesSpace: false
	Health:
		HP: 10000
	HitShape:
	BodyOrientation:
		QuantizedFacings: 16
	KillsSelf:
	Explodes:
		Weapon: ExplodeDestroySpice
		EmptyWeapon: ExplodeDestroySpice
	OwnerLostAction:
		Action: Dispose
	RenderSpritesEditorOnly:
		Image: worm_rider
#ORDOS UNITS
raider:
	Selectable:
		Class: trike
stealth_raider:
	Buildable:
		Prerequisites: ~light.ordos, upgrade.light, high_tech_factory, ~techlevel.high
	Selectable:
		Class: stealth_raider
advanced_harvester_o:
	Inherits: harvester
	Buildable:
		Prerequisites: refinery, ~heavy.ordos
		Description: Collects Spice for processing\n  Unarmed\n  Doesn't attract worms
	Tooltip:
		Name: Advanced Harvester
	-AttractsWorms:
	RenderSprites:
		Image: harvester_o
missile_tank_o:
	Inherits: missile_tank		
	Buildable:
		Prerequisites: ~heavy.ordos, upgrade.heavy, research_centre, ~techlevel.high
	Turreted:
		TurnSpeed: 5
		Offset: -200,0,170
		RealignDelay: 0
	-AttackFrontal:
	AttackTurreted:
	WithSpriteTurret:
	-Armament:
	Armament@damage:
		Weapon: mtank_pri
		LocalOffset: -200,0,0
	RenderSprites:
		Image: missile_tank_o
deviator:
	Buildable:
		BuildPaletteOrder: 100
		Prerequisites: ~heavy.ordos, research_centre, ~techlevel.house	
siege_tank_o:
	Inherits: siege_tank
	Buildable:
		Prerequisites: upgrade.heavy, ~heavy.ordos, ~techlevel.medium
	-AttackFrontal:
	AttackTurreted:
	Armament:
		Weapon: 155mm
		Recoil: 150
		RecoilRecovery: 19
		LocalOffset: 0,0,320
		MuzzleSequence: muzzle
	RenderSprites:
		Image: siege_tank_o		
saboteur:
	Valued:
		Cost: 250
	Buildable:
		BuildPaletteOrder: 80
		Prerequisites: ~barracks.ordos, upgrade.barracks, ~techlevel.high, high_tech_factory
		BuildDuration: 120
		BuildDurationModifier: 60
		Description: Sneaky infantry, armed with explosives\n  Strong vs Buildings and Vehicles\n  Weak vs Everything\n  Special Ability: destroy buildings and vehicles\n  Stealth granted by Ordos Palace 
	Passenger:
		CargoType: dangerousInfantry
	Demolition:
		DetonationDelay: 125
		Flashes: 5
	GrantConditionOnPrerequisite@STEALTH:
		Condition: PalaceStealth
		Prerequisites: palace.ordos
	Cloak:
		RequiresCondition: !cloak-force-disabled && PalaceStealth
guild_agent:
	Inherits: ^Infantry
	Buildable:
		Queue: Infantry
		BuildPaletteOrder: 90
		Prerequisites: ~barracks.ordos, upgrade.barracks, ~techlevel.house, palace.ordos
		BuildDuration: 140
		BuildAtProductionType: Elite
		BuildDurationModifier: 60
		Description: Elite Ordos spy infantry.\n  Weak vs Everything\n  Reveals important information inside enemy bases.\n  Stealth granted by Ordos Palace\n  Unarmed
	Valued:
		Cost: 350
	Tooltip:
		Name: Guild Agent
	Health:
		HP: 5000
	RevealsShroud:
		Range: 6c0
	Mobile:
		Speed: 43
	-RevealOnFire:
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	ProximityExternalCondition:
		Condition: reveal_secrets
		Range: 5c768
		ValidStances: Enemy
	Cloak:
		InitialDelay: 30
		CloakDelay: 30
		UncloakSound: STEALTH2.WAV
		UncloakOn: Attack, Unload, Infiltrate, Demolish
		IsPlayerPalette: true
		RequiresCondition: !cloak-force-disabled
	WithInfantryBody:
		IdleSequences: idle1
	RenderSprites:
		Image: guild_agent
#HARKONNEN UNITS
quad_hmg:
	Inherits: quad
	Valued:
		Cost: 300
	Buildable:
		Prerequisites: ~light.harkonnen
		BuildPaletteOrder: 10
		BuildDuration: 194
		Description: Durable scout\n  Strong vs Infantry\n  Weak vs Tanks, Aircraft
	Tooltip:
		Name: HMG Quad
	Selectable:
		Class: trike
	WithMuzzleOverlay:
	-Armament:
	Armament@damage:
		Weapon: HMG
		LocalOffset: -300,0,0
	Armament@muzzle:
		Weapon: HMG_muzzle
		LocalOffset: -300,0,0
		MuzzleSequence: muzzle
	RenderSprites:
		Image: quad_hmg
advanced_harvester_h:
	Inherits: harvester
	Buildable:
		Prerequisites: refinery, ~heavy.harkonnen
		Description: Collects 30% more Spice for processing\n  Unarmed
	Tooltip:
		Name: Advanced Harvester
	Harvester:
		PipCount: 9
		Capacity: 36
	RenderSprites:
		Image: harvester_h
troop_crawler:
	Inherits: quad
	-Armament:
	-AttackFrontal:
	-AutoTarget:
	-AutoTargetPriority@DEFAULT:
	-AutoTargetPriority@ATTACKANYTHING:
	AttackMove:
		-AssaultMoveCondition:
	Buildable:
		Queue: Vehicle
		Prerequisites: ~light.harkonnen, barracks, upgrade.light,  ~techlevel.medium
		BuildPaletteOrder: 30
		Description: Quick Infantry Transport\n  Loads up to 8 passengers
	Tooltip:
		Name: Troop Crawler
	Cargo:
		MaxWeight: 8
		PipCount: 8
		Types: Infantry
	Selectable:
		Class: troop_crawler
		DecorationBounds: 40,29,0,0
	SelectionDecorations:
	RenderSprites:
		Image: troop_crawler
siege_tank_h:
	Inherits: siege_tank
	Buildable:
		Prerequisites: ~heavy.harkonnen, upgrade.heavy, ~techlevel.medium
	AmmoPool:
		Ammo: 4
		AmmoCondition: ammo
	ReloadAmmoPool:
		Delay: 120
		ResetOnFire: True
	-Armament:
	GrantCondition@armed:
		Condition: armed
		RequiresCondition: ammo == 4 || !reloading
	GrantCondition@reloading:
		Condition: reloading
		RequiresCondition: ammo == 0 || !armed
	Armament@primary:
		Weapon: 155mm_x4
		Recoil: 150
		RecoilRecovery: 19
		LocalOffset: 256,128,320, 256,-128,320
		PauseOnCondition: reloading
	Armament@TargetDummy:
		Weapon: 155mm_Dummy
	RenderSprites:
		Image: siege_tank_h
missile_tank_h:
	Inherits: missile_tank
	Buildable:
		Prerequisites: ~heavy.harkonnen, upgrade.heavy, research_centre, ~techlevel.high
	Armament:
		Weapon: mtank_pri_salvo
		LocalOffset: -128,128,171, -128,-128,171
	RenderSprites:
		Image: missile_tank_h
assassin:
	Inherits: ^Infantry
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Valued:
		Cost: 225
	Buildable:
		Queue: Infantry
		BuildPaletteOrder: 70
		Prerequisites: ~barracks.harkonnen, upgrade.barracks, high_tech_factory, ~techlevel.high
		BuildDuration: 100
		BuildDurationModifier: 60
		Description: Infantry with long range weaponry\n  Strong vs Infantry\n  Weak vs Vehicles\n  Stealthed in rough terrain 
	Tooltip:
		Name: Assassin
	Health:
		HP: 7500
	Mobile:
		Speed: 31
	RevealsShroud:
		Range: 6c0
	Armament:
		Weapon: SniperRifle
		FireDelay: 4
	AttackFrontal:
	WithInfantryBody:
		DefaultAttackSequence: shoot
		MinIdleDelay: 90
		MaxIdleDelay: 200
	GrantConditionOnTerrain:
		TerrainTypes: Rough
		Condition: hiddenbetweenrocks
	Cloak:
		InitialDelay: 120
		CloakDelay: 120
		UncloakOn: Move, Unload, Infiltrate, Demolish, Dock, Damage
		IsPlayerPalette: true
		RequiresCondition: !cloak-force-disabled && hiddenbetweenrocks
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	-MustBeDestroyed:
	RenderSprites:
		Image: assassin
mpsardaukar:
	Valued:
		Cost: 275
	Buildable:
		Prerequisites: ~barracks.harkonnen, upgrade.barracks, ~techlevel.house, palace.harkonnen
		BuildAtProductionType: Elite
		BuildPaletteOrder: 80
		Description: Elite assault infantry\n  Strong vs Infantry, Vehicles\n  Weak vs Artillery\n  Uncrushable\n  Has close combat attack
	Crushable:
		CrushClasses: vehicle
	ExternalCondition@MELEE:
		Condition: MeleeRange
	AttackFrontal:
		Armaments: primary, secondary, tertiary
	Armament@Tertiary:
		Name: tertiary
		RequiresCondition: MeleeRange
		Weapon: Dagger
		FireDelay: 2
	-Explodes: # useless if uncrushable
	WithInfantryBody:
		AttackSequences: 
			primary: shoot
			secondary: shoot
			tertiary: stab
	RenderSprites:
		Image: sardaukar
	
devastator:
	Buildable:
		Prerequisites: ~heavy.harkonnen, research_centre, ~techlevel.house
#FREMEN RULES
sietch:
	Capturable:
		Types: building
	Production:
		Produces: Infantry, Fremen
	RallyPoint:
		Path: 1,2
	Exit@1:
		SpawnOffset: 352,576,0
		ExitCell: 0,2
	Exit@2:
		SpawnOffset: 512,480,0
		ExitCell: 1,2
	ProductionBar:
		ProductionType: Infantry
	FrozenUnderFog:
	ProvidesPrerequisite@buildingname:
	PrimaryBuilding:
		PrimaryCondition: primary
		ProductionQueues: Infantry
		SelectionNotification: PrimaryBuildingSelected
	WithTextDecoration@primary:
		RequiresSelection: true
		Text: PRIMARY
		ReferencePoint: Top
		ZOffset: 256
		RequiresCondition: primary
	CaptureManager:
fremen:
	Buildable:
		Prerequisites: ~sietch
		BuildAtProductionType: Fremen
		Description: Elite infantry unit armed with assault rifles and close combat weapons\n  Strong vs Infantry\n  Weak vs Artillery\n  Invisibility on Sand\n  Close Combat Attack
	GrantConditionOnTerrain:
		TerrainTypes: Sand, Dune, SpiceSand, Spice
		Condition: HiddeninSand
	Cloak:
		CloakSound: veil.wav
		UncloakSound: unveil.wav
		PauseOnCondition: !(!cloak-force-disabled && HiddeninSand)
	AutoTarget:
		InitialStance: Defend
		InitialStanceAI: Defend
	ExternalCondition@MELEE:
		Condition: MeleeRange
	Armament@TERTIARY:
		Name: tertiary
		RequiresCondition: MeleeRange
		Weapon: Dagger
		FireDelay: 2
	AttackFrontal:
		Armaments: primary, secondary, tertiary
fremen_skyhunter:
	Inherits: fremen
	Inherits@AUTOTARGET: ^AutoTargetAllAssaultMove
	Tooltip:
		Name: Fremen Skyhunter
	Buildable:
		Description: Elite infantry unit armed with Rockets and close combat weapons\n  Strong vs Aircraft (Infantry)\n  Weak vs Artillery\n  Invisibility on Sand\n  Close Combat Attack
	Buildable:
		Prerequisites: ~sietch
	-TakeCover:
	Cloak:
		CloakDelay: 116
	Armament@PRIMARY:
		Weapon: mtank_pri
	-Armament@SECONDARY:
	RenderSprites:
		Image: fremen
#CARRYALLS
carryall.reinforce:
	Cargo:
		MaxWeight: 5
	HiddenUnderFog:
		AlwaysVisibleStances: Ally
carryall:
	WithDeathAnimation:
		FallbackSequence: die-sabotaged
		DeathSequencePalette: effect
		DeathPaletteIsPlayerPalette: False
carryall.controllable:
	Inherits: carryall.reinforce
	-Interactable:
	-Buildable:
	-Carryall:
	Cargo:
		PipCount: 5
		LoadedCondition: loaded
	RejectsOrders:
		RequiresCondition: !loaded
	GrantConditionOnPrerequisite@STEALTH:
		Condition: PalaceStealth
		Prerequisites: palace.ordos
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	Cloak:
		CloakTypes: SkyDistort
		InitialDelay: 0
		CloakDelay: 30
		UncloakSound: STEALTH2.WAV
		UncloakOn: Attack, Unload, Infiltrate, Demolish
		IsPlayerPalette: true
		PauseOnCondition: !(!cloak-force-disabled && PalaceStealth && airborne)
	Aircraft:
		Speed: 110
		Repulsable: True
		RepulsionSpeed: 40
	Selectable:
		Bounds: 36,28,0,2
		Class: carryall
		DecorationBounds: 40,29,0,1
	SelectionDecorations:
carryall.bomber:
	Inherits: carryall.reinforce
	-Buildable:
	-Carryall:
	-Cargo:
	RejectsOrders:
	AttackBomber:
	Armament:
		Weapon: GasBomb
	Health:
		HP: 30000
	AmmoPool:
		Ammo: 1
	GrantConditionOnPrerequisite@STEALTH:
		Condition: PalaceStealth
		Prerequisites: palace.ordos
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	Cloak:
		CloakTypes: SkyDistort
		InitialDelay: 0
		CloakDelay: 30
		UncloakSound: STEALTH2.WAV
		UncloakOn: Attack, Unload, Infiltrate, Demolish
		IsPlayerPalette: true
		PauseOnCondition: !(!cloak-force-disabled && PalaceStealth && airborne)
frigate.controllable:
	Inherits: carryall.controllable
	-Cloak:
	-GrantConditionOnPrerequisite@STEALTH:
	-GrantConditionOnDamageState@UNCLOAK:
	-SpawnActorOnDeath@CRUISING:
	-SpawnActorOnDeath@LANDING:
	Cargo:
		PipCount: 7
	Tooltip:
		Name: Frigate
	Aircraft:
		Speed: 189
		-CruisingCondition:
	RenderSprites:
		Image: frigate
	RevealsShroud:
		Range: 5c768
		Type: CenterPosition
	Explodes:
		Weapon: UnitExplodeLarge
		EmptyWeapon: UnitExplodeLarge
#STARPORT ADDITIONS
combat_tank_m.starport:
	Inherits: ^combat_tank
	Buildable:
		Prerequisites: starport
		Queue: Starport
		Description: Main Battle Tank\n  Strong vs Tanks\n  Weak vs Infantry, Aircraft\n \n Cheap mass product by licensed manufacturers.
	Valued:
		Cost: 875
	Armament:
		Weapon: 80mm_O
	SpawnActorOnDeath:
		Actor: combat_tank_h.husk
	RenderSprites:
		Image: combat_tank_m
mobile_crane.starport:
	Inherits: mobile_crane
	Buildable:
		Prerequisites: starport
		Queue: Starport
	Valued:
		Cost: 2000
	RenderSprites:
		Image: mobile_crane
quad.starport:
	RenderSprites:
		Image: quad_rocket
#DISABLED UNITS 
trike:
	Buildable:
		Prerequisites: ~disabled
mcv.starport:
	Buildable:
		Prerequisites: ~disabled
combat_tank_a.starport:
	Buildable:
		Prerequisites: ~disabled
combat_tank_h.starport:
	Buildable:
		Prerequisites: ~disabled
combat_tank_o.starport:
	Buildable:
		Prerequisites: ~disabled
harvester:
	Buildable:
		Prerequisites: ~disabled
grenadier:
	Buildable:
		Prerequisites: ~disabled
siege_tank:
	Buildable:
		Prerequisites: ~disabled
		Description: Siege Artillery with extreme range\n  Strong vs Infantry, Buildings\n  Weak vs Tanks
	Armament:
		LocalOffset: 512,0,400
	AutoTarget:
		InitialStance: AttackAnything
missile_tank:
	Buildable:
		Prerequisites: ~disabled
		Description: Rocket Artillery\n  Strong vs Vehicles, Buildings, Aircraft\n  Weak vs Infantry\n\n  Detects stealthed aircraft.
	DetectCloaked:
		CloakTypes: SkyDistort
		Range: 6c0
	WithRangeCircle:
		Range: 6c0
		Color: B2B2FF60
nsfremen:
	#for lint integrity
	-GrantConditionOnTerrain: