<?xml version="1.0" encoding="utf-8"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude">
	<Tags></Tags>
	<Includes>
		<Include
			type="all"
			source="ART:GBPwrPlnt.w3x" />
		<Include
			type="all"
			source="ART:GBPwrPlnt_IDL.w3x" />
		<Include
			type="all"
			source="ART:GBPwrPlnt_ASN.w3x" />
		<Include
			type="all"
			source="ART:GBPwrPlnt_AAN.w3x" />
		<Include
			type="all"
			source="ART:GBPwrPlntD2_SN.w3x" />
		<Include
			type="all"
			source="ART:GBPwrPlntD2_AN.w3x" />
		<Include
			type="all"
			source="ART:GBPwrPlntD3_SN.w3x" />
		<Include
			type="all"
			source="ART:GBPwrPlntD3_AN.w3x" />
		<Include
			type="all"
			source="ART:GBPwrPlntT_SKN.w3x" />
		<Include
			type="all"
			source="ART:GBPwrPlntT_IDL.w3x" />
		<Include
			type="all"
			source="ART:GBPwrPlntTD_SKN.w3x" />
		<!-- Base Object -->
		<Include
			type="instance"
			source="DATA:BaseObjects/BaseStructure.xml" />
	</Includes>
	<GameObject
		id="GDIPowerPlant"
		inheritFrom="BaseStructure"
		ButtonImage="Portrait_GDIPowerPlant"
		SelectPortrait="Portrait_GDIPowerPlant"
		Side="GDI"
		EditorSorting="STRUCTURE"
		TransportSlotCount="1"
		BuildCost="700"
		BuildTime="7"
		EnergyProduction="20"
		EnergyBonus="20"
		CommandSet="GDIPowerPlantCommandSet"
		KindOf="STRUCTURE SELECTABLE IMMOBILE CAN_CAST_REFLECTIONS FS_POWER NOT_AUTOACQUIRABLE AUTO_ACQUIRABLE_BY_AI COVER"
		RadarPriority="STRUCTURE"
		PlacementViewAngle="315d"
		ProductionQueueType="MAIN_STRUCTURE"
		BuildPlacementTypeFlag="MAIN_STRUCTURE"
		EditorName="GDIPowerPlant"
		Description="Desc:GDIPowerPlant"
		TypeDescription="Type:GDIPowerPlant">
		<DisplayName
			xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:GDIPowerPlant</DisplayName>
		<GameDependency>
			<ObjectFilter
				Rule="ANY">
				<IncludeThing>GDIConstructionYard</IncludeThing>
				<IncludeThing>SteelTalonsConstructionYard</IncludeThing>
				<IncludeThing>GDICrane</IncludeThing>
			</ObjectFilter>
		</GameDependency>
		<ArmorSet
			Armor="GDIPowerPlantArmor"
			DamageFX="FactionStructureDamageFX" />
		<SkirmishAIInformation
			BaseBuildingLocation="SPREAD" />
		<Draws>
			<ScriptedModelDraw
				id="ModuleTag_Draw"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT"
					ConditionsYes="NONE">
					<Model
						Name="GBPwrPlnt" />					
				</ModelConditionState>
				<!-- BUILDING -->
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Model
						Name="GBPwrPlnt_ASN" />
				</ModelConditionState>
				<!-- DAMAGED -->
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED">
					<Model
						Name="GBPwrPlntD2_SN" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="GDIPPDamagedSteam"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="GDISiloDamagedDist2"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone03"
						FXParticleSystemTemplate="GDIPPDamagedSmoke"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED">
					<Model
						Name="GBPwrPlntD2_SN" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="GDIPPDamagedSteam"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="GDISiloDamagedDist2"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone03"
						FXParticleSystemTemplate="GDIPPDamagedFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone03"
						FXParticleSystemTemplate="GDIPPDamagedSmoke"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone03"
						FXParticleSystemTemplate="GDIRefineryDamagedDist"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DYING">
					<Model
						Name="GBPwrPlntD3_SN" />
				</ModelConditionState>
				<!-- ANIMATIONS -->
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT"></AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Animation
						AnimationName="GBPwrPlnt_AAN"
						AnimationMode="ONCE" />
					<ParticleSysBone
						BoneName="NONE"
						FXParticleSystemTemplate="Con_Medium"
						FollowBone="true" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED"
					StateName="STATE_Damaged"
					Flags="START_FRAME_FIRST">
					<Animation
						AnimationName="GBPwrPlntD2_AN"
						AnimationMode="MANUAL" />
				</AnimationState>
				<!-- REALLY DAMAGED ANIMATION -->
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED"
					StateName="STATE_ReallyDamaged"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="GBPwrPlntD2_AN"
						AnimationMode="MANUAL" />
					<Script>
						Prev = CurDrawablePrevAnimationState();
						if Prev ~= "STATE_ReallyDamaged" and Prev ~= "TRANS_DamagedToReallyDamaged" then
							CurDrawableSetTransitionAnimState("TRANS_DamagedToReallyDamaged")
						end
					</Script>
				</AnimationState>
				<!-- DYING ANIMATION -->
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DYING">
					<Animation
						AnimationName="GBPwrPlntD3_AN"
						AnimationMode="ONCE" />
					<ParticleSysBone
						BoneName="NONE"
						FXParticleSystemTemplate="Des_Medium"
						FollowBone="false" />
				</AnimationState>
				<!-- Transitions -->
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_DamagedToReallyDamaged">
					<Animation
						AnimationName="GBPwrPlntD2_AN"
						AnimationMode="ONCE" />
				</AnimationState>
			</ScriptedModelDraw>
			<!-- DRAW TURBINE UPGRADE -->
			<ScriptedModelDraw
				id="ModuleTag_Draw_Turbine"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT"
					ConditionsYes="NONE">
					<Model
						Name="" />
				</ModelConditionState>
				<!-- UPGRADED -->
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="AFFECTED_BY_EMP DAMAGED USER_1">
					<Model
						Name="GBPwrPlntTD_SKN" />					
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED USER_1">
					<Model
						Name="GBPwrPlntTD_SKN" />
					<ParticleSysBone
						BoneName="TurbineA"
						FXParticleSystemTemplate="GDIPowerTurbineDistortionA"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="TurbineB"
						FXParticleSystemTemplate="GDIPowerTurbineDistortionA"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="AFFECTED_BY_EMP REALLYDAMAGED USER_1">
					<Model
						Name="GBPwrPlntTD_SKN" />					
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED USER_1">
					<Model
						Name="GBPwrPlntTD_SKN" />
					<ParticleSysBone
						BoneName="TurbineA"
						FXParticleSystemTemplate="GDIPowerTurbineDistortionA"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="TurbineB"
						FXParticleSystemTemplate="GDIPowerTurbineDistortionA"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="AFFECTED_BY_EMP DYING USER_1">
					<Model
						Name="GBPwrPlntTD_SKN" />					
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DYING USER_1">
					<Model
						Name="GBPwrPlntTD_SKN" />
					<ParticleSysBone
						BoneName="TurbineA"
						FXParticleSystemTemplate="GDIPowerTurbineDistortionA"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="TurbineB"
						FXParticleSystemTemplate="GDIPowerTurbineDistortionA"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="AFFECTED_BY_EMP USER_1">
					<Model
						Name="GBPwrPlntT_SKN" />					
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="USER_1">
					<Model
						Name="GBPwrPlntT_SKN" />
					<ParticleSysBone
						BoneName="TurbineA"
						FXParticleSystemTemplate="GDIPowerTurbineDistortionA"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="TurbineB"
						FXParticleSystemTemplate="GDIPowerTurbineDistortionA"
						FollowBone="true" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT"
					Flags="DO_NOT_PLAY_WHEN_UNPOWERED">
					<Animation
						AnimationName="GBPwrPlntT_IDL"
						AnimationMode="LOOP" />
				</AnimationState>
			</ScriptedModelDraw>
			
			<ScriptedModelDraw
				id="ModuleTag_SmokeDraw"
				AttachToBoneInAnotherModule="FXBone01">
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="NONE">
					<Model
						Name="FXInvisBone" />
					<ParticleSysBone
						BoneName="INVISBONE01"
						FXParticleSystemTemplate="GDIPowerSmoke"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="INVISBONE01"
						FXParticleSystemTemplate="GDIPowerSmokeDistortion"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="AFFECTED_BY_EMP">
					<Model
						Name="" />					
				</ModelConditionState>
			</ScriptedModelDraw>			
		</Draws>
		<Behaviors>
			<BuildingBehavior
				id="ModuleTag_BuildingBehavior"
				NightWindowObject="LIGHT_01" />
			<BuildingBehavior
				id="ModuleTag_BuildingBehavior02"
				NightWindowObject="LIGHT_02" />
			<SlowDeath
				id="ModuleTag_Death"
				SinkDelay="3.0s"
				SinkRate="4.0"
				DestructionDelay="8.0s">
				<Sound Type="INITIAL" List="HumanFaction_MediumBuilding_DieMS" />
				<DieMuxData
					DeathTypes="ALL" />
			</SlowDeath>
			<ProductionUpdate
				id="ModuleTag_ProductionUpdate"
				GiveNoXP="true" />
			<PowerUpgrade
				id="ModuleTag_Turbines">
				<TriggeredBy>Upgrade_PowerPlantTurbine</TriggeredBy>
			</PowerUpgrade>
			<SubObjectsUpgrade
				id="ModuleTag_ShowTurbines"
				ShowSubObjects="Turbines TurbineGlows">
				<CustomAnimAndDuration
					AnimState="USER_1"></CustomAnimAndDuration>
				<TriggeredBy>Upgrade_PowerPlantTurbine</TriggeredBy>
			</SubObjectsUpgrade>
			<FXListBehavior
				id="ModuleTag_FXList">
				<DieMuxData
					DeathTypes="ALL"
					DeathTypesForbidden="CATALYST"/>
				<Event
					Index="onTransitionToDamaged"
					FX="FX_BuildDamaged_Medium" />
				<Event
					Index="onTransitionToReallyDamaged"
					FX="FX_BuildDamaged_Medium" />
				<Event
					Index="onTransitionToRubble"
					FX="FX_BuildRubble_Medium" />
			</FXListBehavior>
			<StructureUnpackUpdate
				UnpackTime="1.5s" />
			<xi:include
				href="../../Includes/GenericBuildingRepair.xml" />
			<xi:include
				href="../../Includes/GenericEngineerContain.xml" />
			<xi:include
				href="../../Includes/GenericGDIBuildingDestruction.xml" />
			<xi:include
				href="../../Includes/GenericGDIBuildingSuicide.xml" />
		</Behaviors>
		<AI>
			<AIUpdate
				id="ModulTag_AIForLua"
				AILuaEventsList="GDIPowerPlantFunctions" />
		</AI>
		<Body>
			<ActiveBody
				id="ModuleTag_Body"
				MaxHealth="4000.0" />
		</Body>
		<Geometry
			IsSmall="false">
			<Shape
				Type="CYLINDER"
				MajorRadius="18.0"
				Height="48.0"></Shape>
			<Shape
				Type="CYLINDER"
				MajorRadius="14.0"
				Height="20.0">
				<Offset
					x="13"
					y="35"
					z="0" />
			</Shape>
			<Shape
				Type="CYLINDER"
				MajorRadius="14.0"
				Height="20.0">
				<Offset
					x="-13"
					y="35"
					z="0" />
			</Shape>
			<Shape
				Type="BOX"
				MajorRadius="30.0"
				MinorRadius="32.5"
				Height="18.0">
				<Offset
					x="0"
					y="-9"
					z="0" />
			</Shape>
			<ContactPoint>
				<Pos
					x="-20.0"
					y="24.0"
					z="30" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="26.0"
					y="24.0"
					z="0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="26.0"
					y="-32.0"
					z="30" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="26.0"
					y="24.0"
					z="0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-26.0"
					y="-32.0"
					z="30" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="26.0"
					y="24.0"
					z="0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-26.0"
					y="-32.0"
					z="30" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-20.0"
					y="24.0"
					z="0" />
			</ContactPoint>
		</Geometry>
		<AudioArrayVoice>
			<AudioEntry
				Sound="GDI_PowerPlantSelect"
				AudioType="voiceSelect" />
		</AudioArrayVoice>
		<AudioArraySound>
			<AudioEntry Sound="HumanFaction_MediumBuilding_LightDamageMS" AudioType="soundOnDamaged" />
			<AudioEntry Sound="HumanFaction_MediumBuilding_HeavyDamageMS" AudioType="soundOnReallyDamaged" />
		</AudioArraySound>
		<AudioArraySound>
			<AudioEntry Sound="Amb_FireRubble" AudioType="soundAmbientReallyDamaged" />
		</AudioArraySound>
		<ShadowInfo
			Type="VOLUME" />
		<VisionInfo
			VisionRange="100"
			ShroudClearingRange="400" />
		<ProjectedBuildabilityInfo
			Radius="0"
			BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
	</GameObject>
</AssetDeclaration>