^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:
	AutoTargetPriority@Bot_walls:
		RequiresCondition: ignore-creeps
		ValidTargets: Wall

^AutoTargetAllAssaultMove:
	AutoTargetPriority@Bot_walls:
		RequiresCondition: ignore-creeps
		ValidTargets: Wall

^onsand:
	GrantConditionOnTerrain@onsand:
		TerrainTypes: Sand, Dune, SpiceSand, Spice
		Condition: onsand

^temporarycloak:
	ExternalCondition@temporeryclock:
		Condition: temporery_clock
	Cloak@temporeryclock:
		RequiresCondition: temporery_clock
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		InitialDelay: 30
		CloakDelay: 104
		IsPlayerPalette: true

^chaos_bomb_influence:
	ExternalCondition@Trigger:
		Condition: chaos_bomb
	Armament@chaos_bomb_influence:
		TargetRelationships: Enemy, Ally, Neutral
		RequiresCondition: chaos_bomb
	AttackWander:
		WanderMoveRadius: 3
		RequiresCondition: chaos_bomb
	RejectsOrders@chaos_bomb_influence:
		RequiresCondition: chaos_bomb
	WithDecoration@skullFromRA:
		Image: pips
		Sequence: pip-skull
		Palette: temperat
		Position: TopLeft
		ValidRelationships: Ally, Enemy, Neutral
		RequiresCondition: chaos_bomb

^jammedvision:
	ExternalCondition@jammed:
		Condition: jammed
	RevealsShroudMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 50
	DetectCloakedMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 5
	WithColoredOverlay@black:
		Color: 3E202080
		RequiresCondition: jammed
	WithDecoration@skullFromRA:
		Image: pips
		Sequence: pip-jammer
		Palette: disabled
		Position: TopLeft
		ValidRelationships: Ally, Enemy, Neutral
		RequiresCondition: jammed

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

^BotLogicRepairing:
	ExternalCondition@giveControl:
		Condition: reject_control
	ExternalCondition@startrepair:
		Condition: start_repair
	ScriptTags:
	RejectsOrders:
		RequiresCondition: reject_control
	RejectsOrders@rejectOnRepairPad:
		RequiresCondition: repairing
	GrantConditionOnDamageState@fullyrepaird:
		Condition: full_hp
		ValidDamageStates: Undamaged
	GrantCondition:
		RequiresCondition: start_repair && !full_hp
		Condition: repairing
	ChangesHealth@BotRepairing:
		Step: 800
		Delay: 10
		StartIfBelow: 105
		RequiresCondition: start_repair

^botDeployLogic:
	GrantConditionOnBotOwner@Imstupidbotthatcandeploy:
		Condition: Imbot
		Bots: omnius, vidious, gladius
	GrantConditionOnAttack@deploing:
		Condition: dummyfire
		RevokeDelay: 400
		ArmamentNames: secondary
		RequiresCondition: Imbot
	GrantConditionOnAttack@beforedeploy:
		Condition: beforedeploy
		RevokeDelay: 40
		ArmamentNames: primary
		RequiresCondition: Imbot
	GrantCondition@deploythrowattack:
		Condition: deployed
		RequiresCondition: dummyfire
	Armament@botAiming:
		Weapon: dummy_aim
		FireDelay: 40
		Name: secondary
		PauseOnCondition: deployed
		RequiresCondition: Imbot
	Armament@botAiming2:
		Weapon: dummy_aim2
		FireDelay: 0
		Name: primary
		PauseOnCondition: deployed
		RequiresCondition: Imbot
	WithIdleOverlay@botdeployanim:
		Sequence: deploying
		RequiresCondition: beforedeploy && !deployed
		PauseOnCondition: dummyfire
	RejectsOrders@noundeploy:
		Reject: AttackMove, AssaultMove
		RequiresCondition: !Imbot && deployed

^GainsExperience:
	ChangesHealth@ELITE:
		Step: 0
		PercentageStep: 4
		Delay: 125
		StartIfBelow: 100
		DamageCooldown: 125
		RequiresCondition: rank-veteran >= 3

^wormslowing:
	ExternalCondition@wormIsnear:
		Condition: worm_attack
	ExternalCondition@stop:
		Condition: stop
	SpeedMultiplier@wormeated:
		Modifier: 0
		RequiresCondition: stop
	SpeedMultiplier@worm_eating:
		Modifier: 25
		RequiresCondition: worm_attack

^CliffAvalanche:
	KillsSelf@rockAvalanche:
		RequiresCondition: rock_avalanche
		DamageTypes: SmallExplosionDeath
	ExternalCondition@rockAvalanche:
		Condition: rock_avalanche

^Infantry:
	Inherits@onsand: ^onsand
	Inherits@rockAvalanche: ^CliffAvalanche
	Inherits@temporerycloak: ^temporarycloak
	Inherits@jammer: ^jammedvision
	Inherits@chaos: ^chaos_bomb_influence
	Inherits@wormslowing: ^wormslowing
	GrantRandomCondition:
		Conditions: inf_cond01, inf_cond02, inf_cond03
	Crushable:
		CrushSound: CRUSH1.WAV
		RequiresCondition: inf_cond01
	Crushable@2:
		CrushSound: audio/crush_guy_2.wav
		RequiresCondition: inf_cond02
	Crushable@3:
		CrushSound: audio/crush_guy_4.wav
		RequiresCondition: inf_cond03
	Crushable@worm:
		CrushClasses: worm_dinner
		WarnProbability: 0
		CrushedByFriendlies: true
		CrushSound: audio/EBoD_normal_dying_3.wav
		RequiresCondition: inf_cond01
	Crushable@worm2:
		CrushClasses: worm_dinner
		WarnProbability: 0
		CrushedByFriendlies: true
		CrushSound: CRUSH1.WAV
		RequiresCondition: inf_cond02
	Crushable@worm3:
		CrushClasses: worm_dinner
		WarnProbability: 0
		CrushedByFriendlies: true
		CrushSound: audio/EBoD_normal_dying_3.wav
		RequiresCondition: inf_cond03
	TurnOnIdle:
	WithInfantryBody:
		MinIdleDelay: 50
		MaxIdleDelay: 160
	WithDeathAnimation:
		DeathTypes:
			ExplosionDeath: 1
			SoundDeath: 2
			SmallExplosionDeath: 3
			BulletDeath: 4
			FireDeath: 6, 3
	DeathSounds@choke:
		Voice: Choke
		DeathTypes: ChokeDeath
		VolumeMultiplier: 0.8
	DeathSounds@burn:
		Voice: Burn
		DeathTypes: FireDeath
		VolumeMultiplier: 0.8
	ExternalCondition@hidden:
		Condition: hidden
	Cloak@hidden:
		InitialDelay: 30
		CloakDelay: 104
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		IsPlayerPalette: true
		PauseOnCondition: cloak-force-disabled
		RequiresCondition: hidden && onsand
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	Demolishable@wormCrush:
	Parachutable:
		KilledOnImpassableTerrain: true
	HitShape:
		Type: Circle
			Radius: 100
	ExternalCondition@vulnerable:
		Condition: vulnerable
	DamageMultiplier@vulnerable:
		Modifier: 200
		RequiresCondition: vulnerable
	ExternalCondition@slowed:
		Condition: slowed
	SpeedMultiplier@slowed:
		Modifier: 50
		RequiresCondition: slowed
	ReloadDelayMultiplier@slowed:
		Modifier: 200
		RequiresCondition: slowed

^Vehicle:
	Inherits@onsand: ^onsand
	Inherits@BotRepairLogic: ^BotLogicRepairing
	Inherits@rockAvalanche: ^CliffAvalanche
	Inherits@chaosbomb: ^chaos_bomb_influence
	Inherits@temporerycloak: ^temporarycloak
	Inherits@jammer: ^jammedvision
	Inherits@wormslowing: ^wormslowing
	GrantConditionOnDamageState@HEAVY:
		Condition: heavy-damage
		ValidDamageStates: Heavy, Critical
	ExternalCondition:
		Condition: unitCapturated
	RevealsShroud:
		RequiresCondition: !unitCapturated
		RevealGeneratedShroud: false
	RevealsShroud@whileCaptured:
		Range: 3c512
		RequiresCondition: unitCapturated
	SpeedMultiplier@HEAVYDAMAGE:
		RequiresCondition: heavy-damage
		Modifier: 75
	Crushable:
		CrushClasses: vehicle
		WarnProbability: 0
		CrushedByFriendlies: true
		CrushSound: WORM.WAV
	WithDamageOverlay:
		MinimumDamageState: Heavy
		Image: smoke_m
		IdleSequence: smokeFromRA01idle
		LoopSequence: smokeFromRA01loop
	Targetable:
		TargetTypes: Ground, Vehicle, C4
		RequiresCondition: !unitCapturated
	Targetable@CAPTURED:
		TargetTypes: CapturedUnit, Ground
		RequiresCondition: unitCapturated
	HitShape:
		Type: Circle
			Radius: 300
	ExternalCondition@hidden:
		Condition: hidden
	Cloak@hidden:
		InitialDelay: 30
		CloakDelay: 104
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		IsPlayerPalette: true
		PauseOnCondition: cloak-force-disabled
		RequiresCondition: hidden && onsand
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	ExternalCondition@vulnerable:
		Condition: vulnerable
	DamageMultiplier@vulnerable:
		Modifier: 200
		RequiresCondition: vulnerable
	ExternalCondition@slowed:
		Condition: slowed
	SpeedMultiplier@slowed:
		Modifier: 50
		RequiresCondition: slowed
	ReloadDelayMultiplier@slowed:
		Modifier: 200
		RequiresCondition: slowed

^Tank:
	Targetable:
		TargetTypes: Ground, C4, Tank
	GrantConditionOnDamageState@HEAVY:
		ValidDamageStates: Critical
	SpeedMultiplier@HEAVYDAMAGE:
		Modifier: 75
	SpawnActorOnDeath:
		SpawnAfterDefeat: false
	WithDamageOverlay:
		MinimumDamageState: Critical
	HitShape:
		Type: Circle
			Radius: 400
	ExternalCondition@hidden:
		Condition: hidden
	Cloak@hidden:
		InitialDelay: 30
		CloakDelay: 104
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		IsPlayerPalette: true
		PauseOnCondition: cloak-force-disabled
		RequiresCondition: hidden && onsand
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	ExternalCondition@vulnerable:
		Condition: vulnerable
	DamageMultiplier@vulnerable:
		Modifier: 200
		RequiresCondition: vulnerable
	ExternalCondition@slowed:
		Condition: slowed
	SpeedMultiplier@slowed:
		Modifier: 50
		RequiresCondition: slowed
	ReloadDelayMultiplier@slowed:
		Modifier: 200
		RequiresCondition: slowed
	ExternalCondition@jammed:
		Condition: jammed
	RevealsShroudMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 50
	DetectCloakedMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 5

^Plane:
	ExternalCondition@jammed:
		Condition: jammed
	RevealsShroudMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 50
	DetectCloakedMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 5
	WithColoredOverlay@black:
		Color: 3E202080
		RequiresCondition: jammed
	WithDecoration@skullFromRA:
		Image: pips
		Sequence: pip-jammer
		Palette: disabled
		Position: TopLeft
		ValidRelationships: Ally, Enemy, Neutral
		RequiresCondition: jammed

mcv:
	Valued:
		Cost: 2000
	Buildable:
		Prerequisites: upgrade.heavy, repair_pad, ~techlevel.medium
		Queue: Armor
		BuildPaletteOrder: 150
		BuildDuration: 750
		Description: Deploys into another Construction Yard\nRegenerates up to half health if not under attack
	Health:
		HP: 45000
	Armor:
		Type: heavy
	Mobile:
		Speed: 31
	HitShape:
		Type: Circle
			Radius: 500
	RevealsShroud:
		Range: 3c768
	-SpawnActorOnDeath:
	-Armament@chaos_bomb_influence:
	ChangesHealth:
		Step: 100
		Delay: 5
		StartIfBelow: 50
		DamageCooldown: 250
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Transforms:
		Facing: 64
		IntoActor: construction_yard
		Offset: -1,-1
		TransformSounds: BUILD1.WAV
		NoTransformNotification: CannotDeploy
		NoTransformTextNotification: Cannot deploy here.
		PauseOnCondition: unitCapturated
		RequiresCondition: !unitCapturated

thumper:
	Buildable:
		Prerequisites: ~disabled

harvester:
	-Armament@chaos_bomb_influence:
	Buildable:
		Queue: Armor
		Prerequisites: refinery
		BuildDuration: 600
		Description: Collects Spice for processing\nRegenerates up to half health if not under attack
	Valued:
		Cost: 1000
	WithDockingAnimation:
	Harvester:
		Capacity: 28
		HarvestFacings: 8
		Resources: Spice
		BaleUnloadDelay: 5
		SearchFromProcRadius: 30
		SearchFromHarvesterRadius: 15
		EmptyCondition: harvesterEmpty
	Health:
		HP: 45000
	Mobile:
		Speed: 43
	HitShape:
		Type: Circle
			Radius: 500
	RevealsShroud:
		Range: 3c768
	Explodes:
		Weapon: UnitExplodeLarge
		EmptyWeapon: UnitExplodeLarge
	SpawnActorOnDeath:
		Actor: harvester.Husk
		OwnerType: InternalName
		RequiresCondition: !worm_attack && harvesterEmpty
		EffectiveOwnerFromOwner: true
		SpawnAfterDefeat: false
	ThrowsShrapnel@ShrapnelNotEmpty:
		Weapons: Debris, Debris2, Debris3, Debris4
		Pieces: 3, 5
		Range: 1c0, 6c0
		RequiresCondition: !harvesterEmpty
	ThrowsShrapnel@DeathHandClusterDebris:
		Weapons: DeathHandClusterDebris
		Pieces: 1, 2
		Range: 1c0, 5c0
		RequiresCondition: !harvesterEmpty
	ThrowsShrapnel@ShrapnelEmpty:
		Weapons: Debris, Debris2
		Pieces: 0, 1
		Range: 1c0, 6c0
		RequiresCondition: harvesterEmpty
	ThrowsShrapnel@throwSpice:
		Weapons: HarvesterSpiceExplosion
		Pieces: 1, 3
		Range: 1c0, 5c0
		RequiresCondition: !harvesterEmpty
	ThrowsShrapnel@wheel:
		Weapons: debris_harvester_wheel01, debris_harvester_wheel02
		Pieces: 0, 1
		Range: 3c0, 5c0
	ChangesHealth:
		Step: 100
		Delay: 5
		StartIfBelow: 50
		DamageCooldown: 250
	WithHarvesterPipsDecoration:
		Position: BottomLeft
		Margin: 1, 4
		RequiresSelection: true
		PipCount: 7

trike:
	Inherits@AUTOTARGET: ^AutoTargetAllAssaultMove
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: ignore-creeps
	Buildable:
		Prerequisites: ~light.trike
		BuildDuration: 250
		Description: Scout with best vision range\n Strong vs Infantry\n Weak vs Vehicles
	Valued:
		Cost: 300
	Selectable:
		Class: trike
	Health:
		HP: 8000
	Armor:
		Type: light
	Mobile:
		Locomotor: light_vehicle
		TurnSpeed: 40
		Speed: 120
	RevealsShroud:
		Range: 7c512
	Armament@damage:
		FireDelay: 0
		Weapon: HMG
		MuzzleSequence: muzzle
	-Armament@muzzle:
	Armament@chaos_bomb_influence:
		Weapon: HMG
	SpeedMultiplier@HEAVYDAMAGE:
		RequiresCondition: heavy-damage
		Modifier: 75

raider:
	Inherits@AUTOTARGET: ^AutoTargetAllAssaultMove
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: ignore-creeps
	Buildable:
		Prerequisites: ~light.raider
		BuildDuration: 250
		Description: Trike with better speed, rate of fire and health\n Strong vs Infantry\n Weak vs Vehicles
	Valued:
		Cost: 350
	Tooltip:
		Name: Raider
	RevealsShroud:
		Range: 6c768
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 10000
	Armor:
		Type: light
	Mobile:
		Locomotor: light_vehicle
		TurnSpeed: 45
		Speed: 130
	WithMuzzleOverlay:
	Armament@damage:
		Weapon: HMGo
		MuzzleSequence: muzzle
	-Armament@muzzle:
	Armament@chaos_bomb_influence:
		Weapon: HMGo
	SpeedMultiplier@HEAVYDAMAGE:
		RequiresCondition: heavy-damage
		Modifier: 75

quad:
	AutoTargetPriority@bot:
		ValidTargets: Vehicle, Structure, Tank
		InvalidTargets: Infantry
		Priority: 50
		RequiresCondition: ignore-creeps
	Buildable:
		Prerequisites: upgrade.light, ~light.quad, ~techlevel.medium
		BuildDuration: 300
		BuildDurationModifier: 100
		Description: Missile Scout\n Strong vs Vehicles\n Weak vs Infantry
	Valued:
		Cost: 400
	Tooltip:
		Name: Quad
	Health:
		HP: 12000
	Armor:
		Type: light
	Mobile:
		Locomotor: light_vehicle
		TurnSpeed: 30
		Speed: 100
	RevealsShroud:
		Range: 6c112
	Armament:
		Weapon: Rocket
		LocalOffset: 128,64,64, 128,-64,64
	Armament@chaos_bomb_influence:
		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, high_tech_factory, ~techlevel.high
		BuildPaletteOrder: 30
		BuildDuration: 300
		Description: Invisible Raider\n Strong vs Infantry\n Weak vs Vehicles\nQuickly becomes invisible
	Valued:
		Cost: 450
	Tooltip:
		Name: Stealth Raider
	RevealsShroud:
		Range: 6c112
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Cloak:
		InitialDelay: 30
		CloakDelay: 29
		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: 450
		BuildDurationModifier: 100
		Description: Siege Ranged Artillery\n Strong vs Infantry, Buildings\n Weak vs Vehicles\nBest attack range\nLow vision range
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Defense
		InvalidTargets: Tanks
		Priority: 50
		RequiresCondition: ignore-creeps
	AutoTargetPriority@bot2:
		ValidTargets: Vehicle
		InvalidTargets: Tanks
		Priority: 10
		RequiresCondition: bot-owned
	AttackFrontal:
		ForceFireIgnoresActors: False
		TargetFrozenActors: True
		FacingTolerance: 0
	Valued:
		Cost: 700
	Health:
		HP: 14000
	Armor:
		Type: heavy
	Mobile:
		Speed: 43
		TurnSpeed: 14
	RevealsShroud:
		Range: 3c768
	Turreted:
		TurnSpeed: 12
		Offset: 0,0,-32
	-RevealOnFire:
	Armament:
		Weapon: 155mm
		Recoil: 150
		RecoilRecovery: 19
		LocalOffset: 512,0,320
		MuzzleSequence: muzzle
	Armament@chaos_bomb_influence:
		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
		RequiresCondition: !worm_attack
	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: false
		TargetFrozenActors: true
		FacingTolerance: 0
	GrantRandomCondition:
		Conditions: shrapnel_01, shrapnel_02, shrapnel_03
	Buildable:
		BuildDuration: 550
		Prerequisites: ~heavy.missile_tank, upgrade.heavy, research_centre, ~techlevel.high
		Description: Rocket Artillery\n Strong vs Tanks, Aircraft\n Weak vs Infantry\nHoming Missiles\nSlow reload
	Valued:
		Cost: 900
	Mobile:
		Speed: 61
		TurnSpeed: 20
	Health:
		HP: 14000
	Armor:
		Type: heavy
	RevealsShroud:
		Range: 5c512
	Armament:
		Weapon: mtank_pri
		LocalOffset: -128,128,171, -128,-128,171
	Armament@chaos_bomb_influence:
		Weapon: mtank_pri
		LocalOffset: -128,128,171, -128,-128,171
	-RevealOnFire:
	ThrowsShrapnel@01:
		Weapons: Debris, Debris4, Debris3
		Pieces: 0,1
		Range: 1c0, 3c0
		RequiresCondition: shrapnel_01  && !worm_attack
	ThrowsShrapnel@02:
		Weapons: Debris3, Debris
		Pieces: 1,2
		Range: 2c0, 3c0
		RequiresCondition: shrapnel_02  && !worm_attack
	ThrowsShrapnel@02_02:
		Weapons: DerbisMissile
		Pieces: 0,2
		Range: 3c0, 5c0
		RequiresCondition: shrapnel_02 && !worm_attack
	ThrowsShrapnel@03:
		Weapons: DerbisMissile, Debris, Debris4, Debris3
		Pieces: 1,3
		Range: 4c0, 6c0
		RequiresCondition: shrapnel_03 && !worm_attack
	SpawnActorOnDeath:
		RequiresCondition: !worm_attack

sonic_tank:
	AutoTargetPriority@bot:
		ValidTargets: Vehicle, Defense, Structure, Infantry
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: ignore-creeps
	AttackFrontal:
		TargetFrozenActors: True
		ForceFireIgnoresActors: False
		FacingTolerance: 0
	Buildable:
		Queue: Armor
		BuildPaletteOrder: 80
		Prerequisites: ~heavy.atreides, upgrade.heavy, research_centre, ~techlevel.high
		BuildDuration: 600
		Description: Vehicle with sound weapon\n Strong vs Everything except Tanks\nAttacks in straight line\nResistant to sound weapon\nHigh vision range
	Valued:
		Cost: 1000
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 30000
	Armor:
		Type: invulnerable
	Mobile:
		TurnSpeed: 12
		Speed: 31
	HitShape:
		Type: Circle
			Radius: 400
	RevealsShroud:
		Range: 6c112
	Armament:
		Weapon: Sound
		LocalOffset: 600,0,427
	Armament@chaos_bomb_influence:
		Weapon: Sound
		LocalOffset: 600,0,427
	-RevealOnFire:
	SpawnActorOnDeath:
		RequiresCondition: !worm_attack

devastator:
	GrantConditionOnDamageState@forbot:
		Condition: lowhp
		ValidDamageStates: Critical
	GrantCondition@botselfdestruct:
		Condition: overload
		RequiresCondition: lowhp && bot-owned && !unitCapturated
	Buildable:
		BuildPaletteOrder: 130
		Prerequisites: ~heavy.harkonnen, upgrade.heavy, research_centre, ~techlevel.high
		BuildDuration: 650
		Description: Super Heavy Tank\n Strong vs Everything except Anti-Heavy Units\nDeploy to self-destruct after short delay\nCan ram walls\nRegenerates up to half health if not under attack
	ExternalCondition:
		Condition: unitCapturated
	Valued:
		Cost: 1100
	Health:
		HP: 50000
	Armor:
		Type: heavy
	Mobile:
		TurnSpeed: 12
		Speed: 31
		Locomotor: devastator
		RequiresCondition: !overload
		PauseOnCondition: notmobile
	RevealsShroud:
		Range: 5c112
	Armament:
		Weapon: DevBullet
		LocalOffset: 640,0,32
		MuzzleSequence: muzzle
		RequiresCondition: !overload
	Armament@chaos_bomb_influence:
		Weapon: DevBullet
		LocalOffset: 640,0,32
		MuzzleSequence: muzzle
	Explodes@OVERLOAD:
		Weapon: PlasmaExplosion
		EmptyWeapon: PlasmaExplosion
		RequiresCondition: meltdown
	GrantConditionOnDeploy@REACTOR:
		DeployedCondition: overload
		PauseOnCondition: overload || unitCapturated
		RequiresCondition: !unitCapturated
	WithIdleOverlay@OVERLOAD:
		Sequence: active
		RequiresCondition: overload
	WithIdleOverlay@OVERLOAD2:
		Sequence: active-2
		RequiresCondition: overload
	KillsSelf@MELTDOWN:
		Delay: 125
		RequiresCondition: overload
		GrantsCondition: meltdown
	AttractsWorms:
		Intensity: 700
	ChangesHealth:
		Step: 100
		Delay: 5
		StartIfBelow: 50
		DamageCooldown: 250
	-RevealOnFire:
	Selectable:
		DecorationBounds: 1408, 1216, 0, 0
	AmbientSound@onMeltDown:
		SoundFiles: audio/DevastatorMeltdown01.wav
		RequiresCondition: overload
	ThrowsShrapnel@TrowOnMeldown:
		Weapons: Debris2, DeathHandClusterDebris, Debris4, DerbisSiegetank
		Pieces: 5, 10
		Range: 3c512, 7c0
		RequiresCondition: meltdown
	ThrowsShrapnel@standart:
		Weapons: Debris, Debris3, DerbisSiegetank
		Pieces: 1, 2
		RequiresCondition: !meltdown
	SpawnActorOnDeath:
		RequiresCondition: !meltdown && !worm_attack
	SpawnActorOnDeath@crater:
		Actor: crater_big
		RequiresCondition: meltdown
		Offset: -1,0
	HitShape:
		Type: Circle
			Radius: 500

deviator:
	AutoTargetPriority@bot:
		ValidTargets: Tank, Vehicle
		InvalidTargets: Infantry, Structure, Defense
		Priority: 50
		RequiresCondition: ignore-creeps
	Valued:
		Cost: 1000
	Buildable:
		BuildPaletteOrder: 90
		Prerequisites: ~heavy.ordos, upgrade.heavy, research_centre, ~techlevel.high
		BuildDuration: 600
		Description: Anti-Vehicle Skirmisher\n Temporary changes allegiance of enemy vehicles\nAffects nearby enemies when destroyed\nSlow reload
	Mobile:
		TurnSpeed: 16
		Speed: 55
	Health:
		HP: 14000
	Armor:
		Type: heavy
	RevealsShroud:
		Range: 5c112
	-RevealOnFire:
	Armament:
		Weapon: DeviatorMissile
		LocalOffset: -299,0,85
	Armament@chaos_bomb_influence:
		Weapon: DeviatorMissile
		LocalOffset: -299,0,85
	ThrowsShrapnel:
		Weapons: Debris4, Debris
		Pieces: 0,2
		Range: 0c512, 4c512
	SpawnActorOnDeath:
		RequiresCondition: !worm_attack
	Explodes:
		Weapon: DeviatorGas
		EmptyWeapon: DeviatorGas

^combat_tank:
	GrantRandomCondition:
		Conditions: Husk01, Husk02, Husk03, Husk04
	AutoTargetPriority@bot:
		InvalidTargets: Infantry
		ValidTargets: Vehicle, Defense, Structure, Tank
		Priority: 40
		RequiresCondition: ignore-creeps
	Buildable:
		Queue: Armor
		BuildDuration: 450
		Description: Main Battle Tank\n Strong vs Light Vehicles\n Weak vs Anti-Heavy Units
	Valued:
		Cost: 700
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 26000
	Armor:
		Type: heavy
	Mobile:
		Speed: 70
		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
	-RevealOnFire:

combat_tank_a:
	Inherits: ^combat_tank
	Buildable:
		Prerequisites: ~heavy.atreides_combat
		Description: Main Battle Tank\n Strong vs Light Vehicles\n Weak vs Anti-Heavy Units\nMedium speed and health\nLong attack range
	Tooltip:
		Name: Atreides Combat Tank
	Armament:
		Weapon: 80mm_A
	Armament@chaos_bomb_influence:
		Weapon: 80mm_A
	SpawnActorOnDeath:
		Actor: combat_tank_a.husk
		RequiresCondition: Husk01 && !worm_attack
	SpawnActorOnDeath@husk02:
		Actor: combat_tank_a.husk02
		RequiresCondition: Husk02 && !worm_attack
	SpawnActorOnDeath@husk03:
		Actor: combat_tank_a.husk03
		RequiresCondition: Husk03 && !worm_attack
	SpawnActorOnDeath@husk04:
		Actor: combat_tank_a.husk04
		RequiresCondition: Husk04 && !worm_attack
	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
		Description: Main Battle Tank\n Strong vs Light Vehicles\n Weak vs Anti-Heavy Units\nSlow speed, High health\nRegenerates up to a third of health if not under attack
	Armament:
		Weapon: 80mm_H
	Armament@chaos_bomb_influence:
		Weapon: 80mm_H
	Tooltip:
		Name: Harkonnen Combat Tank
	Mobile:
		Speed: 62
		TurnSpeed: 18
		Locomotor: tank_harkonnen
	Turreted:
		TurnSpeed: 18
	Health:
		HP: 30000
	SpawnActorOnDeath:
		Actor: combat_tank_h.husk
		RequiresCondition: Husk01 && !worm_attack
	SpawnActorOnDeath@husk02:
		Actor: combat_tank_h.husk02
		RequiresCondition: Husk02 && !worm_attack
	SpawnActorOnDeath@husk03:
		Actor: combat_tank_h.husk03
		RequiresCondition: Husk03 && !worm_attack
	SpawnActorOnDeath@husk04:
		Actor: combat_tank_h.husk04
		RequiresCondition: Husk04 && !worm_attack
	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
	ChangesHealth:
		Step: 100
		Delay: 5
		StartIfBelow: 34
		DamageCooldown: 250

combat_tank_o:
	Inherits: ^combat_tank
	Buildable:
		Prerequisites: ~heavy.ordos_combat
		Description: Main Battle Tank\n Strong vs Light Vehicles\n Weak vs Anti-Heavy Units\nFast speed, Low health\nFast firing speed
	Turreted:
		TurnSpeed: 22
	Armament:
		Weapon: 80mm_O
	Armament@chaos_bomb_influence:
		Weapon: 80mm_O
	Tooltip:
		Name: Ordos Combat Tank
	Mobile:
		Speed: 78
		TurnSpeed: 22
	Health:
		HP: 22000
	SpawnActorOnDeath:
		Actor: combat_tank_o.husk
		RequiresCondition: Husk01 && !worm_attack
	SpawnActorOnDeath@husk02:
		Actor: combat_tank_o.husk02
		RequiresCondition: Husk02 && !worm_attack
	SpawnActorOnDeath@husk03:
		Actor: combat_tank_o.husk03
		RequiresCondition: Husk03 && !worm_attack
	SpawnActorOnDeath@husk04:
		Actor: combat_tank_o.husk04
		RequiresCondition: Husk04 && !worm_attack
	ThrowsShrapnel@turret:
		Weapons: debris_turret.ordos
		Pieces: 1,1
		Range: 1c0, 2c512
		RequiresCondition: Husk01 || Husk02

combat_tank_cheap:
	Inherits: ^combat_tank
	Buildable:
		BuildPaletteOrder: 45
		BuildDuration: 400
		Prerequisites: ~factions.subfaction_allowed, ~heavy.cheap_tank
		Description: Cheap Battle Tank\n Strong vs Light Vehicles\n Weak vs Tanks\nFastest speed, Lowest health
	Valued:
		Cost: 600
	Tooltip:
		Name: Smuggler Combat Tank
	Mobile:
		Locomotor: tank
	Health:
		HP: 18000
	Turreted:
		TurnSpeed: 24
	Mobile:
		Speed: 86
		TurnSpeed: 24
	Armament:
		Weapon: 80mm_cheap
	Armament@chaos_bomb_influence:
		Weapon: 80mm_cheap
	SpawnActorOnDeath:
		Actor: combat_tank_cheap.husk
		RequiresCondition: Husk01 && !worm_attack
	SpawnActorOnDeath@husk02:
		Actor: combat_tank_cheap.husk02
		RequiresCondition: Husk02 && !worm_attack
	SpawnActorOnDeath@husk03:
		Actor: combat_tank_cheap.husk03
		RequiresCondition: Husk03 && !worm_attack
	SpawnActorOnDeath@husk04:
		Actor: combat_tank_cheap.husk04
		RequiresCondition: Husk04 && !worm_attack
	ThrowsShrapnel@turret:
		Weapons: debris_turret.harkonnen
		Pieces: 1,1
		Range: 0c250, 2c512
		RequiresCondition: Husk01

combat_tank_corrino:
	Inherits: combat_tank_h
	Buildable:
		BuildPaletteOrder: 43
		Prerequisites: ~heavy.corrino_combat, ~factions.subfaction_allowed
		Description: Emperor Battle Tank\n Strong vs Light Vehicles\n Weak vs Anti-Heavy Units\nSlow speed, High health\nResistant to negative effects
	Tooltip:
		Name: Corrino Combat Tank
	Health:
		HP: 30000
	Mobile:
		Speed: 62
		TurnSpeed: 18
		Locomotor: tank_corrino
	Turreted:
		TurnSpeed: 18
	Armament:
		Weapon: 80mm_corrino
	Armament@chaos_bomb_influence:
		Weapon: 80mm_corrino
	SpeedMultiplier@HEAVYDAMAGE:
		Modifier: 95
	DamageMultiplier@vulnerable:
		Modifier: 120
		RequiresCondition: vulnerable
	SpeedMultiplier@slowed:
		Modifier: 90
		RequiresCondition: slowed
	ReloadDelayMultiplier@slowed:
		Modifier: 120
		RequiresCondition: slowed
	RevealsShroudMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 90
	SpeedMultiplier@worm_eating:
		Modifier: 90
		RequiresCondition: worm_attack
	-ChangesHealth:
	SpawnActorOnDeath:
		Actor: combat_tank_corrino.husk
		RequiresCondition: Husk01 && !worm_attack

combat_tank_fremen:
	Inherits: ^combat_tank
	-GrantRandomCondition:
	Buildable:
		BuildPaletteOrder: 41
		BuildDuration: 450
		Prerequisites: ~heavy.fremen_tank, ~factions.subfaction_allowed
		Description: Desert Battle Tank\n Strong vs Light Vehicles\n Weak vs Anti-Heavy Units\nSlowest speed, Highest health\nInvisible on the dunes
	Tooltip:
		Name: Fremen Combat Tank
	Valued:
		Cost: 700
	Health:
		HP: 36000
	Mobile:
		Speed: 54
		TurnSpeed: 16
		Locomotor: tank
	Turreted:
		TurnSpeed: 16
	Armament:
		Weapon: 80mm_fremen
	Armament@chaos_bomb_influence:
		Weapon: 80mm_fremen
	Explodes:
		Weapon: UnitExplodeMed
		EmptyWeapon: UnitExplodeMed
	SpawnActorOnDeath:
		Actor: combat_tank_fremen.husk
		RequiresCondition: !worm_attack
	GrantConditionOnTerrain:
		TerrainTypes: Dune
		Condition: HiddeninSand
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	Cloak:
		InitialDelay: 30
		CloakDelay: 104
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		IsPlayerPalette: true
		RequiresCondition: !cloak-force-disabled && HiddeninSand

combat_tank_mercenary:
	Inherits: ^combat_tank
	-GrantRandomCondition:
	Buildable:
		BuildPaletteOrder: 47
		BuildDuration: 500
		Prerequisites: ~heavy.mercenary_tank, ~factions.subfaction_allowed
		Description: Expensive Battle Tank\n Strong vs Tanks\n Weak vs Anti-Heavy Units\nSlowest speed, Highest health\nDouble Shot\nHigh accurate
	Tooltip:
		Name: Mercenary Combat Tank
	Valued:
		Cost: 800
	Health:
		HP: 36000
	Mobile:
		Speed: 54
		TurnSpeed: 16
		Locomotor: tank
	Turreted:
		TurnSpeed: 16
	Armament:
		Weapon: 80mm_double
		Recoil: 128
		RecoilRecovery: 32
		LocalOffset: 320,64,0, 320,-64,0
		MuzzleSequence: muzzle
	Armament@chaos_bomb_influence:
		Weapon: 80mm_double
	Explodes:
		Weapon: UnitExplodeMed
		EmptyWeapon: UnitExplodeMed
	SpawnActorOnDeath:
		Actor: combat_tank_mercenary.husk
		RequiresCondition: !worm_attack
	GrantConditionOnTerrain:
		TerrainTypes: Dune
		Condition: HiddeninSand
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	RenderSprites:
		PlayerPalette: player_r16

bison_tank:
	Inherits@GAINSEXPERIENCE: ^GainsExperience
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Inherits: ^Vehicle
	AutoTargetPriority@bot:
		InvalidTargets: Infantry
		ValidTargets: Vehicle, Defense, Structure, Tank
		Priority: 40
		RequiresCondition: ignore-creeps
	Buildable:
		Queue: Armor
		Prerequisites: ~heavy.bison, upgrade.heavy, research_centre, ~techlevel.high, ~factions.subfaction_allowed
		BuildDuration: 600
		BuildDurationModifier: 100
		BuildPaletteOrder: 120
		Description: Tall Double Barrel Heavy Tank\n Strong vs Vehicles\n Weak vs Anti-Heavy Units\nFires two accurate shots at once\nCan shoot over walls
	Health:
		HP: 40000
	Valued:
		Cost: 1000
	Tooltip:
		Name: Bison tank
	Armor:
		Type: heavy
	Mobile:
		Speed: 43
		TurnSpeed: 14
	Mobile:
		Locomotor: tank_bison
		PauseOnCondition: notmobile
	RevealsShroud:
		Range: 5c112
	HitShape:
		Type: Circle
			Radius: 500
	Armament:
		Weapon: 80mm_bison
		Recoil: 128
		RecoilRecovery: 32
		LocalOffset: 475,100,75, 475,-100,75
		MuzzleSequence: muzzle
	Armament@chaos_bomb_influence:
		Weapon: 80mm_bison
	AttackFrontal:
		FacingTolerance: 0
	WithMuzzleOverlay:
		IgnoreOffset: true
	Explodes:
		Weapon: UnitExplodeMed
		EmptyWeapon: UnitExplodeMed
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	SpawnActorOnDeath:
		Actor: bison_tank.Husk
		RequiresCondition: !worm_attack

carryall.reinforce:
	Inherits: ^Plane
	HitShape:
		Type: Circle
			Radius: 500
	Valued:
		Cost: 1500
	Cargo:
		MaxWeight: 10
	ParaDrop:
		DropRange: 4c0
	Buildable:
		BuildDuration: 750
		Description: Transport air ship\n Automatically lifts harvesters from and to Spice\n Lifts vehicles to Repair Pads when ordered\nRegenerates up to half health if not under attack
	UpdatesPlayerStatistics:
		AddToAssetsValue: false
	Tooltip:
		Name: Carryall
	Health:
		HP: 45000
	Armor:
		Type: light
	Aircraft:
		CruiseAltitude: 2160
		CruisingCondition: cruising
		Speed: 160
		TurnSpeed: 16
		LandableTerrainTypes: Sand, Rock, Transition, Spice, SpiceSand, Dune, Concrete
		Repulsable: False
		AirborneCondition: airborne
		CanSlide: True
		VTOL: true
		IdleTurnSpeed: 8
		IdleSpeed: 120
	ThrowsShrapnel@derbis:
		Weapons: Debris, Debris2, debris_vehicle01, debris_vehicle02
		Pieces: 1, 3
		Range: 1c0, 6c0
	ThrowsShrapnel@derbisExplosions:
		Weapons: DeathHandClusterDebris
		Pieces: 0, 1
		Range: 1c0, 5c0
	ThrowsShrapnel@derbisExplosions2:
		Weapons: DeathHandClusterDebris
		Pieces: 0, 1
		Range: 1c0, 5c0
	SpawnActorOnDeath@rotor:
		Actor: rotor
		SkipMakeAnimations: false
		Offset: 0, 1
		RequiresCondition: cruising
	SpawnActorOnDeath@CRUISING:
		SpawnAfterDefeat: false
	SpawnActorOnDeath@LANDING:
		SpawnAfterDefeat: false
	HiddenUnderFog:
		AlwaysVisibleRelationships: Ally
	ChangesHealth:
		Step: 100
		Delay: 5
		StartIfBelow: 50
		DamageCooldown: 250

carryall.harvester.delivery:
    Inherits: carryall.reinforce
    -Buildable:
    GrantConditionOnPrerequisite@frigatecloaked:
        Condition: cloak_carryallreinforce
        Prerequisites: cloak_carryall.reinforce
    Cloak:
        InitialDelay: 0
        CloakDelay: 0
        RequiresCondition: cloak_carryallreinforce
        IsPlayerPalette: true
    Tooltip:
        Name: Harvester Reinforcements

carryall.reinforce_with_sound:
	Inherits: carryall.reinforce
	Tooltip:
		Name: Infantry Reinforcements
	Health:
		HP: 45000
	-Carryall:
	Cargo:
		Types: Infantry, Vehicle
		PassengerFacing: 512
		BeforeUnloadDelay: 50
	Aircraft:
		MinAirborneAltitude: 400
		Speed: 160
	RevealsShroud@landing:
		Range: 3c0
		RequiresCondition: !cruising
		Type: CenterPosition
	RevealsShroud@onland:
		Range: 4c0
		RequiresCondition: !airborne
		Type: CenterPosition
	SpawnActorOnDeath@LANDING:
		Actor: carryall.huskVTOL_reinforce
	SpawnActorOnDeath@rotor2:
		Actor: rotor
		Offset: 0, 1

carryall.bomber:
	Inherits: ^Plane
	RejectsOrders:
	RenderSprites:
		Image: carryall
	Health:
		HP: 45000
	Armor:
		Type: light
	Aircraft:
		MinAirborneAltitude: 500
		AirborneCondition: airborne
		CruiseAltitude: 2500
		Speed: 170
	Targetable@AIRBORNE:
		TargetTypes: Air
		RequiresCondition: airborne
	AmmoPool:
		Ammo: 1
	ThrowsShrapnel@derbis:
		Weapons: Debris, Debris2, debris_vehicle01
		Pieces: 1, 3
		Range: 0c512, 2c0
	HitShape:
		Type: Circle
			Radius: 500
	AttackBomber:
		FacingTolerance: 8
	Armament:
		Weapon: chaosbomb1
	SpawnActorOnDeath:
		Actor: carryall.bomberhusk
	ChangesHealth:
		Step: 100
		Delay: 5
		StartIfBelow: 50
		DamageCooldown: 250

ornithopter:
	Inherits: ^Plane
	Health:
		HP: 14000
	Armor:
		Type: light
	Aircraft:
		Speed: 200
		TurnSpeed: 10
		MinAirborneAltitude: 500
		AirborneCondition: airborne
	Targetable@AIRBORNE:
		TargetTypes: Air
		RequiresCondition: airborne
	AmbientSound:
		SoundFiles: audio/ornithopterMotor01.wav
	ThrowsShrapnel@derbis:
		Weapons: Debris, Debris2, debris_vehicle01
		Pieces: 1, 3
		Range: 0c512, 2c0
	RevealOnFire:
		Duration: 100
		Radius: 8c0
	HitShape:
		Type: Circle
			Radius: 300
	ChangesHealth:
		Step: 100
		Delay: 5
		StartIfBelow: 50
		DamageCooldown: 250

ornithopter_bomb:
	Inherits: ornithopter
	RenderSprites:
		Image: ornithopter
	AttackBomber:
	Aircraft:
		AltitudeVelocity: 3240
	AttackAircraft:
		AttackType: Strafe
		StrafeRunLength: 4c0
		OpportunityFire: false
		ForceFireIgnoresActors: true
		Voice: Attack
		FacingTolerance: 512
		PersistentTargeting: false
		AbortOnResupply: true
	Armament:
		Weapon: OrniBomb_multipass
	Aircraft:
		Speed: 200
		TurnSpeed: 10
		Repulsable: False
		CruiseAltitude: 1920
	Valued:
		Cost: 500

ornithopter_mg:
	Inherits: ornithopter
	RenderSprites:
		Image: ornithopter
	AttackBomber:
	Aircraft:
		AltitudeVelocity: 3240
	AttackAircraft:
		AttackType: Strafe
		StrafeRunLength: 4c0
		OpportunityFire: false
		ForceFireIgnoresActors: true
		Voice: Attack
		FacingTolerance: 512
		PersistentTargeting: false
		AbortOnResupply: true
	Armament:
		Weapon: Ornithopter_MG
		MuzzleSequence: muzzle
		LocalOffset: -120,0,0
	Aircraft:
		Speed: 200
		TurnSpeed: 10
		Repulsable: False
		CruiseAltitude: 1920
	Valued:
		Cost: 500

light_inf:
	Inherits@AUTOTARGET: ^AutoTargetAllAssaultMove
	ExternalCondition@chaos_bomb:
		Condition: chaos_bomb
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: ignore-creeps
	AutoTargetPriority@bot2:
		ValidTargets: Vehicle
		Priority: 20
		RequiresCondition: bot-owned
	Buildable:
		Queue: Infantry
		BuildPaletteOrder: 1
		BuildDuration: 100
		Description: General-purpose infantry\n Strong vs Infantry\n Weak vs Vehicles, Defensive Structures
	Valued:
		Cost: 50
	Health:
		HP: 6000
	RevealsShroud:
		Range: 4c768
	Mobile:
		Speed: 43
	Armament:
		Weapon: LMG
	Armament@chaos_bomb_influence:
		Weapon: LMG
	WithInfantryBody:
		-DefaultAttackSequence:
		AttackSequences:
			primary: shoot
	Armament@chaossounds:
		Weapon: chaosambiencesounds
		TargetRelationships: Enemy, Ally, Neutral
		Name: secondary
		RequiresCondition: chaos_bomb

light_inf.vet4:
	Inherits: mpsardaukar
	RenderSprites:
		Image: sardaukar
	ProducibleWithLevel:
		Prerequisites: techlevel.medium
		InitialLevels: 2
	WithProductionIconOverlay:
		Types: veteran
	UpdatesPlayerStatistics:
		OverrideActor: light_inf
	-Buildable:

light_inf.vet3:
	Inherits: mpsardaukar
	RenderSprites:
		Image: sardaukar
	ProducibleWithLevel:
		Prerequisites: techlevel.medium
		InitialLevels: 1
	WithProductionIconOverlay:
		Types: veteran
	UpdatesPlayerStatistics:
		OverrideActor: light_inf
	-Buildable:

trooper.vet2:
	Inherits: mpsardaukar
	RenderSprites:
		Image: sardaukar
	ProducibleWithLevel:
		Prerequisites: techlevel.medium
		InitialLevels: 1
	WithProductionIconOverlay:
		Types: veteran
	UpdatesPlayerStatistics:
		OverrideActor: trooper
	-Buildable:

trooper:
	AutoTargetPriority@bot:
		InvalidTargets: Infantry
		ValidTargets: Vehicle, Defense, Structure, Tank
		Priority: 50
		RequiresCondition: ignore-creeps
	Buildable:
		BuildPaletteOrder: 2
		Prerequisites: upgrade.barracks, ~techlevel.medium
		BuildDuration: 150
		Description: Anti-tank infantry\n Strong vs Vehicles\n Weak vs Infantry, Artillery
	Valued:
		Cost: 100
	Health:
		HP: 7000
	RevealsShroud:
		Range: 4c768
	Mobile:
		Speed: 31
	Armament:
		Weapon: Bazooka
		LocalOffset: 128,0,256
	Armament@chaos_bomb_influence:
		Weapon: Bazooka
		LocalOffset: 128,0,256
	TakeCover:
		ProneOffset: 324,0,-204
	WithInfantryBody:
		-DefaultAttackSequence:
		AttackSequences:
			primary: shoot
	Armament@chaossounds:
		Weapon: chaosambiencesounds
		TargetRelationships: Enemy, Ally, Neutral
		Name: secondary
		RequiresCondition: chaos_bomb

engineer:
	Inherits@botLogic: ^BotLogicEngineer
	Buildable:
		Prerequisites: upgrade.barracks, ~techlevel.medium
		BuildDuration: 200
		BuildPaletteOrder: 8
		Description: Infiltrates and captures enemy structures\n Can repair Buildings\n Captures husks\nAttracts nearby worms when deployed
	Valued:
		Cost: 250
	Health:
		HP: 5000
	RevealsShroud:
		Range: 3c768
	Mobile:
		Speed: 31
		PauseOnCondition: deployed
	InstantlyRepairs:
		Types: Building
	CaptureManager:
	Captures:
		CaptureTypes: building
	Captures@cliff:
		CaptureTypes: cliff
		ConsumedByCapture: false
		CaptureDelay: 150
	Captures@husks:
		CaptureTypes: husk
	GrantConditionOnDeploy:
		DeployedCondition: deployed
		UndeployedCondition: undeployed
		Facing: 512
		SkipMakeAnimation: true
		AllowedTerrainTypes: Sand, Spice, Dune, SpiceSand
	DamageMultiplier@GrantConditionOnDeploy:
		Modifier: 70
		RequiresCondition: deployed
	WithInfantryBody:
		RequiresCondition: undeployed
	WithSpriteBody@DEPLOYED:
		Sequence: thump
		RequiresCondition: !undeployed
	WithIdleOverlay@DEPLOYED:
		Sequence: thump-sand
		RequiresCondition: deployed
	AmbientSound:
		SoundFiles: THUMPER1.WAV
		Interval: 60
		RequiresCondition: deployed
	AttractsWorms:
		Intensity: 1000
		Falloff: 0, 0, 0, 100, 100, 100, 25, 11, 6, 4, 3, 2, 1, 0
		RequiresCondition: deployed
	-Armament@chaos_bomb_influence:

scout_infantry:
	Inherits: engineer
	Selectable:
		Class: scout
	Buildable:
		Prerequisites: upgrade.barracks, outpost,~enhancedAirCombat, ~techlevel.medium
		BuildDuration: 150
		BuildPaletteOrder: 9
		Description: Unarmed infantry for reconnaissance\n Vision range and stealth detection doubles when deployed\nInvisible when not deployed
	Tooltip:
		Name: Scout Infantry
	Valued:
		Cost: 125
	Health:
		HP: 5000
	RevealsShroud:
		Range: 3c756
	DetectCloaked:
		Range: 1c884
	RevealsShroudMultiplier@GrantConditionOnDeploy:
		RequiresCondition: deployed
		Modifier: 200
	DetectCloakedMultiplier@GrantConditionOnDeploy:
		RequiresCondition: deployed
		Modifier: 200
	Mobile:
		Speed: 43
		PauseOnCondition: deployed
	-InstantlyRepairs:
	-CaptureManager:
	-Captures:
	-Captures@cliff:
	-Captures@husks:
	GrantConditionOnDeploy:
		DeployedCondition: deployed
		UndeployedCondition: undeployed
		Facing: 512
		SkipMakeAnimation: true
		AllowedTerrainTypes: Sand, Rock, Transition, Concrete, SpiceSand, Spice, SpiceBlobs, Dune, Rough
	WithRangeCircle:
		RequiresCondition: deployed
		Range: 3c768
	-AmbientSound:
	-AttractsWorms:
	-Voiced:
	Cloak:
		InitialDelay: 30
		CloakDelay: 104
		UncloakOn: Damage, Heal
		IsPlayerPalette: true
		PauseOnCondition: deployed
	WithIdleOverlay@DEPLOYED:
		Sequence: thump-sand
		RequiresCondition: !deployed

grenadier:
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: ignore-creeps
	Buildable:
		BuildPaletteOrder: 3
		Prerequisites: ~barracks.atreides, upgrade.barracks, high_tech_factory, ~techlevel.medium
		BuildDuration: 150
		Description: Infantry armed with grenades\n Strong vs Infantry, Defensive Structures\n Weak vs Tanks, Artillery\nExplodes when destroyed
	Valued:
		Cost: 75
	Health:
		HP: 6000
	RevealsShroud:
		Range: 4c768
	Mobile:
		Speed: 43
	Armament:
		Weapon: grenade
		LocalOffset: 192,0,224
		FireDelay: 3
	Armament@chaos_bomb_influence:
		Weapon: grenade
		LocalOffset: 192,0,224
		FireDelay: 3
	TakeCover:
		ProneOffset: 96,100,-64
	WithInfantryBody:
		DefaultAttackSequence: throw
	Explodes:
		Weapon: GrenDeath
		EmptyWeapon: GrenDeath


mpsardaukar:
	Inherits@AUTOTARGET: ^AutoTargetAllAssaultMove
	Buildable:
		BuildPaletteOrder: 6
		Prerequisites: ~barracks.harkonnen, upgrade.barracks, high_tech_factory, ~techlevel.medium, ~factions.standard
		BuildDuration: 200
		Description: Emperor elite assault infantry\n Strong vs Infantry, Tanks\n Weak vs Defensive Structures, Artillery\nDeals large damage when crushed\nLow vision range
	Valued:
		Cost: 200
	Health:
		HP: 8000
	RevealsShroud:
		Range: 3c768
	Mobile:
		Speed: 31
	Armament@PRIMARY:
		Weapon: MP_Sardaukar_Weapon
	-Armament@SECONDARY:
	Armament@chaos_bomb_influence:
		Weapon: M_LMG_H
	Armament@chaos_bomb_influence2:
		Weapon: M_HMG_H
		RequiresCondition: chaos_bomb
	GrantConditionOnPrerequisite@supportpoweractivator:
		Condition: stimpack
		Prerequisites: productionSpeedup.sardaukar
	TakeCover:
		RequiresCondition: !stimpack
	SpeedMultiplier@corrinosupportposer:
		Modifier: 135
		RequiresCondition: stimpack

mpsardaukar.corrino:
	Inherits: mpsardaukar
	Buildable:
		Prerequisites: ~barracks.corrino, upgrade.barracks, high_tech_factory, ~techlevel.medium, ~factions.subfaction_allowed
	ProductionTimeMultiplier:
		Multiplier: 40
		Queue: Infantry
		Prerequisites: productionSpeedup.sardaukar
	ProductionCostMultiplier:
		Multiplier: 50
		Prerequisites: productionSpeedup.sardaukar
	ProducibleWithLevel:
		InitialLevels: 1
		Prerequisites: productionSpeedup.sardaukar
	WithProductionIconOverlay:
		Types: veteran
		Prerequisites: productionSpeedup.sardaukar


mpsardaukar.level4:
	Inherits: mpsardaukar
	RenderSprites:
		Image: sardaukar
	ProducibleWithLevel:
		InitialLevels: 1
	WithProductionIconOverlay:
		Types: veteran
	UpdatesPlayerStatistics:
		OverrideActor: mpsardaukar
	Buildable:
		Prerequisites: ~disabled

mpsardaukar.level3:
	Inherits: mpsardaukar
	RenderSprites:
		Image: sardaukar
	ProducibleWithLevel:
		InitialLevels: 1
	WithProductionIconOverlay:
		Types: veteran
	UpdatesPlayerStatistics:
		OverrideActor: mpsardaukar
	Buildable:
		Prerequisites: ~disabled

mpsardaukar.level2:
	Inherits: mpsardaukar
	RenderSprites:
		Image: sardaukar
	ProducibleWithLevel:
		InitialLevels: 1
	WithProductionIconOverlay:
		Types: veteran
	UpdatesPlayerStatistics:
		OverrideActor: mpsardaukar
	Buildable:
		Prerequisites: ~disabled

saboteur:
	Inherits@selection: ^SelectableSupportUnit
	ScriptTags:
	Buildable:
		BuildPaletteOrder: 12
		Prerequisites: ~disabled
		Description: Stealth infantry, armed with explosives\nCan explode buildings or a huge area around himself
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	WithDecoration@ScullIcon:
		Image: skullicon
		Sequence: idle
		ValidRelationships: Enemy, Neutral, Ally
		Palette: effect
		Position: BottomRight
		Margin: 5, 6
	Health:
		HP: 5000
	RevealsShroud:
		Range: 3c768
	Mobile:
		Speed: 43
		PauseOnCondition: SuicideAtt
	Demolition:
		DetonationDelay: 25
		Flashes: 2
		EnterBehaviour: Suicide
	Cloak:
		InitialDelay: 30
		CloakDelay: 29
		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: 25
		RequiresCondition: SuicideAtt
		GrantsCondition: kamikadze
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	AmbientSound@onSuicide:
		SoundFiles: audio/explodeSaboteurEmperor02.wav
		RequiresCondition: SuicideAtt
	TakeCover:
		RequiresCondition: SuicideAtt
	SpawnActorOnDeath@crater:
		Actor: crater_big
		RequiresCondition: kamikadze
		Offset: -1,0
	-Armament@chaos_bomb_influence:

fremen:
	Inherits@AUTOTARGET: ^AutoTargetAllAssaultMove
	Buildable:
		BuildPaletteOrder: 13
		Prerequisites: ~disabled
		Description: Invisible warrior of dunes loyal to the Duke\nArmed with anti-vehicle sound weapon\nRegenerates to full health if not under attack
	Mobile:
		Speed: 43
	Valued:
		Cost: 125
	Tooltip:
		Name: Noble Fremen
	Health:
		HP: 6000
	RevealsShroud:
		Range: 5c512
	AutoTarget:
		ScanRadius: 7
		InitialStance: HoldFire
		InitialStanceAI: ReturnFire
	Armament@PRIMARY:
		Weapon: MP_Fremen_Weapon
	-Armament@SECONDARY:
	Armament@chaos_bomb_influence:
		Weapon: Fremen_S
	Armament@chaos_bomb_influence2:
		Weapon: Fremen_L
	ChangesHealth@regen:
		Step: 0
		PercentageStep: 1
		Delay: 25
		StartIfBelow: 100
		DamageCooldown: 250
	Cloak:
		InitialDelay: 30
		CloakDelay: 104

assassin:
	Inherits: ^Infantry
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Valued:
		Cost: 150
	Buildable:
		Queue: Infantry
		BuildPaletteOrder: 4
		Prerequisites: ~!factions.standard, ~barracks.harkonnen, upgrade.barracks, high_tech_factory, ~techlevel.high
		BuildDuration: 150
		BuildDurationModifier: 100
		Description: Infantry with an accurate sniper rifle\n Attacks only Infantry\nInvisible on the rocks
	Tooltip:
		Name: Assassin
	Health:
		HP: 5000
	Mobile:
		Speed: 43
		Voice: Move
	RevealsShroud:
		Range: 5c512
	Armament:
		Weapon: SniperRifle
		FireDelay: 2
	Armament@chaos_bomb_influence:
		Weapon: SniperRifle
		FireDelay: 2
	AttackFrontal:
		FacingTolerance: 0
	WithInfantryBody:
		DefaultAttackSequence: shoot
		MinIdleDelay: 90
		MaxIdleDelay: 200
	GrantConditionOnTerrain:
		TerrainTypes: Rough
		Condition: hiddenbetweenrocks
	Voiced:
		VoiceSet: AssassinVoice
	Cloak:
		InitialDelay: 30
		CloakDelay: 104
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		IsPlayerPalette: true
		RequiresCondition: !cloak-force-disabled && hiddenbetweenrocks
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	-MustBeDestroyed:

mortar_inf:
	Inherits: ^Infantry
	Inherits@botlogic: ^botDeployLogic
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tank
		Priority: 50
		RequiresCondition: ignore-creeps
	Selectable:
		Priority: 10
		PriorityModifiers: Ctrl, Alt
	RevealsShroud:
		Range: 3c768
	Buildable:
		Queue: Infantry
		BuildPaletteOrder: 5
		Prerequisites: ~barracks.mercenary, upgrade.barracks, ~techlevel.medium, high_tech_factory, ~factions.subfaction_allowed
		BuildDuration: 150
		BuildDurationModifier: 100
		Description: Infantry with siege weapon\n Strong vs Infantry, Buildings\n Weak vs Vehicles, Artillery\nAttack range almost doubles when deployed\nLow vision range
	Valued:
		Cost: 175
	Tooltip:
		Name: Mortar Infantry
	WithRangeCircle:
		RequiresCondition: deployed
		Range: 6c552
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 7000
	Mobile:
		Speed: 31
		PauseOnCondition: deployed
		RequireForceMoveCondition: !undeployed
	GrantConditionOnDeploy:
		DeployedCondition: deployed
		UndeployedCondition: undeployed
		Facing: 768
		UndeployOnMove: false
		SkipMakeAnimation: false
	DamageMultiplier@GrantConditionOnDeploy:
		Modifier: 70
		RequiresCondition: deployed
	WithMakeAnimation:
		Sequence: deploying
	WithInfantryBody:
		RequiresCondition: undeployed && !beforedeploy && !dummyfire
	WithSpriteBody@DEPLOYED:
		Sequence: invisible
		RequiresCondition: !undeployed
	Turreted:
		Turret: turret
	WithSpriteTurret@idle:
		RequiresCondition: deployed && !AnimateTurret
	WithSpriteTurret@animated:
		RequiresCondition: deployed && AnimateTurret
		Sequence: thump
	WithIdleOverlay@sand:
		Sequence: thump-sand
		RequiresCondition: deployed && AnimateTurret
	GrantConditionOnAttack:
		Condition: AnimateTurret
		RevokeDelay: 14
	RangeMultiplier@DEPLOYED:
		RequiresCondition: deployed
		Modifier: 184
	Armament:
		Weapon: 40mm_mortar
		LocalOffset: 0,100,200
	Armament@chaos_bomb_influence:
		Weapon: 40mm_mortar
		RequiresCondition: chaos_bomb
		LocalOffset: 0,100,200
	GrantCondition:
		Condition: editorhack
	WithInfantryBody@Editor:
		RequiresCondition: !editorhack
	AttackFrontal:
		FacingTolerance: 512
		OutsideRangeRequiresForceFire: False
		ForceFireIgnoresActors: False

mercenary:
	Inherits: ^Infantry
	Inherits: ^botDeployLogic
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	AutoTargetPriority@bot:
		InvalidTargets: Infantry
		ValidTargets: Vehicle, Defense, Structure, Tank
		Priority: 40
		RequiresCondition: ignore-creeps
	Selectable:
		Priority: 10
		PriorityModifiers: Alt
	Buildable:
		BuildPaletteOrder: 14
		Prerequisites: ~disabled, barracks
		BuildDuration: 225
		BuildDurationModifier: 100
		Description: Elite mercenary with an accurate deployable cannon\n Huge firepower and slow reload\nAttack range almost doubles when deployed
	Valued:
		Cost: 250
	Tooltip:
		Name: Hireling
	Mobile:
		Speed: 31
		PauseOnCondition: deployed
		RequireForceMoveCondition: !undeployed
	TakeCover:
	RevealsShroud:
		Range: 5c512
	Health:
		HP: 8000
	Armor:
		Type: none
	RangeMultiplier@DEPLOYED:
		RequiresCondition: deployed
		Modifier: 184
	Armament:
        Weapon: portable_cannon
        LocalOffset: 0,100,0
        MuzzleSequence: muzzle
   	Armament@chaos_bomb_influence:
        Weapon: portable_cannon
        RequiresCondition: chaos_bomb
        LocalOffset: 0,100,0
	GrantConditionOnDeploy:
		UndeployOnPickup: true
		DeployedCondition: deployed
		UndeployedCondition: undeployed
		Facing: 768
		UndeployOnMove: false
		SkipMakeAnimation: false
	DamageMultiplier@GrantConditionOnDeploy:
		Modifier: 70
		RequiresCondition: deployed
	WithInfantryBody:
		RequiresCondition: undeployed && !beforedeploy && !dummyfire
	WithFacingSpriteBody:
		Sequence: invisible
		RequiresCondition: !undeployed
	Turreted:
		TurnSpeed: 200
		InitialFacing: 1023
		RealignDelay: -1
		RequiresCondition: deployed
	WithSpriteTurret@idle:
		RequiresCondition: deployed && !AnimateTurret
	WithSpriteTurret@animated:
		RequiresCondition: deployed && AnimateTurret
		Sequence: turret-shoot
	GrantConditionOnAttack:
		Condition: AnimateTurret
		RevokeDelay: 14
	WithMakeAnimation@DEPLOYING:
		Sequence: deploying
	GrantCondition:
		Condition: editorhack
	WithRangeCircle:
		RequiresCondition: deployed
		Range: 6c552
	WithInfantryBody@Editor:
		RequiresCondition: !editorhack
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	AttackFrontal:
		FacingTolerance: 512
		OutsideRangeRequiresForceFire: False
		ForceFireIgnoresActors: False

officer:
	Inherits: ^Infantry
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Buildable:
		Queue: Infantry
		BuildPaletteOrder: 11
		Prerequisites: ~disabled, ~factions.subfaction_allowed
		Description: Targets near the laser marked point take double damage
	Tooltip:
		Name: Target Designator
	RevealsShroud:
		Range: 5c512
	Valued:
		Cost: 25
	Health:
		HP: 8000
	Mobile:
		Speed: 31
	Armament:
		Weapon: laserpointer
	Armament@chaos_bomb_influence:
		Weapon: laserpointer
	Voiced:
		VoiceSet: GenericVoice
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	WithInfantryBody:
		DefaultAttackSequence: shoot
	-TakeCover:

fremen_warrior:
	Inherits: fremen
	RenderSprites:
		Image: fremen_warrior
	Tooltip:
		Name: Desert Warrior
	RevealsShroud:
		Range: 4c768
	AutoTarget:
		ScanRadius: 7
		InitialStance: Defend
		InitialStanceAI: Defend
	Valued:
		Cost: 225
	Buildable:
		Queue: Infantry
		BuildPaletteOrder: 7
		Prerequisites: ~factions.subfaction_allowed, ~barracks.fremen, upgrade.barracks, high_tech_factory, ~techlevel.medium
		BuildDuration: 200
		BuildDurationModifier: 100
		Description: Armed with a shock rifle\n Modest vs Everything\n Slows down target for half a second when hit\nRegenerates up to half health if not under attack
	Armament@PRIMARY:
		Weapon: MP_Fedaykin_Weapon
	Armament@chaos_bomb_influence:
		Weapon: Fremen_S_MP
		RequiresCondition: chaos_bomb
	Armament@chaos_bomb_influence2:
		Weapon: Fremen_L_MP
		RequiresCondition: chaos_bomb
	ChangesHealth@regen:
		Step: 0
		PercentageStep: 1
		Delay: 25
		StartIfBelow: 50
		DamageCooldown: 250
	-Cloak:

worm_rider:
	Buildable:
		Description: Attracts a worm and saddle it for a couple of minutes
	Inherits: thumper
	Inherits@selection: ^SelectableSupportUnit
	AttackFrontal@deploytargeting:
		FacingTolerance: 0
	GrantConditionOnBotOwner@bots:
		Condition: deployed
		Bots: omnius, vidious, gladius
	GrantConditionOnTerrain@forBotonly:
		TerrainTypes: Sand, Spice, Dune, SpiceSand
		Condition: desert_terain
	-ActorLostNotification:
	Tooltip:
		Name: Worm Rider
	WithDecoration@skullFromRA:
		Image: pips
		Sequence: pip-skull
		Palette: temperat
		Position: BottomRight
		ValidRelationships: Ally, Enemy, Neutral
		RequiresCondition: undeployed
	Health:
		HP: 6000
	Mobile:
		Speed: 43
	ChangesHealth@regen:
		Step: 0
		PercentageStep: 1
		Delay: 25
		StartIfBelow: 50
		DamageCooldown: 250
	Voiced:
		VoiceSet: FremenVoice
	Cloak:
		InitialDelay: 30
		CloakDelay: 104
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Damage, Heal
		IsPlayerPalette: true
		PauseOnCondition: cloak-force-disabled
		RequiresCondition: !deployed
	KillsSelf:
		Delay: 750
		GrantsCondition: spawnWorm
		RequiresCondition: deployed && desert_terain
	GrantConditionOnDeploy:
		DeployedCondition: deployed
		UndeployedCondition: undeployed
		PauseOnCondition: deployed
	DamageMultiplier@GrantConditionOnDeploy:
		Modifier: 70
		RequiresCondition: deployed
	AmbientSound:
		SoundFiles: THUMPER1.WAV
		Delay: 10
		Interval: 20
		RequiresCondition: deployed && desert_terain
	SpawnActorOnDeath@worm:
		Actor: mp_sandworm
		RequiresCondition: spawnWorm
		SkipMakeAnimations: false

mp_sandworm:
	Inherits@world: ^ExistsInWorld
	Inherits@selectable: ^SelectableCombatUnit
	Inherits@1: ^SpriteActor
	Selectable:
		Bounds: 1024, 1024, 0, 0
	Tooltip:
		Name: Sandworm
	Health:
		HP: 500000
	HitShape:
		Type: Rectangle
			TopLeft: -512, -512
			BottomRight: 512, 1024
	Armor:
		Type: buildingWeak
	RenderSprites:
		Palette: terrain
	Mobile:
		Speed: 49
		TurnSpeed: 28
		Locomotor: worm_mp
		PauseOnCondition: makeAnimation
	Targetable:
		TargetTypes: Ground, Vehicle
	WithFacingSpriteBody:
	WithIdleOverlay@makeanimfromdummy:
		RequiresCondition: makeAnimation
		Sequence: make
		Image: mp_sandworm
	WithMakeAnimation:
		Condition: makeAnimation
	AmbientSound:
		SoundFiles: WRMSIGN1.WAV
		Delay: 500
		Interval: 500
	KillsSelf:
		Delay: 3000
		GrantsCondition: dispose
	Explodes@1:
		Weapon: worm_disapier
		EmptyWeapon: worm_disapier
		RequiresCondition: dispose
	Explodes@2:
		Weapon: worm_explode
		EmptyWeapon: worm_explode
		RequiresCondition: !dispose
	AmbientSound@worm_roar:
		SoundFiles: audio/worm_roar_1_tc.wav, audio/worm_roar_2_tc.wav, audio/worm_roar_5_tc.wav, audio/worm_roar_6_tc.wav,
		Interval: 20, 100
		RequiresCondition: !makeAnimation
	AmbientSound@invoking:
		SoundFiles: audio/worm_sign_elec_1.wav
		RequiresCondition: makeAnimation
	HiddenUnderFog:
	AppearsOnRadar:
		UseLocation: true
	Demolition:
		DetonationDelay: 0
		Flashes: 0
		DamageTypes: Vehicle, Infantry
		EnterBehaviour: Exit
		Cursor: attack
	ExternalCondition:
		Condition: worm_eating_anim
	WithIdleOverlay@mouth:
		Sequence: mouth
		RequiresCondition: worm_eating_anim
	Wanders:
		WanderMoveRadius: 5
		AvoidTerrainTypes: Rock, Rough, Concrete
	IgnoresCloak:
	AnnounceOnSeen:
		Notification: WormSign
		PingRadar: True
	RevealsShroud:
		Range: 6c112
	LeavesTrails:
		Image: sandtrail
		Sequences: traila, trailb, trailc
		Palette: effect
		Type: CenterPosition
		TerrainTypes: Sand, Dune, SpiceSand, Spice
		MovingInterval: 3
		Offsets: -1024,0,0
	RevealOnFire:
		Duration: 50
		Radius: 2c512
	ProximityExternalCondition:
		Range: 1c412
		Condition: worm_attack
		ValidRelationships: Ally, Neutral, Enemy
	ProximityExternalCondition@stop:
		Range: 1c0
		Condition: stop
		ValidRelationships: Neutral, Enemy, Ally
	SpawnActorOnDeath@rideEnds:
		Actor: fremen_warrior
		RequiresCondition: dispose
		SkipMakeAnimations: false
	GrantConditionOnCombatantOwner@nonAi:
		Condition: human_player
	RejectsOrders:
		Reject: AttackMove, AssaultMove
		RequiresCondition: human_player

spire:
	Inherits: quad
	Buildable:
		Prerequisites: ~disabled, ~spire, upgrade.light, ~factions.subfaction_allowed, ~techlevel.high
		BuildDuration: 300
		BuildDurationModifier: 100
		BuildPaletteOrder: 65
		Description: Quad with best speed\n Strong vs Vehicles\n Weak vs Infantry\nHoming Missiles\nReload slower
	Valued:
		Cost: 500
	Selectable:
		Class: spire
	Health:
		HP: 12000
	Tooltip:
		Name: Spy Spire
	Armor:
		Type: light
	Mobile:
		Locomotor: light_vehicle
		TurnSpeed: 50
		Speed: 140
	Armament:
		Weapon: rocket_spike
		LocalOffset: 128,0,64
	Armament@chaos_bomb_influence:
		Weapon: Rocket
		LocalOffset: 128,0,64

quad.heavy:
	Inherits: quad
	Buildable:
		Prerequisites: ~light.heavy_quad, upgrade.light, ~factions.subfaction_allowed, ~techlevel.high
		BuildDuration: 300
		BuildDurationModifier: 100
		BuildPaletteOrder: 55
		Description: Expensive Quad with better speed and health\n Strong vs Vehicles\n Weak vs Infantry\nHoming Missiles\nRate of fire slower
	Valued:
		Cost: 500
	Tooltip:
		Name: Stalker
	Health:
		HP: 14000
	Armor:
		Type: light
	Mobile:
		Locomotor: light_vehicle
		Speed: 110
		TurnSpeed: 35
	RevealsShroud:
		Range: 6c112
	Armament:
		Weapon: rocket_spike
		LocalOffset: 128,0,64
	Armament@chaos_bomb_influence:
		Weapon: Rocket
		LocalOffset: 128,0,64

hunter:
	Inherits: trike
	Inherits@GAINSEXPERIENCE: ^GainsExperience
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Buildable:
		Prerequisites: ~light.hunter, ~factions.subfaction_allowed
		BuildPaletteOrder: 10
		BuildDuration: 250
		Description: Turreted Trike with better attack range\n Strong vs Infantry\n Weak vs Vehicles
	Tooltip:
		Name: Hunter
	Valued:
		Cost: 350
	Selectable:
		Class: hunter
	Turreted:
		TurnSpeed: 40
		Offset: -200,0,30
		RealignDelay: 0
	-AttackFrontal:
	WithMuzzleOverlay:
	AttackTurreted:
	WithSpriteTurret:
	RevealsShroud:
		Range: 6c768
	Armament@damage:
		Weapon: HMGhunter
		LocalOffset: -200,0,0
		MuzzleSequence: muzzle
	Armament@muzzle:
		Weapon: HMG_muzzle
		LocalOffset: -200,0,0
		MuzzleSequence: muzzle

crawler.light:
	Inherits: ^Vehicle
	Inherits@selection: ^SelectableSupportUnit
	Buildable:
		Queue: Vehicle
		Prerequisites: ~light.crawler, ~factions.subfaction_allowed, upgrade.light, high_tech_factory
		BuildDuration: 350
		BuildDurationModifier: 100
		BuildPaletteOrder: 60
		Description: Vehicle with deployable jamming device\n Greatly decreases unit and building vision\n Removes invisibility detection\nInvisible when standing and not deployed\nBest vision range when deployed\nGradually loses health until critical when deployed\nStops affecting enemies when health is critical
	Valued:
		Cost: 550
	Tooltip:
		Name: Jammer
	Health:
		HP: 12000
	Armor:
		Type: light
	Mobile:
		Speed: 90
		TurnSpeed: 25
		PauseOnCondition: notmobile || deployed_jammer
	RevealsShroud:
		Range: 6c112
		RequiresCondition: !deployed_jammer
	RevealsShroud@deployed:
		Range: 7c512
		RequiresCondition: deployed_jammer
	Cloak:
		InitialDelay: 30
		CloakDelay: 104
		UncloakOn: Move, Attack, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		IsPlayerPalette: true
		PauseOnCondition: cloak-force-disabled 
		RequiresCondition: !deployed_jammer
	GrantConditionOnDeploy:
		DeployedCondition: deployed_jammer
		UndeployOnMove: false
		SkipMakeAnimation: false
		DeploySounds: audio/ironcur9.aud
	Explodes:
		Weapon: UnitExplodeSmall
		EmptyWeapon: UnitExplodeSmall
	ProximityExternalCondition@dhealign:
		Condition: jammed
		Range: 7c512
		ValidRelationships: Enemy, Neutral
		RequiresCondition: deployed_jammer && !jammerbroken
	Selectable:
		Class: support
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	-Armament@chaos_bomb_influence:
	WithRangeCircle@on:
		RequiresCondition: deployed_jammer && !jammerbroken
		Range: 7c512
	WithRangeCircle@off:
		RequiresCondition: deployed_jammer && jammerbroken
		Range: 0c512
	CreatesShroud:
		Range: 6c112
		ValidRelationships: Enemy, Neutral
		RequiresCondition: deployed_jammer && !jammerbroken
	ChangesHealth:
		Step: -40
		Delay: 5
		StartIfBelow: 101
		DamageCooldown: 0
		RequiresCondition: deployed_jammer && !jammerbroken
	GrantConditionOnDamageState@JAMMERBROKEN:
		Condition: jammerbroken
		ValidDamageStates: Critical

bombardment_tank:
	Inherits: ^Vehicle
	Inherits@GAINSEXPERIENCE: ^GainsExperience
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Buildable:
		Queue: Armor
		Prerequisites: ~heavy.corrino, upgrade.heavy, research_centre, ~factions.subfaction_allowed
		BuildDuration: 600
		BuildDurationModifier: 100
		BuildPaletteOrder: 100
		Description: Multi-Shot Turreted Artillery\n Modest vs Everything\nCharge up to 4 shots\nLow explosion area
	Health:
		HP: 18000
	Valued:
		Cost: 1000
	Tooltip:
		Name: Bombardment Tank
	Armor:
		Type: heavy
	Mobile:
		Speed: 61
		TurnSpeed: 20
		Locomotor: tank
	HitShape:
		Type: Circle
			Radius: 400
	RevealsShroud:
		Range: 5c512
	Turreted:
		TurnSpeed: 20
		Offset: -200,0,170
	AttackTurreted:
	WithMuzzleOverlay:
	WithSpriteTurret:
	Explodes:
		Weapon: UnitExplodeMed
		EmptyWeapon: UnitExplodeMed
	AmmoPool:
		Ammo: 4
		AmmoCondition: ammo
	ReloadAmmoPool:
		Count: 1
		Delay: 96
		ResetOnFire: true
	Armament:
		Weapon: clusterMissile
		LocalOffset: -100,125,150, -100,-125,150, -100,100,125, -100,-100,125
		PauseOnCondition: ammo == 0
	Armament@chaos_bomb_influence:
		Weapon: clusterMissile
	WithAmmoPipsDecoration:
		PipCount: 4
	SpawnActorOnDeath:
		Actor: bombardment_tank.husk
		SpawnAfterDefeat: false
		RequiresCondition: !worm_attack
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	-RevealOnFire:

flamer:
	Inherits: ^Tank
	Inherits@GAINSEXPERIENCE: ^GainsExperience
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	AutoTargetPriority@bot:
		ValidTargets: Infantry, Structure
		InvalidTargets: Tanks
		Priority: 25
		RequiresCondition: ignore-creeps
	AutoTargetPriority@bot2:
		ValidTargets: Vehicle
		InvalidTargets: Tanks
		Priority: 10
		RequiresCondition: bot-owned
	Buildable:
		Queue: Armor
		BuildDuration: 600
		BuildDurationModifier: 100
		BuildPaletteOrder: 110
		Prerequisites: ~heavy.smuggler, upgrade.heavy, research_centre
		Description: Fast Flame Tank\n Strong vs Infantry, Light Vehicles, Harvesters\n Weak vs Tanks, Defensive Structures\nDestroys spice\nExplodes when destroyed
	Health:
		HP: 18000
	Valued:
		Cost: 1000
	Tooltip:
		Name: Flamer
	Armor:
		Type: heavy
	Mobile:
		TurnSpeed: 24
		Speed: 85
	RevealsShroud:
		Range: 5c112
	AttackFrontal:
		FacingTolerance: 0
	AutoTarget:
		ScanRadius: 6
	Explodes:
		Weapon: UnitExplodeMed
		EmptyWeapon: UnitExplodeMed
		DeathTypes: BulletDeath
	Explodes@big:
		Weapon: flamer_explosion_big
		EmptyWeapon: flamer_explosion_big
		DeathTypes: ExplosionDeath, SoundDeath, FireDeath, SmallExplosionDeath
	Explodes@small1:
		Offset: 500,400,0
		Chance: 50
		Weapon: flamer_explosion_small
		EmptyWeapon: flamer_explosion_small
		DeathTypes: ExplosionDeath, SoundDeath, FireDeath, SmallExplosionDeath
	Explodes@small2:
		Offset: -800,-300,0
		Chance: 50
		Weapon: flamer_explosion_small02
		EmptyWeapon: flamer_explosion_small02
		DeathTypes: ExplosionDeath, SoundDeath, FireDeath, SmallExplosionDeath
	Explodes@small3:
		Offset: 200,900,0
		Chance: 50
		Weapon: flamer_explosion_small03
		EmptyWeapon: flamer_explosion_small03
		DeathTypes: ExplosionDeath, SoundDeath, FireDeath
	Armament:
		Weapon: flamethrower
		LocalOffset: 100,0, 200
	Armament@chaos_bomb_influence:
		Weapon: flamethrower
	SpawnActorOnDeath:
		Actor: flamer.husk
		DeathType: BulletDeath
		RequiresCondition: !worm_attack
	UpdatesPlayerStatistics:
		AddToArmyValue: true

frigate.harkonnen:
	Inherits: carryall.reinforce_with_sound
	RenderSprites:
		Image: frigate.harkonnen
	Buildable:
		Queue: Aircraft
		BuildDuration: 1250
  		BuildDurationModifier: 100
  		BuildPaletteOrder: 140
 		Prerequisites: upgrade.hightech, barracks
		Description: Delivers 5 light infantry to any selected area\n Unloads infantry to the rally point
	Health:
		HP: 45000
	Armor:
		Type: light
	Aircraft:
		IdleBehavior: Land
		Speed: 150
		TurnSpeed: 16
	KillsSelf:
		Delay: 25
		GrantsCondition: timerstart
		RequiresCondition: !airborne
	-SpawnActorOnDeath@rotor:
	-SpawnActorOnDeath@rotor2:
	SpawnActorOnDeath@CRUISING:
		RequiresCondition: cruising && !timerstart
	SpawnActorOnDeath@LANDING:
		RequiresCondition: !cruising && !timerstart
	-ThrowsShrapnel@derbis:
	-ThrowsShrapnel@derbisExplosions:
	-ThrowsShrapnel@derbisExplosions2:
	SpawnActorOnDeath:
		Actor: carryall.that.leaves.map
		RequiresCondition: timerstart
	SpawnActorOnDeath@1:
		Actor: light_inf
		RequiresCondition: timerstart
	SpawnActorOnDeath@2:
		Actor: light_inf
		RequiresCondition: timerstart
	SpawnActorOnDeath@3:
		Actor: light_inf
		RequiresCondition: timerstart
	SpawnActorOnDeath@4:
		Actor: light_inf
		RequiresCondition: timerstart
	SpawnActorOnDeath@5:
		Actor: light_inf
		RequiresCondition: timerstart
	-ActorLostNotification:

carryall.that.leaves.map:
	Inherits: carryall.reinforce
	-Buildable:
 	Tooltip:
		Name: Infantry Reinforcements
	Aircraft:
		IdleBehavior: LeaveMap

frigate.harkonnen_cargo:
	Inherits: frigate.harkonnen
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	RenderSprites:
		Image: frigate.harkonnen
	-Buildable:
	Aircraft:
		IdleBehavior: None
	Health:
		HP: 45000
	RejectsOrders:
	Armament:
		Weapon: clusterMissile
		LocalOffset: -100,0,0, -100,100,0, -100,200,0
		PauseOnCondition: ammo == 0
		RequiresCondition: landing_area
	ExternalCondition@activateWeapon:
		Condition: landing_area
	AmmoPool:
		Ammo: 12
		AmmoCondition: ammo
	AutoTarget:
		InitialStance: AttackAnything
	Cargo:
		Types: Infantry, Vehicle
		PassengerFacing: 512
		BeforeUnloadDelay: 50
	Turreted:
	AttackTurreted:

frigate:
	Aircraft:
		AltitudeVelocity: 100
		IdleBehavior: LeaveMap
		Speed: 240
		TurnSpeed: 4
		Repulsable: False
		MaximumPitch: 20
		CruiseAltitude: 3000
		VTOL: true
		CanHover: true
		CanSlide: true
	ParaDrop:
		DropRange: 2c500
	GrantConditionOnPrerequisite@frigatecloaked:
		Condition: cloakedfrigate
		Prerequisites: cloak.frigate
	Cloak:
		InitialDelay: 0
		CloakDelay: 0
		RequiresCondition: cloakedfrigate
		IsPlayerPalette: true

frigate_choam:
	Inherits: carryall.reinforce
	ParaDrop:
	RenderSprites:
		Image: frigate
	AmbientSound:
		SoundFiles: audio/frigate_new2.wav
		RequiresCondition: cruising
	Cargo:
		MaxWeight: 20
	RejectsOrders:
	ProximityExternalCondition:
		Condition: frigate_proximity_influence
		Range: 6c0
	Aircraft:
		IdleBehavior: LeaveMapAtClosestEdge
		Speed: 240
		TurnSpeed: 4
		Repulsable: False
		MaximumPitch: 20
		CruiseAltitude: 2048
		VTOL: true
		CanHover: true
		CanSlide: true
		TakeoffSounds: audio/EITSTakeOff.wav
		LandingSounds: audio/frigate_land.wav
	SpawnActorOnDeath@CRUISING:
		Actor: frigate.husk
	SpawnActorOnDeath@LANDING:
		Actor: frigate.huskvtol
	Cloak@perma:
		InitialDelay: 1
		CloakDelay: 1
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		IsPlayerPalette: true

thumper:
	Buildable:
		Prerequisites: ~disabled
	RevealsShroud:
		Range: 3c768
	-Armament@chaos_bomb_influence:

sardaukar:
	Buildable:
		Prerequisites: ~disabled
	Armament@chaos_bomb_influence:
		Weapon: M_HMG
	Armament@chaos_bomb_influence2:
		Weapon: M_LMG
		RequiresCondition: chaos_bomb



merged.fremen_warrior:
	Inherits: fremen_warrior
	Buildable:
		BuildDuration: 160
		Prerequisites: ~techlevel.high, ~factions.merged, barracks, upgrade.barracks, merged.fremen_sietch, ~merged.fremen
	RenderSprites:
		Image: fremen


merged.sardaukar:
	Inherits: mpsardaukar.corrino
	RenderSprites:
		Image: sardaukar
	Buildable:
		Prerequisites: ~techlevel.high, ~factions.merged, ~merged.corrino, merged.corrino_palace, barracks, upgrade.barracks

merged.bombardment_tank:
	Inherits: bombardment_tank
	RenderSprites:
		Image: bombardment_tank
	Buildable:
		Prerequisites: ~techlevel.high,~factions.merged, ~merged.corrino, heavy_factory, upgrade.heavy, research_centre

merged.flamer:
	Inherits: flamer
	RenderSprites:
		Image: flamer
	Buildable:
		Prerequisites: ~techlevel.high, ~factions.merged, ~merged.smuggler, research_centre, heavy_factory, upgrade.heavy, merged.starport_smuggler

merged.hunter:
	Inherits: hunter
	RenderSprites:
		Image: hunter
	Buildable:
		Prerequisites: ~factions.merged, ~light.hunter, upgrade.light, ~merged.smuggler
		BuildPaletteOrder: 50

merged.hunter_fremen:
	Inherits: hunter
	RenderSprites:
		Image: hunter
	Buildable:
		Prerequisites: ~factions.merged, upgrade.light, ~merged.fremen
		BuildPaletteOrder: 50

merged.crawler.light:
	Inherits: crawler.light
	RenderSprites:
		Image: crawler.light
	Buildable:
		BuildPaletteOrder: 106
		Prerequisites: ~merged.mercenary, outpost, ~factions.merged, ~techlevel.high, upgrade.light, light_factory

merged.mortar_inf:
	Inherits: mortar_inf
	RenderSprites:
		Image: mortar_inf
	Buildable:
		Prerequisites: ~merged.mercenary, outpost, ~factions.merged, ~techlevel.high, barracks, upgrade.barracks, merged.mercenary_factory

merged.bison_tank:
	Inherits: bison_tank
	RenderSprites:
		Image: bison_tank
	Buildable:
		Prerequisites: merged.mercenary_factory, ~merged.mercenary, ~factions.merged, ~techlevel.high, research_centre

ornithopter_s:
	Inherits: ornithopter
	RenderSprites:
		Image: ornithopter
	-AttackBomber:
	Aircraft:
		AltitudeVelocity: 8c0
	Tooltip:
		Name: Scout Ornithopter
	Buildable:
		Queue: Aircraft
		BuildDuration: 1000
		BuildDurationModifier: 100
		BuildPaletteOrder: 120
		Description: Unarmed aircraft for reconnaissance\n Flies along rally path then circles around rally point\nRegenerates up to half health if not under attack
 		Prerequisites: upgrade.hightech, outpost, ~enhancedAirCombat
	AttackAircraft:
		AttackType: Strafe
		StrafeRunLength: 4c0
		OpportunityFire: true
		ForceFireIgnoresActors: false
		Voice: Attack
		FacingTolerance: 512
		PersistentTargeting: false
		AbortOnResupply: false
	Armor:
		Type: light
	Aircraft:
		Speed: 200
		TurnSpeed: 5
		Repulsable: False
		CruiseAltitude: 2560
			AirborneCondition: airborne
		CanSlide: True
	Valued:
		Cost: 1500
	RevealsShroud@airborne:
		Range: 7c112
		Type: GroundPosition
		RequiresCondition: airborne
	ChangesHealth:
		Step: 100
		Delay: 5
		StartIfBelow: 50
		DamageCooldown: 250

nsfremen: #LITERALY WHO??
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical

merc_apc:
	AutoTargetPriority@bot:
		ValidTargets: Tank, Vehicle, Infantry
		InvalidTargets: Structure, Defense
		Priority: 50
		RequiresCondition: ignore-creeps
	Inherits: quad
	Buildable:
		Queue: Vehicle
		Prerequisites: ~disabled, starport, ~light.harkonnen, ~techlevel.medium
		BuildPaletteOrder: 70
		Description: Transporter with energy beam device\n Slows down targets\n Transports ally infantry\nHeals ally infantry
		BuildDuration: 650
	Valued:
		Cost: 1100
	Selectable:
		Class: merc_apc
	Health:
		HP: 18000
	Armor:
		Type: heavy
	Mobile:
		Speed: 55
		TurnSpeed: 16
		Locomotor: tank
	HitShape:
		Type: Circle
			Radius: 500
	RevealsShroud:
		Range: 5c512
	Tooltip:
		Name: Crawler
	Cargo:
		Types: Infantry
		MaxWeight: 5
		LoadingCondition: notmobile
		InitialUnits: mercenary, mercenary, mercenary, mercenary, mercenary
	Armament:
		Weapon: slowlaserpointer
		LocalOffset: 50,75,75, 50,-75,75
	RenderSprites:
		Image: merc_apc
	WithCargoPipsDecoration:
		Position: BottomLeft
		Margin: 4, 3
		RequiresSelection: true
	Armor:
		Type: heavy
	Mobile:
		PauseOnCondition: notmobile
	SpawnActorOnDeath:
		Actor: merc_apc.husk
		OwnerType: InternalName
		EffectiveOwnerFromOwner: true
		RequiresCondition: !worm_attack
	ProximityExternalCondition@dhealign:
		Condition: carrierhealing
		Range: 0c276
		ValidRelationships: Ally

merc_apc_revived:
	Inherits: merc_apc
	Cargo:
		Types: Infantry
		MaxWeight: 5
		LoadingCondition: notmobile
		-InitialUnits:

carrier:
	Inherits: mcv
	Buildable:
		BuildPaletteOrder: 70
		Prerequisites: ~carrier, upgrade.heavy, research_centre, ~techlevel.high
		BuildDuration: 550
		Description: Heavy Armored Transporter\n Transports ally infantry\nHeals ally infantry\nInvisible when standing on the sands
	Health:
		HP: 36000
	Valued:
		Cost: 900
	Tooltip:
		Name: Carrier
	Armor:
		Type: heavy
	Mobile:
		Speed: 55
		TurnSpeed: 16
		Locomotor: tank
		PauseOnCondition: notmobile
	RevealsShroud:
		Range: 5c512
	HitShape:
		Type: Circle
			Radius: 400
	GrantConditionOnTerrain:
		TerrainTypes: Sand, Dune, SpiceSand, Spice
		Condition: HiddeninSand
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	Cloak:
		InitialDelay: 30
		CloakDelay: 104
		UncloakOn: Move, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		IsPlayerPalette: true
		RequiresCondition: !cloak-force-disabled && HiddeninSand
	Cargo:
		Types: Infantry
		MaxWeight: 5
		LoadingCondition: notmobile
	WithCargoPipsDecoration:
		Position: BottomLeft
		Margin: 4, 3
		RequiresSelection: true
	ProximityExternalCondition@dhealign:
		Condition: carrierhealing
		Range: 0c276
		ValidRelationships: Ally
	Explodes:
		Weapon: UnitExplodeMed
		EmptyWeapon: UnitExplodeMed
	SpawnActorOnDeath:
		Actor: carrier.husk
	Selectable:
		Class: transport
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	-ChangesHealth:
	-Transforms:
