^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

^temporarycloak:
	ExternalCondition@temporeryclock:
		Condition: temporery_clock
	Cloak@temporeryclock:
		RequiresCondition: temporery_clock
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		InitialDelay: 10
		CloakDelay: 30
		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
	ReloadDelayMultiplier@jammer:
		Modifier: 120
		RequiresCondition: jammed
	InaccuracyMultiplier@jammer:
		Modifier: 170
		RequiresCondition: jammed
	RangeMultiplier@jammer:
		Modifier: 60
		RequiresCondition: jammed
	RevealsShroud:
		RevealGeneratedShroud: false
	RevealsShroud@jammed:
		Range: 3c512
		RevealGeneratedShroud: true
	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@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@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@hidden:
		Condition: hidden
	Cloak@hidden:
		InitialDelay: 30
		CloakDelay: 120
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		IsPlayerPalette: true
		PauseOnCondition: cloak-force-disabled
		RequiresCondition: hidden
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	ExternalCondition@jammed:
		Condition: jammed
	RevealsShroudMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 25
	DetectCloakedMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 5
	Demolishable@wormCrush:
	RevealsShroud@jammed:
		Range: 3c112
	Parachutable:
		KilledOnImpassableTerrain: true
	HitShape:
		Type: Circle
			Radius: 100

^Vehicle:
	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@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@hidden:
		Condition: hidden
	Cloak@hidden:
		InitialDelay: 5
		CloakDelay: 120
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		IsPlayerPalette: true
		PauseOnCondition: cloak-force-disabled
		RequiresCondition: hidden
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	ExternalCondition@jammed:
		Condition: jammed
	RevealsShroudMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 25
	DetectCloakedMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 5

^Tank:
	Targetable:
		TargetTypes: Ground, C4, Tank
	GrantConditionOnDamageState@HEAVY:
		ValidDamageStates: Critical
	SpeedMultiplier@HEAVYDAMAGE:
		Modifier: 75
	RevealsShroud@jammed:
		Range: 4c0
	SpawnActorOnDeath:
		SpawnAfterDefeat: false
	WithDamageOverlay:
		MinimumDamageState: Critical
	HitShape:
		Type: Circle
			Radius: 400
	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@hidden:
		Condition: hidden
	Cloak@hidden:
		InitialDelay: 5
		CloakDelay: 120
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		IsPlayerPalette: true
		PauseOnCondition: cloak-force-disabled
		RequiresCondition: hidden
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	ExternalCondition@jammed:
		Condition: jammed
	RevealsShroudMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 25
	DetectCloakedMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 5

mcv:
	Valued:
		Cost: 2000
	Buildable:
		Prerequisites: upgrade.heavy, repair_pad, ~techlevel.medium
		Queue: Armor
		BuildPaletteOrder: 110
		BuildDuration: 750
		Description: Deploys into another Construction Yard\nRegenerates to full durability after small delay\nUnarmed
	Health:
		HP: 45000
	Armor:
		Type: harvester
	Mobile:
		Speed: 43
	HitShape:
		Type: Circle
			Radius: 500
	RevealsShroud:
		Range: 2c768
	SpawnActorOnDeath:
		RequiresCondition: !worm_attack
	-Armament@chaos_bomb_influence:
	ChangesHealth:
		Step: 100
		Delay: 5
		StartIfBelow: 100
		DamageCooldown: 250

thumper:
	Buildable:
		Prerequisites: ~disabled

harvester:
	-Armament@chaos_bomb_influence:
	Buildable:
		Queue: Armor
		Prerequisites: refinery
		BuildDuration: 600
		Description: Collects Spice for processing\nRegenerates to full durability after small delay\nUnarmed
	Valued:
		Cost: 1000
	WithDockingAnimation:
	Harvester:
		Capacity: 40
		HarvestFacings: 8
		Resources: Spice
		BaleUnloadDelay: 6
		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: 100
		DamageCooldown: 250

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\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: 8c768
	Armament@damage:
		FireDelay: 0
		Weapon: HMG
		MuzzleSequence: muzzle
	-Armament@muzzle:
	Armament@chaos_bomb_influence:
		Weapon: HMG
	SpeedMultiplier@HEAVYDAMAGE:
		RequiresCondition: heavy-damage
		Modifier: 75
	RevealsShroud@jammed:
		Range: 5c0

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 and durability\n Strong vs Infantry\n Weak vs Vehicles
	Valued:
		Cost: 350
	Tooltip:
		Name: Raider
	RevealsShroud:
		Range: 7c512
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 10000
	Armor:
		Type: light
	Mobile:
		Locomotor: light_vehicle
		TurnSpeed: 40
		Speed: 140
	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
	Health:
		HP: 11000
	Armor:
		Type: light
	Mobile:
		Locomotor: light_vehicle
		TurnSpeed: 35
		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
	RevealsShroud@jammed:
		Range: 5c0

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
	Valued:
		Cost: 450
	Tooltip:
		Name: Stealth Raider
	RevealsShroud:
		Range: 6c512
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Cloak:
		InitialDelay: 30
		CloakDelay: 60
		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: 500
		BuildDurationModifier: 100
		Description: Siege Ranged Artillery\n Strong vs Infantry, Buildings\n Weak vs Vehicles\nHighest max and min attack 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: True
		TargetFrozenActors: True
		FacingTolerance: 0
	Valued:
		Cost: 800
	Health:
		HP: 12000
	Armor:
		Type: heavy
	Mobile:
		Speed: 37
		TurnSpeed: 12
	RevealsShroud:
		Range: 5c512
	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, high_tech_factory, ~techlevel.high
		Description: Surface-to-Air Missile Artillery\n Strong vs Tanks, Aircraft\n Weak vs Infantry\nHoming missiles\nSlow reload
	Valued:
		Cost: 900
	Mobile:
		Speed: 60
		TurnSpeed: 20
	Health:
		HP: 12000
	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: True
		FacingTolerance: 0
	Buildable:
		Queue: Armor
		BuildPaletteOrder: 80
		Prerequisites: ~heavy.atreides, upgrade.heavy, research_centre, ~techlevel.high
		BuildDuration: 650
		Description: Vehicle with sound weapon\n Strong vs Everything except Tanks\nAttacks in straight line\nBeware of friendly fire
	Valued:
		Cost: 1100
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 19000
	Armor:
		Type: invulnerable
	Mobile:
		TurnSpeed: 12
		Speed: 37
	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: 105
		Prerequisites: ~heavy.harkonnen, upgrade.heavy, research_centre, ~techlevel.high
		BuildDuration: 700
		Description: Slow and durable heavy tank\n Strong vs Everything\nDeploy to self-destruct after short delay
	ExternalCondition:
		Condition: unitCapturated
	Valued:
		Cost: 1200
	Health:
		HP: 75000
	Armor:
		Type: heavy
	Mobile:
		TurnSpeed: 12
		Speed: 31
		Locomotor: devastator
		RequiresCondition: !overload
		PauseOnCondition: notmobile
	RevealsShroud:
		Range: 4c768
	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: 150
		RequiresCondition: overload
		GrantsCondition: meltdown
	AttractsWorms:
		Intensity: 700
	-ChangesHealth:
	-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: 1100
	Buildable:
		BuildPaletteOrder: 90
		Prerequisites: ~heavy.ordos, upgrade.heavy, research_centre, ~techlevel.high
		BuildDuration: 650
		Description: Anti-Vehicle Skirmisher\n Temporary changes allegiance of enemy vehicles\nSlow reload
	Mobile:
		TurnSpeed: 20
		Speed: 60
	Health:
		HP: 12000
	Armor:
		Type: heavy
	RevealsShroud:
		Range: 6c112
	-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 Light Vehicles\n Weak vs Anti-Heavy Units
	Valued:
		Cost: 700
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 25000
	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 durability\nLong 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 durability\nLarge damage range, Best dune resistance
	Armament:
		Weapon: 80mm_H
	Armament@chaos_bomb_influence:
		Weapon: 80mm_H
	Tooltip:
		Name: Harkonnen Combat Tank
	Mobile:
		Speed: 61
		TurnSpeed: 19
		Locomotor: tank_harkonnen
	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

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 durability\nFastest firing speed
	Turreted:
		TurnSpeed: 24
	Armament:
		Weapon: 80mm_O
	Armament@chaos_bomb_influence:
		Weapon: 80mm_O
	Tooltip:
		Name: Ordos Combat Tank
	Mobile:
		Speed: 79
		TurnSpeed: 21
	Health:
		HP: 20000
	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: 44
		BuildDuration: 400
		Prerequisites: ~factions.subfaction_allowed, ~heavy.cheap_tank
		Description: Cheap Battle Tank\n Strong vs Light Vehicles\n Weak vs Tanks\nMedium speed, Low durability\nBest accurate
	Valued:
		Cost: 600
	Tooltip:
		Name: Generic Combat Tank
	Mobile:
		Locomotor: tank
	Health:
		HP: 20000
	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: 41
		Prerequisites: ~heavy.corrino_combat, ~factions.subfaction_allowed
		Description: Corrino Combat tank\n Strong vs Light Vehicles\n Weak vs Anti-Heavy Units\nSlow speed, High durability\nLargest damage range, Better dune resistance
	Tooltip:
		Name: Corrino Combat Tank
	Health:
		HP: 30000
	Mobile:
		Speed: 61
		TurnSpeed: 19
		Locomotor: tank_corrino
	Armament:
		Weapon: 80mm_corrino
	Armament@chaos_bomb_influence:
		Weapon: 80mm_corrino


carryall.reinforce:
	Inherits: ^Plane
	HitShape:
		Type: Circle
			Radius: 500
	Valued:
		Cost: 1000
	Cargo:
		MaxWeight: 10
	ParaDrop:
		DropRange: 4c0
	Buildable:
		BuildDuration: 600
		Description: Transport air ship\n Automatically lifts harvesters from and to Spice\n Lifts vehicles to Repair Pads when ordered\nRegenerates to full durability after small delay\nUnarmed
	UpdatesPlayerStatistics:
		AddToAssetsValue: false
	Tooltip:
		Name: Carryall
	Health:
		HP: 45000
	Armor:
		Type: harvester
	Aircraft:
		CruiseAltitude: 2160
		CruisingCondition: cruising
		Speed: 170
		TurnSpeed: 16
		LandableTerrainTypes: Sand, Rock, Transition, Spice, SpiceSand, Dune, Concrete
		Repulsable: False
		AirborneCondition: airborne
		CanSlide: True
		VTOL: true
		IdleTurnSpeed: 5
		IdleSpeed: 115
	ThrowsShrapnel@derbis:
		Weapons: Debris, Debris2, 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: 100
		DamageCooldown: 250

carryall.reinforce_with_sound:
	Inherits: carryall.reinforce
	Health:
		HP: 11000
	-Carryall:
	Cargo:
		Types: Infantry, Vehicle
		PassengerFacing: 512
		BeforeUnloadDelay: 50
	Aircraft:
		MinAirborneAltitude: 400
		TakeoffSounds: audio/adv_carryall_takeoff_1.wav
		LandingSounds: audio/adv_carryall_land_1.wav
		Speed: 140
	RevealsShroud@landing:
		Range: 3c0
		RequiresCondition: !cruising
		Type: CenterPosition
	RevealsShroud@onland:
		Range: 4c0
		RequiresCondition: !airborne
		Type: CenterPosition
	AmbientSound:
		SoundFiles: audio/carryallSound(2).wav
		RequiresCondition: cruising
	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: harvester
	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: 100
		DamageCooldown: 250

ornithopter:
	Inherits: ^Plane
	Health:
		HP: 30000
	Armor:
		Type: light
	Aircraft:
		Speed: 210
		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: 400

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: 210
		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
	Valued:
		Cost: 50
	Health:
		HP: 6500
	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
	Valued:
		Cost: 100
	Health:
		HP: 8000
	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, except for MCV\n Attracts 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
	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:

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, Buildings\n Weak vs Vehicles\nBeware of friendly fire
	Valued:
		Cost: 75
	Health:
		HP: 6500
	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: 7
		Prerequisites: ~barracks.harkonnen, upgrade.barracks, high_tech_factory, ~techlevel.medium, ~factions.standard
		BuildDuration: 200
		Description: Emperor elite assault infantry\n Strong vs Tanks, Buildings\n Weak vs Artillery\nDeals large damage when crushed
	Valued:
		Cost: 200
	Health:
		HP: 9500
	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
	-Passenger:
	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: 50
		Flashes: 3
		EnterBehaviour: Suicide
	Cloak:
		InitialDelay: 30
		CloakDelay: 60
		CloakSound: STEALTH1.WAV
		UncloakOn: Attack, Unload, Infiltrate, Demolish, Damage, Heal
		IsPlayerPalette: true
		PauseOnCondition: cloak-force-disabled
		RequiresCondition: !SuicideAtt
	Explodes@Selfkill:
		Weapon: PlasmaSaboteur
		EmptyWeapon: PlasmaSaboteur
		RequiresCondition: kamikadze
	GrantConditionOnDeploy:
		DeployedCondition: SuicideAtt
		PauseOnCondition: SuicideAtt
	KillsSelf@SuicideKillCount:
		Delay: 50
		RequiresCondition: SuicideAtt
		GrantsCondition: kamikadze
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	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
	Mobile:
		Speed: 43
	Valued:
		Cost: 225
	Tooltip:
		Name: Noble Fremen
	Health:
		HP: 6500
	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: 125
	Cloak:
		InitialDelay: 30
		CloakDelay: 60

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: 5c512
	Buildable:
		Queue: Infantry
		BuildPaletteOrder: 6
		Prerequisites: ~barracks.mercenary, upgrade.barracks, ~techlevel.medium, high_tech_factory, ~factions.subfaction_allowed
		BuildDuration: 200
		BuildDurationModifier: 100
		Description: Infantry with siege weapon\n Strong vs Infantry, Buildings\n Weak vs Vehicles\nCan shoot only when deployed
	Valued:
		Cost: 175
	Tooltip:
		Name: Mortar Infantry
	WithRangeCircle:
		RequiresCondition: deployed
		Range: 6c512
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 8000
	Mobile:
		Speed: 31
		PauseOnCondition: deployed
	GrantConditionOnDeploy:
		DeployedCondition: deployed
		UndeployedCondition: undeployed
		Facing: 768
		UndeployOnMove: false
		SkipMakeAnimation: false
	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
	Armament:
		Weapon: 40mm_mortar
		RequiresCondition: deployed
		LocalOffset: 0,100,200
	Armament@chaos_bomb_influence:
		Weapon: 40mm_mortar
		RequiresCondition: deployed && chaos_bomb
		LocalOffset: 0,100,200
	GrantCondition:
		Condition: editorhack
	WithInfantryBody@Editor:
		RequiresCondition: !editorhack

assassin:
	Inherits: ^Infantry
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Valued:
		Cost: 125
	Buildable:
		Queue: Infantry
		BuildPaletteOrder: 4
		Prerequisites: ~!factions.standard, ~barracks.harkonnen, upgrade.barracks, high_tech_factory, ~techlevel.high
		BuildDuration: 150
		BuildDurationModifier: 100
		Description: Infantry with siper rifle\n Attacks only Infantry
	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: 120
		UncloakOn: Move, Damage
		IsPlayerPalette: true
		RequiresCondition: !cloak-force-disabled && hiddenbetweenrocks
	GrantConditionOnDamageState@UNCLOAK:
		Condition: cloak-force-disabled
		ValidDamageStates: Critical
	-MustBeDestroyed:


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: 6c512
	Valued:
		Cost: 25
	Health:
		HP: 9500
	Mobile:
		Speed: 31
	Armament:
		Weapon: laserpointer
	Armament@chaos_bomb_influence:
		Weapon: laserpointer
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	WithInfantryBody:
		DefaultAttackSequence: shoot
	-TakeCover:

fremen_warrior:
	Inherits: fremen
	RenderSprites:
		Image: fremen
	Tooltip:
		Name: Desert Warrior
	RevealsShroud:
		Range: 4c768
	AutoTarget:
		ScanRadius: 7
		InitialStance: Defend
		InitialStanceAI: Defend
	Valued:
		Cost: 150
	Buildable:
		Queue: Infantry
		BuildPaletteOrder: 5
		Prerequisites: ~factions.subfaction_allowed, ~barracks.fremen, research_centre, ~techlevel.medium
		BuildDuration: 200
		BuildDurationModifier: 100
		Description: Armed with a shock rifle\n Slows down the target for a second when hit\n Same modest vs Everything\nRegenerates to full health after small delay
	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
	-Cloak:

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
	Valued:
		Cost: 275
	Tooltip:
		Name: Hireling
	Mobile:
		Speed: 31
		PauseOnCondition: deployed
	TakeCover:
		RequiresCondition: !editorhack
	RevealsShroud:
		Range: 5c512
	Health:
		HP: 9500
	Armor:
		Type: none
	Armament:
		Weapon: portable_cannon
		PauseOnCondition: !deployed
		LocalOffset: 0,100,0
		MuzzleSequence: muzzle
	-Armament@chaos_bomb_influence:
	WithMuzzleOverlay:
	GrantConditionOnDeploy:
		UndeployOnMove: false
		DeployedCondition: deployed
		UndeployedCondition: undeployed
		Facing: 768
		DeploySounds: audio/EBoD_MortarDeploy.wav
		UndeploySounds: audio/EBoD_MortarUndeploy.wav
		SkipMakeAnimation: false
	WithInfantryBody:
		RequiresCondition: undeployed
	WithSpriteBody@DEPLOYED:
		Sequence: invisible
		RequiresCondition: !undeployed
	Turreted:
		TurnSpeed: 200
		InitialFacing: 640
		RealignDelay: -1
		Turret: turret
	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: 6c512
	WithInfantryBody@Editor:
		RequiresCondition: !editorhack


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: 70
		Description: Heavy Universal Tank\n Strong vs Vehicles\n Weak vs Anti-Heavy Units\nMedium speed, High durability\nExtented range, Fast firing speed\nHigh accurate, Better damage vs Heavy armor
	Health:
		HP: 30000
	Valued:
		Cost: 1000
	Tooltip:
		Name: Bison tank
	Armor:
		Type: heavy
	Mobile:
		Speed: 70
		TurnSpeed: 20
	Mobile:
		Locomotor: tank
		PauseOnCondition: notmobile
	RevealsShroud:
		Range: 5c512
	HitShape:
		Type: Circle
			Radius: 400
	Armament:
		Weapon: 90mm_bison
		Recoil: 128
		RecoilRecovery: 32
		LocalOffset: 0,0,0
		MuzzleSequence: muzzle
	Turreted:
		TurnSpeed: 20
		RealignDelay: 0
	AttackTurreted:
	Explodes:
		Weapon: UnitExplodeMed
		EmptyWeapon: UnitExplodeMed
	WithMuzzleOverlay:
	WithSpriteTurret:
	Armament@chaos_bomb_influence:
		Weapon: 90mm_bison
	SpawnActorOnDeath:
		Actor: bison_tank.Husk
		RequiresCondition: !worm_attack

worm_rider:
	Buildable:
		Description: Attracts a worm and saddles it
	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
	Mobile:
		Speed: 43
	KillsSelf:
		Delay: 750
		GrantsCondition: spawnWorm
		RequiresCondition: deployed && desert_terain
	GrantConditionOnDeploy:
		DeployedCondition: deployed
		UndeployedCondition: undeployed
		PauseOnCondition: 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
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	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: 25
		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: 2250
		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: 7c768
	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
	Armament@1:
		Name: primary
		Weapon: pistol
		Recoil: 128
		RecoilRecovery: 32
	Armament@2:
		Name: secondary
		Weapon: pistol
		Recoil: 128
		RecoilRecovery: 32
		Turret: secondary
	Turreted@1:
		TurnSpeed: 25
		Turret: primary
		Offset: -600,0,200
	Turreted@2:
		TurnSpeed: 25
		Turret: secondary
		Offset: -50,-150,350
	AttackTurreted:
		Turrets: primary, secondary
	AutoTarget:
	AttackMove:
	WithSpriteTurret@1:
		Turret: primary
		RequiresCondition: !makeAnimation
	WithSpriteTurret@2:
		Turret: secondary
		RequiresCondition: !makeAnimation
	GrantConditionOnCombatantOwner@nonAi:
		Condition: human_player
	RejectsOrders:
		Reject: AttackMove, AssaultMove
		RequiresCondition: human_player

spire:
	Inherits: quad
	Buildable:
		Prerequisites: ~disabled, upgrade.light, ~factions.subfaction_allowed, ~techlevel.medium
		BuildDuration: 353
		BuildDurationModifier: 100
		Description: Heavy missile Scout\n  Excellent vs Light Armor\n Modest vs Tanks\n Weak vs  Moving Targets, Infantry \n Slower speed, more HP, better damage
	Valued:
		Cost: 500
	Health:
		HP: 12000
	Tooltip:
		Name: Spire
	Armor:
		Type: light
	Mobile:
		Locomotor: light_vehicle
		TurnSpeed: 40
		Speed: 90
	Armament:
		Weapon: rocket_spike
		LocalOffset: 128,64,64
	Armament@secondrocket:
		Weapon: rocket_spike
		LocalOffset: 128,-64,64
	Armament@chaos_bomb_influence:
		Weapon: Rocket
		LocalOffset: 128,64,64, 128,-64,64


hunter:
	Inherits: trike
	Inherits@GAINSEXPERIENCE: ^GainsExperience
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Buildable:
		Prerequisites: ~light.hunter, ~factions.subfaction_allowed
		BuildPaletteOrder: 10
		BuildDuration: 240
		Description: Turreted Trike\n Strong vs Infantry\n Weak vs Vehicles
	Tooltip:
		Name: Hunter
	Valued:
		Cost: 350
	Turreted:
		TurnSpeed: 40
		Offset: -200,0,30
		RealignDelay: 0
	-AttackFrontal:
	WithMuzzleOverlay:
	AttackTurreted:
	WithSpriteTurret:
	RevealsShroud:
		Range: 7c512
	Mobile:
		Speed: 120
	Armament@damage:
		Weapon: HMG
		LocalOffset: -200,0,0
		MuzzleSequence: muzzle
	Armament@muzzle:
		Weapon: HMG_muzzle
		LocalOffset: -200,0,0
		MuzzleSequence: muzzle

crawler.light:
	Inherits: ^Vehicle
	Buildable:
		Queue: Vehicle
		Prerequisites: ~light.crawler, ~factions.subfaction_allowed, upgrade.light, high_tech_factory
		BuildDuration: 350
		BuildDurationModifier: 100
		BuildPaletteOrder: 60
		Description: Fast Armored Transporter\n Transports ally infantry\n Crushes enemy infantry\nInvisible when not moving\nUnarmed
	Health:
		HP: 11000
	Valued:
		Cost: 500
	Tooltip:
		Name: Carrier
	Armor:
		Type: heavy
		RequiresCondition: !engineer.inside
	Mobile:
		Speed: 110
		TurnSpeed: 30
		Locomotor: tank
		PauseOnCondition: notmobile
	RevealsShroud:
		Range: 7c112
	Cloak:
		InitialDelay: 30
		CloakDelay: 120
		UncloakOn: Move, Unload, Infiltrate, Demolish, Dock, Damage, Heal
		IsPlayerPalette: true
		PauseOnCondition: cloak-force-disabled
	ExternalCondition@engineer.inside:
		Condition: engineer.inside
	Cargo:
		Types: Infantry
		MaxWeight: 5
		LoadingCondition: notmobile
		PassengerConditions:
			engineer: engineer.inside
	Explodes:
		Weapon: UnitExplodeSmall
		EmptyWeapon: UnitExplodeSmall
	WithCargoPipsDecoration:
		Position: BottomLeft
		Margin: 4, 3
		RequiresSelection: true
	-Armament@chaos_bomb_influence:

bombardment_tank:
	Inherits: ^Vehicle
	Inherits@GAINSEXPERIENCE: ^GainsExperience
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Buildable:
		Queue: Armor
		Prerequisites: ~heavy.corrino, upgrade.heavy, research_centre, ~factions.subfaction_allowed
		BuildDuration: 650
		BuildDurationModifier: 100
		BuildPaletteOrder: 95
		Description: Multi-Shot Turreted Artillery\n Modest vs Everything\nCharge up to 4 shots
	Health:
		HP: 13000
	Valued:
		Cost: 1100
	Tooltip:
		Name: Bombardment Tank
	Armor:
		Type: heavy
	Mobile:
		Speed: 60
		TurnSpeed: 20
	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: 80
	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
	-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: 650
		BuildDurationModifier: 100
		BuildPaletteOrder: 100
		Prerequisites: ~heavy.smuggler, upgrade.heavy, research_centre
		Description: Flame Tank\n Strong vs Infantry, Light Vehicles, Harvesters\n Weak vs Tanks, Turrets\nDestroys spice
	Health:
		HP: 20000
	Valued:
		Cost: 1100
	Tooltip:
		Name: Flamer
	Armor:
		Type: heavy
	Mobile:
		Speed: 80
	RevealsShroud:
		Range: 4c768
	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

frigate.harkonnen:
	Inherits: carryall.reinforce_with_sound
	RenderSprites:
		Image: frigate.harkonnen
	Health:
		HP: 64000
	Aircraft:
		IdleBehavior: LeaveMapAtClosestEdge
		Speed: 170
		TakeoffSounds: audio/EITSTakeOff.wav
		LandingSounds: audio/EITSLand.wav
	SpawnActorOnDeath@CRUISING:
		Actor: frigate.husk
		RequiresCondition: cruising
	AmbientSound:
		SoundFiles: audio/frigate_new2.wav
		RequiresCondition: cruising
	SpawnActorOnDeath@LANDING:
		Actor: frigate.huskvtol
	RejectsOrders:
	-SpawnActorOnDeath@rotor:
	-SpawnActorOnDeath@rotor2:


frigate.harkonnen_cargo:
	Inherits: frigate.harkonnen
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	RenderSprites:
		Image: frigate.harkonnen
	Aircraft:
		IdleBehavior: None
	Health:
		HP: 64000
	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: 250
		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: 250
		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: 1200
		BuildDurationModifier: 100
		BuildPaletteOrder: 120
		Description: Scout aircraft\n Flies along rally path then circles around rally point\nUnarmed
	AttackAircraft:
		AttackType: Strafe
		StrafeRunLength: 4c0
		OpportunityFire: true
		ForceFireIgnoresActors: false
		Voice: Attack
		FacingTolerance: 512
		PersistentTargeting: false
		AbortOnResupply: false
	Armor:
		Type: light
	Aircraft:
		Speed: 210
		TurnSpeed: 4
		Repulsable: False
		CruiseAltitude: 2560
			AirborneCondition: airborne
		CanSlide: True
	Valued:
		Cost: 2000
	RevealsShroud@airborne:
		Range: 8c768
		Type: GroundPosition
		RequiresCondition: airborne

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

merc_apc:
	AutoTargetPriority@bot:
		ValidTargets: Tank, Vehicle, Infantry, Defense
		InvalidTargets: Structure
		Priority: 50
		RequiresCondition: ignore-creeps
	Inherits: quad
	Buildable:
		Queue: Vehicle
		Prerequisites: ~disabled, starport, ~light.harkonnen, ~techlevel.medium
		BuildPaletteOrder: 70
		Description: Heavy Armored Transporter\nArmed with laser device\n Transports ally infantry\n Slows down targets
		BuildDuration: 200
	Valued:
		Cost: 1200
	Health:
		HP: 18000
	Armor:
		Type: heavy
	Mobile:
		Speed: 55
		TurnSpeed: 20
	HitShape:
		Type: Circle
			Radius: 400
	RevealsShroud:
		Range: 5c512
	Tooltip:
		Name: Crawler
	Cargo:
		Types: Infantry
		MaxWeight: 5
		LoadingCondition: notmobile
		InitialUnits: mercenary, mercenary, mercenary, mercenary, mercenary
	Armament:
		Weapon: slowlaserpointer
		LocalOffset: 128,64,64, 128,-64,64
	RenderSprites:
		Image: merc_apc
	WithCargoPipsDecoration:
		Position: BottomLeft
		Margin: 4, 3
		RequiresSelection: true
	Armor:
		Type: heavy
	Mobile:
		PauseOnCondition: notmobile
