<?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:ABRiftGen.w3x" />
		<Include
			type="all"
			source="ART:ABRiftGen_D2SN.w3x" />
		<Include
			type="all"
			source="ART:ABRiftGen_D2AN.w3x" />
		<Include
			type="all"
			source="ART:ABRiftGen_D3SN.w3x" />
		<Include
			type="all"
			source="ART:ABRiftGen_D3AN.w3x" />
		<Include
			type="all"
			source="ART:ABRiftGenBld_SKN.w3x" />
		<Include
			type="all"
			source="ART:ABRiftGenBld_AAN.w3x" />
		<Include
			type="all"
			source="ART:ABRGFXBone.w3x" />
		<!-- Base Object -->
		<Include
			type="instance"
			source="DATA:BaseObjects/BaseStructure.xml" />
	</Includes>
	<GameObject
		id="AlienRiftGenerator"
		inheritFrom="BaseStructure"
		SelectPortrait="Portrait_ALIENRiftGenerator"
		ButtonImage="Portrait_ALIENRiftGenerator"
		Side="ALIEN"
		EditorSorting="STRUCTURE"
		BuildCost="5000"
		PlacementViewAngle="337.5d"
		BuildTime="50"
		CommandSet="AlienRiftGeneratorCommandSet"
		KindOf="STRUCTURE SELECTABLE IMMOBILE CAN_CAST_REFLECTIONS UNIQUE_UNIT AUTO_ACQUIRABLE_BY_AI NOT_AUTOACQUIRABLE COVER REVEAL_TO_ALL POWERED SUPER_WEAPON"
		RadarPriority="STRUCTURE"
		ProductionQueueType="OTHER_STRUCTURE"
		BuildPlacementTypeFlag="OTHER_STRUCTURE"
		EditorName="AlienRiftGenerator"
		Description="Desc:ALIENRiftGenerator"
		TypeDescription="Type:AlienRiftGenerator"
		EnergyProduction="-15"
		MaxSimultaneousOfType="1">
		<DisplayName
			xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">NAME:ALIENRiftGenerator</DisplayName>
		<GameDependency>
			<RequiredObject>AlienReactor</RequiredObject>
		</GameDependency>
		<ArmorSet
			Armor="AlienRiftGeneratorArmor"
			DamageFX="FactionStructureDamageFX" />
		<SkirmishAIInformation
			BaseBuildingLocation="HOMEBASE" />
		<Draws>
			<ScriptedModelDraw
				id="ModuleTag_Draw"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="ABRiftGen" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Model
						Name="ABRiftGenBld_SKN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE">
					<Model
						Name="ABRiftGen_D3SN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED">
					<Model
						Name="ABRiftGen_D2SN" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienDamageFire01"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienDamageFireGlow01"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienDamageFireGlow02"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="AlienDamageFire01"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="AlienDamageFireGlow01"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="AlienDamageFireGlow02"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone03"
						FXParticleSystemTemplate="AlienDamageFire01"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone03"
						FXParticleSystemTemplate="AlienDamageFireGlow01"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone03"
						FXParticleSystemTemplate="AlienDamageFireGlow02"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED">
					<Model
						Name="ABRiftGen" />
					<Texture
						Original="ABRiftGen"
						New="ABRiftGenD" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienDamageFire01"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone03"
						FXParticleSystemTemplate="AlienDamageFire01"
						FollowBone="true" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Animation
						AnimationName="ABRiftGenBld_AAN"
						AnimationMode="ONCE" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE"
					StateName="STATE_Rubble"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="ABRiftGen_D3AN"
						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="ABRiftGen_D2AN"
						AnimationMode="MANUAL" />
					<Script>
						Prev = CurDrawablePrevAnimationState();
						if Prev ~= "STATE_ReallyDamaged" and Prev ~= "TRANS_IntoReallyDamaged" then
						CurDrawableSetTransitionAnimState("TRANS_IntoReallyDamaged")
						end
					</Script>
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_IntoReallyDamaged">
					<Animation
						AnimationName="ABRiftGen_D2AN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_IntoRubble">
					<Animation
						AnimationName="ABRiftGen_D3AN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
			</ScriptedModelDraw>
			<ScriptedModelDraw
				id="ModuleTag_ReadyFX"
				AttachToBoneInAnotherModule="FXFIRER">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="ABRGFXBone" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT"/>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="PACKING">
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienRiftFire01"
						FollowBone="false" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienRiftFire02"
						FollowBone="false" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienRiftFire03"
						FollowBone="false" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienRiftFire04"
						FollowBone="false" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienRiftFire06"
						FollowBone="false" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="AFFECTED_BY_EMP"/>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="SPECIALPOWER1_READY">
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienRiftReady01"
						FollowBone="false" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienRiftReady02"
						FollowBone="false" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienRiftReady03"
						FollowBone="false" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienRiftReady06"
						FollowBone="false" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienRiftReady07"
						FollowBone="false" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienRiftReady08"
						FollowBone="false" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="AlienRiftReady09"
						FollowBone="false" />
				</AnimationState>
			</ScriptedModelDraw>
		</Draws>
		<Behaviors>
			<FXListBehavior
				id="ModuleTag_FXList">
				<DieMuxData
					DeathTypes="ALL" />
				<Event
					Index="onTransitionToDamaged"
					FX="FX_AlienBuildingDamagedL" />
				<Event
					Index="onTransitionToReallyDamaged"
					FX="FX_AlienBuildingDamagedL" />
				<Event
					Index="onTransitionToRubble"
					FX="FX_AlienBuildingRubbleL" />
			</FXListBehavior>
			<SlowDeath
				id="ModuleTag_Death"
				SinkDelay="5.0s"
				SinkRate="4.0"
				DestructionDelay="11.0s">
				<Sound Type="INITIAL" List="ALI_Building_Die" />
				<DieMuxData
					DeathTypes="ALL" />
			</SlowDeath>

			<OCLSpecialPower
				id="ModuleTag_RiftGeneratorSpecialPower"
				SpecialPowerTemplate="SpecialPower_RiftGeneratorWeapon"
				UpdateModuleStartsAttack="true" 
				OCL="OCL_SuperweaponDestroyCiviliansHumanelyObject"
				AvailableAtStart="false"
				CreateLocation="CREATE_AT_LOCATION"
			/>
			<WeaponFireSpecialAbilityUpdate
				id="ModuleTag_RiftGeneratorUpdate"
				SpecialPowerTemplate="SpecialPower_RiftGeneratorWeapon"
				SpecialWeapon="RiftGeneratorWeaponTrigger"
				UnpackTime="0s"
				PreparationTime="0s"
				PackTime="9s"
				DisabledTypesToProcess="HELD EMP UNDERPOWERED"
			/>
			<AISpecialPowerUpdate
				id="ModuleTag_RiftGeneratorAISpecialPower"
				CommandButtonName="Command_RiftGeneratorSuperweapon"
				SpecialPowerRadius="999999.0"
				SpecialPowerAIType="SPECIAL_POWER_SUPERWEAPON"
				UnitKindOf="STRUCTURE" 
			/>

			<MonitorSpecialPowerTimerUpdate
				id="ModuleTag_RiftReadyToFireUpdate"
				SpecialPowerTemplate="SpecialPower_RiftGeneratorWeapon"
				ReadyCondition="SPECIALPOWER1_READY" />
			<xi:include
				href="../../Includes/GenericBuildingRepair.xml" />
			<xi:include
				href="../../Includes/GenericEngineerContain.xml" />
			<xi:include
				href="../../Includes/AdvancedAlienBuildingDestruction.xml" />
			<xi:include
				href="../../Includes/AdvancedAlienBuildingSuicide.xml" />
			<StructureUnpackUpdate
				id="StructureUnpackUpdate"
				UnpackTime="1.5s" />
	
	<!-- 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:MetaAlieRiftGenerator"
	        MetaGameTypeDescription="Type:MetaAlienRiftGenerator"
	        >
	        <!-- you can list as many powers as you want here -->
	<Powers
		Image="Button_PlayerPowerRiftGenerator"
		Title="NAME:PlayerPowerMetaRiftGenerator"
		TypeDescription="TYPE:PlayerPowerMetaRiftGenerator"
		Description="DESC:PlayerPowerMetaRiftGenerator"
		MetaGameOp="SCRIN_POWER_RIFT_GENERATOR"
/>

      </MetaGameStratButtonInfo>
      
	</Behaviors>
		<AI>
			<AIUpdate
				id="ModuleTag_AI" />
		</AI>
		<Body>
			<ActiveBody
				id="ModuleTag_Body"
				MaxHealth="20000" />
		</Body>
   		<ClientBehaviors>
			<ModelConditionAudioLoopClientBehavior id="ModuleTag_ALI_RiftGenerator_Ready">
				<ModelConditionSound Sound="ALI_RiftGenerator_Ready" RequiredFlags="SPECIALPOWER1_READY" />
			</ModelConditionAudioLoopClientBehavior>
			<ModelConditionAudioLoopClientBehavior id="ModuleTag_ALI_RiftGenerator_Swirl">
				<ModelConditionSound Sound="ALI_RiftGenerator_SwirlLoopMS" RequiredFlags="PACKING" />
			</ModelConditionAudioLoopClientBehavior>
		</ClientBehaviors>
    <ClientUpdates>
		<EvaAnnounceSpecialPowerReadyClientUpdate
			id="RiftGeneratorReady"
			AnnouncementEventOwner="RiftGeneratorReady"
			SpecialPowerTemplate="SpecialPower_RiftGeneratorWeapon"
			JustMonitorPercentReady="true" 
		/>
		<EvaAnnounceClientCreate
          id="RiftGeneratorDetected"
          AnnouncementEventEnemy="EnemyRiftGeneratorDetected"
          AnnouncementEventAlly="AlliedRiftGeneratorDetected"
          UseObjectsPosition="true" />
    </ClientUpdates>
		<Geometry
			IsSmall="false">
			<Shape
				Type="BOX"
				MajorRadius="27.5"
				MinorRadius="9.5"
				Height="85.9531">
				<Offset
					x="0.0"
					y="0.0"
					z="0.0" />
			</Shape>
			<Shape
				Type="BOX"
				MajorRadius="9.26559"
				MinorRadius="26.7559"
				Height="85.9531">
				<Offset
					x="0.0"
					y="0.0"
					z="0.0" />
			</Shape>
			<ContactPoint>
				<Pos
					x="-36.9368"
					y="-34.4633"
					z="0.230854" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="17.4547"
					y="-17.2508"
					z="78.6253" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="34.6672"
					y="37.1407"
					z="0.230854" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-19.7243"
					y="19.9282"
					z="78.6253" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-19.7243"
					y="-17.2508"
					z="78.6253" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="34.6672"
					y="-34.4633"
					z="0.230854" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="17.4547"
					y="19.9282"
					z="78.6253" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-36.9368"
					y="37.1407"
					z="0.230854" />
			</ContactPoint>
		</Geometry>
		<AudioArrayVoice>
			<AudioEntry
				Sound="ALI_RiftGenerator_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="100"
			ShroudClearingRange="100" />
		<ProjectedBuildabilityInfo
			Radius="175"
			BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
	</GameObject>
</AssetDeclaration>