<?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:ABDronePlat.w3x" />
		<Include
			type="all"
			source="ART:ABDronePlatD2SN.w3x" />
		<Include
			type="all"
			source="ART:ABDronePlatD2AN.w3x" />
		<Include
			type="all"
			source="ART:ABDronePlatD3SN.w3x" />
		<Include
			type="all"
			source="ART:ABDronePlatD3AN.w3x" />
		<!-- Base Object -->
		<Include
			type="instance"
			source="DATA:BaseObjects/BaseStructure.xml" />
	</Includes>
	<GameObject
		id="AlienDronePlatform"
		inheritFrom="BaseStructure"
		SelectPortrait="Portrait_ALIENDronePlatform"
		ButtonImage="Portrait_ALIENDronePlatform"
		Side="ALIEN"
		EditorSorting="STRUCTURE"
		TransportSlotCount="1"
		BuildCost="3500"
		BuildTime="25"
		EnergyProduction="10"
		CommandSet="AlienDronePlatformCommandSet"
		KindOf="STRUCTURE SELECTABLE IMMOBILE CAN_CAST_REFLECTIONS CONSTRUCTION_YARD FS_FACTORY AUTO_ACQUIRABLE_BY_AI NOT_AUTOACQUIRABLE COVER AUTO_RALLYPOINT PROJECT_BUILDABILITY_FOR_ALLIES"
		RadarPriority="STRUCTURE"
		EditorName="AlienDronePlatform"
		Description="Desc:ALIENDronePlatform"
		TypeDescription="Type:AlienDronePlatform">
		<DisplayName
			xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">NAME:ALIENDronePlatform</DisplayName>
		<ArmorSet
			Armor="AlienDronePlatformArmor"
			DamageFX="FactionStructureDamageFX" />
		<SkirmishAIInformation
			BaseBuildingLocation="BACK" />
		<Draws>
			<ScriptedModelDraw
				id="ModuleTag_Draw"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="ABDronePlat" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE">
					<Model
						Name="ABDronePlatD3SN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED">
					<Model
						Name="ABDronePlatD2SN" />
					<Texture
						Original="AUDronShip"
						New="AUDronShip_D" />
					<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="ABDronePlat" />
					<Texture
						Original="AUDronShip"
						New="AUDronShip_D" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="AlienDamageFire01"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="AlienDamageFireGlow01"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="AlienDamageFireGlow02"
						FollowBone="true" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT">
					<!-- no anim -->
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE"
					StateName="STATE_Rubble"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="ABDronePlatD3AN"
						AnimationMode="MANUAL" />
					<Script>
						Prev = CurDrawablePrevAnimationState();
						if Prev ~= "STATE_Rubble" and Prev ~= "TRANS_IntoRubble" then
						CurDrawableSetTransitionAnimState("TRANS_IntoRubble")
						end
					</Script>
				</AnimationState>
				<!-- prevents the TRANS_IntoReallyDamaged playing when unpacking and really damaged -->
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED JUST_BUILT"
					StateName="STATE_ReallyDamaged"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="ABDronePlatD2AN"
						AnimationMode="MANUAL" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED"
					StateName="STATE_ReallyDamaged"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="ABDronePlatD2AN"
						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="ABGatewayD1"
						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="ABGatewayD1"
						AnimationMode="ONCE"
						AnimationBlendTime="0"/>
				</AnimationState>
-->
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_IntoReallyDamaged">
					<Animation
						AnimationName="ABDronePlatD2AN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_IntoRubble">
					<Animation
						AnimationName="ABDronePlatD3AN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
			</ScriptedModelDraw>
		</Draws>
		<Behaviors>
		
		<RadarBehavior
				id="ModuleTag_RadarBehavior" />
		
			<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>
			<xi:include
				href="DATA:Includes/GenericPackPower.xml" />
			<xi:include
				href="DATA:Includes/GenericPackUpdate.xml" />
			<ReplaceSelfUpgrade
				id="ModuleTag_ReplaceSelf"
				NewObjectUnpackTime="3.5s">
				<TriggeredBy>Upgrade_Pack</TriggeredBy>
				<ReplacementTemplate>AlienMCV</ReplacementTemplate>
			</ReplaceSelfUpgrade>
			<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"
				Type="MAIN_STRUCTURE"
				MaxQueueEntries="1" />
			<ProductionUpdate
				id="ModuleTag_OtherProductionUpdate"
				Type="OTHER_STRUCTURE"
				MaxQueueEntries="1" />
			<ProductionUpdateInfo
				id="ModuleTag_ProductionUpdateInfo"/>
			<QueueProductionExitUpdate
				id="ModuleTag_QueueProduction"
				ExitDelay="1">
				<UnitCreatePoint
					x="0.0"
					y="17.0"
					z="0.0" />
				<NaturalRallyPoint
					x="90.0"
					y="17.0"
					z="0.0" />
			</QueueProductionExitUpdate>
			<xi:include
				href="../../Includes/GenericBuildingRepair.xml" />
			<xi:include
				href="../../Includes/GenericEngineerContain.xml" />
			<xi:include
				href="../../Includes/GenericAlienBuildingDestruction.xml" />
			<xi:include
				href="../../Includes/ConYardAlienBuildingSuicide.xml" />
			<StructureUnpackUpdate
				id="StructureUnpackUpdate"
				UnpackTime="1.5s" />
		</Behaviors>
		<Body>
			<ActiveBody
				id="ModuleTag_Body"
				MaxHealth="20000" />
		</Body>
		<AI>
			<AIUpdate
				id="ModuleTag_AIUpdate"
				AutoAcquireEnemiesWhenIdle="NO" 
			/>
		</AI>
		<!-- IMPORTANT: Keep the geometry entries of AlienDronePlatform and AlienMCVUnpacking the same -->
		<Geometry
			IsSmall="false">
			<Shape
				Type="CYLINDER"
				MajorRadius="24.0"
				MinorRadius="24.0"
				Height="80.0">
				<Offset
					x="0.0"
					y="-9.53674e-007"
					z="0.0" />
			</Shape>
			<ContactPoint>
				<Pos
					x="-16.0215"
					y="-16.0929"
					z="0.0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="16.2452"
					y="-16.0929"
					z="73.9139" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="16.2452"
					y="16.1738"
					z="0.0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-16.0215"
					y="16.1738"
					z="73.9139" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-16.0215"
					y="-16.0929"
					z="73.9139" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="16.2452"
					y="-16.0929"
					z="0.0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="16.2452"
					y="16.1738"
					z="73.9139" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-16.0215"
					y="16.1738"
					z="0.0" />
			</ContactPoint>
		</Geometry>
		<AudioArrayVoice>
			<AudioEntry
				Sound="ALI_DronePlatform_Select"
				AudioType="voiceSelect" />
		</AudioArrayVoice>
		<AudioArraySound>
			<AudioEntry
				Sound="ALI_DroneShip_DeployMS"
				AudioType="soundUnderConstruction" />
			<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="400"
			ShroudClearingRange="500" />
		<ProjectedBuildabilityInfo
			Radius="450"
			BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
	</GameObject>
</AssetDeclaration>
