

^Husk:
	Health:
		HP: 10000	

^VehicleHusk:
	Inherits: ^Husk
	CaptureManager:
	Capturable:
		Types: husk
		ValidRelationships: Enemy, Neutral, Ally
	TransformOnCapture:
		ForceHealthPercentage: 25
	Husk:
		AllowedTerrain: Sand, Rock, Transition, Concrete, Spice, SpiceSand, SpiceBlobs, Dune
	Targetable:
		TargetTypes: Ground, Vehicle
		RequiresForceFire: true
	-WithColoredOverlay@IDISABLE:
	WithColoredOverlay@deadPallete:
		Palette: huskPalette
	Explodes:
		Weapon: huskExplode01
		EmptyWeapon: huskExplode01
		Chance: 70
	WithIdleOverlay@Burns:
		Image: fire_slow
		Sequence: 1
		IsDecoration: True
	ChangesHealth:
		Step: -70
		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
		PauseOnCondition: notmobile
	Targetable:
		TargetTypes: Ground, Vehicle, C4
	Passenger:
		CargoType: Vehicle
	HiddenUnderFog:
	WithFacingSpriteBody:
	HitShape:
		Type: Circle
			Radius: 16
	Tooltip:
		GenericName: Unit
	AutoCarryable:
		CarriedCondition: notmobile
		LockedCondition: notmobile
	RejectsOrders:

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



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: #why the hell this isnt working
	Health:
		HP: 10
	Armor:
		Type: invulnerable
	KillsSelf: # just in case
		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
	SpawnActorOnDeath@infantry01:
		Actor: ordos_light_drop
		Offset: 0,0
	SpawnActorOnDeath@infantry02:
		Actor: ordos_light_drop_squadleader
		Offset: 0,0
	SpawnActorOnDeath@infantry03:
		Actor: ordos_trooper_drop
		Offset: 0,0
	SpawnActorOnDeath@infantry04:
		Actor: ordos_trooper_drop
		Offset: 0,0
	SpawnActorOnDeath@infantry05:
		Actor: ordos_trooper_drop
		Offset: 0,0

waypoint_dummy_o:
	Inherits: ^Dummy
	FreeActorWithDelivery:
		DeliveringActor: carryall.reinforce_with_sound
		Actor: dummy_spam_actor
		DeliveryRange: 5c0
		DeliveryOffset: 1,1

harkonnen.dummy_spawnpoint:
	Inherits: dummy_spam_actor
	SpawnActorOnDeath@infantry01:
		Actor: mpsardaukar.level4
	SpawnActorOnDeath@infantry02:
		Actor: mpsardaukar.level3
	SpawnActorOnDeath@infantry03:
		Actor: mpsardaukar.level2
	SpawnActorOnDeath@infantry05:
		Actor: mpsardaukar.level2

waypoint_dummy_h:
	Inherits: waypoint_dummy_o
	FreeActorWithDelivery:
		DeliveringActor: frigate.harkonnen
		Actor: harkonnen.dummy_spawnpoint

dummy_mercenary_spawnpoint:
	Inherits: dummy_spam_actor
	Buildable:
		Prerequisites: ~disabled
		Queue: Infantry
		BuildPaletteOrder: 40
		BuildDuration: 432
		BuildDurationModifier: 100
	SpawnActorOnDeath@infantry01
		Actor: mercenary
	SpawnActorOnDeath@infantry02
		Actor: mercenary
	SpawnActorOnDeath@infantry03
		Actor: mercenary
	SpawnActorOnDeath@infantry04
		Actor: mercenary
	SpawnActorOnDeath@infantry05
		Actor: 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: 5, 10
		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


#
# Vehicle husks
#

mcv.husk:
	TransformOnCapture:
		IntoActor: mcv

harvester.husk:
	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
		Color: 000000
		UsePlayerColor:	false
	Contrail@2:
		Offset: -598,383,0
		Color: 000000
		UsePlayerColor:	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
		Color: 000000
		TrailWidth: 0c128
		UsePlayerColor:	false
	Contrail@2:
		Offset: -598,383,0
		Color: 000000
		TrailWidth: 0c80
		UsePlayerColor:	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: 0c35
	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
	Contrail@01:
		ZOffset: -100
	Contrail@02:
		ZOffset: -100
	Contrail@03:
		Offset: -0,0,-300
		ZOffset: -100
		TrailWidth: 0c120
		Color: 000000
		UsePlayerColor: false
	SpawnActorOnDeath@carry:
		Actor: frigate.husk_on_land
		OwnerType: InternalName

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

carryall.husk_on_land:
	Inherits: ^VehicleHusk
	-TransformOnCapture:
	Health:
		HP: 10000
	-WithColoredOverlay@deadPallete:
	WithIdleOverlay@Burns:
		Image: fire_slow
		Sequence: 1
		IsDecoration: True
		Palette: effect
	WithColoredOverlay@IDISABLE:
		Palette: huskPalette
	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 # USE ONLY '_' UperCase dont work
	Tooltip:
		Name: Carryall husk
	ThrowsShrapnel:
		Weapons: Debris3, Debris4
		Pieces: 1, 4
		Range: 1c0, 3c0

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

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 tanks husks
#
^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_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: 12500
	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

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



^dummygas:
	Inherits:^Dummy
	ExternalCondition@huskCheck:
		Condition: devation_husk_still_alive
	Explodes:
		Weapon: DeviatorGas
		EmptyWeapon: DeviatorGas
		RequiresCondition: devation_husk_still_alive
	KillsSelf:
		Delay: 10
	HitShape:
		Type: Circle
			Radius: 16
	Health:
		HP: 1

dummygas01:
	Inherits: ^dummygas
	KillsSelf:
		Delay: 100

dummygas02:
	Inherits: ^dummygas
	KillsSelf:
		Delay: 130

dummygas03:
	Inherits: ^dummygas
	KillsSelf:
		Delay: 160

dummygas04:
	Inherits: ^dummygas
	KillsSelf:
		Delay: 200

dummygas05:
	Inherits: ^dummygas
	KillsSelf:
		Delay: 250
dummygas06:
	Inherits: ^dummygas
	KillsSelf:
		Delay: 300
dummygas07:
	Inherits: ^dummygas
	KillsSelf:
		Delay: 350
dummygas08:
	Inherits: ^dummygas
	KillsSelf:
		Delay: 390
#
# BUILDINGS HUSKS
#

^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:
		Palette: huskBuilding
	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

#
# misc
#
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: