^Building:
	InstantlyRepairable:
		Types: Building
	ProductionTimeMultiplier@craneBonus:
		Prerequisites: bonus.crane
		Multiplier: 90
	GrantRandomCondition@randomFX:
		Conditions: explode02, explode03
	FireWarheadsOnDeath@02:
		Type: CenterPosition
		Weapon: buildingExplosions02
		EmptyWeapon: buildingExplosions02
		Chance: 50
		Offset: 1,0,1
		RequiresCondition: explode02 && !being-demolished
	FireWarheadsOnDeath@03:
		Type: CenterPosition
		Weapon: buildingExplosions03
		EmptyWeapon: buildingExplosions03
		Chance: 50
		Offset: 1,2,1
		RequiresCondition: (explode02 || explode03) && !being-demolished
	FireWarheadsOnDeath@sabotuerdemolition:
		RequiresCondition: being-demolished
		Type: CenterPosition
		Weapon: buildingBigExplosion
		EmptyWeapon: buildingBigExplosion
	FireProjectilesOnDeath:
		Weapons: derbisRock01, derbisRock02, derbisRock03, Debris4
		Pieces: 2, 5
		Range: 1c512, 4c0
	SpawnActorOnDeath@bigcrater:
		Actor: crater_big
		Offset: 0,1
		RequiresCondition: being-demolished
	AmbientSound@saboteurCharge:
		SoundFiles: audio/explodeSaboteurEmperor02.wav
		RequiresCondition: being-demolished
	WithBuildingRepairDecoration:
		Palette: player
		IsPlayerPalette: True
	ExternalCondition@vulnerable:
		Condition: vulnerable
	DamageMultiplier@vulnerable:
		Modifier: 125
		RequiresCondition: vulnerable
	ExternalCondition@jammed:
		Condition: jammed
	RevealsShroudMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 50
	DetectCloakedMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 0
	RevealOnDeath:
		Duration: 25
		Radius: 3c768
	WithColoredOverlay@vulnerable:
		Color: FF2C2C7D
		RequiresCondition: vulnerable
	WithColoredOverlay@black:
		Color: 3E202080
		RequiresCondition: jammed

construction_yard:
	Health:
		HP: 100000
	GrantConditionOnPrerequisite@energy:
		Condition: EnergyUpgrade
		Prerequisites: upgrade.conyard
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	RevealsShroud:
		Range: 5c768
	RevealsShroud@BigVis:
		Range: 9c768
		RequiresCondition: BiggerVision
	Valued:
		Cost: 4000
	CustomSellValue:
		Value: 2000
	StoresPlayerResources:
		Capacity: 2000
	Power:
		Amount: 25
		RequiresCondition: EnergyUpgrade
	FireProjectilesOnDeath:
		Weapons: Debris, Debris2
		Pieces: 1, 3
		Range: 1c0, 2c0
	FireProjectilesOnDeath@longer:
		Weapons: Debris, Debris2, Debris3, Debris4
		Pieces: 5, 7
		Range: 3c0, 6c0
	FireProjectilesOnDeath@longest:
		Weapons: Debris4, DerbisSiegetank
		Pieces: 0, 3
		Range: 6c0, 10c0
	FireWarheadsOnDeath@02:
		RequiresCondition: explode02
	FireWarheadsOnDeath@03:
		RequiresCondition: explode03
	Tooltip:
		Name: Atreides Conyard
		RequiresCondition: !harkonnen && !ordos && !fremen && !corrino && !smuggler && !mercenary
	Tooltip@harkonnen:
		Name: Harkonnen Conyard
		RequiresCondition: harkonnen
	Tooltip@ordos:
		Name: Ordos Conyard
		RequiresCondition: ordos
	Tooltip@fremen:
		Name: Fremen Conyard
		RequiresCondition: fremen
	Tooltip@corrino:
		Name: Corrino Conyard
		RequiresCondition: corrino
	Tooltip@smuggler:
		Name: Smuggler Conyard
		RequiresCondition: smuggler
	Tooltip@mercenary:
		Name: Mercenary Conyard
		RequiresCondition: mercenary
	GrantConditionOnFaction@harkonnen:
		Condition: harkonnen
		Factions: harkonnen
	GrantConditionOnFaction@ordos:
		Condition: ordos
		Factions: ordos
	GrantConditionOnFaction@corrino:
		Condition: corrino
		Factions: corrino
	GrantConditionOnFaction@fremen:
		Condition: fremen
		Factions: fremen
	GrantConditionOnFaction@smuggler:
		Condition: smuggler
		Factions: smuggler
	GrantConditionOnFaction@mercenary:
		Condition: mercenary
		Factions: mercenary
	ProvidesPrerequisite@fremenBuildins:
		Prerequisite: conyard.fremen
		Factions: fremen
	ProvidesPrerequisite@atreides:
		Prerequisite: conyard.atreides
		Factions: atreides
	ProvidesPrerequisite@harkonnen:
		Prerequisite: conyard.harkonnen
		Factions: harkonnen
	ProvidesPrerequisite@ordos:
		Prerequisite: conyard.ordos
		Factions: ordos
	ProvidesPrerequisite@corrino:
		Prerequisite: conyard.corrino
		Factions: corrino
	RenderSprites:
		Image: conyard.ordos
		FactionImages:
			atreides: conyard.atreides
			fremen: conyard.fremen
			harkonnen: conyard.harkonnen
			corrino: conyard.corrino
			smuggler: conyard.smuggler
			mercenary: conyard.mercenary
	WithIdleOverlay@ZAPS:
		RequiresCondition: !build-incomplete
		Sequence: idle-zaps

concretea:
	D2kBuilding:
		Footprint: xxxx xxxx xxxx xxxx
		Dimensions: 4,4
	Buildable:
		Prerequisites: !choosefaction
		BuildPaletteOrder: 618
		BuildDuration: 50
		Description: concrete-a.description
	Valued:
		Cost: 25
	RevealsShroud:
		Range: 1c512
	RequiresBuildableArea:
		AreaTypes: building
		Adjacent: 3
	KillsSelf:
		Delay: 1

concreteb:
	D2kBuilding:
		Footprint: xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx
		Dimensions: 6,6
	Buildable:
		Prerequisites: wind_trap, !choosefaction
		BuildPaletteOrder: 619
		BuildDuration: 100
		Description: concrete-b.description
	RevealsShroud:
		Range: 1c512
	RequiresBuildableArea:
		AreaTypes: building
		Adjacent: 3
	KillsSelf:
		Delay: 1

wind_trap:
	Buildable:
		Prerequisites: !choosefaction
		BuildDuration: 250
		BuildDurationModifier: 100
		Description: wind-trap.description
	Selectable:
		Bounds: 2048, 2048
	Valued:
		Cost: 250
	Health:
		HP: 35000
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	RevealsShroud:
		Range: 3c768
	RevealsShroud@BigVis:
		Range: 7c768
		RequiresCondition: BiggerVision
	Power:
		Amount: 250
	RevealOnDeath:
		Radius: 3c768
	SpawnActorOnDeath@husktype01:
		Actor: windTrap.husk
		RequiresCondition: explode02 && !being-demolished
	SpawnActorOnDeath@huskType02:
		Actor: windTrap.husk_passable
		RequiresCondition: explode03 && !being-demolished

barracks:
	Buildable:
		BuildDuration: 300
	Valued:
		Cost: 500
	Health:
		HP: 35000
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	RevealsShroud:
		Range: 3c768
	RevealsShroud@BigVis:
		Range: 7c768
		RequiresCondition: BiggerVision
	GrantConditionOnFaction@fremenExit:
		Condition: fremen
		Factions: fremen
	Exit@1:
		SpawnOffset: 512,768,0
		ExitCell: 0,2
		RequiresCondition: !fremen
	Exit@2:
		SpawnOffset: 512,768,0
		ExitCell: 1,2
		RequiresCondition: !fremen
	Exit@3:
		SpawnOffset: 512,768,0
		ExitCell: 2,2
		RequiresCondition: !fremen
	Exit@4:
		SpawnOffset: 512,768,0
		ExitCell: 2,1
		RequiresCondition: !fremen
	Exit@5:
		SpawnOffset: 0,1024,0
		ExitCell: 0,2
		RequiresCondition: fremen
	Exit@6:
		SpawnOffset: 0,1024,0
		ExitCell: 1,2
		RequiresCondition: fremen
	Exit@7:
		SpawnOffset: 768,768,0
		ExitCell: 2,2
		RequiresCondition: fremen
	Exit@8:
		SpawnOffset: 768,768,0
		ExitCell: 2,1
		RequiresCondition: fremen
	RenderSprites:
		Image: barracks.ordos
		FactionImages:
			atreides: barracks.atreides
			fremen: barracks.fremen
			harkonnen: barracks.harkonnen
			corrino: barracks.corrino
			smuggler: barracks.ordos
			mercenary: barracks.mercenary
	Power:
		Amount: -50
	GrantConditionOnProduction@ClusterdebrisExplosion:
		Condition: producing
	FireProjectilesOnDeath@explosiveDerbis:
		Weapons: DeathHandClusterDebris
		Pieces: 0, 1
		Range: 1c0, 2c0
		RequiresCondition: producing
	ProvidesPrerequisite@corrino:
		Prerequisite: barracks.corrino
		Factions: corrino
	ProvidesPrerequisite@mercenary:
		Prerequisite: barracks.mercenary
		Factions: mercenary
	ProvidesPrerequisite@fremen:
		Prerequisite: barracks.fremen
		Factions: fremen

refinery:
	PlaceBuildingVariants:
		Actors: refinery_inverted
		Facings: 384, 896
	Buildable:
		BuildDuration: 700
		Description: refinery.description
	D2kBuilding:
		Footprint: =xx xx+ ===
		Dimensions: 3,3
		LocalCenterOffset: 0,-512,0
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	Valued:
		Cost: 1750
	Health:
		HP: 40000
	RevealsShroud:
		Range: 3c768
	RevealsShroud@BigVis:
		Range: 7c768
		RequiresCondition: BiggerVision
	StoresPlayerResources:
		Capacity: 2000
	FreeActorWithDelivery:
		Actor: harvester
		DeliveryOffset: 2,2
		DeliveringActor: carryall.harvester.delivery
		Facing: 160
	CustomSellValue:
	Sellable:
		RequiresCondition: !build-incomplete && !being-demolished
		SellSounds: BUILD1.WAV
	Power:
		Amount: -75
	FireWarheadsOnDeath@big04:
		Type: CenterPosition
		Weapon: buildingExplosions04_big
		EmptyWeapon: buildingExplosions04_big
		Chance: 100
		Offset: 2,2,1
	FireProjectilesOnDeath:
		Weapons: Debris, Debris2, Debris3, Debris4, HarvesterSpiceExplosion
		Pieces: 7, 15
		Range: 2c0, 10c0
	ProvidesPrerequisite@cloak_carryall.reinforce:
		Prerequisite: cloak_carryall.reinforce
	GrantConditionOnFaction@Atreides:
		Condition: atreides
		Factions: atreides, fremen
	GrantConditionOnFaction@Harkonnen:
		Condition: harkonnen
		Factions: harkonnen, corrino
	GrantConditionOnFaction@Ordos:
		Condition: ordos
		Factions: ordos, mercenary, smuggler
	SpawnActorOnDeath@ordosHusk:
		Actor: refinery_husk.ordos
		RequiresCondition: ordos && !being-demolished
	SpawnActorOnDeath@atreidesHusk:
		Actor: refinery_husk.atreides
		RequiresCondition: atreides && !being-demolished
	SpawnActorOnDeath@harkonnenHusk:
		Actor: refinery_husk.harkonnen
		RequiresCondition: harkonnen && !being-demolished

refinery_inverted:
	Inherits: refinery
	PlaceBuildingVariants:
		Actors: refinery
		Facings: 896, 384
	Buildable:
		Prerequisites: wind_trap
		Queue: Building
		BuildPaletteOrder: 310
		Description: Refinery with docking from north side.
	RenderSprites:
		Image: refinery_invert.ordos
		FactionImages:
			atreides: refinery_invert.atreidis
			fremen: refinery_invert.atreidis
			harkonnen: refinery_invert.harkonnen
			corrino: refinery_invert.harkonnen
	WithIdleOverlay@front:
		Sequence: idle-front
		RequiresCondition: !build-incomplete
	Selectable:
		Bounds: 3072, 2048
	WithIdleOverlay@top:
		Sequence: idle-top
		RequiresCondition: !build-incomplete
	Refinery:
	DockHost:
		Type: Unload
		DockAngle: 128
		DockOffset: -1c0,-512,0
	Tooltip:
		Name: Spice Refinery Inverted
	D2kBuilding:
		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
	ProvidesPrerequisite:
		Prerequisite: refinery
	FreeActorWithDelivery:
		DeliveryOffset: 0,0

silo:
	GrantConditionOnPrerequisite@heal:
		Condition: SiloUpgrade
		Prerequisites: upgrade.silo
	Buildable:
		BuildPaletteOrder: 612
		BuildDuration: 200
		Description: silo.description
	Valued:
		Cost: 200
	Health:
		HP: 20000
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	RevealsShroud:
		Range: 3c768
	RevealsShroud@BigVis:
		Range: 7c768
		RequiresCondition: BiggerVision
	StoresPlayerResources:
		Capacity: 2000
	Power:
		Amount: -25
	FireProjectilesOnDeath:
		Weapons: Debris, Debris2, Debris3, Debris4
		Pieces: 3, 5
		Range: 2c0, 5c0
	ProvidesPrerequisite@silo:
	RevealOnDeath:
		Duration: 25
		Radius: 3c768
	ProximityExternalCondition@dhealign:
		Condition: healing
		Range: 3c512
		ValidRelationships: Ally
		RequiresCondition: DeployedSilo
	WithRangeCircle:
		Range: 3c512
		RequiresCondition: DeployedSilo
	GrantConditionOnDeploy:
		DeployedCondition: DeployedSilo
		SkipMakeAnimation: true
		RequiresCondition: SiloUpgrade
	WithIdleOverlay:
		RequiresCondition: DeployedSilo
		Image: deployed_silo
		Sequence: deployed
		Palette: terrain
	CashTrickler:
		Interval: 25
		Amount: -5
		RequiresCondition: DeployedSilo
		ShowTicks: False

light_factory:
	Buildable:
		Prerequisites: refinery
		BuildDuration: 400
	D2kBuilding:
		Footprint: xxx xx+ ===
		Dimensions: 3,3
		LocalCenterOffset: 0,-512,0
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	Valued:
		Cost: 750
	Health:
		HP: 40000
	RenderSprites:
		Image: light.ordos
		FactionImages:
			atreides: light.atreides
			fremen: light.atreides
			harkonnen: light.harkonnen
			corrino: light.harkonnen
			smuggler: light.smuggler
			mercenary: light.mercenary
	RevealsShroud:
		Range: 5c768
	RevealsShroud@BigVis:
		Range: 9c768
		RequiresCondition: BiggerVision
	Power:
		Amount: -100
	FireProjectilesOnDeath:
		Weapons: Debris2, derbisRock01, Debris4
		Pieces: 5, 7
		Range: 0c512, 3c0
	ProvidesPrerequisite@hunter:
		Prerequisite: light.hunter
		Factions: smuggler
	ProvidesPrerequisite@harkonnen:
		Prerequisite: light.harkonnen
		Factions: harkonnen
	ProvidesPrerequisite@atreides:
		Prerequisite: light.atreides
		Factions: atreides
	ProvidesPrerequisite@quad:
		Prerequisite: light.quad
		Factions: atreides, fremen, harkonnen, corrino, ordos, smuggler
	ProvidesPrerequisite@trike:
		Prerequisite: light.trike
		Factions: atreides, harkonnen, corrino, mercenary, fremen
	ProvidesPrerequisite@raider:
		Prerequisite: light.raider
		Factions: ordos
	ProvidesPrerequisite@jammer:
		Prerequisite: light.jammer
		Factions: smuggler
	ProvidesPrerequisite@heavyQuad:
		Prerequisite: light.heavy_quad
		Factions: mercenary
	ProvidesPrerequisite@spire:
		Prerequisite: spire
		Factions: atreides, fremen, harkonnen, corrino, ordos, smuggler, mercenary
	WithIdleOverlay@ZAPS:
		RequiresCondition: !build-incomplete
		Sequence: idle-zaps

heavy_factory:
	Buildable:
		Prerequisites: refinery
		BuildDuration: 800
	D2kBuilding:
		Footprint: _x_ xxx +xX ===
		Dimensions: 3,4
		LocalCenterOffset: 0,-512,0
	Valued:
		Cost: 1000
	Health:
		HP: 45000
	RenderSprites:
		Image: heavy.ordos
		FactionImages:
			atreides: heavy.atreides
			fremen: heavy.fremen
			harkonnen: heavy.harkonnen
			corrino: heavy.corrino
			smuggler: heavy.smuggler
			mercenary: heavy.mercenary
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	RevealsShroud:
		Range: 4c768
	RevealsShroud@BigVis:
		Range: 8c768
		RequiresCondition: BiggerVision
	Power:
		Amount: -150
	ProvidesPrerequisite@missile_tank:
		Prerequisite: heavy.missile_tank
		Factions: atreides, fremen, harkonnen, corrino, ordos, smuggler, mercenary
	ProvidesPrerequisite@crawler:
		Prerequisite: heavy.bison
		Factions: mercenary
	ProvidesPrerequisite@smuggler:
		Prerequisite: heavy.smuggler
		Factions: smuggler
	ProvidesPrerequisite@mercenary:
		Prerequisite: heavy.mercenary
		Factions: mercenary
	ProvidesPrerequisite@corrino:
		Prerequisite: heavy.corrino
		Factions: corrino
	ProvidesPrerequisite@atreides_combat:
		Prerequisite: heavy.atreides_combat
		Factions: atreides, fremen
		RequiresCondition: !subfaction_mode
	ProvidesPrerequisite@ordos_combat:
		Prerequisite: heavy.ordos_combat
		Factions: ordos, smuggler, mercenary
		RequiresCondition: !subfaction_mode
	ProvidesPrerequisite@harkonnen_combat:
		Prerequisite: heavy.harkonnen_combat
		Factions: harkonnen, corrino
		RequiresCondition: !subfaction_mode
	ProvidesPrerequisite@atreides_combat_subfactions:
		Prerequisite: heavy.atreides_combat
		Factions: atreides
		RequiresCondition: subfaction_mode
	ProvidesPrerequisite@ordos_combat_subfactions:
		Prerequisite: heavy.ordos_combat
		Factions: ordos
		RequiresCondition: subfaction_mode
	ProvidesPrerequisite@harkonnen_combat_subfactions:
		Prerequisite: heavy.harkonnen_combat
		Factions: harkonnen
		RequiresCondition: subfaction_mode
	ProvidesPrerequisite@cheap_tank:
		Prerequisite: heavy.cheap_tank
		Factions: smuggler
		RequiresCondition: subfaction_mode
	ProvidesPrerequisite@corrinotank:
		Prerequisite: heavy.corrino_combat
		Factions: corrino
		RequiresCondition: subfaction_mode
	ProvidesPrerequisite@fremen_tank:
		Prerequisite: heavy.fremen_tank
		Factions: fremen
		RequiresCondition: subfaction_mode
	ProvidesPrerequisite@mercenary_tank:
		Prerequisite: heavy.mercenary_tank
		Factions: mercenary
		RequiresCondition: subfaction_mode
	ProvidesPrerequisite@sand_tanks:
		Prerequisite: sand_tank
		Factions: fremen
		RequiresCondition: subfaction_mode
	GrantConditionOnPrerequisite@combattankslogic:
		Prerequisites: !factions.standard
		Condition: subfaction_mode
	GrantConditionOnProduction@debrisExplosion:
		Condition: producing
	FireProjectilesOnDeath:
		Weapons: Debris, Debris2, Debris3, Debris4
		Pieces: 10, 20
		Range: 1c0, 5c0
	FireProjectilesOnDeath@explosiveDerbis:
		Weapons: DeathHandClusterDebris
		Pieces: 0, 1
		Range: 1c0, 3c0
	FireProjectilesOnDeath@explosiveDerbiswhenproducing:
		Weapons: DeathHandClusterDebris
		Pieces: 1, 2
		Range: 1c0, 5c0
		RequiresCondition: producing
	SpawnActorOnDeath@bigcrater:
		Offset: 0,2
	WithIdleOverlay@ZAPS:
		RequiresCondition: !build-incomplete
		Sequence: idle-zaps

outpost:
	Buildable:
		BuildDuration: 400
		Description: outpost.description
	Valued:
		Cost: 750
	Health:
		HP: 40000
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	RenderSprites:
		Image: outpost.ordos
		FactionImages:
			atreides: outpost.atreides
			fremen: outpost.atreides
			harkonnen: outpost.harkonnen
			corrino: outpost.harkonnen
	RevealsShroud:
		Range: 5c768
	RevealsShroud@BigVis:
		Range: 9c768
		RequiresCondition: BiggerVision && !disabled
	Power:
		Amount: -100
	ProvidesRadar:
		RequiresCondition: !disabled
	DetectCloaked:
		Range: 5c002
		RequiresCondition: !disabled
	WithRangeCircle:
		Range: 5c002
		RequiresCondition: !disabled

starport:
	Buildable:
		BuildDuration: 600
		Prerequisites: heavy_factory, outpost, ~techlevel.high
		Description: Dropzone for extra reinforcements, at a price.
	Valued:
		Cost: 1500
	Health:
		HP: 50000
	D2kBuilding:
		Footprint: xxx =+= =x=
		Dimensions: 3,3
	Exit@1:
		SpawnOffset: 0,-480,0
		ExitCell: 1,1
	-Exit@2:
	ProductionAirdrop:
		WaitTickBeforeProduce: 10
		WaitTickAfterProduce: 15
		LandOffset: 0, -256, 0
		Produces: Starport
		ActorType: frigate
		ReadyTextNotification: notification-reinforcements-have-arrived
	Production:
		Produces: Starport
	RenderSprites:
		Image: starport.ordos
		FactionImages:
			atreides: starport.atreides
			fremen: starport.fremen
			harkonnen: starport.harkonnen
			corrino: starport.corrino
			smuggler: starport.smuggler
			mercenary: starport.mercenary
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	RevealsShroud:
		Range: 3c768
	RevealsShroud@BigVis:
		Range: 7c768
		RequiresCondition: BiggerVision
	Tooltip@smuggler:
		Name: Smuggler Starport
		RequiresCondition: smuggler
	Tooltip@mercenary:
		Name: Mercenary Starport
		RequiresCondition: mercenary
	Tooltip:
		RequiresCondition: !smuggler && !mercenary
	Power:
		Amount: -150
	-FireWarheadsOnDeath@02:
	ExternalCondition@lights:
		Condition: frigate_proximity_influence
	WithIdleOverlay@LIGHTS:
		RequiresCondition: !build-incomplete && frigate_proximity_influence
		Sequence: active
	ProvidesPrerequisite@cloak_frigate:
		Prerequisite: cloak.frigate
	ProvidesPrerequisite@atreides_combat:
		Prerequisite: starport.atreides_combat
		Factions: atreides
	ProvidesPrerequisite@ordos_combat:
		Prerequisite: starport.ordos_combat
		Factions: ordos
	ProvidesPrerequisite@harkonnen_combat:
		Prerequisite: starport.harkonnen_combat
		Factions: harkonnen
	ProvidesPrerequisite@corrino_combat:
		Prerequisite: starport.corrino_combat
		Factions: corrino
	ProvidesPrerequisite@cheap_Tank:
		Prerequisite: starport.cheap_combat
		Factions: smuggler
	ProvidesPrerequisite@fremen_Tank:
		Prerequisite: starport.fremen_combat
		Factions: fremen
	ProvidesPrerequisite@mercenary_Tank:
		Prerequisite: starport.mercenary_combat
		Factions: mercenary
	ProvidesPrerequisite@smugglerstarport:
		Prerequisite: starport.smuggler
		Factions: smuggler
	ProvidesPrerequisite@mercenaryStarport:
		Prerequisite: starport.mercenary
		Factions: mercenary
	ProvidesPrerequisite@ordosstarport:
		Prerequisite: starport.ordos
		Factions: ordos
	GrantConditionOnFaction@mercenary:
		Condition: mercenary
		Factions: mercenary
	GrantConditionOnFaction@smuggler:
		Condition: smuggler
		Factions: smuggler
	FireWarheadsOnDeath@03:
		Type: CenterPosition
		Weapon: buildingExplosions05
		EmptyWeapon: buildingExplosions05
		Chance: 75
	ProduceActorPower@contractors:
		Name: Hire Contractors
		Description: starport.starportpower-description
		Icon: mercenary
		RequiresCondition: mercenary
		Prerequisites: upgrade.starport, ~techlevel.superweapons, ~!factions.standard
		Actors: crawler
		Type: Starport
		ChargeInterval: 3750
		OrderName: ProduceActorPower.Contractors
		SupportPowerPaletteOrder: 250
		EndChargeTextNotification: Hire Contractors ready.
	WithIdleOverlay@ZAPS:
		RequiresCondition: !build-incomplete
		Sequence: idle-zaps
	SupportPowerChargeBar:

wall:
	Buildable:
		BuildDuration: 150
	Valued:
		Cost: 100
	Health:
		HP: 20000
	Armor:
		Type: wall
	RevealsShroud:
		Range: 1c768
	LineBuild:
		Range: 6
		NodeTypes: wall, turret
	RequiresBuildableArea:
		AreaTypes: building
		Adjacent: 8
	ExternalCondition@vulnerable:
		Condition: vulnerable
	DamageMultiplier@vulnerable:
		Modifier: 125
		RequiresCondition: vulnerable
	WithColoredOverlay@vulnerable:
		Color: FF2C2C7D
		RequiresCondition: vulnerable

medium_gun_turret:
	Inherits@jammer: ^jammedvision
	Buildable:
		Prerequisites: barracks
		BuildDuration: 300
		Description: medium-gun-turret.description
	Valued:
		Cost: 500
	BlocksProjectiles:
		Height: 512
	Health:
		HP: 30000
	Armor:
		Type: wall
	RevealsShroud:
		Range: 5c756
	Turreted:
		TurnSpeed: 21
		InitialFacing: 512
		RealignDelay: -1
	WithSpriteTurret:
		Recoils: false
	WithSpriteBarrel:
		RequiresCondition: !build-incomplete
	Armament:
		Weapon: 110mm_Gun
		LocalOffset: 512,0,432
		MuzzleSequence: muzzle
		Recoil: 200
		RecoilRecovery: 25
	Power:
		Amount: -50
	DetectCloaked:
		Range: 2c512
	ExternalCondition@jammed:
		Condition: jammed
	RevealsShroudMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 50
	DetectCloakedMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 5
	-RevealOnFire:
	WithRangeCircle@invis:
		Range: 2c512

large_gun_turret:
	Inherits@AUTOTARGET: ^AutoTargetAll
	Inherits@Jammer: ^jammedvision
	Buildable:
		Prerequisites: outpost, upgrade.conyard, ~techlevel.medium
		BuildDuration: 400
		Description: large-gun-turret.description
	Valued:
		Cost: 750
	BlocksProjectiles:
		Height: 512
	Health:
		HP: 30000
	Armor:
		Type: wall
	RevealsShroud:
		Range: 6c768
	Armament:
		Weapon: MissleTowerNew
		LocalOffset: 256,384,768, 256,-384,768
	Turreted:
		TurnSpeed: 28
	Power:
		Amount: -50
	DetectCloaked:
		Range: 2c512
	ExternalCondition@jammed:
		Condition: jammed
	RevealsShroudMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 50
	DetectCloakedMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 5
	-RevealOnFire:
	WithRangeCircle@invis:
		Range: 2c512

repair_pad:
	Buildable:
		Queue: Building
		Prerequisites: heavy_factory, ~techlevel.medium, ~!repair_pad.bot
		BuildDuration: 400
	Valued:
		Cost: 750
	Health:
		HP: 40000
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	RevealsShroud:
		Range: 3c768
	RevealsShroud@BigVis:
		Range: 7c768
		RequiresCondition: BiggerVision
	Capturable:
		RequiresCondition: !build-incomplete
		Types: building
		CancelActivity: true
	Power:
		Amount: -50
	-FireWarheadsOnDeath@02:
	FireWarheadsOnDeath@03:
		Type: CenterPosition
		Weapon: buildingExplosions05
		EmptyWeapon: buildingExplosions05
		Chance: 75

repair_pad.bot:
	Inherits: repair_pad
	Buildable:
		BuildPaletteOrder: 650
		Queue: Building
		Prerequisites: heavy_factory, ~techlevel.medium, ~repair_pad.bot
	Tooltip:
		Name: Repair Pad For Bot
	D2kBuilding:
		Footprint: +++ +=+ =+=
	GrantConditionOnBotOwner@enableProximity:
		Condition: bot
		Bots: omnius, vidious, gladius
	ProximityExternalCondition@repairingForbot:
		Condition: start_repair
		Range: 2c0
		RequiresCondition: bot
	ProvidesPrerequisite@buildingname:
		Prerequisite: repair_pad

high_tech_factory:
	Buildable:
		BuildDuration: 500
	Valued:
		Cost: 1250
	Health:
		HP: 45000
	RenderSprites:
		Image: hightech.ordos
		FactionImages:
			atreides: hightech.atreides
			fremen: hightech.fremen
			harkonnen: hightech.harkonnen
			corrino: hightech.corrino
			smuggler: hightech.smuggler
			mercenary: hightech.smuggler
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	RevealsShroud:
		Range: 4c768
	RevealsShroud@BigVis:
		Range: 8c768
		RequiresCondition: BiggerVision
	Power:
		Amount: -125
	RallyPoint:
		ForceSetType: Infantry
	ProvidesPrerequisite@ordosprerequisite:
		Prerequisite: hightech.ordos
		Factions: ordos
	SpawnActorOnDeath@bigcrater:
		Offset: 0,2
	GrantConditionOnFaction@airstrike:
		Condition: atreides
		Factions: atreides
	GrantConditionOnFaction@reinforcemets:
		Condition: ordos
		Factions: ordos
	GrantConditionOnFaction@harkonnendropship:
		Condition: corrino
		Factions: corrino
	GrantConditionOnFaction@fremen:
		Condition: fremen
		Factions: fremen
	GrantConditionOnFaction@Corrinodropship:
		Condition: harkonnen
		Factions: harkonnen
	ProvidesPrerequisite@enableupgradeStandard_enhancedAir:
		Prerequisite: High Tech Factory
		Factions: atreides, ordos, harkonnen, fremen, corrino
	ProvidesPrerequisite@enableupgradeSubfaction:
		Prerequisite: High Tech Factory
		RequiresPrerequisites: ~!factions.standard
		Factions: mercenary, smuggler, fremen, corrino
	-AirstrikePower:
	AirstrikePower@ATREIDES_ENABLED:
		OrderName: AtreidesEnabledAirstrike
		Icon: ornistrike
		Name: Air Strike
		Prerequisites: ~techlevel.superweapons, upgrade.hightech
		ChargeInterval: 6750
		SquadSize: 3
		SquadOffset: -1024, 1024, 0
		Description: high-tech-factory.airstrikepower-description
		UnitType: ornithopter_bomb
		DisplayBeacon: True
		CameraActor: camera
		RequiresCondition: atreides
		CameraRemoveDelay: 75
		ArrowSequence: arrow
		CircleSequence: circles
		UseDirectionalTarget: True
		DirectionArrowAnimation: ornidirection
		SupportPowerPaletteOrder: 430
		EndChargeTextNotification: Air Strike ready.
		SelectTargetTextNotification: Select target.
	AirstrikePower@HARKONNEN_ENABLED:
		OrderName: HarkonnenEnabledAirstrike
		Icon: lightStrike
		Name: Air Support
		Prerequisites: ~techlevel.superweapons, upgrade.hightech
		ChargeInterval: 4500
		SquadSize: 5
		SquadOffset: -1024, 1024, 0
		Description: high-tech-factory.airsupportpower-description
		UnitType: ornithopter_mg
		DisplayBeacon: True
		CameraActor: camera
		RequiresCondition: harkonnen
		CameraRemoveDelay: 50
		ArrowSequence: arrow
		CircleSequence: circles
		UseDirectionalTarget: True
		DirectionArrowAnimation: ornidirection
		SupportPowerPaletteOrder: 300
		EndChargeTextNotification: Air Support ready.
		SelectTargetTextNotification: Select target.
	AirstrikePower@ORDOS_ENABLED:
		OrderName: OrdosEnabledAirstike
		Icon: gascloud
		RequiresCondition: ordos
		Name: Gas Bomb
		Prerequisites: ~techlevel.superweapons, upgrade.hightech
		ChargeInterval: 5250
		SquadSize: 1
		SquadOffset: -1024, 2048, 0
		Description: high-tech-factory.gasbombpower-description
		UnitType: ornithopter.bomber
		DisplayBeacon: True
		CameraActor: camera
		CameraRemoveDelay: 75
		ArrowSequence: arrow
		CircleSequence: circles
		UseDirectionalTarget: True
		DirectionArrowAnimation: ornidirection
		SupportPowerPaletteOrder: 350
		EndChargeTextNotification: Gas Bomb ready.
		SelectTargetTextNotification: Select target.
	ParatroopersPower@CORRINO_ENABLED:
		UnitType: carryall.reinforce
		RequiresCondition: corrino
		OrderName: CorrinoDrop
		Prerequisites: ~techlevel.superweapons, upgrade.hightech
		SquadSize: 5
		SquadOffset: -2048, 1024, 0
		Icon: sardaukarFleet
		ChargeInterval: 9000
		Name: Emperor Airdrop
		Description: high-tech-factory.emperorairdroppower-description
		DropItems: sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar, sardaukar
		ReinforcementsArrivedTextNotification: Reinforcements have arrived.
		SelectTargetTextNotification: Select target.
		AllowImpassableCells: true
		QuantizedFacings: 8
		DisplayBeacon: true
		ArrowSequence: arrow
		CircleSequence: circles
		UseDirectionalTarget: True
		DirectionArrowAnimation: ornidirection
		SupportPowerPaletteOrder: 600
		EndChargeTextNotification: Emperor Airdrop ready.
	ParatroopersPower@FREMEN_ENABLED:
		UnitType: carryall.reinforce.for.thumper
		RequiresCondition: fremen
		OrderName: FremenDrop
		Prerequisites: ~techlevel.superweapons, upgrade.hightech
		SquadSize: 1
		Icon: true_sayer
		ChargeInterval: 1500
		Name: Fremen Thumper
		Description: high-tech-factory.frementhumperpower-description
		DropItems: thumper
		ReinforcementsArrivedTextNotification: Reinforcements have arrived.
		SelectTargetTextNotification: Select target.
		AllowImpassableCells: false
		QuantizedFacings: 8
		DisplayBeacon: true
		ArrowSequence: arrow
		CircleSequence: circles
		UseDirectionalTarget: True
		DirectionArrowAnimation: ornidirection
		SupportPowerPaletteOrder: 100
		EndChargeTextNotification: Fremen Thumper ready.
	WithIdleOverlay@ZAPS:
		RequiresCondition: !build-incomplete
		Sequence: idle-zaps
	SupportPowerChargeBar:

research_centre:
	Buildable:
		BuildDuration: 500
		Prerequisites: heavy_factory, outpost, ~techlevel.high
	Valued:
		Cost: 1250
	Health:
		HP: 35000
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	RevealsShroud:
		Range: 4c768
	RevealsShroud@BigVis:
		Range: 8c768
		RequiresCondition: BiggerVision
	Power:
		Amount: -175
	RenderSprites:
		Image: research.ordos
		FactionImages:
			atreides: research.atreides
			fremen: research.atreides
			harkonnen: research.harkonnen
			corrino: research.harkonnen
			smuggler: research.smuggler
	ProvidesPrerequisite@s:
		Prerequisite: research_centre.smuggler
		Factions: smuggler
	GrantConditionOnFaction@jammereds:
		Condition: smuggler
		Factions: smuggler
	SpawnActorPower@SmugglerTrueSayer:
		EffectImage: frigate.harkonnen
		EffectSequence:
		Actor: jammer_point
		Icon: jammer
		RequiresCondition: smuggler
		Prerequisites: ~techlevel.superweapons, upgrade.research
		ChargeInterval: 6000
		LifeTime: 6000
		StartFullyCharged: false
		DeploySound: SONIC3.WAV
		LaunchSound: SONIC3.WAV
		Name: Signal Shroud
		Description: research-centre.research-centre-description
		SupportPowerPaletteOrder: 400
		EndChargeTextNotification: Signal Shroud ready.
		DisplayBeacon: True
		OrderName: Signal_Shroud
		DisplayRadarPing: true
		BlockedCursor: move-blocked
	SupportPowerChargeBar:

palace:
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
	Buildable:
		Prerequisites: research_centre, ~techlevel.high, ~factions.standard
		Queue: Building
		BuildPaletteOrder: 620
		BuildDuration: 900
		BuildDurationModifier: 100
		Description: palace.description
	Selectable:
		Bounds: 3072, 3072
	Valued:
		Cost: 1750
	Tooltip:
		Name: Palace
	D2kBuilding:
		Footprint: xx= xxx +xx
		Dimensions: 3,3
	Exit@1:
		SpawnOffset: -768,768,0
		ExitCell: 0,2
	-Exit@2:
	-Exit@3:
	Health:
		HP: 75000
	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
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	RevealsShroud:
		Range: 4c768
	RevealsShroud@BigVis:
		Range: 8c768
		RequiresCondition: BiggerVision && !disabled
	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
	RallyPoint:
	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:
		ProductionQueues: Fremen, Saboteur
		RequiresCondition: atreides || ordos
	WithTextDecoration@primary:
		RequiresCondition: primary && (atreides || ordos)
	-NukePower:
	NukePower@harkonnen_standart:
		RequiresCondition: harkonnen
		Prerequisites: ~palace.nuke, ~techlevel.superweapons
		LaunchSound: audio/death_hand_launch_1.wav
		Cursor: nuke
		Icon: deathhand
		PauseOnCondition: disabled
		MissileDelay: 18
		DetonationAltitude: 6c0
		RemoveMissileOnDetonation: True
		ChargeInterval: 7500
		Name: Death Hand
		Description: palace.nukepower-description
		BeginChargeSpeechNotification: DeathHandMissilePrepping
		EndChargeSpeechNotification: DeathHandMissileReady
		IncomingSpeechNotification: MissileLaunchDetected
		MissileWeapon: deathhand
		SpawnOffset: 32,816,0
		DisplayBeacon: True
		DisplayRadarPing: True
		CameraRange: 7c0
		CameraRemoveDelay: 150
		ArrowSequence: arrow
		CircleSequence: circles
		FlightVelocity: 384
		TrailInterval: 0
		TrailImage: large_trail
		TrailSequences: idle
		SupportPowerPaletteOrder: 500
		EndChargeTextNotification: Death Hand ready.
		MissileImage: deathhand
		OrderName: Death_Hand
	-ProduceActorPower@fremen:
	ProduceActorPower@fremen_standart:
		Name: Elite Rangers
		Description: palace.produceactorpower-fremen-description
		Icon: fremen
		PauseOnCondition: disabled
		RequiresCondition: atreides
		Prerequisites: ~techlevel.superweapons, ~palace.fremen, ~factions.standard, !~factions.allowed
		Actors: fremen, fremen, fremen, fremen, fremen
		Type: Fremen
		ChargeInterval: 3000
		BlockedAudio: NoRoom
		BlockedTextNotification: notification-no-room-for-new-unit
		OrderName: ProduceActorPower.Rangers
		SupportPowerPaletteOrder: 200
		EndChargeTextNotification: Elite Rangers ready.
	-ProduceActorPower@saboteur:
	ProduceActorPower@saboteur_standart:
		Name: Hidden Saboteur
		Description: palace.produceactorpower-saboteur-description
		Icon: saboteur
		PauseOnCondition: disabled
		RequiresCondition: ordos
		Prerequisites: ~techlevel.superweapons, ~palace.saboteur, ~factions.standard, !~factions.allowed
		Actors: saboteur
		Type: Saboteur
		ChargeInterval: 2250
		BlockedAudio: NoRoom
		BlockedTextNotification: notification-no-room-for-new-unit
		OrderName: ProduceActorPower.Saboteur
		SupportPowerPaletteOrder: 150
		EndChargeTextNotification: Hidden Saboteur ready.
	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:

palace.harkonnen:
	Inherits: ^Building
	Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
	Valued:
		Cost: 1750
	Health:
		HP: 75000
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	RevealsShroud:
		Range: 4c768
	RevealsShroud@BigVis:
		Range: 8c768
		RequiresCondition: BiggerVision && !disabled
	Power:
		Amount: -200
	Buildable:
		Prerequisites: research_centre, ~techlevel.high, ~!factions.standard, ~conyard.harkonnen
		Queue: Building
		BuildPaletteOrder: 620
		BuildDuration: 900
		BuildDurationModifier: 100
		Description: palace.description
	Selectable:
		Bounds: 3072, 3072
	Tooltip:
		Name: Harkonnen Palace
	D2kBuilding:
		Footprint: xx= xxx +xx
		Dimensions: 3,3
	Health:
		HP: 75000
	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
	RenderSprites:
		Image: palace.harkonnen
	WithBuildingBib:
		HasMinibib: True
	WithSupportPowerActivationOverlay:
		RequiresCondition: !build-incomplete && !launchpad-damaged
	GrantConditionOnDamageState@LAUNCHPADDAMAGED:
		Condition: launchpad-damaged
	ProvidesPrerequisite@nuke:
		Prerequisite: palace.nuke
		Factions: harkonnen
	NukePower:
		LaunchSound: audio/death_hand_launch_1.wav
		Cursor: nuke
		Icon: deathhand
		PauseOnCondition: disabled
		MissileDelay: 18
		DetonationAltitude: 6c0
		RemoveMissileOnDetonation: True
		ChargeInterval: 7500
		Name: Death Hand
		Description: palace.nukepower-description
		BeginChargeSpeechNotification: DeathHandMissilePrepping
		EndChargeSpeechNotification: DeathHandMissileReady
		IncomingSpeechNotification: MissileLaunchDetected
		MissileWeapon: deathhand
		SpawnOffset: 32,816,0
		DisplayBeacon: True
		DisplayRadarPing: True
		CameraRange: 7c0
		CameraRemoveDelay: 150
		ArrowSequence: arrow
		CircleSequence: circles
		FlightVelocity: 384
		TrailInterval: 0
		TrailImage: large_trail
		TrailSequences: idle
		SupportPowerPaletteOrder: 500
		EndChargeTextNotification: Death Hand ready.
		MissileImage: deathhand
		OrderName: Death_Hand
	SupportPowerChargeBar:
	ProvidesPrerequisite@buildingname:

palace.atreides:
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
	PrimaryBuilding:
		ProductionQueues: Fremen
	Buildable:
		Prerequisites: research_centre, ~techlevel.high, ~!factions.standard, ~conyard.atreides
		Queue: Building
		BuildPaletteOrder: 620
		BuildDuration: 900
		BuildDurationModifier: 100
		Description: palace.description
	Selectable:
		Bounds: 3072, 3072
	RallyPoint:
	Valued:
		Cost: 1750
	Tooltip:
		Name: Atreides Palace
	D2kBuilding:
		Footprint: xx= xxx +xx
		Dimensions: 3,3
	Health:
		HP: 75000
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	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
	RenderSprites:
		Image: palace.atreides
		FactionImages:
	WithBuildingBib:
		HasMinibib: True
	Power:
		Amount: -200
	Exit@1:
		SpawnOffset: -768,768,0
		ExitCell: 0,2
	RevealsShroud:
		Range: 4c768
	RevealsShroud@BigVis:
		Range: 8c768
		RequiresCondition: BiggerVision && !disabled
	ProduceActorPower@Fremen_Enabled:
		Name: Elite Rangers
		Description: palace.produceactorpower-fremen-description
		Actors: fremen, fremen, fremen, fremen, fremen
		Type: Fremen
		ChargeInterval: 3000
		Icon: fremen
		PauseOnCondition: disabled
		Prerequisites: ~techlevel.superweapons, ~!factions.standard
		BlockedAudio: NoRoom
		BlockedTextNotification: notification-no-room-for-new-unit
		OrderName: ProduceActorPower.Fremen
		SupportPowerPaletteOrder: 200
		EndChargeTextNotification: Elite Rangers ready.
	Production@Atreides_enabled:
		Produces: Fremen
	SupportPowerChargeBar:
	ProvidesPrerequisite@buildingname:

palace.ordos:
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
	PrimaryBuilding:
		ProductionQueues: Saboteur
	Buildable:
		Prerequisites: research_centre, ~techlevel.high, ~!factions.standard, ~conyard.ordos
		Queue: Building
		BuildPaletteOrder: 620
		BuildDuration: 900
		BuildDurationModifier: 100
		Description: palace.description
	Selectable:
		Bounds: 3072, 3072
	RallyPoint:
	Valued:
		Cost: 1750
	Tooltip:
		Name: Ordos Palace
	D2kBuilding:
		Footprint: xx= xxx +xx
		Dimensions: 3,3
	Health:
		HP: 75000
	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
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	Exit@1:
		SpawnOffset: -768,768,0
		ExitCell: 0,2
	RevealsShroud:
		Range: 4c768
	RevealsShroud@BigVis:
		Range: 8c768
		RequiresCondition: BiggerVision && !disabled
	WithBuildingBib:
		HasMinibib: True
	Power:
		Amount: -200
	SupportPowerChargeBar:
	Production:
		Produces: Building, Elite
	ProduceActorPower@Saboteur_Enabled:
		Name: Hidden Saboteur
		Description: palace.produceactorpower-saboteur-description
		Actors: saboteur
		Type: Saboteur
		ChargeInterval: 2250
		Icon: saboteur
		PauseOnCondition: disabled
		Prerequisites: ~techlevel.superweapons, ~!factions.standard
		BlockedAudio: NoRoom
		BlockedTextNotification: notification-no-room-for-new-unit
		OrderName: ProduceActorPower.Saboteur
		SupportPowerPaletteOrder: 150
		EndChargeTextNotification: Hidden Saboteur ready.
	Production@Saboteur_enabled:
		Produces: Saboteur
	ProvidesPrerequisite@buildingname:
	
palace.corrino:
	Inherits: ^Defense
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
	Inherits@AUTOTARGET: ^AutoTargetGround
	PrimaryBuilding:
		ProductionQueues: Designator
	Buildable:
		Prerequisites: research_centre, ~techlevel.high, ~conyard.corrino, ~!factions.standard
		Queue: Building
		BuildPaletteOrder: 630
		BuildDuration: 1300
		BuildDurationModifier: 100
		Description: palace-corrino.description
	Selectable:
		Bounds: 3072, 3072
	Valued:
		Cost: 2500
	RallyPoint:
	Tooltip:
		Name: Emperor Palace
	D2kBuilding:
		Footprint: xxx xxx ===
		Dimensions: 3,3
	Health:
		HP: 75000
	HitShape:
		Type: Rectangle
			TopLeft: -1536, -512
			BottomRight: 1536, 512
	HitShape@TOP:
		Type: Rectangle
			TopLeft: -1536, -1536
			BottomRight: 1536, -512
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	Armor:
		Type: building
	RevealsShroud:
		Range: 4c768
	RevealsShroud@BigVis:
		Range: 8c768
		RequiresCondition: BiggerVision && !disabled
	WithBuildingBib:
		HasMinibib: True
	Power:
		Amount: -250
	Exit@1:
		SpawnOffset: 352,160,0
		ExitCell: 0,2
	Exit@2:
		SpawnOffset: 352,160,0
		ExitCell: 1,2
	Exit@3:
		SpawnOffset: 352,160,0
		ExitCell: 2,2
	ProvidesPrerequisite@buildingname:
	ProduceActorPower@Fremen:
		Name: Target Designator
		Description: palace-corrino.produceactorpower-designator-description
		Actors: designator
		Type: Designator
		ChargeInterval: 750
		Icon: designator
		PauseOnCondition: disabled
		Prerequisites: ~techlevel.superweapons, ~!factions.standard
		BlockedAudio: NoRoom
		BlockedTextNotification: notification-no-room-for-new-unit
		OrderName: ProduceActorPower.Designator
		SupportPowerPaletteOrder: 50
		EndChargeTextNotification: Target Designator ready.
	Production@Corrino_enabled:
		Produces: Designator
	Armament@clusterMissile.palace:
		Weapon: clusterMissile.palace
		LocalOffset: 384,0,1408
	WithRangeCircle:
		Range: 7c512
	AttackTurreted:
		PauseOnCondition: disabled
	Turreted:
		TurnSpeed: 512
		InitialFacing: 512
	-RevealOnFire:
	-CommandBarBlacklist:
	SupportPowerChargeBar:

fremen_sietch:
	Inherits: ^Building
	Inherits@primary: ^PrimaryBuilding
	-D2kBuilding:
	WithBuildingBib:
	Buildable:
		Queue: Building
		BuildPaletteOrder: 640
		BuildDuration: 1300
		BuildDurationModifier: 100
		Prerequisites: research_centre, ~techlevel.high, ~conyard.fremen, ~!factions.standard
		Description: Unlocks Worm Rider.
	SpawnActorsOnSell:
		ActorTypes: light_inf
	Valued:
		Cost: 2500
	GrantConditionOnPrerequisite@vision:
		Condition: VisionUpgrade
		Prerequisites: upgrade.outpost
	GrantConditionOnPowerState@BigVis:
		Condition: BiggerVision
		ValidPowerStates: Normal
		RequiresCondition: VisionUpgrade
	RevealsShroud:
		Range: 4c768
	RevealsShroud@BigVis:
		Range: 8c768
		RequiresCondition: BiggerVision
	PrimaryBuilding:
		ProductionQueues: Rider
	HitShape:
		Type: Rectangle
			TopLeft: -1536, -512
			BottomRight: 1536, 512
	HitShape@TOP:
		Type: Rectangle
			TopLeft: -536, -1536
			BottomRight: 512, -512
	HitShape@BOTTOM:
		Type: Rectangle
			TopLeft: -512, 512
			BottomRight: 1536, 1536
	Building:
		Footprint: =x= xxx +xx
		Dimensions: 3,3
		TerrainTypes: Rock, Concrete
		BuildSounds: BUILD1.WAV
	RallyPoint:
	Tooltip:
		Name: Sietch
	Health:
		HP: 75000
	Armor:
		Type: building
	Selectable:
		Bounds: 3072, 3072
	Exit@1:
		SpawnOffset: -512,1024,0
		ExitCell: 0,2
	Production@wormriderproduction:
		Produces: Rider
	ProduceActorPower@wormrider:
		Name: Worm Rider
		Description: fremen-sietch.produceactorpower-rider-description
		Icon: sandworm
		Prerequisites: ~techlevel.high
		Actors: worm_rider
		Type: Rider
		ChargeInterval: 8250
		BlockedAudio: NoRoom
		BlockedTextNotification: notification-no-room-for-new-unit
		OrderName: ProduceActorPower.Rider
		SupportPowerPaletteOrder: 550
		EndChargeTextNotification: Worm Rider ready.
	SupportPowerChargeBar:

upgrade.conyard:
	Buildable:
		BuildPaletteOrder: 1
		BuildDuration: 750
		Prerequisites: ~construction_yard, ~!choosefaction
		Description: upgrade-conyard.description
	Valued:
		Cost: 1000

upgrade.outpost:
	AlwaysVisible:
	Interactable:
	ScriptTriggers:
	Tooltip:
		Name: Outpost Upgrade
	Buildable:
		BuildPaletteOrder: 2
		Prerequisites: outpost, ~!choosefaction
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 500
		BuildDurationModifier: 100
		Description: Increases building vision with enough power
	Valued:
		Cost: 750
	RenderSprites:
		Image: outpost.ordos
		FactionImages:
			atreides: outpost.atreides
			fremen: outpost.atreides
			harkonnen: outpost.harkonnen
			corrino: outpost.harkonnen
	ProvidesPrerequisite@upgradename:

upgrade.silo:
	AlwaysVisible:
	Interactable:
	ScriptTriggers:
	Tooltip:
		Name: Silo Upgrade
	Buildable:
		BuildPaletteOrder: 3
		Prerequisites: silo, ~!choosefaction
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 250
		BuildDurationModifier: 100
		Description: Heals ally infantry when deployed
	Valued:
		Cost: 500
	RenderSprites:
		Image: silo.ordos
		FactionImages:
			atreides: silo.atreides
			fremen: silo.atreides
			harkonnen: silo.harkonnen
			corrino: silo.harkonnen
	ProvidesPrerequisite@upgradename:

upgrade.barracks:
	Buildable:
		BuildPaletteOrder: 4
		Prerequisites: barracks, ~!choosefaction
		BuildDuration: 250
		Description: Unlocks additional infantry
	Valued:
		Cost: 500
	RenderSprites:
		Image: barracks.ordos
		FactionImages:
			atreides: barracks.atreides
			fremen: barracks.fremen
			harkonnen: barracks.harkonnen
			corrino: barracks.corrino
			mercenary: barracks.mercenary

upgrade.light:
	Buildable:
		BuildPaletteOrder: 5
		Prerequisites: light_factory, ~!choosefaction
		BuildDuration: 500
		Description: Unlocks additional light vehicles
	Valued:
		Cost: 750

upgrade.heavy:
	Buildable:
		BuildPaletteOrder: 6
		Prerequisites: heavy_factory, ~!choosefaction
		BuildDuration: 750
		Description: Unlocks additional heavy vehicles
	Valued:
		Cost: 1000

upgrade.hightech:
	Buildable:
		BuildPaletteOrder: 7
		Prerequisites: ~!choosefaction, High Tech Factory, ~techlevel.superweapons
		BuildDuration: 1000
		Description: Unlocks hight tech support powers
	Valued:
		Cost: 1250
	RenderSprites:
		Image: hightech.atreides
		FactionImages:
			ordos: hightech.ordos
			harkonnen: hightech.harkonnen
			corrino: hightech.harkonnen
			smuggler: hightech.ordos
			mercenary: hightech.ordos

upgrade.research:
	AlwaysVisible:
	Interactable:
	ScriptTriggers:
	Tooltip:
		Name: Smuggler IX Research Center Upgrade
	Buildable:
		BuildPaletteOrder: 9
		Prerequisites: ~!choosefaction, ~research_centre.smuggler, ~!factions.standard, ~techlevel.high
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1000
		BuildDurationModifier: 100
		Description: Unlocks Signal Shroud
	Valued:
		Cost: 1250
	RenderSprites:
		Image: research.smuggler
	ProvidesPrerequisite@upgradename:

upgrade.starport:
	AlwaysVisible:
	Interactable:
	ScriptTriggers:
	Tooltip:
		Name: Mercenary Starport Upgrade
	Buildable:
		BuildPaletteOrder: 10
		Prerequisites: ~!choosefaction, ~starport.mercenary, ~!factions.standard, ~techlevel.high
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1250
		BuildDurationModifier: 100
		Description: Unlocks Hire Contractors
	Valued:
		Cost: 1500
	RenderSprites:
		Image: starport.mercenary
	ProvidesPrerequisite@upgradename:

sietch:
	-GrantRandomCondition@randomFX:
	-FireWarheadsOnDeath@02:
	-FireWarheadsOnDeath@03:
	-FireWarheadsOnDeath@sabotuerdemolition:
	-Demolishable:
	Demolishable@testfix:
		Condition: being-demolished
	Building:
		Footprint: xx xx
		Dimensions: 2,2
		TerrainTypes: Cliff

conyard.atreides:
	Inherits: construction_yard
	Buildable:
		Queue: Building
		BuildDuration: 6000
		BuildDurationModifier: 100
		BuildPaletteOrder: 1001
		Prerequisites: ~merged.atreides
		ForceFaction: atreides
	UpdatesPlayerStatistics:
		OverrideActor: construction_yard
	Tooltip:
		Name: Atreides Conyard
	WithIdleOverlay@ZAPS:
		RequiresCondition: !build-incomplete
		Sequence: idle-zaps

conyard.harkonnen:
	Inherits: construction_yard
	Buildable:
		Queue: Building
		BuildDuration: 6000
		BuildDurationModifier: 100
		BuildPaletteOrder: 1002
		Prerequisites: ~merged.harkonnen
		ForceFaction: harkonnen
	UpdatesPlayerStatistics:
		OverrideActor: construction_yard
	Tooltip:
		Name: Harkonnen Conyard
	WithIdleOverlay@ZAPS:
		RequiresCondition: !build-incomplete
		Sequence: idle-zaps

conyard.ordos:
	Inherits: construction_yard
	Buildable:
		Queue: Building
		BuildDuration: 6000
		BuildDurationModifier: 100
		BuildPaletteOrder: 1003
		Prerequisites: ~merged.ordos
		ForceFaction: ordos
	UpdatesPlayerStatistics:
		OverrideActor: construction_yard
	Tooltip:
		Name: Ordos Conyard
	WithIdleOverlay@ZAPS:
		RequiresCondition: !build-incomplete
		Sequence: idle-zaps

conyard.fremen:
	Inherits: construction_yard
	Buildable:
		Queue: Building
		BuildDuration: 6000
		BuildDurationModifier: 100
		BuildPaletteOrder: 1004
		Prerequisites: ~merged.fremen
		ForceFaction: fremen
	RenderSprites:
		Image: conyard.fremen
		-FactionImages:
	UpdatesPlayerStatistics:
		OverrideActor: construction_yard
	Tooltip:
		Name: Fremen Conyard
	WithIdleOverlay@ZAPS:
		RequiresCondition: !build-incomplete
		Sequence: idle-zaps

conyard.corrino:
	Inherits: construction_yard
	Buildable:
		Queue: Building
		BuildDuration: 6000
		BuildDurationModifier: 100
		BuildPaletteOrder: 1005
		Prerequisites: ~merged.corrino
		ForceFaction: corrino
	RenderSprites:
		Image: conyard.corrino
		-FactionImages:
	UpdatesPlayerStatistics:
		OverrideActor: construction_yard
	Tooltip:
		Name: Corrino Conyard
	WithIdleOverlay@ZAPS:
		RequiresCondition: !build-incomplete
		Sequence: idle-zaps

conyard.smuggler:
	Inherits: construction_yard
	Buildable:
		Queue: Building
		BuildDuration: 6000
		BuildDurationModifier: 100
		BuildPaletteOrder: 1006
		Prerequisites: ~merged.smuggler
		ForceFaction: smuggler
	RenderSprites:
		Image: conyard.smuggler
		-FactionImages:
	UpdatesPlayerStatistics:
		OverrideActor: construction_yard
	Tooltip:
		Name: Smuggler Conyard
	WithIdleOverlay@ZAPS:
		RequiresCondition: !build-incomplete
		Sequence: idle-zaps

conyard.mercenary:
	Inherits: construction_yard
	Buildable:
		Queue: Building
		BuildDuration: 6000
		BuildDurationModifier: 100
		BuildPaletteOrder: 1007
		Prerequisites: ~merged.mercenary
		ForceFaction: mercenary
	RenderSprites:
		Image: conyard.mercenary
		-FactionImages:
	UpdatesPlayerStatistics:
		OverrideActor: construction_yard
	Tooltip:
		Name: Mercenary Conyard
	WithIdleOverlay@ZAPS:
		RequiresCondition: !build-incomplete
		Sequence: idle-zaps
