^NeutralBuilding:
	Inherits@1: ^ExistsInWorld
	Inherits@2: ^SpriteActor
	Huntable:
	Interactable:
	HitShape:
		UseTargetableCellsOffsets: true
		Type: Rectangle
			TopLeft: -512, -512
			BottomRight: 512, 512
	Building:
		Dimensions: 1,1
		Footprint: x
		TerrainTypes: Rock, Concrete, Sand
		BuildSounds: BUILD1.WAV
	Health:
		HP: 25000
	Armor:
		Type: building
	Tooltip:
		Name: Neutral Building
	FrozenUnderFog:
	MapEditorData:
		Categories: Neutral building
	Targetable:
		TargetTypes: Ground, Structure
		RequiresForceFire: true
	FireWarheadsOnDeath:
		Type: Footprint
		Weapon: BuildingExplode
		EmptyWeapon: BuildingExplode
	WithSpriteBody:
	FireProjectilesOnDeath@1:
		Weapons: derbisRock01, derbisRock02, derbisRock03
		Pieces: 0, 2
		Range: 1c0, 4c0
	FireProjectilesOnDeath@2:
		Weapons: derbisRock01, derbisRock02, derbisRock03
		Pieces: 1, 4
		Range: 0c512, 2c0
	FireProjectilesOnDeath:
		Weapons: Debris, Debris2, Debris3, Debris4
		Pieces: 1, 3
		Range: 1c256, 3c0
	Crushable:
		CrushClasses: wall
	FireWarheadsOnDeath:
		Type: CenterPosition
		Weapon: cliffExplode01
		EmptyWeapon: cliffExplode01

^DecorationBuildings:
	Inherits@1: ^NeutralBuilding
	MapEditorData:
		Categories: buildings Decorations

^NeutralBuildingCapturable:
	Inherits@1: ^ExistsInWorld
	Inherits@2: ^SpriteActor
	Inherits@selection: ^SelectableBuilding
	FrozenUnderFog:
	WithSpriteBody:
	Huntable:
	HitShape:
		UseTargetableCellsOffsets: true
		Type: Rectangle
			TopLeft: -1024, -1024
			BottomRight: 1024, 1024
	D2kBuilding:
		Dimensions: 2,2
		Footprint: xx xx
		TerrainTypes: Rock, Concrete
		BuildSounds: BUILD1.WAV
	Health:
		HP: 25000
	Armor:
		Type: building
	MapEditorData:
		Categories: Neutral building
	Targetable:
		TargetTypes: Ground, C4, Structure
		RequiresForceFire: false
	CaptureManager:
	RevealsShroud:
		Range: 4c0
	Capturable:
		Types: building
	FireWarheadsOnDeath:
		Type: Footprint
		Weapon: BuildingExplode
		EmptyWeapon: BuildingExplode
	InstantlyRepairable:
	RepairableBuilding:
		RepairStep: 500
		PlayerExperience: 5
		RepairingNotification: Repairing
	Demolishable:
	RevealOnDeath:
		Duration: 100
		Radius: 4c768
	WithBuildingRepairDecoration:
		Image: allyrepair
		Sequence: repair
		Position: Center
		Palette: player
		IsPlayerPalette: True
	OwnerLostAction:
		Action: ChangeOwner
	FireProjectilesOnDeath:
		Weapons: Debris, Debris2, Debris3, Debris4
		Pieces: 2, 5
		Range: 1c512, 4c0
	FireWarheadsOnDeath:
		Type: Footprint
		Weapon: BuildingExplode
		EmptyWeapon: BuildingExplode
	SoundOnDamageTransition:
		DamagedSounds: EXPLSML1.WAV
		DestroyedSounds: EXPLHG1.WAV

^InfantryHealing:
	ExternalCondition@healing:
		Condition: healing
	WithDecoration@REDCROSS:
		Image: pips
		Sequence: healt_cross
		Position: BottomRight
		Margin: 5, 5
		RequiresCondition: healing && damaged
		BlinkInterval: 32
		BlinkPattern: Off, On
		ValidRelationships: Ally
	ChangesHealth@HOSPITAL:
		Step: 400
		Delay: 60
		StartIfBelow: 100
		DamageCooldown: 125
		RequiresCondition: healing
	GrantConditionOnDamageState@HOSPITAL:
		Condition: damaged
		ValidDamageStates: Light, Medium, Heavy, Critical
	GrantConditionOnPrerequisite@heal:
		Condition: hospitalheal
		Prerequisites: hospitalHealing
	ChangesHealth@HOSPITAL:
		Step: 300
		Delay: 100
		StartIfBelow: 100
		DamageCooldown: 125
		RequiresCondition: hospitalheal


^Infantry:
	Inherits@healing: ^InfantryHealing

crane:
	Inherits: ^NeutralBuildingCapturable
	Tooltip:
		Name: Crane
	WithBuildingBib:
	Power:
		Amount: 0
	Health:
		HP: 20000
	Armor:
		Type: cy
	HitShape:
		Type: Rectangle
			TopLeft: -1024, -1024
			BottomRight: 1024, 1039
	RevealsShroud:
		Range: 3c0
	GivesBuildableArea:
		AreaTypes: building
	RenderSprites:
		Image: crane.ordos
		FactionImages:
			atreides: crane.atreides
			harkonnen: crane.harkonnen
			fremen: crane.atreides
			corrino: crane.harkonnen
			smuggler: crane.ordos
			mercenary: crane.ordos
	ProvidesPrerequisite:
		Prerequisite: bonus.crane
	TooltipDescription@description:
		Description: Provides buildable area. Speed up building production by 10%

spice_sifter:
	Inherits: ^NeutralBuildingCapturable
	Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
	Power:
		Amount: 0
	WithBuildingBib:
	D2kBuilding:
		Dimensions: 2,2
		Footprint: xx xx
		TerrainTypes: Rock, Concrete
		BuildSounds: BUILD1.WAV
	Tooltip:
		Name: Spice sifter
	TooltipDescription:
		Description: Absorbs Spice obtained by the wind flow. Provides Passive income equivalent to 1 harvester
	CashTrickler:
		Interval: 330
		Amount: 200
		PauseOnCondition: lowpower || disabled
	CashTricklerBar:
	Armor:
		Type: cy
	WithIdleOverlay:
		RequiresCondition: !damaged
		PauseOnCondition: disabled
	GrantConditionOnDamageState@DAMAGED:
		Condition: damaged
		ValidDamageStates: Heavy, Critical
	FireWarheadsOnDeath:
		Type: Footprint
		Weapon: BuildingExplode
		EmptyWeapon: BuildingExplode
	FireProjectilesOnDeath@spice:
		Weapons: HarvesterSpiceExplosion
		Pieces: 1, 5
		Range: 5c0, 10c0

radar_station:
	Inherits: ^NeutralBuildingCapturable
	Tooltip:
		Name: Radar Station
	TooltipDescription:
		Description: Provides buildiable area, Provides vision
	WithBuildingBib:
	HitShape:
		Type: Rectangle
			TopLeft: -1024, -1024
			BottomRight: 1024, 1024
	Health:
		HP: 30000
	FloatingSpriteEmitter@smoke_huge_atreides:
		RequiresCondition: damaged
		Image: smoke3
		Lifetime: 15, 20
		Speed: 5
		Gravity: 60
		Offset: 0 , -500, 0
		SpawnFrequency: 2, 5
		RandomFacing: true
		RandomRate: 4
		TurnRate: 3
		Duration: 1224
	D2kBuilding:
		Dimensions: 2,2
		Footprint: xx xx
		TerrainTypes: Rock, Concrete
		BuildSounds: BUILD1.WAV
	WithIdleOverlay@DISH:
		RequiresCondition: !damaged
		Sequence: idle-dish
	GrantConditionOnDamageState@DAMAGED:
		Condition: damaged
		ValidDamageStates: Heavy, Critical
	FireWarheadsOnDeath:
		Type: Footprint
		Weapon: BuildingExplode
		EmptyWeapon: BuildingExplode
	GivesBuildableArea:
		AreaTypes: building
	DetectCloaked:
		Range: 8c0
	RevealsShroud:
		Range: 11c0




building01:
	Inherits: ^DecorationBuildings

building01_burned:
	Inherits: ^BuildingHusk
	Building:
		Dimensions: 1,1
		Footprint: _
	-GrantRandomCondition:
	-WithBuildingBib:

fremen_temple:
	Inherits: ^DecorationBuildings
	RenderSprites:
		Palette: terrain
	Building:
		Dimensions: 3,2
		Footprint: xxx xxx
	Tooltip:
		Name: Fremen Temple
		GenericVisibility: None

ecology_station:
	Inherits: ^NeutralBuildingCapturable
	Inherits@selection: ^SelectableBuilding
	WithBuildingBib:
	Armor:
		Type: cy
	Health:
		HP: 40000
	HitShape:
		UseTargetableCellsOffsets: true
		Type: Rectangle
			TopLeft: -2048, -1536
			BottomRight: 2048, 1536
	-D2kBuilding:
	Building:
		Dimensions: 4,3
		Footprint: _xx_ xxxx _xx_
	ProximityExternalCondition@dhealing:
		Condition: healing
		Range: 7c0
		ValidRelationships: Ally, Neutral, Enemy
	ProvidesPrerequisite@heal:
		Prerequisite: hospitalHealing
	Tooltip:
		Name: Ecology Station
		GenericName: Neutral Building
	TooltipDescription@adf:
		Description: Heal nearby infantry units. If captured heals all players infantry.

building_rock01:
	Inherits: ^DecorationBuildings
	RenderSprites:
		Palette: terrain
	Building:
		Dimensions: 3,3
		Footprint: _XX xxx xxx

fremen_tent01:
	Inherits: ^DecorationBuildings
	RenderSprites:
		Palette: terrain
	Building:
		Dimensions: 1,1
		Footprint: x
	HitShape:
		UseTargetableCellsOffsets: true
		Type: Rectangle
			TopLeft: -512, -512
			BottomRight: 512, 512

mining_rig:
	Inherits: ^NeutralBuildingCapturable
	Tooltip:
		Name: Mining rig
	TooltipDescription:
		Description: Provides small passive income. Can by rebuild when destroyed.
		ValidRelationships: none
	Health:
		HP: 20000
	CashTrickler:
		Amount: 15
		RequiresCondition: enabled
	GrantConditionOnCombatantOwner:
		Condition: enabled
	WithIdleOverlay:
		RequiresCondition: enabled
	FireWarheadsOnDeath:
		Type: Footprint
		Weapon: BuildingExplode
		EmptyWeapon: BuildingExplode
	FireProjectilesOnDeath@spice:
		Weapons: HarvesterSpiceExplosion
		Pieces: 1, 3
		Range: 1c0, 3c0
	HitShape:
		UseTargetableCellsOffsets: true
		Type: Rectangle
			TopLeft: -512, -1024
			BottomRight: 512, 512
	-D2kBuilding:
	Building:
		Dimensions: 1,1
		Footprint: x
	GrantConditionOnDamageState@HEAVY:
		Condition: heavy-damage
	FloatingSpriteEmitter@SMOKE:
		RequiresCondition: heavy-damage
		Image: smoke3
		Lifetime: 15, 20
		Speed: 3
		Gravity: 50
		SpawnFrequency: 5, 15
		RandomFacing: true
		RandomRate: 4
		Offset: 0, 0, 600
		TurnRate: 3
		Duration: 500
	SpawnActorOnDeath:
		Actor: mining_rig.husk
		OwnerType: InternalName



mining_rig.husk:
	Inherits: ^NeutralBuildingCapturable
	HitShape:
		UseTargetableCellsOffsets: true
		Type: Rectangle
			TopLeft: -512, -1024
			BottomRight: 1024, 512
	-D2kBuilding:
	Armor:
		Type: invulnerable
	Tooltip:
		Name: Mining rig (Destroyed)
	TooltipDescription:
		Description: Can be repaired by engineer
	HitShape:
		UseTargetableCellsOffsets: true
		Type: Rectangle
			TopLeft: -512, -1024
			BottomRight: 512, 512
	Building:
		Dimensions: 1,1
		Footprint: x
	TransformOnCapture:
		IntoActor: mining_rig
	FloatingSpriteEmitter@SMOKE:
		Image: smoke3
		Lifetime: 15, 20
		Speed: 3
		Gravity: 50
		SpawnFrequency: 5, 10
		RandomFacing: true
		RandomRate: 4
		Offset: 0, 0, 200
		TurnRate: 3
		Duration: 500
