<?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:ABPower_SKN.w3x" />
			<Include
				type="all"
				source="ART:ABPowerBld_SKN.w3x" />
			<Include
				type="all"
				source="ART:ABPowerBld_AAN.w3x" />
			<Include
				type="all"
				source="ART:ABPower_IDLA.w3x" />
			<Include
				type="all"
				source="ART:ABPowerD2_SN.w3x" />
			<Include
				type="all"
				source="ART:ABPowerD2_AN.w3x" />
			<Include
				type="all"
				source="ART:ABPowerD3_SN.w3x" />
			<Include
				type="all"
				source="ART:ABPowerD3_AN.w3x" />
			<Include
				type="all"
				source="ART:ABPowerUpgrade.w3x" />
			<!-- Base Object -->
			<Include
				type="instance"
				source="DATA:BaseObjects/BaseStructure.xml" />
		</Includes>
		<!-- PowerPlant -->
		<GameObject
			id="MG_Alien_Tower"
			inheritFrom="BaseStructure"
			SelectPortrait="Portrait_ALIENTower"
			ButtonImage="Portrait_ALIENTower"
			Side="ALIEN"
			EditorSorting="STRUCTURE"
			Browser="REGION METAGAME ALIEN"
			TransportSlotCount="1"
			BuildCost="1"
			BuildTime="1"
			PlacementViewAngle="315d"
			CommandSet="EmptyCommandSet"
			KindOf="STRUCTURE SELECTABLE IMMOBILE CAN_CAST_REFLECTIONS AUTO_ACQUIRABLE_BY_AI NOT_AUTOACQUIRABLE COVER META_ALIEN_TOWER IGNORE_CAN_NOT_BUILD"
			RadarPriority="STRUCTURE"
			ProductionQueueType="MAIN_STRUCTURE"
			BuildPlacementTypeFlag="MAIN_STRUCTURE"
			EditorName="MG_Alien_Tower"
			Description="Desc:MG_Alien_Tower"
			TypeDescription="Type:MG_Alien_Tower">
			<DisplayName
				xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">NAME:MG_Alien_Tower</DisplayName>
			<ArmorSet
				Armor="AlienPowerProjectorArmor"
				DamageFX="FactionStructureDamageFX" />
			<SkirmishAIInformation
				BaseBuildingLocation="SPREAD" />
			<Draws>
				<ScriptedModelDraw
					id="ModuleTag_Draw"
					OkToChangeModelColor="true">
					<ModelConditionState
						ParseCondStateType="PARSE_DEFAULT">
						<Model
							Name="ABPower_SKN" />
						<ParticleSysBone
							BoneName="FXBone01"
							FXParticleSystemTemplate="AlienPowerPlant"
							FollowBone="true" />
						<ParticleSysBone
							BoneName="FXBone01"
							FXParticleSystemTemplate="AlienPowerPlantGlow"
							FollowBone="true" />
					</ModelConditionState>
					<ModelConditionState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="STRUCTURE_UNPACKING">
						<Model
							Name="ABPowerBld_SKN" />
					</ModelConditionState>
					<ModelConditionState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="RUBBLE">
						<Model
							Name="ABPowerD3_SN" />
					</ModelConditionState>
					<ModelConditionState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="REALLYDAMAGED">
						<Model
							Name="ABPowerD2_SN" />
						<ParticleSysBone
							BoneName="FXBone01"
							FXParticleSystemTemplate="AlienPowerPlant"
							FollowBone="true" />
						<ParticleSysBone
							BoneName="FXBone01"
							FXParticleSystemTemplate="AlienPowerPlantGlow"
							FollowBone="true" />
						<ParticleSysBone
							BoneName="FXBone02"
							FXParticleSystemTemplate="AlienDamageFire01"
							FollowBone="true" />
						<ParticleSysBone
							BoneName="FXBone02"
							FXParticleSystemTemplate="AlienDamageFireGlow01"
							FollowBone="true" />
						<ParticleSysBone
							BoneName="FXBone02"
							FXParticleSystemTemplate="AlienDamageFireGlow02"
							FollowBone="true" />
					</ModelConditionState>
					<ModelConditionState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="DAMAGED">
						<Model
							Name="ABPower_SKN" />
						<Texture
							Original="ABPower"
							New="ABPowerD" />
						<ParticleSysBone
							BoneName="FXBone01"
							FXParticleSystemTemplate="AlienPowerPlant"
							FollowBone="true" />
						<ParticleSysBone
							BoneName="FXBone01"
							FXParticleSystemTemplate="AlienPowerPlantGlow"
							FollowBone="true" />
						<ParticleSysBone
							BoneName="FXBone02"
							FXParticleSystemTemplate="AlienDamageFire01"
							FollowBone="true" />
					</ModelConditionState>
					<AnimationState
						ParseCondStateType="PARSE_DEFAULT"
						StateName="STATE_bored"
						Flags="RANDOMSTART">
						<Animation
							AnimationName="ABPower_IDLA"
							AnimationMode="LOOP" />
					</AnimationState>
					<AnimationState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="STRUCTURE_UNPACKING">
						<Animation
							AnimationName="ABPowerBld_AAN"
							AnimationMode="ONCE" />
					</AnimationState>
					<AnimationState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="RUBBLE"
						StateName="STATE_Rubble"
						Flags="START_FRAME_LAST">
						<Animation
							AnimationName="ABPowerD3_AN"
							AnimationMode="MANUAL" />
						<Script>
							Prev = CurDrawablePrevAnimationState();
							if Prev ~= "STATE_Rubble" and Prev ~= "TRANS_IntoRubble" then
							CurDrawableSetTransitionAnimState("TRANS_IntoRubble")
							end
						</Script>
					</AnimationState>
					<AnimationState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="REALLYDAMAGED"
						StateName="STATE_ReallyDamaged"
						Flags="START_FRAME_LAST">
						<Animation
							AnimationName="ABPowerD2_AN"
							AnimationMode="MANUAL" />
						<Script>
							Prev = CurDrawablePrevAnimationState();
							if Prev ~= "STATE_ReallyDamaged" and Prev ~= "TRANS_IntoReallyDamaged" then
							CurDrawableSetTransitionAnimState("TRANS_IntoReallyDamaged")
							end
						</Script>
					</AnimationState>
					<!--				
					<AnimationState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="DAMAGED"
						StateName="STATE_Damaged"
						Flags="START_FRAME_LAST">
						<Animation
							AnimationName="ABPowerD1"
							AnimationMode="MANUAL" />
						<Script>
							Prev = CurDrawablePrevAnimationState();
							if Prev ~= "STATE_Damaged" and Prev ~= "TRANS_IntoDamaged" then
							CurDrawableSetTransitionAnimState("TRANS_IntoDamaged")
							end
						</Script>
					</AnimationState>
	
					<AnimationState
						ParseCondStateType="PARSE_TRANSITION"
						StateName="TRANS_IntoDamaged">
						<Animation
							AnimationName="ABPowerD1"
							AnimationMode="ONCE"
							AnimationBlendTime="0"/>
					</AnimationState>
	-->
					<AnimationState
						ParseCondStateType="PARSE_TRANSITION"
						StateName="TRANS_IntoReallyDamaged">
						<Animation
							AnimationName="ABPowerD2_AN"
							AnimationMode="ONCE"
							AnimationBlendTime="0" />
					</AnimationState>
					<AnimationState
						ParseCondStateType="PARSE_TRANSITION"
						StateName="TRANS_IntoRubble">
						<Animation
							AnimationName="ABPowerD3_AN"
							AnimationMode="ONCE"
							AnimationBlendTime="0" />
					</AnimationState>
				</ScriptedModelDraw>
				<!-- draw upgrade -->
				<ScriptedModelDraw
					id="ModuleTag_TibCore"
					OkToChangeModelColor="true">
					<ModelConditionState
						ParseCondStateType="PARSE_DEFAULT"
						ConditionsYes="NONE">
						<Model
							Name="" />
					</ModelConditionState>
					<!--
					<ModelConditionState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="STRUCTURE_UNPACKING">
						<Model
							Name="ABPowerUpgrade_ASN" />
					</ModelConditionState>
	-->
					<ModelConditionState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="USER_1 DAMAGED">
						<Model
							Name="ABPowerUpgrade" />
					</ModelConditionState>
					<ModelConditionState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="USER_1 REALLYDAMAGED">
						<Model
							Name="ABPowerUpgrade" />
					</ModelConditionState>
					<ModelConditionState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="USER_1 DYING">
						<Model
							Name="ABPowerUpgrade" />
					</ModelConditionState>
					<ModelConditionState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="USER_1">
						<Model
							Name="ABPowerUpgrade" />
					</ModelConditionState>
					<AnimationState
						ParseCondStateType="PARSE_DEFAULT">
						<Animation
							AnimationName="ABPowerUpgrade"
							AnimationMode="LOOP" />
					</AnimationState>
					<!-- BUILDUP ANIMATION -->
					<!--
					<AnimationState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="STRUCTURE_UNPACKING">
						<Animation
							AnimationName="ABPowerUpgrade_AAN"
							AnimationMode="ONCE" />
						<ParticleSysBone
							BoneName="NONE"
							FXParticleSystemTemplate="Con_Large"
							FollowBone="true" />
					</AnimationState>
	-->
					<!-- DAMAGED ANIMATION -->
					<AnimationState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="DAMAGED"
						StateName="STATE_Damaged"
						Flags="START_FRAME_FIRST">
						<Animation
							AnimationName="ABPowerUpgrade"
							AnimationMode="MANUAL" />
					</AnimationState>
					<!-- REALLY DAMAGED ANIMATION -->
					<AnimationState
						ParseCondStateType="PARSE_NORMAL"
						ConditionsYes="REALLYDAMAGED"
						StateName="STATE_ReallyDamaged"
						Flags="START_FRAME_LAST">
						<Animation
							AnimationName="ABPowerUpgrade"
							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="ABPowerUpgrade"
							AnimationMode="ONCE" />
						<ParticleSysBone
							BoneName="NONE"
							FXParticleSystemTemplate="Des_Large"
							FollowBone="false" />
					</AnimationState>
					<!-- Transitions -->
					<AnimationState
						ParseCondStateType="PARSE_TRANSITION"
						StateName="TRANS_DamagedToReallyDamaged">
						<Animation
							AnimationName="ABPowerUpgrade"
							AnimationMode="ONCE" />
					</AnimationState>
				</ScriptedModelDraw>
			</Draws>
			<!-- This needs to be in every Stategic Buildings XML
			            DO NOT CHANGE THE id. it must be the same in all files-->
	      	
			<Behaviors>
				<FXListBehavior
					id="ModuleTag_FXList">
					<DieMuxData
						DeathTypes="ALL" />
					<Event
						Index="onTransitionToDamaged"
						FX="FX_AlienBuildingDamagedM" />
					<Event
						Index="onTransitionToReallyDamaged"
						FX="FX_AlienBuildingDamagedM" />
					<Event
						Index="onTransitionToRubble"
						FX="FX_AlienBuildingRubbleM" />
				</FXListBehavior>
				<SlowDeath
					id="ModuleTag_Death"
					SinkDelay="3.0s"
					SinkRate="4.0"
					DestructionDelay="8.0s">
					<Sound Type="INITIAL" List="ALI_Building_Die" />
					<DieMuxData
						DeathTypes="ALL" />
				</SlowDeath>
				<ProductionUpdate
					id="ModuleTag_ProductionUpdate"
					GiveNoXP="true" />
				<PowerUpgrade
					id="ModuleTag_FusionCore">
					<TriggeredBy>Upgrade_FusionCore</TriggeredBy>
				</PowerUpgrade>
				<SubObjectsUpgrade
					id="ModuleTag_ShowFusionCore"
					ShowSubObjects="ABPowerUpgrade">
					<CustomAnimAndDuration
						AnimState="USER_1"></CustomAnimAndDuration>
					<TriggeredBy>Upgrade_FusionCore</TriggeredBy>
				</SubObjectsUpgrade>
				<StructureUnpackUpdate
					id="StructureUnpackUpdate"
					UnpackTime="2.0s" />
				<xi:include
					href="../../Includes/GenericBuildingRepair.xml" />
				<xi:include
					href="../../Includes/GenericEngineerContain.xml" />
				<xi:include
					href="../../Includes/GenericAlienBuildingDestruction.xml" />
				<xi:include
					href="../../Includes/GenericAlienBuildingSuicide.xml" />
			<!-- This needs to be in every Stategic Buildings XML
			            DO NOT CHANGE THE id. it must be the same in all files-->
			      <MetaGameStratButtonInfo
			        id="ModuleTag_MetaGameStratButtonInfo"
			        MetaGameDescription="Desc:MG_Alien_Tower"
			        MetaGameTypeDescription="TYPE:MG_Alien_Tower"
			        >
			        <!-- you can list as many powers as you want here -->
					
			<Powers
					Image="Button_PlayerPowerMetaWormhole"
					Title="NAME:PlayerPowerMetaWormHole"
					TypeDescription="TYPE:PlayerPowerMetaWormhole"
					Description="DESC:PlayerPowerMetaWormHole"
					MetaGameOp="SCRIN_POWER_WORMHOLE"/>	
					
			<Powers
					Image="Button_PlayerPowerPhaseField"
					Title="NAME:PlayerPowerMetaPhaseField"
					TypeDescription="TYPE:PlayerPowerMetaPhaseField"
					Description="DESC:PlayerPowerMetaPhaseField"
					MetaGameOp="SCRIN_POWER_PHASE_FIELD"/>	
					
	
					
      </MetaGameStratButtonInfo>
				</Behaviors>
				<Body>
					<ActiveBody
						id="ModuleTag_Body"
						MaxHealth="4000.0" />
				</Body>
				<Geometry
					IsSmall="false">
					<Shape
						Type="CYLINDER"
						MajorRadius="41.5067"
						MinorRadius="41.5067"
						Height="9.5105">
						<Offset
							x="7.73712"
							y="-1.90735e-006"
							z="0.0" />
					</Shape>
					<Shape
						Type="CYLINDER"
						MajorRadius="19.0931"
						MinorRadius="19.0931"
						Height="38.605"
						ContactPointGeneration="INFANTRY">
						<Offset
							x="5.75443"
							y="-9.53674e-007"
							z="0.0" />
					</Shape>
				</Geometry>
				<AudioArrayVoice>
					<AudioEntry
						Sound="ALI_Reactor_Select"
						AudioType="voiceSelect" />
				</AudioArrayVoice>
				<AudioArraySound>
					<AudioEntry Sound="ALI_Building_LightDamage" AudioType="soundOnDamaged" />
					<AudioEntry Sound="ALI_Building_HeavyDamage" AudioType="soundOnReallyDamaged" />
					<AudioEntry Sound="ALI_Building_Placed" AudioType="soundUnderConstruction" />
				</AudioArraySound>
				<ShadowInfo
					Type="VOLUME" />
				<VisionInfo
					VisionRange="200"
					ShroudClearingRange="400" />
				<ProjectedBuildabilityInfo
					Radius="0"
					BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
			</GameObject>
</AssetDeclaration>