^concrete:
	AlwaysVisible:
	Interactable:
	D2kBuilding:
		TerrainTypes: Rock
		BuildSounds: CHUNG.WAV
		AllowInvalidPlacement: true
	FootprintPlaceBuildingPreview:
	RequiresBuildableArea:
		AreaTypes: building
		Adjacent: 4
	Tooltip:
		Name: Concrete
		GenericName: Structure
	RenderSprites:
	KillsSelf:
		RemoveInstead: true
	Buildable:
		Queue: Building
		BuildPaletteOrder: 10
		Description: Provides a strong foundation that prevents\ndamage from the terrain.

concretea:
	Inherits: ^concrete
	D2kBuilding:
		Footprint: xx xx
		Dimensions: 2,2
	Tooltip:
		Name: Concrete Slab
	Encyclopedia:
		Description: If buildings are not placed on concrete, they will be damaged. Buildings can be repaired, but unless the building sits completely on concrete, the building will suffer continual weathering damage from the erosive desert environment.\n\nConcrete is vulnerable to most weapon types. Concrete cannot be repaired if damaged.
		Category: Buildings
		Order: 10
	Valued:
		Cost: 20
	Buildable:
		BuildPaletteOrder: 110
		Prerequisites: ~!global-auto-concrete
		BuildDuration: 62
		BuildDurationModifier: 100
	WithSpriteBody:
		Sequence: preview

concreteb:
	Inherits: ^concrete
	D2kBuilding:
		Footprint: xxx xxx xxx
		Dimensions: 3,3
	Tooltip:
		Name: Large Concrete Slab
	Valued:
		Cost: 50
	Buildable:
		BuildPaletteOrder: 210
		Prerequisites: upgrade.conyard, ~!global-auto-concrete
		BuildDuration: 94
		BuildDurationModifier: 100

construction_yard:
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Inherits@UPGRADEABLE: ^Upgradeable
	Buildable:
		Description: Produces structures.
	D2kBuilding:
		Footprint: xxx xxx ===
		Dimensions: 3,3
		LocalCenterOffset: 0,-512,0
		-ConcretePrerequisites:
	Encyclopedia:
		Description: The Construction Yard is the foundation of any base built on Arrakis. Construction Yards produce a small amount of power and are required for the building of any new structures. Protect this structure! It is critical to the success of your base.\n\nConstruction yards are fairly strong, but vulnerable in varying degrees to all types of weapons.
		Category: Buildings
		Order: 0
	WithBuildingBib:
	Selectable:
		Bounds: 3072, 2048
	Health:
		HP: 30000
	HitShape:
		Type: Rectangle
			TopLeft: -1536, -1024
			BottomRight: 1536, 1024
	Armor:
		Type: cy
	RevealsShroud:
		Range: 5c768
	Production:
		Produces: Building, Upgrade
	Valued:
		Cost: 2000
	Tooltip:
		Name: Construction Yard
	CustomSellValue:
		Value: 2000
	SpawnActorsOnSell:
		ActorTypes: light_inf, light_inf, engineer
	BaseBuilding:
	ProductionBar:
		ProductionType: Building
	Power:
		Amount: 20
	RenderSprites:
		Image: conyard.ordos
		FactionImages:
			atreides: conyard.atreides
			fremen: conyard.atreides
			harkonnen: conyard.harkonnen
			corrino: conyard.harkonnen
	WithBuildingPlacedOverlay:
		RequiresCondition: !build-incomplete
		Palette: d2k
	PrimaryBuilding:
		ProductionQueues: Building
	ProvidesPrerequisite@buildingname:
	GrantConditionOnPrerequisite@UPGRADEABLE:
		Prerequisites: upgrade.conyard
	RevealOnDeath:
		Radius: 5c768

wind_trap:
	Inherits: ^Building
	Buildable:
		Queue: Building
		BuildPaletteOrder: 120
		BuildDuration: 208
		BuildDurationModifier: 100
		Description: Provides power for other structures.
	Selectable:
		Bounds: 2048, 2048
	Valued:
		Cost: 225
	Tooltip:
		Name: Wind Trap
	D2kBuilding:
		Footprint: xx xx ==
		Dimensions: 2,3
		LocalCenterOffset: 0,-512,0
	Encyclopedia:
		Description: Wind Traps provide power and water to an installation. Large, above-ground ducts funnel wind currents underground into massive turbines which power generators and humidity extractors.\n\nWind Traps are vulnerable to most types of weapons.
		Category: Buildings
		Order: 20
	Health:
		HP: 30000
	HitShape:
		Type: Rectangle
			TopLeft: -1024, -1024
			BottomRight: 1024, 1024
	Armor:
		Type: building
	RevealsShroud:
		Range: 3c768
	RenderSprites:
		Image: power.ordos
		FactionImages:
			atreides: power.atreides
			fremen: power.atreides
			harkonnen: power.harkonnen
			corrino: power.harkonnen
	WithBuildingBib:
	WithIdleOverlay@ZAPS:
		RequiresCondition: !build-incomplete
		Sequence: idle-zaps
	Power:
		Amount: 200
	ScalePowerWithHealth:
	ProvidesPrerequisite@buildingname:
	RevealOnDeath:
		Radius: 3c768

barracks:
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Inherits@UPGRADEABLE: ^Upgradeable
	Buildable:
		Prerequisites: wind_trap
		Queue: Building
		BuildPaletteOrder: 220
		BuildDuration: 268
		BuildDurationModifier: 100
		Description: Trains infantry.
	Selectable:
		Bounds: 2048, 2048
	Valued:
		Cost: 225
	Tooltip:
		Name: Barracks
	D2kBuilding:
		Footprint: xx xx ==
		Dimensions: 2,3
		LocalCenterOffset: 0,-512,0
	Encyclopedia:
		Description: Barracks are required to produce and train light infantry units. Barracks can be upgraded for the production of more advanced infantry in later missions.\n\nBarracks are vulnerable to most types of weapons.
		Category: Buildings
		Order: 30
	Health:
		HP: 32000
	HitShape:
		Type: Rectangle
			TopLeft: -1024, -1024
			BottomRight: 1024, 1024
	Armor:
		Type: building
	RevealsShroud:
		Range: 3c768
	RallyPoint:
		ForceSetType: Infantry
	CommandBarBlacklist:
		DisableStop: false
	Exit@1:
		SpawnOffset: 352,576,0
		ExitCell: 0,2
	Exit@2:
		SpawnOffset: 512,480,0
		ExitCell: 1,2
	Production:
		Produces: Infantry, Upgrade
	PrimaryBuilding:
		ProductionQueues: Infantry
	ProductionBar:
		ProductionType: Infantry
	ProvidesPrerequisite@atreides:
		Prerequisite: barracks.atreides
		Factions: atreides
	ProvidesPrerequisite@ordos:
		Prerequisite: barracks.ordos
		Factions: ordos
	ProvidesPrerequisite@harkonnen:
		Prerequisite: barracks.harkonnen
		Factions: harkonnen
	Power:
		Amount: -30
	RenderSprites:
		Image: barracks.ordos
		FactionImages:
			atreides: barracks.atreides
			fremen: barracks.atreides
			harkonnen: barracks.harkonnen
			corrino: barracks.harkonnen
	WithBuildingBib:
	ProvidesPrerequisite@buildingname:
	GrantConditionOnPrerequisite@UPGRADEABLE:
		Prerequisites: upgrade.barracks
	RevealOnDeath:
		Radius: 3c768

refinery:
	Inherits: ^Building
	Buildable:
		Prerequisites: wind_trap
		Queue: Building
		BuildPaletteOrder: 130
		BuildDuration: 625
		BuildDurationModifier: 100
		Description: Harvesters unload Spice here for processing.
	Selectable:
		Bounds: 3072, 2048
	Valued:
		Cost: 1500
	Tooltip:
		Name: Spice Refinery
	D2kBuilding:
		Footprint: =xx xx= ===
		Dimensions: 3,3
		LocalCenterOffset: 0,-512,0
	Encyclopedia:
		Description: The Refinery is the basis of all Spice production on Dune. Harvesters transport mined Spice to the Refinery where it is converted into credits. Refined Spice is automatically distributed among the Silos and Refineries for storage. A refinery can store 2000 spice. A Spice Harvester is delivered via Carryall once a Refinery is built.\n\nRefineries are vulnerable to most types of weapons.
		Category: Buildings
		Order: 40
	Health:
		HP: 30000
	HitShape:
		Type: Rectangle
			TopLeft: -512, -1024
			BottomRight: 1536, 0
	HitShape@BOTTOM:
		Type: Rectangle
			TopLeft: -1536, 0
			BottomRight: 512, 1024
	Armor:
		Type: heavy
	RevealsShroud:
		Range: 3c768
	Refinery:
		DockAngle: 640
		DockOffset: 2,1
		TickRate: 20
	StoresResources:
		Capacity: 2000
	CustomSellValue:
		Value: 500
	FreeActorWithDelivery:
		Actor: harvester
		DeliveryOffset: 2,2
		DeliveringActor: carryall.reinforce
		Facing: 160
	RenderSprites:
		Image: refinery.ordos
		FactionImages:
			atreides: refinery.atreides
			fremen: refinery.atreides
			harkonnen: refinery.harkonnen
			corrino: refinery.harkonnen
	WithBuildingBib:
	WithIdleOverlay@TOP:
		RequiresCondition: !build-incomplete
		Sequence: idle-top
	WithDockedOverlay@SMOKE:
		RequiresCondition: !build-incomplete
		Sequence: smoke
	Power:
		Amount: -75
	ProvidesPrerequisite@buildingname:
	WithResourceStoragePipsDecoration:
		Position: BottomLeft
		Margin: 1, 4
		RequiresSelection: true
		PipCount: 10

silo:
	Inherits: ^Building
	Buildable:
		Prerequisites: refinery
		Queue: Building
		BuildPaletteOrder: 310
		BuildDuration: 156
		BuildDurationModifier: 100
		Description: Stores excess harvested Spice.
	Selectable:
		Bounds: 1024, 1024
	Encyclopedia:
		Description: The Spice Silo allows the player to store 1500 harvested Spice. When a Refinery completes processing, excess Spice is automatically distributed evenly among the Silos and Refineries. When harvested Spice exceeds Silo capacity, the excess will be lost. When Spice Silos are destroyed or captured, the amount stored will be dispersed among other Silos and Refineries unless there is insufficient storage capacity.\n\nThe Spice Silo is vulnerable to most types of weapons.
		Category: Buildings
		Order: 50
	Valued:
		Cost: 120
	Tooltip:
		Name: Silo
	RequiresBuildableArea:
		Adjacent: 4
	-GivesBuildableArea:
	Health:
		HP: 15000
	Armor:
		Type: building
	RevealsShroud:
		Range: 2c768
	RenderSprites:
		Image: silo.ordos
		FactionImages:
			atreides: silo.atreides
			fremen: silo.atreides
			harkonnen: silo.harkonnen
			corrino: silo.harkonnen
	-WithSpriteBody:
	WithResourceLevelSpriteBody:
		Sequence: stages
	StoresResources:
		Capacity: 2000
	-SpawnActorsOnSell:
	Power:
		Amount: -15
	MustBeDestroyed:
		RequiredForShortGame: false
	ThrowsShrapnel:
		Weapons: Debris, Debris2, Debris3, Debris4
		Pieces: 3, 5
		Range: 2c0, 5c0
	RevealOnDeath:
		Radius: 2c768
	WithResourceStoragePipsDecoration:
		Position: BottomLeft
		Margin: 1, 4
		RequiresSelection: true
		PipCount: 5

light_factory:
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Inherits@UPGRADEABLE: ^Upgradeable
	Buildable:
		Prerequisites: refinery
		Queue: Building
		BuildPaletteOrder: 230
		BuildDuration: 321
		BuildDurationModifier: 100
		Description: Produces light vehicles.
	Selectable:
		Bounds: 3072, 2048
	Valued:
		Cost: 500
	Tooltip:
		Name: Light Factory
	D2kBuilding:
		Footprint: xxx xx= ===
		Dimensions: 3,3
		LocalCenterOffset: 0,-512,0
	Encyclopedia:
		Description: The Light Factory is required for the production of small, lightly armored, combat vehicles. The Light Factory can be upgraded to produce more advanced light vehicles in later missions.\n\nA Light Factory is vulnerable to most types of weapons.
		Category: Buildings
		Order: 60
	Health:
		HP: 33000
	HitShape:
		TargetableOffsets: -210,608,0
		Type: Rectangle
			TopLeft: -1536, -1024
			BottomRight: 1536, 1024
	Armor:
		Type: building
	RevealsShroud:
		Range: 5c768
	RenderSprites:
		Image: light.ordos
		FactionImages:
			atreides: light.atreides
			fremen: light.atreides
			harkonnen: light.harkonnen
			corrino: light.harkonnen
	WithBuildingBib:
	WithIdleOverlay@TOP:
		RequiresCondition: !build-incomplete
		Sequence: idle-top
	WithProductionOverlay@WELDING:
		RequiresCondition: !build-incomplete
		Queues: Vehicle
		Sequence: production-welding
	RallyPoint:
		ForceSetType: Vehicle
	CommandBarBlacklist:
		DisableStop: false
	Exit@1:
		SpawnOffset: 544,-224,0
		ExitCell: 2,1
	Production:
		Produces: Vehicle, Upgrade
	PrimaryBuilding:
		ProductionQueues: Vehicle
	ProductionBar:
		ProductionType: Vehicle
	ProvidesPrerequisite@atreides:
		Prerequisite: light.atreides
		Factions: atreides
	ProvidesPrerequisite@ordos:
		Prerequisite: light.ordos
		Factions: ordos
	ProvidesPrerequisite@harkonnen:
		Prerequisite: light.harkonnen
		Factions: harkonnen
	ProvidesPrerequisite@trike:
		Prerequisite: light.trike
		Factions: atreides, fremen, harkonnen, corrino
	ProvidesPrerequisite@raider:
		Prerequisite: light.raider
		Factions: ordos, smuggler, mercenary
	ProvidesPrerequisite@buildingname:
	Power:
		Amount: -125
	GrantConditionOnPrerequisite@UPGRADEABLE:
		Prerequisites: upgrade.light

heavy_factory:
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Inherits@UPGRADEABLE: ^Upgradeable
	Buildable:
		Prerequisites: refinery
		Queue: Building
		BuildPaletteOrder: 330
		BuildDuration: 750
		BuildDurationModifier: 100
		Description: Produces heavy vehicles.
	Selectable:
		Bounds: 3072, 3072
	Valued:
		Cost: 1000
	Tooltip:
		Name: Heavy Factory
	D2kBuilding:
		Footprint: _x_ xxx =xX ===
		Dimensions: 3,4
		LocalCenterOffset: 0,-512,0
	Encyclopedia:
		Description: The Heavy Factory allows the player to build heavy vehicles such as Harvesters and Combat Tanks. When upgraded, this facility allows the construction of advanced vehicles, though some vehicles also require other buildings.\n\nThe Heavy Factory is vulnerable to most types of weapons.
		Category: Buildings
		Order: 70
	Health:
		HP: 35000
	HitShape:
		TargetableOffsets: -1155,-704,0, -1365,832,0
		Type: Rectangle
			TopLeft: -1536, -512
			BottomRight: 1536, 1536
	HitShape@TOP:
		Type: Rectangle
			TopLeft: -512, -1536
			BottomRight: 512, -512
	Armor:
		Type: building
	RevealsShroud:
		Range: 4c768
	RallyPoint:
		ForceSetType: Armor
	CommandBarBlacklist:
		DisableStop: false
	Exit@1:
		SpawnOffset: 256,192,0
		ExitCell: 0,2
	Production:
		Produces: Armor, Upgrade
	PrimaryBuilding:
		ProductionQueues: Armor
	ProductionBar:
		ProductionType: Armor
	ProvidesPrerequisite@atreides:
		Prerequisite: heavy.atreides
		Factions: atreides
	ProvidesPrerequisite@ordos:
		Prerequisite: heavy.ordos
		Factions: ordos
	ProvidesPrerequisite@harkonnen:
		Prerequisite: heavy.harkonnen
		Factions: harkonnen
	ProvidesPrerequisite@atreides_combat:
		Prerequisite: heavy.atreides_combat
		Factions: atreides, fremen
	ProvidesPrerequisite@ordos_combat:
		Prerequisite: heavy.ordos_combat
		Factions: ordos, smuggler, mercenary
	ProvidesPrerequisite@harkonnen_combat:
		Prerequisite: heavy.harkonnen_combat
		Factions: harkonnen, corrino
	ProvidesPrerequisite@missile_tank:
		Prerequisite: heavy.missile_tank
		Factions: atreides, fremen, harkonnen, corrino
	RenderSprites:
		Image: heavy.ordos
		FactionImages:
			atreides: heavy.atreides
			fremen: heavy.atreides
			harkonnen: heavy.harkonnen
			corrino: heavy.harkonnen
			mercenary: heavy.mercenary
	WithBuildingBib:
	WithIdleOverlay@TOP:
		RequiresCondition: !build-incomplete
		Sequence: idle-top
	WithProductionOverlay@WELDING:
		RequiresCondition: !build-incomplete
		Queues: Armor
		Sequence: production-welding
	Power:
		Amount: -150
	ProvidesPrerequisite@buildingname:
	GrantConditionOnPrerequisite@UPGRADEABLE:
		Prerequisites: upgrade.heavy

outpost:
	Inherits: ^Building
	Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
	Buildable:
		Prerequisites: barracks, ~techlevel.medium
		Queue: Building
		BuildPaletteOrder: 320
		BuildDuration: 312
		BuildDurationModifier: 100
		Description: Provides a radar map of the battlefield.\n  Requires power to operate.
	Selectable:
		Bounds: 3072, 2048
	Valued:
		Cost: 750
	Tooltip:
		Name: Outpost
	D2kBuilding:
		Footprint: xxx xxx ===
		Dimensions: 3,3
		LocalCenterOffset: 0,-512,0
	Encyclopedia:
		Description: If the player has sufficient power, the Radar Outpost will generate a radar map. Radar is automatically activated when construction of the Outpost is complete.\n\nThe Radar Outpost is vulnerable to most types of weapons.
		Category: Buildings
		Order: 80
	Health:
		HP: 35000
	HitShape:
		Type: Rectangle
			TopLeft: -1536, -1024
			BottomRight: 1536, 1024
	Armor:
		Type: building
	RevealsShroud:
		Range: 5c768
	ProvidesRadar:
		RequiresCondition: !disabled
	RenderSprites:
		Image: outpost.ordos
		FactionImages:
			atreides: outpost.atreides
			fremen: outpost.atreides
			harkonnen: outpost.harkonnen
			corrino: outpost.harkonnen
	WithBuildingBib:
	WithIdleOverlay@DISH:
		RequiresCondition: !build-incomplete && !severe-damaged
		Sequence: idle-dish
		PauseOnCondition: disabled
	GrantConditionOnDamageState@STOPDISH:
		Condition: severe-damaged
	Power:
		Amount: -125
	ProvidesPrerequisite@buildingname:

starport:
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Tooltip:
		Name: Starport
	Buildable:
		Prerequisites: heavy_factory, outpost, ~techlevel.high
		Queue: Building
		BuildPaletteOrder: 530
		BuildDuration: 625
		BuildDurationModifier: 100
		Description: Dropzone for quick reinforcements, at a price.
	Valued:
		Cost: 1500
	D2kBuilding:
		Footprint: xxx x=x =x=
		Dimensions: 3,3
	Encyclopedia:
		Description: The Starport allows you to engage in intergalactic trading with the C.H.O.A.M. Merchants' Guild. The Starport provides a trading market for vehicles and airborne units at varying rates. You cannot purchase units from the Guild without this facility.\n\nArmor is heavy, but the Starport is vulnerable to most types of weapons.
		Category: Buildings
		Order: 90
	Selectable:
		Bounds: 3072, 3072
	Health:
		HP: 35000
	HitShape:
		Type: Rectangle
			TopLeft: -1536, -1536
			BottomRight: 1536, 512
	HitShape@BOTTOM:
		Type: Rectangle
			TopLeft: -512, 512
			BottomRight: 512, 1536
	Armor:
		Type: heavy
	RevealsShroud:
		Range: 3c768
	RallyPoint:
		ForceSetType: Starport
	CommandBarBlacklist:
		DisableStop: false
	Exit@1:
		SpawnOffset: 0,-480,0
		ExitCell: 2,2
	Exit@2:
		SpawnOffset: 0,-480,0
		ExitCell: 0,2
	ProductionAirdrop:
		Produces: Starport
		ActorType: frigate
		ReadyTextNotification: Reinforcements have arrived.
	RenderSprites:
		Image: starport.ordos
		FactionImages:
			atreides: starport.atreides
			fremen: starport.atreides
			harkonnen: starport.harkonnen
			corrino: starport.harkonnen
			smuggler: starport.smuggler
	WithDeliveryOverlay:
		RequiresCondition: !build-incomplete
		Palette: starportlights
	ProductionBar:
		ProductionType: Starport
	PrimaryBuilding:
		ProductionQueues: Starport
	ProvidesPrerequisite@atreides:
		Prerequisite: starport.atreides
		Factions: atreides
	ProvidesPrerequisite@ordos:
		Prerequisite: starport.ordos
		Factions: ordos
	ProvidesPrerequisite@harkonnen:
		Prerequisite: starport.harkonnen
		Factions: harkonnen
	ProvidesPrerequisite@atreides_combat:
		Prerequisite: starport.atreides_combat
		Factions: atreides, fremen
	ProvidesPrerequisite@ordos_combat:
		Prerequisite: starport.ordos_combat
		Factions: ordos, smuggler, mercenary
	ProvidesPrerequisite@harkonnen_combat:
		Prerequisite: starport.harkonnen_combat
		Factions: harkonnen, corrino
	Power:
		Amount: -150
	ProvidesPrerequisite@buildingname:

wall:
	Inherits@1: ^SpriteActor
	Interactable:
	CombatDebugOverlay:
	FrozenUnderFog:
	ScriptTriggers:
	OwnerLostAction:
		Action: ChangeOwner
	Buildable:
		Queue: Building
		Prerequisites: barracks
		BuildPaletteOrder: 410
		BuildDuration: 62
		BuildDurationModifier: 100
		Description: Stop units and blocks enemy fire.
	Valued:
		Cost: 20
	CustomSellValue:
		Value: 0
	Tooltip:
		Name: Concrete Wall
		GenericName: Structure
	AppearsOnRadar:
	D2kBuilding:
		BuildSounds: CHUNG.WAV
		TerrainTypes: Rock, Concrete
	Encyclopedia:
		Description: Base defense. Concrete walls are the most effective barriers on Dune. Concrete walls will block tank bullets and impede unit movement.\n\nWalls can only be damaged by explosive weapons, missiles and shells. Like concrete slabs, walls cannot be repaired if damaged.
		Category: Buildings
		Order: 15
	FootprintPlaceBuildingPreview:
		LineBuildFootprintAlpha: 0.65
	RequiresBuildableArea:
		AreaTypes: building
		Adjacent: 7
	Health:
		HP: 20000
	Armor:
		Type: wall
	RevealsShroud:
		Range: 1c768
	Crushable:
		CrushClasses: wall
	BlocksProjectiles:
		Height: 512
	LineBuild:
		Range: 5
		NodeTypes: wall, turret
	LineBuildNode:
		Types: wall
	Targetable:
		TargetTypes: Ground, Wall
	WithWallSpriteBody:
	Sellable:
		SellSounds: CHUNG.WAV
	Guardable:
	Explodes:
		Weapon: WallExplode
		EmptyWeapon: WallExplode
	ThrowsShrapnel:
		Weapons: Debris2, Debris3
		Pieces: 1, 1
		Range: 1c512, 2c768
	HitShape:
		Type: Rectangle
			TopLeft: -512, -512
			BottomRight: 512, 512
	AppearsOnMapPreview:
	MapEditorData:
		Categories: Defense
	Replaceable:
		Types: Tower

medium_gun_turret:
	Inherits: ^Defense
	Inherits@AUTOTARGET: ^AutoTargetGround
	Buildable:
		Queue: Building
		Prerequisites: barracks
		BuildPaletteOrder: 510
		BuildDuration: 268
		BuildDurationModifier: 100
		Description: Defensive structure.\n  Strong vs Tanks\n  Weak vs Infantry, Aircraft
	Valued:
		Cost: 550
	Tooltip:
		Name: Gun Turret
	RequiresBuildableArea:
		Adjacent: 4
	Selectable:
		Bounds: 1024, 1024
		DecorationBounds: 1024, 1280, 0, -256
	Health:
		HP: 27000
	Encyclopedia:
		Description: The Gun Turret has a medium range gun which is effective against vehicles, especially heavily armored vehicles. The Gun Turret will fire on any enemy unit within range.\n\nThe Gun Turret is resistant to bullet and explosive weapons, but vulnerable to missiles and high-caliber guns.
		Category: Buildings
		Order: 100
	Armor:
		Type: heavy
	RevealsShroud:
		Range: 4c768
	BodyOrientation:
		QuantizedFacings: 32
	WithMuzzleOverlay:
	Turreted:
		TurnSpeed: 24
		InitialFacing: 512
		RealignDelay: -1
	Armament:
		Weapon: 110mm_Gun
		LocalOffset: 512,0,432
		MuzzleSequence: muzzle
	Power:
		Amount: -50
	Replacement:
		ReplaceableTypes: Tower

large_gun_turret:
	Inherits: ^Defense
	Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
	Inherits@AUTOTARGET: ^AutoTargetAll
	AttackTurreted:
		PauseOnCondition: disabled || build-incomplete
	Buildable:
		Queue: Building
		Prerequisites: outpost, upgrade.conyard, ~techlevel.medium
		BuildPaletteOrder: 610
		BuildDuration: 312
		BuildDurationModifier: 100
		Description: Defensive structure.\n  Strong vs Infantry, Aircraft\n  Weak vs Tanks\n\n  Requires power to operate.
	Valued:
		Cost: 750
	Tooltip:
		Name: Rocket Turret
	Encyclopedia:
		Description: The substantially improved Rocket Turret has a longer range and a higher rate of fire than the Gun Turret. The Rocket Turret's advanced targeting equipment requires power to operate.\n\nThe Rocket Turret is resistant to bullet and explosive weapons, but vulnerable to missiles and high caliber guns.
		Category: Buildings
		Order: 110
	RequiresBuildableArea:
		Adjacent: 4
	Selectable:
		Bounds: 1024, 1024
		DecorationBounds: 1024, 1280, 0, -256
	Health:
		HP: 30000
	Armor:
		Type: heavy
	RevealsShroud:
		Range: 5c768
	BodyOrientation:
		QuantizedFacings: 32
	Armament:
		Weapon: TowerMissile
		LocalOffset: 256,384,768, 256,-384,768
	Turreted:
		TurnSpeed: 32
		InitialFacing: 512
		RealignDelay: -1
	Power:
		Amount: -60
	RevealOnDeath:
		Radius: 5c768
	Replacement:
		ReplaceableTypes: Tower

repair_pad:
	Inherits: ^Building
	Buildable:
		Queue: Building
		Prerequisites: heavy_factory, upgrade.heavy, ~techlevel.medium
		BuildPaletteOrder: 430
		BuildDuration: 375
		BuildDurationModifier: 100
		Description: Repairs vehicles.\n Allows construction of MCVs
	Valued:
		Cost: 800
	Tooltip:
		Name: Repair Pad
	D2kBuilding:
		Footprint: +++ +++ +++
		Dimensions: 3,3
	Encyclopedia:
		Description: With a Repair Pad, vehicles can be repaired for a varying price.\n\nThe Repair Pad is vulnerable to most types of weapons.
		Category: Buildings
		Order: 120
	Health:
		HP: 30000
	HitShape:
		TargetableOffsets: 1024,0,0, 0,-1024,0, 0,1024,0, -1024,0,0
		Type: Rectangle
			TopLeft: -1536, -512
			BottomRight: 1536, 512
	HitShape@TOPANDBOTTOM:
		Type: Rectangle
			TopLeft: -512, -1536
			BottomRight: 512, 1536
	Armor:
		Type: building
	RevealsShroud:
		Range: 3c768
	Selectable:
		Bounds: 3072, 3072
	Reservable:
	RepairsUnits:
		Interval: 10
		HpPerStep: 800
		StartRepairingNotification: Repairing
		StartRepairingTextNotification: Repairing.
		FinishRepairingNotification: UnitRepaired
		FinishRepairingTextNotification: Unit repaired.
		PlayerExperience: 10
	RallyPoint:
	CommandBarBlacklist:
		DisableStop: false
	RenderSprites:
		Image: repair_pad.ordos
		FactionImages:
			atreides: repair_pad.atreides
			fremen: repair_pad.atreides
			harkonnen: repair_pad.harkonnen
			corrino: repair_pad.harkonnen
	WithRepairOverlay:
		RequiresCondition: !build-incomplete
		Palette: effect75alpha
	Power:
		Amount: -50
	ProvidesPrerequisite@buildingname:

high_tech_factory:
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Inherits@UPGRADEABLE: ^Upgradeable
	Buildable:
		Prerequisites: outpost, ~techlevel.medium
		Queue: Building
		BuildPaletteOrder: 420
		BuildDuration: 468
		BuildDurationModifier: 100
		Description: Unlocks advanced technology.
	Selectable:
		Bounds: 3072, 3072
	Valued:
		Cost: 1150
	Tooltip:
		Name: High Tech Factory
	ProductionFromMapEdge:
		Produces: Aircraft, Upgrade
	ProductionBar:
		ProductionType: Aircraft
	PrimaryBuilding:
		ProductionQueues: Aircraft
	Exit:
		SpawnOffset: 0,0,728
		ExitCell: 0,0
	D2kBuilding:
		Footprint: _X_ xxx XXX ===
		Dimensions: 3,4
		LocalCenterOffset: 0,-512,0
	Encyclopedia:
		Description: The High Tech Factory produces airborne units, and is required for the production of Carryalls. House Atreides can upgrade the High Tech Factory to build Ornithopters for an air strike in later missions.\n\nThe High Tech Factory is vulnerable to most types of weapons.
		Category: Buildings
		Order: 130
	Health:
		HP: 35000
	HitShape:
		TargetableOffsets: -1312,0,0, -1312,-1024,0, -1312,1024,0
		Type: Rectangle
			TopLeft: -1536, -512
			BottomRight: 1536, 1536
	HitShape@TOP:
		TargetableOffsets: 1280,0,0
		Type: Rectangle
			TopLeft: -512, -1536
			BottomRight: 512, -512
	Armor:
		Type: building
	RevealsShroud:
		Range: 4c768
	RenderSprites:
		Image: hightech.ordos
		FactionImages:
			atreides: hightech.atreides
			fremen: hightech.atreides
			harkonnen: hightech.harkonnen
			corrino: hightech.harkonnen
	WithBuildingBib:
	WithProductionOverlay@WELDING:
		RequiresCondition: !build-incomplete
		Queues: Aircraft
		Sequence: production-welding
	ProvidesPrerequisite@upgrade:
		Prerequisite: hightech.atreides
		Factions: atreides
	ProvidesPrerequisite@buildingname:
	AirstrikePower:
		Icon: ornistrike
		Name: Air Strike
		Prerequisites: ~techlevel.superweapons, upgrade.hightech
		ChargeInterval: 7500
		SquadSize: 3
		SquadOffset: -1536, 1024, 0
		Description: Ornithopters hit the target with bombs
		UnitType: ornithopter
		DisplayBeacon: True
		CameraActor: camera
		CameraRemoveDelay: 60
		ArrowSequence: arrow
		CircleSequence: circles
		UseDirectionalTarget: True
		DirectionArrowAnimation: ornidirection
		SupportPowerPaletteOrder: 10
		EndChargeTextNotification: Airstrike ready.
		SelectTargetTextNotification: Select target.
	Power:
		Amount: -75
	GrantConditionOnPrerequisite@UPGRADEABLE:
		Prerequisites: upgrade.hightech

research_centre:
	Inherits: ^Building
	Buildable:
		Queue: Building
		Prerequisites: outpost, heavy_factory, upgrade.heavy, ~techlevel.high
		BuildPaletteOrder: 520
		BuildDuration: 312
		BuildDurationModifier: 100
		Description: Unlocks advanced tanks.
	Selectable:
		Bounds: 3072, 3072
	Valued:
		Cost: 1000
	Tooltip:
		Name: IX Research Center
	D2kBuilding:
		Footprint: _X_ xxx XXX ===
		Dimensions: 3,4
		LocalCenterOffset: 0,-512,0
	Encyclopedia:
		Description: The IX Research Center provides technology upgrades for structures and vehicles. This facility is required for production of a number of advanced special weapons and prototypes.\n\nThe IX Research Center is vulnerable to most types of weapons.
		Category: Buildings
		Order: 140
	Health:
		HP: 25000
	HitShape:
		TargetableOffsets: -1574,-158,0, -1050,-1024,0, -1155,960,0
		Type: Rectangle
			TopLeft: -1536, -512
			BottomRight: 1536, 1536
	HitShape@TOP:
		TargetableOffsets: 1312,0,0
		Type: Rectangle
			TopLeft: -512, -1536
			BottomRight: 512, -512
	Armor:
		Type: building
	RevealsShroud:
		Range: 4c768
	RenderSprites:
		Image: research.ordos
		FactionImages:
			atreides: research.atreides
			fremen: research.atreides
			harkonnen: research.harkonnen
			corrino: research.harkonnen
	WithBuildingBib:
	WithIdleOverlay@LIGHTS:
		RequiresCondition: !build-incomplete
		Sequence: idle-lights
	Power:
		Amount: -175
	ProvidesPrerequisite@buildingname:

palace:
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
	Buildable:
		Prerequisites: research_centre, ~techlevel.high
		Queue: Building
		BuildPaletteOrder: 620
		BuildDuration: 937
		BuildDurationModifier: 100
		Description: Unlocks elite infantry and weapons.
	Selectable:
		Bounds: 3072, 3072
	Valued:
		Cost: 1600
	Tooltip:
		Name: Palace
	RallyPoint:
	CommandBarBlacklist:
		DisableStop: false
	D2kBuilding:
		Footprint: xx= xxx =xx
		Dimensions: 3,3
	Encyclopedia:
		Description: The Palace serves as the command center once it is constructed. Palaces feature unique additional options, making available advanced special weapons.\n\nArmor is heavy, but the Palace is vulnerable to most types of weapons.
		Category: Buildings
		Order: 150
	Health:
		HP: 40000
	HitShape:
		Type: Rectangle
			TopLeft: -1536, -512
			BottomRight: 1536, 512
	HitShape@TOP:
		Type: Rectangle
			TopLeft: -1536, -1536
			BottomRight: 512, -512
	HitShape@BOTTOM:
		Type: Rectangle
			TopLeft: -512, 512
			BottomRight: 1536, 1536
	Armor:
		Type: heavy
	RevealsShroud:
		Range: 4c768
	RenderSprites:
		Image: palace.ordos
		FactionImages:
			atreides: palace.atreides
			fremen: palace.atreides
			harkonnen: palace.harkonnen
			corrino: palace.corrino
	WithBuildingBib:
		HasMinibib: True
	WithSupportPowerActivationOverlay:
		RequiresCondition: !build-incomplete && !launchpad-damaged && harkonnen
	GrantConditionOnDamageState@LAUNCHPADDAMAGED:
		Condition: launchpad-damaged
	Power:
		Amount: -200
	ProvidesPrerequisite@nuke:
		Prerequisite: palace.nuke
		Factions: harkonnen
	ProvidesPrerequisite@fremen:
		Prerequisite: palace.fremen
		Factions: atreides
	ProvidesPrerequisite@saboteur:
		Prerequisite: palace.saboteur
		Factions: ordos
	ProvidesPrerequisite@sardaukar:
		Prerequisite: palace.sardaukar
		Factions: corrino
	PrimaryBuilding:
		RequiresCondition: atreides || ordos
	WithTextDecoration@primary:
		RequiresCondition: primary && (atreides || ordos)
	NukePower:
		Cursor: nuke
		Icon: deathhand
		PauseOnCondition: disabled
		RequiresCondition: harkonnen
		Prerequisites: ~techlevel.superweapons, ~palace.nuke
		ChargeInterval: 7500
		Name: Death Hand
		Description: Launches an atomic missile at a target location
		BeginChargeSpeechNotification: DeathHandMissilePrepping
		EndChargeSpeechNotification: DeathHandMissileReady
		IncomingSpeechNotification: MissileLaunchDetected
		BeginChargeTextNotification: Death Hand missile prepping.
		EndChargeTextNotification: Death Hand missile ready.
		IncomingTextNotification: Missile launch detected.
		SelectTargetTextNotification: Select target.
		MissileWeapon: deathhand
		MissileImage: deathhand
		MissileDelay: 18
		SpawnOffset: 32,816,0
		DetonationAltitude: 3c0
		RemoveMissileOnDetonation: False
		DisplayBeacon: True
		DisplayRadarPing: True
		CameraRange: 10c0
		CameraRemoveDelay: 60
		ArrowSequence: arrow
		CircleSequence: circles
		FlightVelocity: 384
		TrailInterval: 0
		TrailImage: large_trail
		TrailSequences: idle
		SupportPowerPaletteOrder: 40
	ProduceActorPower@fremen:
		Name: Recruit Fremen
		Description: Elite infantry unit armed with assault rifles and rockets\n  Strong vs Infantry, Vehicles\n  Weak vs Artillery\n  Special Ability: Invisibility
		Icon: fremen
		PauseOnCondition: disabled
		RequiresCondition: atreides
		Prerequisites: ~techlevel.superweapons, ~palace.fremen
		Actors: fremen, fremen
		Type: Fremen
		ChargeInterval: 2250
		EndChargeTextNotification: Fremen ready.
		ReadyAudio: Reinforce
		ReadyTextNotification: Reinforcements have arrived.
		BlockedAudio: NoRoom
		BlockedTextNotification: No room for new unit.
		OrderName: ProduceActorPower.Fremen
		SupportPowerPaletteOrder: 20
	ProduceActorPower@saboteur:
		Name: Recruit Saboteur
		Description: Sneaky infantry, armed with explosives\n  Strong vs Buildings\n  Weak vs Everything\n  Special Ability: destroy buildings
		Icon: saboteur
		PauseOnCondition: disabled
		RequiresCondition: ordos
		Prerequisites: ~techlevel.superweapons, ~palace.saboteur
		Actors: saboteur
		Type: Saboteur
		ChargeInterval: 2250
		EndChargeTextNotification: Saboteur ready.
		ReadyAudio: Reinforce
		ReadyTextNotification: Reinforcements have arrived.
		BlockedAudio: NoRoom
		BlockedTextNotification: No room for new unit.
		OrderName: ProduceActorPower.Saboteur
		SupportPowerPaletteOrder: 30
	Exit@1:
		SpawnOffset: -704,768,0
		ExitCell: -1,2
	Exit@2:
		SpawnOffset: -704,768,0
		ExitCell: -1,3
	Exit@3:
		SpawnOffset: -704,768,0
		ExitCell: 0,3
	Production@Atreides:
		Produces: Fremen
		RequiresCondition: atreides
	Production@Ordos:
		Produces: Saboteur
		RequiresCondition: ordos
	GrantConditionOnFaction@Atreides:
		Condition: atreides
		Factions: atreides, fremen
	GrantConditionOnFaction@Harkonnen:
		Condition: harkonnen
		Factions: harkonnen
	GrantConditionOnFaction@Ordos:
		Condition: ordos
		Factions: ordos, mercenary, smuggler
	SupportPowerChargeBar:
		RequiresCondition: atreides || harkonnen || ordos
	ProvidesPrerequisite@buildingname:

conyard.atreides:
	Inherits: construction_yard
	Buildable:
		Queue: Building
		BuildPaletteOrder: 1000
		Prerequisites: ~disabled
		ForceFaction: atreides
	RenderSprites:
		Image: conyard.atreides
		-FactionImages:
	UpdatesPlayerStatistics:
		OverrideActor: construction_yard

conyard.harkonnen:
	Inherits: construction_yard
	Buildable:
		Queue: Building
		BuildPaletteOrder: 1000
		Prerequisites: ~disabled
		ForceFaction: harkonnen
	RenderSprites:
		Image: conyard.harkonnen
		-FactionImages:
	UpdatesPlayerStatistics:
		OverrideActor: construction_yard

conyard.ordos:
	Inherits: construction_yard
	Buildable:
		Queue: Building
		BuildPaletteOrder: 1000
		Prerequisites: ~disabled
		ForceFaction: ordos
	RenderSprites:
		Image: conyard.ordos
		-FactionImages:
	UpdatesPlayerStatistics:
		OverrideActor: construction_yard
