spicebloom:
	SpiceBloom:
		Pieces: 4,5

^Husk:
	Health:
		HP: 15000

^VehicleHusk:
	Inherits: ^Husk
	CaptureManager:
	Capturable:
		Types: husk
		ValidRelationships: Enemy, Neutral, Ally
	TransformOnCapture:
		ForceHealthPercentage: 5
	Husk:
		AllowedTerrain: Sand, Rock, Transition, Concrete, Spice, SpiceSand, SpiceBlobs, Dune
	Targetable:
		TargetTypes: Ground, Vehicle
		RequiresForceFire: true
	-WithColoredOverlay@IDISABLE:
	WithColoredOverlay@deadPallete:
		Color: 00000060
	Explodes:
		Weapon: huskExplode01
		EmptyWeapon: huskExplode01
		Chance: 70
	WithIdleOverlay@Burns:
		Image: fire_slow
		Sequence: 1
		IsDecoration: True
	ChangesHealth:
		Step: -30
		StartIfBelow: 101
		Delay: 4

^AircraftHusk:
	FallsToEarth:
		Explosion: ExplosionAircraft
	HitShape:
		Type: Rectangle
			TopLeft: -512, -512
			BottomRight: 512, 512


^Dummy:
	EditorOnlyTooltip:
		Name: wpdummy
	MapEditorData:
		Categories: system
	AlwaysVisible:
	Interactable:
	Immobile:
		OccupiesSpace: false
	RenderSpritesEditorOnly:
		Image: waypoint
	WithSpriteBody:
	BodyOrientation:
		QuantizedFacings: 1
	OwnerLostAction:
		Action: Dispose

^DummyVehicle:
	Inherits@1: ^ExistsInWorld
	Inherits@2: ^SpriteActor
	Interactable:
	Mobile:
		TurnSpeed: 20
		Locomotor: vehicle
		Speed: 20
		PauseOnCondition: notmobile
	Targetable:
		TargetTypes: Ground, Vehicle, C4
	Passenger:
		CargoType: Vehicle
	HiddenUnderFog:
	WithFacingSpriteBody:
	HitShape:
		Type: Circle
			Radius: 16
	Tooltip:
	AutoCarryable:
		CarriedCondition: notmobile
		LockedCondition: notmobile
	RejectsOrders:

dummy.kill_self:
	Inherits: dummyShrapnelThrower_carryall
	-ThrowsShrapnel@derbisshort:
	-ThrowsShrapnel@derbislong:


^LivingDummy:
	Inherits: ^Dummy
	-Immobile:
	Mobile:
		Speed: 0
		Locomotor: foot
	Health:
		HP: 10
	Armor:
		Type: invulnerable
	HitShape:

dummy.generic:
	Inherits: ^DummyVehicle
	Targetable:
		TargetTypes: Ground, Air_support
		RequiresForceFire: true
	RenderSprites:
		Image: invisible
	GrantCondition@dontmoveDammit:
		Condition: notmobile
	Health:
		HP: 1000000
	Armor:
		Type: invulnerable

dummy.true_sayer:
	Inherits: ^Dummy
	RevealsShroud:
		Range: 8c112
		Type: CenterPosition
	DetectCloaked:
		Range: 8c112
	TerrainLightSource:
		Range: 8c112
		Intensity: -0.4
		RedTint: 0.04
		GreenTint: 0.02
		BlueTint: 0.02

waypoint.airtstrike_a:
	Inherits: ^Dummy
	RenderSpritesEditorOnly:

waypoint.airtstrike_o:
	Inherits: ^Dummy
	RenderSpritesEditorOnly:


waypoint.reinforce_h:
	Inherits: ^Dummy
	ProximityExternalCondition:
		Condition: landing_area
		Range: 6c0

waypoint.reinforce_o:
	Inherits: ^Dummy

dummy.sardaukar_production_speed_up:
	Inherits: ^DummyVehicle
	Buildable:
		Prerequisites: ~disabled
		Queue: Infantry
	RenderSprites:
		Image: invisible
	Health:
		HP: 10
	Armor:
		Type: invulnerable
	ProvidesPrerequisite:
		Prerequisite: productionSpeedup.sardaukar
	KillsSelf:
		Delay: 1100
	TerrainLightSource:
		Range: 3c640
		Intensity: 0.01
		RedTint: 0.75
		GreenTint: 0.01
		BlueTint: 0.01

jammer_point:
	Inherits: ^Dummy
	TerrainLightSource:
		Range: 7c0
		Intensity: -0.5
		RedTint: 0.04
		GreenTint: 0.02
		BlueTint: 0.02
	-Immobile:
	Health:
		HP: 10
	Armor:
		Type: invulnerable
	KillsSelf:
		Delay: 500
	HitShape:
	Mobile:
		Speed: 0
		Locomotor: foot
	CreatesShroud:
		Range: 9c0
		ValidRelationships: Enemy, Neutral
	ProximityExternalCondition@jammer:
		Range: 6c0
		Condition: jammed
		ValidRelationships: Enemy, Neutral
	JamsMissiles:
		Range: 6c0
		Chance: 90
		DeflectionRelationships: Enemy, Neutral
	RejectsOrders:

dummy.hide_units:
	Inherits: ^LivingDummy
	RejectsOrders:
	KillsSelf:
		Delay: 1
		GrantsCondition: hideActivator
	Explodes:
		Weapon: hideWeapon
		EmptyWeapon: hideWeapon
		RequiresCondition: hideActivator


testshrout:
	Inherits: thumper
	RenderSprites:
		Image: thumper
	-RevealsShroud:
	Tooltip:
		Name: jammer test
	CreatesShroud:
		Range: 8c0
		ValidRelationships: Enemy, Neutral
	ProximityExternalCondition@jammer:
		Range: 6c0
		Condition: jammed
		ValidRelationships: Enemy, Neutral
	JamsMissiles:
		Range: 6c0
		Chance: 90
		DeflectionRelationships: Enemy, Neutral

dummy_spam_actor:
	Inherits: ^DummyVehicle
	GrantConditionOnTerrain@TerrailTest:
		Condition: on_land
		TerrainTypes: Rock, Concrete, Sand, SpiceSand, Spice, Dune, Rough, SpiceBlobs, Clear, Transition
	RenderSprites:
		Image: invisible
	Health:
		HP: 10
	ChangesHealth:
		Step: -5
		Delay: 3
		StartIfBelow: 110
		RequiresCondition: on_land


dummy_mercenary_spawnpoint:
	AlwaysVisible:
	Interactable:
	ScriptTriggers:
	Tooltip:
		Name: Purchase Items
	Buildable:
		Queue: Infantry
		Prerequisites: ~disabled
	Valued:
		Cost: 1
	RenderSprites:
		Image: mercenary

waypoint_dummy_chaosbomb:
	Inherits: ^Dummy
	ProximityExternalCondition@chaos:
		Condition: chaos_bomb
		Range: 5c0

dummyShrapnelThrower_carryall:
	Inherits: ^Dummy
	KillsSelf:
		Delay: 0
	HitShape:
		Type: Circle
			Radius: 16
	Health:
		HP: 1
	ThrowsShrapnel@derbisshort:
		Weapons: Debris, Debris2, debris_vehicle01
		Pieces: 1, 3
		Range: 1c0, 3c0
	ThrowsShrapnel@derbislong:
		Weapons: Debris, Debris2, Debris3, Debris4, DeathHandClusterDebris
		Pieces: 2, 4
		Range: 4c0, 7c0

dummyShrapnelThrower:
	Inherits: ^Dummy
	KillsSelf:
		Delay: 0
	HitShape:
		Type: Circle
			Radius: 16
	Health:
		HP: 1
	ThrowsShrapnel@derbis:
		Weapons: Debris, Debris2, debris_vehicle01, debris_vehicle02, DeathHandClusterDebris
		Pieces: 3, 7
		Range: 1c0, 6c0

dummycrazybombleaks:
	Inherits: ^Dummy
	KillsSelf:
		Delay: 5
	Explodes:
		Weapon: chaosbomb_from_husk
		EmptyWeapon: chaosbomb_from_husk
	HitShape:
		Type: Circle
			Radius: 16
	Health:
		HP: 5

dummy_wormmakeanim:
	Inherits: ^Dummy
	KillsSelf:
		Delay: 70
	ProximityExternalCondition:
		Range: 2c0
		Condition: makeAnimation


mcv.husk:
	Health:
		HP: 10000
	TransformOnCapture:
		IntoActor: engineer

carrier.husk:
	Inherits: ^VehicleHusk
	Health:
		HP: 15000
	Tooltip:
		Name: Carrier (Destroyed)
	TransformOnCapture:
		IntoActor: carrier

merc_apc.husk:
	Inherits: ^VehicleHusk
	Health:
		HP: 15000
	Tooltip:
		Name: Crawler (Destroyed)
	TransformOnCapture:
		IntoActor: merc_apc_revived

harvester.husk:
	Health:
		HP: 15000
	TransformOnCapture:
		IntoActor: harvester

carryall.husk:
	Inherits: ^AircraftHusk
	Tooltip:
		Name: Carryall
	Aircraft:
		TurnSpeed: 4
		Speed: 95
		CanSlide: True
		VTOL: true
	RenderSprites:
		Image: carryall
	FallsToEarth:
		MaximumSpinSpeed: 14
		Explosion: ExplosionAircraft
	AmbientSound:
		SoundFiles: audio/explosion_Carryall.wav
		Interval: 5000
	SpawnActorOnDeath@carry:
		Actor: carryall.husk_on_land
		OwnerType: InternalName
	SpawnActorOnDeath@debris:
		Actor: dummyShrapnelThrower_carryall
		OwnerType: InternalName
	Contrail@1:
		Offset: -300,-383,0
		StartColor: 000000
		StartColorUsePlayerColor: false
	Contrail@2:
		Offset: -598,383,0
		StartColor: 000000
		StartColorUsePlayerColor: false

carryall.bomberhusk:
	Inherits: ornithopter.husk
	RenderSprites:
		Image: Carryall
	FallsToEarth:
		Velocity: 0c40
	SpawnActorOnDeath:
		Actor: dummyShrapnelThrower
	SpawnActorOnDeath@chasbom:
		Actor: dummycrazybombleaks

ornithopter.husk:
	Inherits: ^AircraftHusk
	Tooltip:
		Name: Ornithopter
	Aircraft:
		TurnSpeed: 20
		Speed: 190
	FallsToEarth:
		MaximumSpinSpeed: 1
		Explosion: ExplosionAircraft
		Velocity: 0c35
	RenderSprites:
		Image: ornithopter
	Contrail@1:
		Offset: -300,-383,0
		StartColor: 000000
		StartWidth: 0c128
		StartColorUsePlayerColor: false
	Contrail@2:
		Offset: -598,383,0
		StartColor: 000000
		StartWidth: 0c80
		StartColorUsePlayerColor: false
	SpawnActorOnDeath:
		Actor: dummyShrapnelThrower
	AmbientSound@falldown:
		SoundFiles: audio/ornithroperFall01.wav
		Delay: 10


rotor:
	Inherits: ^AircraftHusk
	-WithFacingSpriteBody:
	WithIdleOverlay:
		Image: debris_rotor_anim
		Sequence: idle
	FallsToEarth:
		MaximumSpinSpeed: 2
		Explosion: debris.rotor
		Velocity: 0c80
	Aircraft:
		TurnSpeed: 16
		Speed: 144
		CanSlide: True
		VTOL: true

rotor.flyingdown:
	Inherits: ^AircraftHusk
	-WithFacingSpriteBody:
	Aircraft:
		TurnSpeed: 16
		Speed: 144
		CanSlide: True
	RenderSprites:
		Image: debris_rotor_anim
		Palette: d2k
	FallsToEarth:
		Explosion: ExplosionWithDamege_large

carryall.huskVTOL_reinforce:
	Inherits: carryall.huskVTOL
	SpawnActorOnDeath:
		Actor: carryall.husk_on_land
		OwnerType: InternalName
	SpawnActorOnDeath@debris:
		Actor: dummyShrapnelThrower_carryall
		OwnerType: InternalName

frigate.husk:
	Inherits: carryall.husk
	RenderSprites:
		Image: frigate.harkonnen
	Aircraft:
		Speed: 135
	FallsToEarth:
		MaximumSpinSpeed: 0
		Explosion: ExplosionFrigate
	Contrail@01:
		ZOffset: -100
	Contrail@02:
		ZOffset: -100
	Contrail@03:
		Offset: -0,0,-300
		ZOffset: -100
		StartWidth: 0c120
		StartColor: 000000
		StartColorUsePlayerColor: false
	SpawnActorOnDeath@carry:
		Actor: frigate.husk_on_land
		OwnerType: InternalName
	AmbientSound@falldown:
		SoundFiles: audio/ornithroperFall01.wav
		Delay: 10

frigate.huskvtol:
	Inherits: carryall.huskVTOL_reinforce
	RenderSprites:
		Image: frigate.harkonnen
	SpawnActorOnDeath:
		Actor: frigate.husk_on_land
	FallsToEarth:
		Explosion: ExplosionFrigate


carryall.husk_on_land:
	Inherits: ^VehicleHusk
	-TransformOnCapture:
	Health:
		HP: 10000
	WithIdleOverlay@Burns:
		Image: fire_slow
		Sequence: 1
		IsDecoration: True
		Palette: effect
	WithIdleOverlay@Smoke:
		Image: smoke_m
		Sequence: smokLandFromR_idle
		StartSequence: smokLandFromRA_Open
		Palette: disabled
		IsDecoration: True
		Offset: 512, -512, 0
	RenderSprites:
		Image: carryall.husk_on_land
	Tooltip:
		Name: Carryall husk
	ThrowsShrapnel:
		Weapons: Debris3, Debris4
		Pieces: 1, 4
		Range: 1c0, 3c0
	GivesCashOnCapture:
		Amount: 800
	TransformOnCapture:
		IntoActor: dummy.kill_self


frigate.husk_on_land:
	Inherits: carryall.husk_on_land
	RenderSprites:
		Image: frigate.husk
	Tooltip:
		Name: Frigate husk
	-WithColoredOverlay@deadPallete:
	WithIdleOverlay@Smoke:
		Offset: -1000, -600, 0
	GivesCashOnCapture:
		Amount: 1200

carryall.huskVTOL:
	Inherits: ^AircraftHusk
	Tooltip:
		Name: Carryall
	FallsToEarth:
	Aircraft:
		TurnSpeed: 16
		CanSlide: True
		VTOL: true
	RenderSprites:
		Image: carryall
	SpawnActorOnDeath@debris:
		Actor: dummyShrapnelThrower_carryall
		OwnerType: InternalName


siege_tank.husk:
	Inherits: ^VehicleHusk
	Health:
		HP: 10000
	Tooltip:
		Name: Siege Tank (Destroyed)
	-ThrowsParticle@turret:
	TransformOnCapture:
		IntoActor: siege_tank
	WithIdleOverlay@Burns:
		Image: fire
		StartSequence: 2
		Sequence: 1
		IsDecoration: True

sonic_tank.husk:
	Inherits: ^VehicleHusk
	WithIdleOverlay@Burns:
		Image: fire_slow
		Sequence: 1
		IsDecoration: True
	ThrowsParticle@turret:
		Anim: turret
		MaxThrowRange: 1c224
		MinThrowRange: 0c512
	ThrowsParticle@debris01:
		Anim: tankdebris01
	ThrowsParticle@debris02:
		Anim: tankdebris02
	ThrowsParticle@debris03:
		Anim: tankdebris03
	ThrowsParticle@debris04:
		Anim: tankdebris04

flamer.husk:
	Inherits: ^VehicleHusk
	ThrowsParticle@debris01:
		Anim: tankdebris01
	ThrowsParticle@debris02:
		Anim: tankdebris02
	ThrowsParticle@debris03:
		Anim: tankdebris03
	ThrowsParticle@debris04:
		Anim: tankdebris04
	TransformOnCapture:
		IntoActor: flamer

^combat_tank.husk:
	Inherits: ^VehicleHusk
	Health:
		HP: 12000
	Tooltip:
		Name: Combat Tank (Destroyed)
	ThrowsParticle@turret:
		Anim: turret
		TurnSpeed: 10

combat_tank_cheap.husk:
	Inherits: ^combat_tank.husk
	TransformOnCapture:
		IntoActor: combat_tank_cheap

combat_tank_cheap.husk02:
	Inherits: ^combat_tank.husk
	TransformOnCapture:
		IntoActor: combat_tank_cheap
	WithIdleOverlay@Burns:
		Image: smoke_m
		Sequence: smokeFromRA01loop
		IsDecoration: True
	ThrowsParticle@debris01:
		Anim: tankdebris01
		MaxThrowRange: 2c512
		MinThrowRange: 1c0
	ThrowsParticle@debris02:
		Anim: tankdebris02
		MinThrowAngle: 80
		MaxThrowAngle: 200

combat_tank_cheap.husk03:
	Inherits: ^combat_tank.husk
	TransformOnCapture:
		IntoActor: combat_tank_cheap
	WithIdleOverlay@Burns:
		Image: smoke_m
		Sequence: smokeFromRA01loop
		IsDecoration: True
	ThrowsParticle@turret:
	ThrowsParticle@debris02:
		Anim: tankdebris02
		MinThrowAngle: 80
		MaxThrowAngle: 200
	ThrowsParticle@debris03:
		Anim: tankdebris03
		MinThrowAngle: 30
		MaxThrowAngle: 150
	ThrowsParticle@debris04:
		Anim: tankdebris04

combat_tank_cheap.husk04:
	Inherits: ^combat_tank.husk
	TransformOnCapture:
		IntoActor: combat_tank_cheap
	ThrowsParticle@debris03:
		Anim: tankdebris03
		MinThrowAngle: 30
		MaxThrowAngle: 150
	ThrowsParticle@debris04:
		Anim: tankdebris04

combat_tank_corrino.husk:
	Inherits: ^combat_tank.husk
	TransformOnCapture:
		IntoActor: combat_tank_corrino

combat_tank_a.husk:
	-ThrowsParticle@turret:

combat_tank_a.husk02:
	Inherits: ^combat_tank.husk
	TransformOnCapture:
		IntoActor: combat_tank_a
	Health:
		HP: 10000
	WithIdleOverlay@Burns:
		Image: smoke_m
		Sequence: smokeFromRA01loop
		IsDecoration: True
	ThrowsParticle@turret:

combat_tank_a.husk03:
	Inherits: ^combat_tank.husk
	TransformOnCapture:
		IntoActor: combat_tank_a
	Health:
		HP: 13000
	WithIdleOverlay@Burns:
		Image: smoke_m
		Sequence: smokeFromRA01loop
		IsDecoration: True
	ThrowsParticle@turret:
		Anim: turret
		MinThrowRange: 0c112
		MaxThrowRange: 1c768
		MinThrowAngle: 30
		MaxThrowAngle: 50
		Velocity: 50
		TurnSpeed: 50

combat_tank_a.husk04:
	Inherits: ^combat_tank.husk
	TransformOnCapture:
		IntoActor: combat_tank_a
	Health:
		HP: 9000
	WithIdleOverlay@Burns:
		Image: smoke_m
		Sequence: smokLandFromR_idle
		StartSequence: smokLandFromRA_Open
		Palette: disabled
		IsDecoration: True
	ThrowsParticle@turret:
		Anim: turret
		MinThrowRange: 0c512
		MaxThrowRange: 1c768
		MinThrowAngle: 50
		MaxThrowAngle: 70
		Velocity: 40
		TurnSpeed: 100

combat_tank_h.husk:
	-ThrowsParticle@turret:

combat_tank_h.husk02:
	Inherits: ^combat_tank.husk
	Health:
		HP: 13000
	TransformOnCapture:
		IntoActor: combat_tank_h
	WithIdleOverlay@Burns:
		Image: fire
		Sequence: 2
		IsDecoration: True
	ThrowsParticle@turret:


combat_tank_h.husk03:
	Inherits: ^combat_tank.husk
	Health:
		HP: 11000
	WithIdleOverlay@Burns:
		Image: smoke_m
		Sequence: smokeFromRA01loop
		IsDecoration: True
	TransformOnCapture:
		IntoActor: combat_tank_h
	ThrowsParticle@turret:
		Anim: turret
		MinThrowRange: 0c512
		MaxThrowRange: 4c768
		MinThrowAngle: 20
		MaxThrowAngle: 100
		Velocity: 50
		TurnSpeed: 50

combat_tank_h.husk04:
	Inherits: ^combat_tank.husk
	Health:
		HP: 9000
	TransformOnCapture:
		IntoActor: combat_tank_h
	WithIdleOverlay@Burns:
		Image: smoke_m
		Sequence: smokLandFromR_idle
		StartSequence: smokLandFromRA_Open
		Palette: disabled
		IsDecoration: True
	ThrowsParticle@turret:
		Anim: turret
		MinThrowRange: 0c512
		MaxThrowRange: 3c768
		MinThrowAngle: 70
		MaxThrowAngle: 150
		Velocity: 40
		TurnSpeed: 20

combat_tank_o.husk:
	-ThrowsParticle@turret:

combat_tank_o.husk02:
	Inherits: ^combat_tank.husk
	Health:
		HP: 15000
	TransformOnCapture:
		IntoActor: combat_tank_o
	WithIdleOverlay@Burns:
		Image: fire
		Sequence: 2
		IsDecoration: True
	-ThrowsParticle@turret:


combat_tank_o.husk03:
	Inherits: ^combat_tank.husk
	Health:
		HP: 9000
	TransformOnCapture:
		IntoActor: combat_tank_o
	WithIdleOverlay@Burns:
		Image: smoke_m
		Sequence: smokeFromRA01loop
		IsDecoration: True
	ThrowsParticle@turret:
		Anim: turret
		MinThrowRange: 1c0
		MaxThrowRange: 3c768
		MinThrowAngle: 30
		MaxThrowAngle: 80
		Velocity: 50
		TurnSpeed: 50

combat_tank_o.husk04:
	Inherits: ^combat_tank.husk
	Health:
		HP: 12000
	TransformOnCapture:
		IntoActor: combat_tank_o
	WithIdleOverlay@Burns:
		Image: smoke_m
		Sequence: smokLandFromR_idle
		StartSequence: smokLandFromRA_Open
		Palette: disabled
		IsDecoration: True
	ThrowsParticle@turret:
		Anim: turret
		MinThrowRange: 0c512
		MaxThrowRange: 3c768
		MinThrowAngle: 60
		MaxThrowAngle: 120
		Velocity: 40
		TurnSpeed: 20

devastator.husk:
	Inherits: ^VehicleHusk
	Health:
		HP: 15000
	Tooltip:
		Name: Devastator (Destroyed)
	TransformOnCapture:
		IntoActor: devastator

missile_tank.husk:
	Inherits: ^VehicleHusk
	TransformOnCapture:
		IntoActor: missile_tank
	ThrowsParticle@turret:
		Anim: turret
		TurnSpeed: 10
	ThrowsParticle@debris01:
		Anim: tankdebris01
		MaxThrowRange: 2c512
		MinThrowRange: 1c0
	ThrowsParticle@debris02:
		Anim: tankdebris02
		MinThrowAngle: 80
		MaxThrowAngle: 200
	ThrowsParticle@debris03:
		Anim: tankdebris03
		MinThrowAngle: 30
		MaxThrowAngle: 150
	ThrowsParticle@debris04:
		Anim: tankdebris04

bombardment_tank.husk:
	Inherits: ^VehicleHusk
	TransformOnCapture:
		IntoActor: bombardment_tank
	ThrowsParticle@turret:
		Anim: turret
		TurnSpeed: 10
	ThrowsParticle@debris01:
		Anim: tankdebris01
		MaxThrowRange: 2c512
		MinThrowRange: 1c0
	ThrowsParticle@debris02:
		Anim: tankdebris02
		MinThrowAngle: 80
		MaxThrowAngle: 200
	ThrowsParticle@debris03:
		Anim: tankdebris03
		MinThrowAngle: 30
		MaxThrowAngle: 150
	ThrowsParticle@debris04:
		Anim: tankdebris04

bison_tank.husk:
	Inherits: ^combat_tank.husk
	TransformOnCapture:
		IntoActor: bison_tank
	Tooltip:
		Name: Bison Tank (Destroyed)
	-ThrowsParticle@turret:
	RenderSprites:
		PlayerPalette: player_r16
	WithIdleOverlay@Burns:
		Palette: d2k

combat_tank_fremen.husk:
	Inherits: ^combat_tank.husk
	TransformOnCapture:
		IntoActor: combat_tank_fremen

combat_tank_mercenary.husk:
	Inherits: ^combat_tank.husk
	TransformOnCapture:
		IntoActor: combat_tank_mercenary
	RenderSprites:
		PlayerPalette: player_r16
	WithIdleOverlay@Burns:
		Palette: d2k

crawler_light.husk:
	Inherits: ^VehicleHusk
	TransformOnCapture:
		IntoActor: crawler.light


deviator.husk:
	Inherits: ^VehicleHusk
	ProximityExternalCondition@isHuskAlive:
		Condition: devation_husk_still_alive
		Range: 2c112
		MaximumVerticalOffset: 1c0
		AffectsParent: true
		ValidRelationships: Ally, Neutral, Enemy
	Tooltip:
		Name: Deviator (Destroyed)
	TransformOnCapture:
		IntoActor: deviator
	WithIdleOverlay@Burns:
		Image: smoke_m
		Sequence: smoke_player
		Palette: deviatorgas
		IsPlayerPalette: True
		IsDecoration: True
		Offset: -100, -200, 312
	Explodes:
		Chance: 100


^BuildingHusk:
	Inherits@1: ^SpriteActor
	GrantRandomCondition:
		Conditions: decoration01, decoration02, decoration03
	Interactable:
	Health:
		HP: 15000
	Armor:
		Type: wood
	FrozenUnderFog:
	Tooltip:
		GenericName: Destroyed Building
	WithSpriteBody:
	HitShape:
		UseTargetableCellsOffsets: true
		Type: Rectangle
			TopLeft: -512, -512
			BottomRight: 512, 512
	MapEditorData:
		Categories: Husk
	Targetable:
		TargetTypes: Ground, Vehicle
		RequiresForceFire: true
	Building:
		Dimensions: 1,1
		Footprint: x
		TerrainTypes: Rock, Concrete
	WithColoredOverlay@darker:
		Color: 00000040
	WithBuildingBib:
	ChangesHealth:
		Step: -70
		StartIfBelow: 101
		Delay: 4
	ChangesHealth@damageidle:
		Step: -160
		StartIfBelow: 50
		Delay: 4
	Tooltip:
		Name: Building (destroyed)


windTrap.husk_passable:
	Inherits: ^BuildingHusk
	RenderSprites:
		Image: husk_wind_trap_passable
	Health:
		HP: 15000
	Building:
		Footprint: __ __ __
		Dimensions: 2,3
		LocalCenterOffset: 0,-512,0
	HitShape:
		Type: Rectangle
			TopLeft: -1024, -1024
			BottomRight: 1024, 1024
	WithIdleOverlay@smoke:
		Image: smoke_big
		Sequence: loop
		StartSequence: start
		Palette: disabled
		IsDecoration: True
		Offset: 0, 0, 312
		RequiresCondition: decoration02 || decoration03
	WithIdleOverlay@fire2:
		Image: fire_slow
		StartSequence: 1
		Sequence: 2
		IsDecoration: True
		Offset: 0,-512,0
		RequiresCondition: decoration01
	ThrowsParticle@debris01:
		Anim: debris01
		MinThrowRange: 1c115
		MaxThrowRange: 3c0
	ThrowsParticle@debris02:
		Anim: debris02
		MinThrowRange: 1c115
		MaxThrowRange: 2c0
	ThrowsParticle@debris03:
		Anim: debris03
		MinThrowRange: 2c115
		MaxThrowRange: 5c0
	ThrowsParticle@debris04:
		Anim: debris04

windTrap.husk:
	Inherits: ^BuildingHusk
	RenderSprites:
		Image: husk_wind_trap.ordos
		FactionImages:
			atreides: husk_wind_trap.atreides
			harkonnen: husk_wind_trap.harkonnen
	Health:
		HP: 27000
	Building:
		Footprint: xx xx ==
		Dimensions: 2,3
		LocalCenterOffset: 0,-512,0
	HitShape:
		Type: Rectangle
			TopLeft: -1024, -1024
			BottomRight: 1024, 1024
	WithIdleOverlay@smoke:
		Image: smoke_big
		Sequence: loop
		StartSequence: start
		Palette: disabled
		IsDecoration: True
		Offset: 250, 0, 312
		RequiresCondition: decoration02 || decoration03
	WithIdleOverlay@fire:
		Image: fire_fromts
		Palette: effect
		Sequence: 1
		IsDecoration: True
		Offset: 2000, 0, 0
		RequiresCondition: decoration01 || decoration02
	WithIdleOverlay@fire2:
		Image: fire_slow
		StartSequence: 1
		Sequence: 2
		IsDecoration: True
		Offset: 0,-512,0
		RequiresCondition: decoration01 || decoration03


refinery_ruins:
	Inherits: ^BuildingHusk
	Building:
		Dimensions: 3,3
		Footprint: ___ ___ ___
		LocalCenterOffset: 0,-512,0
	WithIdleOverlay@smokeSmall:
		Image: smoke_m
		StartSequence: smokeFromRA01idle
		Sequence: smokeFromRA01loop
		IsDecoration: True
		Offset: 1024, 1500, 0
		Palette: huskPalette
		RequiresCondition: decoration01 ||  decoration02
	WithIdleOverlay@smokeCenter:
		Image: smoke_m
		StartSequence: smokeFromRA01idle
		Sequence: smokeFromRA01loop
		IsDecoration: True
		Offset: 0, 0, -1024
		Palette: huskPalette
		RequiresCondition: decoration03 || decoration02

refinery_husk.ordos:
	Inherits: ^BuildingHusk
	RenderSprites:
		Image: husk_refinery.ordos
	WithIdleOverlay@front:
		Sequence: idle-front
	WithIdleOverlay@top:
		Sequence: idle-top
	Building:
		Dimensions: 3,3
		Footprint: =xx x=x ___
		LocalCenterOffset: 0,-512,0
	HitShape:
		Type: Rectangle
			TopLeft: -512, -1024
			BottomRight: 1536, 0
	HitShape@BOTTOM:
		Type: Rectangle
			TopLeft: -1536, 0
			BottomRight: 512, 1024
	WithIdleOverlay@smoke:
		Image: smoke_big
		Sequence: loop
		StartSequence: start
		Palette: disabled
		IsDecoration: True
		Offset: 1400, 600, 0
		RequiresCondition: decoration01 || decoration02
	WithIdleOverlay@smoke2:
		Image: smoke_m
		Sequence: smokLandFromR_idle
		StartSequence: smokLandFromRA_Open
		Palette: disabled
		IsDecoration: True
		Offset: -1024,-400,0
		RequiresCondition: decoration02 || decoration03
	WithIdleOverlay@fire2:
		Image: fire_slow
		StartSequence: 1
		Sequence: 2
		IsDecoration: True
		Offset: 0,-1024,0
		RequiresCondition: decoration01 || decoration03
	SpawnActorOnDeath@ruins:
		Actor: refinery_ruins


refinery_husk.atreides:
	Inherits: ^BuildingHusk
	RenderSprites:
		Image: husk_refinery.atreides
	WithIdleOverlay@front:
		Sequence: idle-front
	WithIdleOverlay@top:
		Sequence: idle-top
	Building:
		Footprint: =xx xx= ===
		Dimensions: 3,3
		LocalCenterOffset: 0,-512,0
	HitShape:
		Type: Rectangle
			TopLeft: -512, -1024
			BottomRight: 1536, 0
	HitShape@BOTTOM:
		Type: Rectangle
			TopLeft: -1536, 0
			BottomRight: 512, 1024
	WithIdleOverlay@smoke:
		Image: smoke_big
		Sequence: loop
		StartSequence: start
		Palette: disabled
		IsDecoration: True
		Offset: -500,-700, 0
		RequiresCondition: decoration01 || decoration03
	WithIdleOverlay@smoke2:
		Image: smoke_m
		Sequence: smokLandFromR_idle
		StartSequence: smokLandFromRA_Open
		Palette: disabled
		IsDecoration: True
		Offset: -800,-400,0
		RequiresCondition: decoration02 || decoration03
	WithIdleOverlay@fire2:
		Image: fire_slow
		StartSequence: 1
		Sequence: 2
		IsDecoration: True
		Offset: 1400, 600, 0
		RequiresCondition: decoration01 || decoration03  || decoration02
	SpawnActorOnDeath@ruins:
		Actor: refinery_ruins

refinery_husk.harkonnen:
	Inherits: ^BuildingHusk
	RenderSprites:
		Image: husk_refinery.harkonnen
	WithIdleOverlay@front:
		Sequence: idle-front
	WithIdleOverlay@top:
		Sequence: idle-top
	Building:
		Footprint: =xx =x= =X=
		Dimensions: 3,3
		LocalCenterOffset: 0,-512,0
	HitShape:
		Type: Rectangle
			TopLeft: -512, -1024
			BottomRight: 1536, 0
	HitShape@BOTTOM:
		Type: Rectangle
			TopLeft: -1536, 0
			BottomRight: 512, 1024
	WithIdleOverlay@smokeLeft:
		Image: smoke_big
		Sequence: loop
		StartSequence: start
		Palette: disabled
		IsDecoration: True
		Offset: 1024, 1500, 500
		RequiresCondition: decoration01 || decoration02
	WithIdleOverlay@smoke2:
		Image: smoke_m
		Sequence: smokLandFromR_idle
		Palette: disabled
		IsDecoration: True
		Offset: -1024,-700,0
		RequiresCondition: decoration02 || decoration03 || decoration01
	WithIdleOverlay@smokeSmall:
		Image: smoke_m
		StartSequence: smokeFromRA01idle
		Sequence: smokeFromRA01loop
		IsDecoration: True
		Offset: 1024, 1500, 0
		Palette: huskPalette
		RequiresCondition: decoration01 || decoration03 || decoration02
	WithIdleOverlay@fire2:
		Image: fire_slow
		StartSequence: 1
		Sequence: 2
		IsDecoration: True
		Offset: 1024, 1000, 0
		RequiresCondition: decoration03  || decoration02
	SpawnActorOnDeath@ruins:
		Actor: refinery_ruins

crater_big:
	Inherits: ^Husk
	-WithFacingSpriteBody:
	WithSpriteBody:
	Armor:
		Type: invulnerable
	GrantConditionOnTerrain@rock:
		Condition: rock
		TerrainTypes: Rock, Concrete
	GrantConditionOnTerrain@sand:
		Condition: sand
		TerrainTypes: Sand, Dune, Spice, SpiceSand
	RenderSprites:
		Palette: terrain
	RequiresSpecificOwners:
		ValidOwnerNames: Neutral
	Building:
		Dimensions: 3, 2
		Footprint: ___ ___
	MapEditorData:
		ExcludeTilesets: INTERIOR
		Categories: Decorations
	HitShape:
		UseTargetableCellsOffsets: true
		Type: Rectangle
			TopLeft: -512, -512
			BottomRight: 512, 512
	WithIdleOverlay@rock:
		RequiresCondition: rock
		Image: crater_big
		Sequence: rock
		Palette: terrain
	WithIdleOverlay@sand:
		RequiresCondition: sand
		Image: crater_big
		Sequence: sand
		Palette: terrain
	ChangesHealth:
		Step: -70
		StartIfBelow: 101
		Delay: 4
	-Tooltip:

crate:
	GiveUnitCrateAction@Thumper:
		SelectionShares: 4
		Units: engineer
