^Building:
	InstantlyRepairable:
		Types: Building
	ProductionTimeMultiplier@craneBonus:
		Prerequisites: bonus.crane
		Multiplier: 95
	GrantRandomCondition@randomFX:
		Conditions: explode02, explode03
	Explodes@02:
		Type: CenterPosition
		Weapon: buildingExplosions02
		EmptyWeapon: buildingExplosions02
		Chance: 50
		Offset: 1,0,1
		RequiresCondition: explode02 && !being-demolished
	Explodes@03:
		Type: CenterPosition
		Weapon: buildingExplosions03
		EmptyWeapon: buildingExplosions03
		Chance: 50
		Offset: 1,2,1
		RequiresCondition: (explode02 || explode03) && !being-demolished
	Explodes@sabotuerdemolition:
		RequiresCondition: being-demolished
		Type: CenterPosition
		Weapon: buildingBigExplosion
		EmptyWeapon: buildingBigExplosion
	ThrowsShrapnel:
		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: 200
		RequiresCondition: vulnerable
	ExternalCondition@jammed:
		Condition: jammed
	RevealsShroudMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 25
	DetectCloakedMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 5

construction_yard:
	Health:
		HP: 95000
	GrantConditionOnPrerequisite@armor:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	RevealsShroud:
		Range: 5c768
	StoresResources:
		Capacity: 2000
	Power:
		Amount: 50
	ThrowsShrapnel:
		Weapons: Debris, Debris2
		Pieces: 1, 3
		Range: 1c0, 2c0
	ThrowsShrapnel@longer:
		Weapons: Debris, Debris2, Debris3, Debris4
		Pieces: 5, 7
		Range: 3c0, 6c0
	ThrowsShrapnel@longest:
		Weapons: Debris4, DerbisSiegetank
		Pieces: 0, 3
		Range: 6c0, 10c0
	Explodes@02:
		RequiresCondition: explode02
	Explodes@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

concretea:
	D2kBuilding:
		Footprint: xxxx xxxx xxxx xxxx
		Dimensions: 4,4
	Buildable:
		Prerequisites: ~!global-auto-concrete, !choosefaction
		BuildPaletteOrder: 670
		BuildDuration: 50
	Valued:
		Cost: 25

concreteb:
	D2kBuilding:
		Footprint: xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx
		Dimensions: 6,6
	Buildable:
		Prerequisites: upgrade.conyard, ~!global-auto-concrete, !choosefaction
		BuildPaletteOrder: 660
		BuildDuration: 100

wind_trap:
	Buildable:
		Prerequisites: !choosefaction
		BuildDuration: 250
		BuildDurationModifier: 100
	Selectable:
		Bounds: 2048, 2048
	Valued:
		Cost: 250
	Health:
		HP: 35000
	GrantConditionOnPrerequisite:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	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: 400
	Valued:
		Cost: 500
	Health:
		HP: 40000
	GrantConditionOnPrerequisite:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	RevealsShroud:
		Range: 3c768
	GrantConditionOnFaction@fremenExit:
		Condition: fremen
		Factions: fremen
	Exit@1:
		RequiresCondition: !fremen
	Exit@2:
		RequiresCondition: !fremen
	Exit@3:
		SpawnOffset: -0,700,0
		ExitCell: 0,2
		RequiresCondition: fremen
	Exit@4:
		SpawnOffset: -0,700,0
		ExitCell: 1,2
		RequiresCondition: fremen
	RenderSprites:
		Image: barracks.ordos
		FactionImages:
			atreides: barracks.atreides
			fremen: barracks.fremen
			harkonnen: barracks.harkonnen
			corrino: barracks.corrino
			smuggler: barracks.ordos
			mercenary: barracks.smuggler
	Power:
		Amount: -50
	GrantConditionOnProduction@ClusterdebrisExplosion:
		Condition: producing
	ThrowsShrapnel@explosiveDerbis:
		Weapons: DeathHandClusterDebris
		Pieces: 0, 1
		Range: 1c0, 2c0
		RequiresCondition: producing
	ProvidesPrerequisite@smugler:
		Prerequisite: barracks.smuggler
		Factions: smuggler
		RequiresPrerequisites: factions.subfaction_allowed
	ProvidesPrerequisite@corrino:
		Prerequisite: barracks.corrino
		Factions: corrino
	ProvidesPrerequisite@mercenary:
		Prerequisite: barracks.mercenary
		Factions: mercenary
	ProvidesPrerequisite@fremen:
		Prerequisite: barracks.fremen
		Factions: fremen
	ProvidesPrerequisite@fremenMerged:
		Prerequisite: barracks.fremen
		RequiresPrerequisites: merged.fremen
		ResetOnOwnerChange: false


refinery:
	PlaceBuildingVariants:
		Actors: refinery_inverted
		Facings: 384, 896
	Buildable:
		BuildDuration: 600
	GrantConditionOnPrerequisite:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Valued:
		Cost: 1500
	Health:
		HP: 42000
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	RevealsShroud:
		Range: 3c768
	StoresResources:
		Capacity: 2000
	FreeActorWithDelivery:
		Actor: harvester
		DeliveryOffset: 2,2
		DeliveringActor: carryall.reinforce
		Facing: 160
	CustomSellValue:
	Sellable:
		RequiresCondition: !build-incomplete && !being-demolished
		SellSounds: BUILD1.WAV
	Power:
		Amount: -75
	Explodes@big04:
		Type: CenterPosition
		Weapon: buildingExplosions04_big
		EmptyWeapon: buildingExplosions04_big
		Chance: 100
		Offset: 2,2,1
	ThrowsShrapnel:
		Weapons: Debris, Debris2, Debris3, Debris4, HarvesterSpiceExplosion
		Pieces: 7, 15
		Range: 2c0, 10c0
	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, 0, 1024
	WithIdleOverlay@top:
		Sequence: idle-top
		RequiresCondition: !build-incomplete
	Refinery:
		DockAngle: 128
		DockOffset: 0,1
		TickRate: 20
	Tooltip:
		Name: Spice Refinery Inverted
	D2kBuilding:
		Footprint: === =xx xx=
		Dimensions: 3,3
		LocalCenterOffset: 0,-512,0
	HitShape:
		Type: Rectangle
			TopLeft: -512, 0
			BottomRight: 1536, 1024
	HitShape@BOTTOM:
		Type: Rectangle
			TopLeft: -1536, 1024
			BottomRight: 512, 2048
	ProvidesPrerequisite:
		Prerequisite: refinery
	FreeActorWithDelivery:
		DeliveryOffset: 0,0

silo:
	GrantConditionOnPrerequisite@vision:
		Condition: SiloUpgrade
		Prerequisites: upgrade.silo
	Buildable:
		BuildPaletteOrder: 650
		BuildDuration: 200
	Valued:
		Cost: 250
	Health:
		HP: 18000
	GrantConditionOnPrerequisite@armor:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	RevealsShroud@basic:
		Range: 2c768
	RevealsShroud@upg:
		Range: 8c768
		RequiresCondition: SiloUpgrade
	StoresResources:
		Capacity: 2000
	Power:
		Amount: -25
	ThrowsShrapnel:
		Weapons: Debris, Debris2, Debris3, Debris4
		Pieces: 3, 5
		Range: 2c0, 5c0
	ProvidesPrerequisite@silo:

upgrade.silo:
	AlwaysVisible:
	Interactable:
	ScriptTriggers:
	Tooltip:
		Name: Silo Upgrade
	Buildable:
		BuildPaletteOrder: 25
		Prerequisites: silo, ~!choosefaction, ~enhancedAirCombat
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 750
		BuildDurationModifier: 100
		Description: Greatly increases vision range of Silo
	Valued:
		Cost: 500
	RenderSprites:
		Image: silo.ordos
		FactionImages:
			atreides: silo.atreides
			fremen: silo.atreides
			harkonnen: silo.harkonnen
			corrino: silo.harkonnen
	ProvidesPrerequisite@upgradename:

light_factory:
	Buildable:
		Prerequisites: refinery
		BuildDuration: 450
	GrantConditionOnPrerequisite:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Valued:
		Cost: 750
	Health:
		HP: 43000
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	RevealsShroud:
		Range: 5c768
	Power:
		Amount: -100
	ThrowsShrapnel:
		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, mercenary, smuggler
	ProvidesPrerequisite@trike:
		Prerequisite: light.trike
		Factions: atreides, harkonnen, corrino, mercenary, fremen
	ProvidesPrerequisite@raider:
		Prerequisite: light.raider
		Factions: ordos
	ProvidesPrerequisite@crawler:
		Prerequisite: light.crawler
		Factions: smuggler
	GrantConditionOnPrerequisite@smugglertech:
		Condition: smugglertech
		Prerequisites: merged.smuggler
	GrantCondition@smuggler:
		Condition: enable_hunter
		GrantPermanently: true
		RequiresCondition: smugglertech
	ProvidesPrerequisite@smuglglertech:
		RequiresCondition: enable_hunter
		Prerequisite: light.hunter
	

heavy_factory:
	Buildable:
		Prerequisites: light_factory
		BuildDuration: 700
	Valued:
		Cost: 1500
	Health:
		HP: 47000
	RenderSprites:
		Image: heavy.ordos
		FactionImages:
			atreides: heavy.atreides
			fremen: heavy.atreides
			harkonnen: heavy.harkonnen
			corrino: heavy.corrino
			mercenary: heavy.mercenary
	GrantConditionOnPrerequisite:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	RevealsShroud:
		Range: 4c768
	Power:
		Amount: -150
	ProvidesPrerequisite@missile_tank:
		Prerequisite: heavy.missile_tank
		Factions: atreides, fremen, harkonnen, corrino, 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, smuggler
		RequiresCondition: subfaction_mode
	ProvidesPrerequisite@harkonnen_combat_subfactions:
		Prerequisite: heavy.harkonnen_combat
		Factions: harkonnen
		RequiresCondition: subfaction_mode
	ProvidesPrerequisite@cheap_tank:
		Prerequisite: heavy.cheap_tank
		Factions: fremen, mercenary
		RequiresCondition: subfaction_mode
	ProvidesPrerequisite@corrinotank:
		Prerequisite: heavy.corrino_combat
		Factions: corrino
		RequiresCondition: subfaction_mode
	GrantConditionOnPrerequisite@combattankslogic:
		Prerequisites: factions.subfaction_allowed
		Condition: subfaction_mode
	GrantConditionOnProduction@debrisExplosion:
		Condition: producing
	ThrowsShrapnel:
		Weapons: Debris, Debris2, Debris3, Debris4
		Pieces: 10, 20
		Range: 1c0, 5c0
	ThrowsShrapnel@explosiveDerbis:
		Weapons: DeathHandClusterDebris
		Pieces: 0, 1
		Range: 1c0, 3c0
	ThrowsShrapnel@explosiveDerbiswhenproducing:
		Weapons: DeathHandClusterDebris
		Pieces: 1, 2
		Range: 1c0, 5c0
		RequiresCondition: producing
	SpawnActorOnDeath@bigcrater:
		Offset: 0,2

outpost:
	Buildable:
		BuildDuration: 500
		Description: Provides a radar map of the battlefield.\nDetects invisible units\nRequires power to operate\n Except for the Fremen
	Valued:
		Cost: 1000
	Health:
		HP: 44000
	GrantConditionOnPrerequisite:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	RevealsShroud:
		Range: 9c768
		RequiresCondition: !disabled
	RevealsShroud@lowpower:
		Range: 3c768
		RequiresCondition: disabled
	Power:
		Amount: -125
		RequiresCondition: !fremen
	Power@FREMEN:
		Amount: 0
		RequiresCondition: fremen
	ProvidesRadar:
		RequiresCondition: !disabled || fremen
	DetectCloaked:
		Range: 4c768
		RequiresCondition: !disabled
	ProvidesPrerequisite@mercenary:
		Prerequisite: outpost.mercenary
		Factions: mercenary
		RequiresPrerequisites: factions.merged
	ProvidesPrerequisite@fremen:
		Prerequisite: outpost.fremen
		Factions: fremen
	GrantConditionOnFaction@fremen:
		Condition: fremen
		Factions: fremen
	GrantExternalConditionPower@HIDE_UNITS_ENABLED:
		RequiresCondition: fremen
		OrderName: FremenHideUnits
		Prerequisites: ~upgrade.outpost_fremen, ~!factions.standard
		Icon: hide_units
		ChargeInterval: 4500
		Name: Hide Army
		Description: Makes units in selected area permanently invisible
		Duration: -1
		SelectTargetTextNotification: Select target.
		DisplayRadarPing: True
		Condition: hidden
		OnFireSound: audio/EBoD_hidenunits1.wav
		SupportPowerPaletteOrder: 85
		Dimensions: 3, 3
		Footprint: xxx xxx xxx
		Sequence: invisible
	GrantConditionOnPrerequisite@frementech:
		Condition: frementech
		Prerequisites: merged.fremen
	GrantCondition@permanentConditionFremen:
		Condition: enable_hideunits
		GrantPermanently: true
		RequiresCondition: frementech
	ProvidesPrerequisite@frementech:
		RequiresCondition: enable_hideunits
		Prerequisite: outpost.fremen
	GrantCondition@enableFremenCondition:
		Condition: fremen
		GrantPermanently: true
		RequiresCondition: enable_hideunits
	ProvidesPrerequisite@mercenarytech:
		Prerequisite: outpost.smuggler
		RequiresPrerequisites: merged.smuggler



starport:
	Buildable:
		BuildDuration: 650
		Prerequisites: heavy_factory, outpost, ~techlevel.high, ~!factions.merged
	Valued:
		Cost: 1500
	Health:
		HP: 46000
	D2kBuilding:
		Footprint: xxx +=+ =x=
		Dimensions: 3,3
	Production:
		Produces: Starport
	RenderSprites:
		Image: starport.ordos
		FactionImages:
			atreides: starport.atreides
			fremen: starport.atreides
			harkonnen: starport.harkonnen
			corrino: starport.harkonnen
			smuggler: starport.smuggler
			mercenary: starport.mercenary
	GrantConditionOnPrerequisite:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	RevealsShroud:
		Range: 3c768
	Tooltip@smuggler:
		Name: Smuggler Starport
		RequiresCondition: smuggler
	Tooltip@mercenary:
		Name: Mercenary Starport
		RequiresCondition: mercenary
	Tooltip:
		RequiresCondition: !smuggler && !mercenary
	Power:
		Amount: -150
	-Explodes@02:
	ExternalCondition@lights:
		Condition: frigate_proximity_influence
	WithIdleOverlay@LIGHTS:
		RequiresCondition: !build-incomplete && frigate_proximity_influence
		Sequence: active
		Palette: starportlights
	ProvidesPrerequisite@cloak_frigate:
		Prerequisite: cloak.frigate
	ProvidesPrerequisite@atreides_combat:
		Prerequisite: starport.atreides_combat
		Factions: atreides
	ProvidesPrerequisite@ordos_combat:
		Prerequisite: starport.ordos_combat
		Factions: ordos, smuggler
	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: fremen, 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
	Explodes@03:
		Type: CenterPosition
		Weapon: buildingExplosions05
		EmptyWeapon: buildingExplosions05
		Chance: 80
	ProduceActorPower@contractors:
		Name: Hire Contractors
		Description: 5 elite mercenaries with an accurate deployable cannons\n Huge firepower and slow reload\nDelivered in Heavy Armored Transporter\n Armed with a laser device that slows down targets
		Icon: mercenary
		RequiresCondition: mercenary
		Prerequisites: upgrade.starport, ~techlevel.superweapons, ~!factions.standard
		Actors: merc_apc
		Type: Starport
		ChargeInterval: 3000
		OrderName: ProduceActorPower.contractors
		SupportPowerPaletteOrder: 60
	GrantConditionOnPrerequisite@merchtech:
		Condition: mercenary
		Prerequisites: merged.mercenary

wall:
	Buildable:
		BuildDuration: 150
	Valued:
		Cost: 250
	Health:
		HP: 20000
	Armor:
		Type: wall
	RevealsShroud:
		Range: 1c768
	LineBuild:
		Range: 6
		NodeTypes: wall, turret

medium_gun_turret:
	Inherits@chaosbomb: ^chaos_bomb_influence
	Inherits@jammer: ^jammedvision
	-AttackWander:
	Buildable:
		Prerequisites: outpost
		BuildDuration: 400
		Description: Defensive structure.\n Strong vs Infantry, Light Vehicles\n Weak vs Tanks, Artillery\nDetects invisible units
	Valued:
		Cost: 750
	Health:
		HP: 30000
	Armor:
		Type: wall
	RevealsShroud:
		Range: 5c768
	Turreted:
		TurnSpeed: 24
		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
		RequiresCondition: !chaos_bomb
	Armament@chaos_bomb_influence:
		Weapon: 110mm_Gun
		LocalOffset: 512,0,432
		MuzzleSequence: muzzle
		Recoil: 200
		RecoilRecovery: 25
	Power:
		Amount: -50
	DetectCloaked:
		Range: 2c768
	ExternalCondition@jammed:
		Condition: jammed
	RevealsShroudMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 25
	DetectCloakedMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 5

large_gun_turret:
	Inherits@AUTOTARGET: ^AutoTargetAll
	Inherits@Jammer: ^jammedvision
	Inherits@chaosbomb: ^chaos_bomb_influence
	-AttackWander:
	Buildable:
		Prerequisites: high_tech_factory, upgrade.conyard, ~techlevel.medium
		BuildDuration: 450
		Description: Defensive structure.\n Strong vs Tanks, Aircraft\n Weak vs Infantry, Artillery\nDetects invisible units\nRequires power to operate
	Valued:
		Cost: 1000
	Health:
		HP: 30000
	Armor:
		Type: wall
	RevealsShroud:
		Range: 6c768
	Armament:
		Weapon: MissleTowerNew
		LocalOffset: 256,384,768, 256,-384,768
		RequiresCondition: !chaos_bomb
	Armament@chaos_bomb_influence:
		Weapon: MissleTowerNew
		LocalOffset: 256,384,768, 256,-384,768
	Turreted:
		TurnSpeed: 32
	Power:
		Amount: -75
	DetectCloaked:
		Range: 2c768
	ExternalCondition@jammed:
		Condition: jammed
	RevealsShroudMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 25
	DetectCloakedMultiplier@jammed:
		RequiresCondition: jammed
		Modifier: 5

repair_pad:
	Buildable:
		Queue: Building
		Prerequisites: heavy_factory, ~techlevel.medium, ~!repair_pad.bot
		BuildDuration: 400
	Valued:
		Cost: 750
	GrantConditionOnPrerequisite:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Health:
		HP: 41000
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	RevealsShroud:
		Range: 3c768
	Capturable:
		RequiresCondition: !build-incomplete
		Types: building
		CancelActivity: true
	Power:
		Amount: -50
	-Explodes@02:
	Explodes@03:
		Type: CenterPosition
		Weapon: buildingExplosions05
		EmptyWeapon: buildingExplosions05
		Chance: 80



repair_pad.bot:
	Inherits: repair_pad
	Buildable:
		Queue: Building
		Prerequisites: heavy_factory, ~techlevel.medium, ~repair_pad.bot
	Tooltip:
		Name: Repair Pad - bot dummy
	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: 600
	Valued:
		Cost: 1250
	Health:
		HP: 45000
	GrantConditionOnPrerequisite:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	RevealsShroud:
		Range: 4c768
	Power:
		Amount: -100
	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@Corrinodropship:
		Condition: harkonnen
		Factions: harkonnen
	ProvidesPrerequisite@enableupgradeStandard_enhancedAir:
		Prerequisite: hightech.enableupgrade
		Factions: atreides, ordos, harkonnen, corrino
	ProvidesPrerequisite@enableupgradeSubfaction:
		Prerequisite: hightech.enableupgrade
		RequiresPrerequisites: ~factions.subfaction_allowed
		Factions: mercenary, smuggler, fremen, corrino
	-AirstrikePower:
	AirstrikePower@ATREIDES_ENABLED:
		OrderName: AtreidesEnabledAirstrike
		Icon: ornistrike
		Name: Air Strike
		Prerequisites: ~techlevel.superweapons, upgrade.hightech
		ChargeInterval: 6000
		SquadSize: 3
		SquadOffset: -1024, 1024, 0
		Description: 3 Ornithopters drops a heavy grenades at the target location
		UnitType: ornithopter_bomb
		DisplayBeacon: True
		CameraActor: camera
		RequiresCondition: atreides
		CameraRemoveDelay: 60
		ArrowSequence: arrow
		CircleSequence: circles
		UseDirectionalTarget: True
		DirectionArrowAnimation: ornidirection
		SupportPowerPaletteOrder: 120
		EndChargeTextNotification: Airstrike ready.
		SelectTargetTextNotification: Select target.
	AirstrikePower@HARKONNEN_ENABLED:
		OrderName: HarkonnenEnabledAirstrike
		Icon: lightStrike
		Name: Air Support
		Prerequisites: ~techlevel.superweapons, upgrade.hightech
		ChargeInterval: 5250
		SquadSize: 5
		SquadOffset: -1024, 2048, 0
		Description: 5 Ornithopters with a heavy machine guns hit at the target location
		UnitType: ornithopter_mg
		DisplayBeacon: True
		CameraActor: camera
		RequiresCondition: harkonnen
		CameraRemoveDelay: 60
		ArrowSequence: arrow
		CircleSequence: circles
		UseDirectionalTarget: True
		DirectionArrowAnimation: ornidirection
		SupportPowerPaletteOrder: 105
		EndChargeTextNotification: Airstrike ready.
		SelectTargetTextNotification: Select target.
	AirstrikePower@ORDOS_ENABLED:
		OrderName: OrdosEnabledAirstike
		Icon: gascloud
		RequiresCondition: ordos
		Name: Deviator Bomb Drop
		Prerequisites: ~techlevel.superweapons, upgrade.hightech
		ChargeInterval: 4500
		SquadSize: 1
		SquadOffset: -1024, 2048, 0
		Description: Carryall drops a bomb filled with Deviator gas at the target location
		UnitType: carryall.bomber
		DisplayBeacon: True
		CameraActor: camera
		CameraRemoveDelay: 60
		ArrowSequence: arrow
		CircleSequence: circles
		UseDirectionalTarget: True
		DirectionArrowAnimation: ornidirection
		SupportPowerPaletteOrder: 90
		EndChargeTextNotification: Airstrike ready.
		SelectTargetTextNotification: Select target.
	ParatroopersPower@CORRINO_ENABLED:
		UnitType: carryall.reinforce
		RequiresCondition: corrino
		OrderName: CorrinoDrop
		Prerequisites: ~techlevel.superweapons, upgrade.hightech
		SquadSize: 3
		SquadOffset: -2048, 1024, 0
		Icon: sardaukarFleet
		ChargeInterval: 6750
		Name: Sardaukar Air Descent
		Description: Carryall squadron drops 15 Sardaukars on target location
		DropItems: mpsardaukar, mpsardaukar, mpsardaukar, mpsardaukar, mpsardaukar, mpsardaukar, mpsardaukar, mpsardaukar, mpsardaukar, mpsardaukar, mpsardaukar, mpsardaukar, mpsardaukar, mpsardaukar, mpsardaukar
		ReinforcementsArrivedTextNotification: Reinforcements have arrived.
		SelectTargetTextNotification: Select target.
		AllowImpassableCells: true
		QuantizedFacings: 8
		CameraActor: camera
		DisplayBeacon: true
		ArrowSequence: arrow
		CircleSequence: circles
		UseDirectionalTarget: True
		DirectionArrowAnimation: ornidirection
		SupportPowerPaletteOrder: 135





research_centre:
	Buildable:
		BuildDuration: 750
		Prerequisites: heavy_factory, high_tech_factory, ~techlevel.high
	Valued:
		Cost: 1750
	Health:
		HP: 39000
	GrantConditionOnPrerequisite:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	RevealsShroud:
		Range: 4c768
	Power:
		Amount: -175
	RenderSprites:
		Image: research.ordos
		FactionImages:
			atreides: research.atreides
			fremen: research.atreides
			harkonnen: research.harkonnen
			corrino: research.harkonnen
			smuggler: research.smuggler
	ProvidesPrerequisite@shutup:
		Prerequisite: research_centre.smuggler
		Factions: smuggler
	GrantConditionOnFaction@jammerkkekw:
		Condition: smuggler
		Factions: smuggler
	GrantExternalConditionPower@JAM_VISION_ENABLED:
		OrderName: SmugglerJammer
		RequiresCondition: smuggler
		Prerequisites: ~techlevel.superweapons, upgrade.research
		Icon: jammer
		ValidRelationships: Enemy, Neutral
		ChargeInterval: 3750
		Name: Jam Comms
		Description: Greatly decreases unit and building vision\nRemoves invisibility detection for 30 seconds
		Duration: 750
		SelectTargetTextNotification: Select target.
		InsufficientPowerTextNotification: Insufficient power.
		DisplayRadarPing: True
		Condition: jammed
		OnFireSound: audio/ironcur9.aud
		SupportPowerPaletteOrder: 75
		Dimensions: 5, 5
		Footprint: xxxxx xxxxx xxxxx xxxxx xxxxxx
		Sequence: idle


palace:
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
	Buildable:
		Prerequisites: research_centre, ~techlevel.high, ~!factions.subfaction_allowed
		Queue: Building
		BuildPaletteOrder: 620
		BuildDuration: 937
		BuildDurationModifier: 100
		Description: Unlocks elite infantry and weapons.\nRequires power to operate
	Selectable:
		Bounds: 3072, 3072
	Valued:
		Cost: 2000
	Tooltip:
		Name: Palace
	D2kBuilding:
		Footprint: xx= xxx =xx
		Dimensions: 3,3
	Health:
		HP: 83000
	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:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	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
	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:
		OrderName: DeathHand_Standart
		Cursor: nuke
		Icon: deathhand
		PauseOnCondition: disabled
		MissileDelay: 18
		DetonationAltitude: 6c0
		RequiresCondition: harkonnen
		RemoveMissileOnDetonation: True
		Prerequisites: ~techlevel.superweapons, ~palace.nuke
		ChargeInterval: 7500
		Name: Death Hand
		Description: Launches an unstoppable atomic missile\nDestroy almost everything at the target location
		BeginChargeSpeechNotification: DeathHandMissilePrepping
		EndChargeSpeechNotification: DeathHandMissileReady
		IncomingSpeechNotification: MissileLaunchDetected
		MissileWeapon: deathhand
		SpawnOffset: 32,816,0
		DisplayBeacon: True
		DisplayRadarPing: True
		CameraRange: 10c0
		CameraRemoveDelay: 160
		ArrowSequence: arrow
		CircleSequence: circles
		FlightVelocity: 384
		TrailInterval: 0
		TrailImage: large_trail
		TrailSequences: idle
		SupportPowerPaletteOrder: 145
		MissileImage: deathhand
	-ProduceActorPower@fremen:
	ProduceActorPower@fremen_standart:
		Name: Noble Fremens
		Description: Invisible warriors of Dune loyal to the Duke\nArmed with anti-vehicle sound weapon\nRegenerates to full health
		Icon: fremen
		PauseOnCondition: disabled
		RequiresCondition: atreides
		Prerequisites: ~techlevel.superweapons, ~palace.fremen, ~factions.standard, !~factions.allowed
		Actors: fremen, fremen, fremen, fremen, fremen
		Type: Fremen
		ChargeInterval: 2250
		OrderName: ProduceActorPower.Fremen_Standart
		SupportPowerPaletteOrder: 45
	ProduceActorPower@saboteur_standart:
		Name: Saboteur
		Description: Stealth infantry, armed with explosives\nCan explode buildings or a huge area around himself
		Icon: saboteur
		PauseOnCondition: disabled
		RequiresCondition: ordos
		Prerequisites: ~techlevel.superweapons, ~palace.saboteur, ~factions.standard, !~factions.allowed
		Actors: saboteur
		Type: Saboteur
		ChargeInterval: 1500
		OrderName: ProduceActorPower.Saboteur
		SupportPowerPaletteOrder: 30
	-ProduceActorPower@saboteur:
	AirstrikePower@chaosbombMerged:
		Icon: gascloud
		Name: Chaos bomb
		ChargeInterval: 7500
		SquadSize: 1
		StartFullyCharged: false
		PauseOnCondition: disabled
		Prerequisites: ~techlevel.high, ~palace.saboteur, ~factions.merged
		Description: Carryall drops a bomb filled with Deviator gas
		UnitType: carryall.bomber
		DisplayBeacon: True
		CameraActor: camera
		CameraRemoveDelay: 75
		ArrowSequence: arrow
		UseDirectionalTarget: True
		DirectionArrowAnimation: airstrike_direction
		CircleSequence: circles
		SupportPowerPaletteOrder: 90
		OrderName: Orderproduction.chaosbombmerged
	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
	Exit@4:
		SpawnOffset: -704,768,0
		ExitCell: 0,2
	Production@Atreides:
		Produces: Fremen
		RequiresCondition: atreides
	Production@OfficerSpawn:
		Produces: Officer
		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: 2000
	Health:
		HP: 83000
	GrantConditionOnPrerequisite@armor:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	RevealsShroud:
		Range: 4c768
	Power:
		Amount: -200
	Buildable:
		Prerequisites: research_centre, ~techlevel.high, ~factions.subfaction_allowed, ~conyard.harkonnen
		Queue: Building
		BuildPaletteOrder: 620
		BuildDuration: 1000
		BuildDurationModifier: 100
		Description: Unlocks elite infantry and weapons.\nRequires power to operate
	Selectable:
		Bounds: 3072, 3072
	Tooltip:
		Name: Harkonnen Palace
	D2kBuilding:
		Footprint: xx= xxx =xx
		Dimensions: 3,3
	Health:
		HP: 83000
	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
		ChargeInterval: 7500
		MissileWeapon: deathhand
		MissileDelay: 18
		Name: Death Hand
		SpawnOffset: 32,816,0
		DetonationAltitude: 6c0
		RemoveMissileOnDetonation: True
		FlightVelocity: 384
		TrailInterval: 0
		TrailImage: large_trail
		TrailSequences: idle
		CameraRemoveDelay: 80
		PauseOnCondition: disabled
		Description: Launches an unstoppable atomic missile\nDestroy almost everything at the target location
		BeginChargeSpeechNotification: DeathHandMissilePrepping
		EndChargeSpeechNotification: DeathHandMissileReady
		IncomingSpeechNotification: MissileLaunchDetected
		DisplayBeacon: True
		DisplayRadarPing: True
		CameraRange: 10c0
		ArrowSequence: arrow
		SupportPowerPaletteOrder: 145
		MissileImage: deathhand
		OrderName: DeathHand_Enabled
	SupportPowerChargeBar:
	ProvidesPrerequisite@buildingname:

palace.atreides:
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
	PrimaryBuilding:
		ProductionQueues: Fremen
	Buildable:
		Prerequisites: research_centre, ~techlevel.high, ~factions.subfaction_allowed, ~conyard.atreides
		Queue: Building
		BuildPaletteOrder: 620
		BuildDuration: 1000
		BuildDurationModifier: 100
		Description: Unlocks elite infantry and weapons.\nRequires power to operate
	Selectable:
		Bounds: 3072, 3072
	RallyPoint:
	Valued:
		Cost: 2000
	Tooltip:
		Name: Atreides Palace
	D2kBuilding:
		Footprint: xx= xxx =xx
		Dimensions: 3,3
	Health:
		HP: 83000
	GrantConditionOnPrerequisite:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	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: -704,768,0
		ExitCell: -1,2
	Exit@2:
		SpawnOffset: -704,768,0
		ExitCell: -1,3
	Exit@3:
		SpawnOffset: -704,768,0
		ExitCell: 0,3
	Exit@4:
		SpawnOffset: -704,768,0
		ExitCell: 0,2
	RevealsShroud:
		Range: 4c768
	ProduceActorPower@Fremen_Enabled:
		Name: Noble Fremens
		Description: Invisible warriors of Dune loyal to the Duke\nArmed with anti-vehicle sound weapon\nRegenerates to full health
		Actors: fremen, fremen, fremen, fremen, fremen
		Type: Fremen
		ChargeInterval: 2250
		Icon: fremen
		PauseOnCondition: disabled
		Prerequisites: ~techlevel.superweapons, ~factions.subfaction_allowed
		OrderName: ProduceActorPower.Fremen_Standart
		SupportPowerPaletteOrder: 45
	Production@Atreides_enabled:
		Produces: Fremen
	SupportPowerChargeBar:
	ProvidesPrerequisite@buildingname:


palace.ordos:
	Inherits: ^Building
	Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
	PrimaryBuilding:
		ProductionQueues: Saboteur
	Buildable:
		Prerequisites: research_centre, ~techlevel.high, ~factions.subfaction_allowed, ~conyard.ordos
		Queue: Building
		BuildPaletteOrder: 620
		BuildDuration: 1000
		BuildDurationModifier: 100
		Description: Unlocks elite infantry and weapons.\nRequires power to operate
	Selectable:
		Bounds: 3072, 3072
	RallyPoint:
	Valued:
		Cost: 2000
	Tooltip:
		Name: Ordos Palace
	D2kBuilding:
		Footprint: xx= xxx =xx
		Dimensions: 3,3
	Health:
		HP: 83000
	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@armor:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	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
	Exit@4:
		SpawnOffset: -704,768,0
		ExitCell: 0,2
	RevealsShroud:
		Range: 4c768
	WithBuildingBib:
		HasMinibib: True
	Power:
		Amount: -200
	SupportPowerChargeBar:
	Production:
		Produces: Building, Elite
	ProduceActorPower@Saboteur_Enabled:
		Name: Saboteur
		Description: Stealth infantry, armed with explosives\nCan explode buildings or a huge area around himself
		Actors: saboteur
		Type: Saboteur
		ChargeInterval: 1500
		Icon: saboteur
		PauseOnCondition: disabled
		Prerequisites: ~techlevel.superweapons, ~factions.subfaction_allowed
		OrderName: ProduceActorPower.Saboteur
		SupportPowerPaletteOrder: 30
	Production@Saboteur_enabled:
		Produces: Saboteur
	ProvidesPrerequisite@buildingname:
	

palace.corrino:
	Inherits: ^Building
	Inherits@PRIMARY: ^PrimaryBuilding
	Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
	Inherits@AUTOTARGET: ^AutoTargetGround
	PrimaryBuilding:
		ProductionQueues: Designator
	Buildable:
		Prerequisites: research_centre, ~techlevel.high, ~conyard.corrino, ~factions.subfaction_allowed
		Queue: Building
		BuildPaletteOrder: 630
		BuildDuration: 1250
		BuildDurationModifier: 100
		Description: Unlocks Emperor Designator.\nHas built-in Bombardment weapons\n Modest vs Everything\nRequires power to operate
	Selectable:
		Bounds: 3072, 3072
	Valued:
		Cost: 2500
	RallyPoint:
	Tooltip:
		Name: Palace Corrino
	D2kBuilding:
		Footprint: xxx xxx ===
		Dimensions: 3,3
	Health:
		HP: 83000
	HitShape:
		Type: Rectangle
			TopLeft: -1536, -512
			BottomRight: 1536, 512
	HitShape@TOP:
		Type: Rectangle
			TopLeft: -1536, -1536
			BottomRight: 1536, -512
	GrantConditionOnPrerequisite@armor:
		Condition: ArmorUpgrade
		Prerequisites: upgrade.conyard
	Armor:
		Type: building
		RequiresCondition: ArmorUpgrade
	Armor@weakArmor:
		Type: buildingWeak
		RequiresCondition: !ArmorUpgrade
	RevealsShroud:
		Range: 4c768
	WithBuildingBib:
		HasMinibib: True
	Power:
		Amount: -250
	Exit@1:
		SpawnOffset: 544,-224,0
		ExitCell: 0,2
	Exit@2:
		SpawnOffset: 544,-224,0
		ExitCell: 1,2
	Exit@3:
		SpawnOffset: 544,-224,0
		ExitCell: 2,2
	ProvidesPrerequisite@buildingname:
	ProduceActorPower@Fremen:
		Name: Emperor Designator
		Description: Target Designator with laser area pointer\nTargets near the laser marked point take double damage
		Actors: officer
		Type: Designator
		ChargeInterval: 1500
		Icon: true_sayer
		PauseOnCondition: disabled
		Prerequisites: ~techlevel.superweapons, ~factions.subfaction_allowed
		OrderName: ProduceActorPower.fremen_enabled
		SupportPowerPaletteOrder: 25
	Production@Corrino_enabled:
		Produces: Designator
	Armament@clusterMissile.palace:
		FireDelay: 5
		Weapon: clusterMissile.palace
		LocalOffset: 128,64,640, 128,-64,640
	WithRangeCircle:
		Range: 8c512
	AttackTurreted:
		PauseOnCondition: disabled
		FacingTolerance: 128
	Turreted:
		TurnSpeed: 50

fremen_sietch:
	Inherits: ^Building
	Inherits@primary: ^PrimaryBuilding
	-D2kBuilding:
	WithBuildingBib:
	Buildable:
		Queue: Building
		BuildPaletteOrder: 640
		BuildDuration: 1000
		BuildDurationModifier: 100
		Prerequisites: research_centre, ~techlevel.high, ~conyard.fremen, ~factions.subfaction_allowed
		Description: Unlocks Worm Rider
	SpawnActorsOnSell:
		ActorTypes: nsfremen
	Valued:
		Cost: 2000
	RevealsShroud:
		Range: 4c768
	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: 83000
	Armor:
		Type: building
	Selectable:
		Bounds: 3072, 3072
	Exit@1:
		SpawnOffset: -704,1024,0
		ExitCell: -1,2
	Exit@2:
		SpawnOffset: -704,1024,0
		ExitCell: -1,3
	SpawnActorPower@wormrider:
		EffectImage: Carryall
		Actor: worm_rider
		Name: Worm Rider
		Description: Deploy Worm Rider who can invoke and ride worm
		ChargeInterval: 7500
		LifeTime: -1
		Icon: sandworm
		StartFullyCharged: false
		Prerequisites: ~techlevel.high
		SupportPowerPaletteOrder: 150
		OrderName: SpawnActorPowerInfoOrder.wormride
	Production@wormriderproduction:
		Produces: Fremen

upgrade.conyard:
	Buildable:
		BuildPaletteOrder: 10
		BuildDuration: 1250
		Prerequisites: ~construction_yard, ~!choosefaction
		Description: Improves building armor\nUnlocks Rocket Turret
	Valued:
		Cost: 1000

upgrade.barracks:
	Buildable:
		Prerequisites: barracks, ~!choosefaction
		BuildDuration: 750
		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.smuggler

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

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

upgrade.outpost_fremen:
	AlwaysVisible:
	Interactable:
	ScriptTriggers:
	Tooltip:
		Name: Fremen Outpost Upgrade
	Buildable:
		BuildPaletteOrder: 50
		Prerequisites: ~!choosefaction, ~outpost.fremen, ~!factions.standard, ~techlevel.superweapons
		Queue: Upgrade
		BuildLimit: 1
		BuildDuration: 1000
		BuildDurationModifier: 100
		Description: Unlocks Hide Army
	Valued:
		Cost: 750
	RenderSprites:
		Image: outpost.atreides
	ProvidesPrerequisite@upgradename:

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

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

merged_upgrade.starport:
	Inherits: upgrade.starport
	RenderSprites:
		Image: starport.mercenary
	Buildable:
		Prerequisites: ~starport, ~!choosefaction, ~merged.mercenary,~factions.merged, merged.mercenary_factory, ~techlevel.superweapons
	ProvidesPrerequisite@enablecontractors:
		Prerequisite: upgrade.starport

upgrade.hightech:
	Buildable:
		Prerequisites: ~!choosefaction, ~hightech.enableupgrade, ~techlevel.superweapons
		BuildDuration: 1500
		Description: Unlocks hight tech support powers
	Valued:
		Cost: 1250
	RenderSprites:
		Image: hightech.atreides
		FactionImages:
			ordos: hightech.ordos
			harkonnen: hightech.harkonnen

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

merged.fremen_sietch:
	Inherits: fremen_sietch
	Buildable:
		Prerequisites: research_centre, ~merged.fremen, ~techlevel.high, ~factions.merged
	RenderSprites:
		Image: fremen_sietch
	ProvidesPrerequisite@name:
	ProvidesPrerequisite@frementech:
		Prerequisite: merged.fremen

merged.corrino_palace:
	Inherits: palace.corrino
	Buildable:
		Prerequisites: research_centre, ~merged.corrino, ~techlevel.high,  ~factions.merged
	RenderSprites:
		Image: palace.corrino
	ProvidesPrerequisite@name:
	Production:
		Produces: palace_corinno
	RallyPoint:
	ProvidesPrerequisite@corrinotech:
		Prerequisite: merged.corrino
	SpawnActorPower@CorrinoTrueSayer:
		EffectImage: frigate.harkonnen
		EffectSequence:
		Actor: dummy.true_sayer
		Icon: true_sayer
		Prerequisites: ~techlevel.superweapons, factions.merged
		ChargeInterval: 3900
		LifeTime: 500
		StartFullyCharged: false
		DeploySound: audio/true_sayer.wav
		LaunchSound: audio/true_sayer.wav
		Name: Emperor's True Sayer
		Description: Reveal target Area
		SupportPowerPaletteOrder: 25
		DisplayBeacon: True
		OrderName: corrino.true_sayer
		DisplayRadarPing: true

merged.starport:
	Inherits: starport
	Buildable:
		Prerequisites: heavy_factory, outpost, ~techlevel.high, ~factions.merged, ~!merged.smuggler
	RenderSprites:
		Image: starport.ordos
		FactionImages:
			atreides: starport.atreides
			fremen: starport.atreides
			harkonnen: starport.harkonnen
			corrino: starport.harkonnen
			smuggler: starport.smuggler
			mercenary: starport.mercenary
	ProvidesPrerequisite@justincase:
		Prerequisite: starport


merged.starport_smuggler:
	Inherits: starport
	Buildable:
		Prerequisites: heavy_factory, outpost, ~techlevel.high, ~factions.merged, ~merged.smuggler
	RenderSprites:
		Image: starport.smuggler
		FactionImages:
			atreides: starport.smuggler
			fremen: starport.smuggler
			harkonnen: starport.smuggler
			corrino: starport.smuggler
			smuggler: starport.smuggler
			mercenary: starport.smuggler
	Tooltip:
		Name: Smugglers Starport
	ProvidesPrerequisite@smugglerstarportmerged:
		Prerequisite: starport.smuggler
	ProvidesPrerequisite@default:
		Prerequisite: starport
	ProvidesPrerequisite@smugllertech:
		Prerequisite: merged.smuggler



merged.mercenary_factory:
	Inherits: heavy_factory
	Buildable:
		BuildDuration: 750
		Prerequisites: refinery, ~merged.mercenary
		Queue: Building
		BuildPaletteOrder: 630
		BuildDurationModifier: 100
		Description: Produces mercenary vehicles
	Tooltip:
		Name: Mercenary Heavy factory
	RenderSprites:
		Image: heavy.mercenary
		FactionImages:
			atreides: heavy.mercenary
			fremen: heavy.mercenary
			harkonnen: heavy.mercenary
			corrino: heavy.mercenary
			mercenary: heavy.mercenary
	ProvidesPrerequisite@actorsname:
	ProvidesPrerequisite@mercenarytech:
		Prerequisite: merged.mercenary
	ProvidesPrerequisite@buildingname:
		Prerequisite: heavy_factory
