<?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:NBCrane_SKN.w3x" />
		<Include
			type="all"
			source="ART:NBCrane_IDLA.w3x" />
		<Include
			type="all"
			source="ART:NBCrane_ASN.w3x" />
		<Include
			type="all"
			source="ART:NBCrane_AAN.w3x" />
		<Include
			type="all"
			source="ART:NBCrane_D2SN.w3x" />
		<Include
			type="all"
			source="ART:NBCrane_D2AN.w3x" />
		<Include
			type="all"
			source="ART:NBCrane_D3SN.w3x" />
		<Include
			type="all"
			source="ART:NBCrane_D3AN.w3x" />
		<Include
			type="all"
			source="ART:NBCrane_LF.w3x" />			
		<!-- Base Object -->
		<Include
			type="instance"
			source="DATA:BaseObjects/BaseStructure.xml" />
	</Includes>
	<GameObject
		id="NODCrane"
		inheritFrom="BaseStructure"
		SelectPortrait="Portrait_NODCrane"
		ButtonImage="Portrait_NODCrane"
		Side="NOD"
		EditorSorting="STRUCTURE"
		TransportSlotCount="1"
		BuildCost="1500"
		BuildTime="15"
		CommandSet="NODCraneCommandSet"
		KindOf="STRUCTURE SELECTABLE IMMOBILE CAN_CAST_REFLECTIONS CONSTRUCTION_YARD FS_FACTORY NOT_AUTOACQUIRABLE AUTO_ACQUIRABLE_BY_AI COVER CRANE"
		RadarPriority="STRUCTURE"
		PlacementViewAngle="225d"
		ProductionQueueType="MAIN_STRUCTURE"
		BuildPlacementTypeFlag="MAIN_STRUCTURE"
		EnergyProduction="-10"
		EditorName="NODCrane"
		Description="Desc:NODCrane"
		TypeDescription="Type:NODCrane">
		<DisplayName
			xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:NODCrane</DisplayName>
		<GameDependency>
			<RequiredObject>NODConstructionYard</RequiredObject>
		</GameDependency>
		<ArmorSet
			Armor="NODCraneArmor"
			DamageFX="FactionStructureDamageFX" />
		<ArmorSet
			Conditions="PLAYER_UPGRADE"
			Armor="NODCraneLaserFencingArmor"
			DamageFX="NormalDamageFX" />			
		<SkirmishAIInformation
			BaseBuildingLocation="CENTER" />
		<Draws>
			<ScriptedModelDraw
				id="ModuleTag_Draw"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="NBCrane_SKN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Model
						Name="NBCrane_ASN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE">
					<Model
						Name="NBCrane_D3SN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED">
					<Model
						Name="NBCrane_D2SN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED">
					<Model
						Name="NBCrane_SKN" />
					<Texture
						Original="NB_Crane"
						New="NB_Crane_d" />
				</ModelConditionState>
				<!-- BUILDUP ANIMATION -->
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Animation
						AnimationName="NBCrane_AAN"
						AnimationMode="ONCE" />
					<ParticleSysBone
						BoneName="NONE"
						FXParticleSystemTemplate="Con_Small"
						FollowBone="true" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT"
					Flags="DO_NOT_PLAY_WHEN_UNPOWERED">
					<Animation
						AnimationName="NBCrane_IDLA"
						AnimationMode="LOOP" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE"
					StateName="STATE_Rubble"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="NBCrane_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="NBCrane_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="NBCrane_D2AN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_IntoRubble">
					<Animation
						AnimationName="NBCrane_D3AN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
			</ScriptedModelDraw>
	<!-- Laser fencing -->		
			<ScriptedModelDraw
				id="ModuleTag_DrawNodCraneLF"
				OkToChangeModelColor="true"
				UseStandardModelNames="true"
				StaticModelLODMode="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT" >
					<Model
						Name="" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="USER_6 DYING">
					<Model
						Name="" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="USER_6 REALLYDAMAGED">
					<Model
						Name="" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="USER_6 DAMAGED">
					<Model
						Name="" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="USER_6">
					<Model
						Name="NBCrane_LF" />
				</ModelConditionState>
			</ScriptedModelDraw>			
		</Draws>
		<Behaviors>
			<SlowDeath
				id="ModuleTag_Death"
				SinkDelay="3.0s"
				SinkRate="4.0"
				DestructionDelay="8.0s">
				<Sound Type="INITIAL" List="HumanFaction_SmallBuilding_DieMS" />
				<DieMuxData
					DeathTypes="ALL" />
			</SlowDeath>
			
			<FXListBehavior
				id="ModuleTag_FXList">
				<DieMuxData
					DeathTypes="ALL" />
				<Event
					Index="onTransitionToDamaged"
					FX="FX_BuildDamaged_Medium" />
				<Event
					Index="onTransitionToReallyDamaged"
					FX="FX_BuildDamaged_Medium" />
				<Event
					Index="onTransitionToRubble"
					FX="FX_BuildDamaged_Medium" />
			</FXListBehavior>
			<StructureUnpackUpdate
				id="ModuleTag_StructureUnpackUpdate"
				UnpackTime="1.5s" />
			<ProductionUpdate
				id="ModuleTag_ProductionUpdate"
				Type="MAIN_STRUCTURE"
				MaxQueueEntries="1" />
			<ProductionUpdate
				id="ModuleTag_OtherProductionUpdate"
				Type="OTHER_STRUCTURE"
				MaxQueueEntries="1" />
			<ModelConditionUpgrade
				id="ModuleTag_UpgradeLaserFencing"
				AddConditionFlags="USER_6">
				<TriggeredBy>Upgrade_LaserFencing</TriggeredBy>
			</ModelConditionUpgrade>
			
			<xi:include
				href="../../Includes/NodLaserFencingArmorUpgrade.xml" />				
			<xi:include
				href="../../Includes/NodLaserFencingStatusUpgrade.xml" />
			<xi:include
				href="../../Includes/GenericBuildingRepair.xml" />
			<xi:include
				href="../../Includes/GenericEngineerContain.xml" />
		</Behaviors>
		<AI>
			<AIUpdate
				id="ModuleTag_AI"
				AutoAcquireEnemiesWhenIdle="NO"
				AILuaEventsList="BuildingPowerFunctions">			
			</AIUpdate>
		</AI>
		<Body>
		   <ActiveBody
		    id="ModuleTag_Body"
		    MaxHealth="3000.0">
		    <DamageTrigger
		     HealthLevelBelowPercent="66"
		     RemoveUpgrade="Upgrade_LaserFencing"/>
		   </ActiveBody>
  		</Body> 
  		<Geometry
			IsSmall="false">
			<Shape
				Type="CYLINDER"
				ContactPointGeneration="INFANTRY"
				MajorRadius="50.0"
				Height="25.0" >
				<Offset
					x="0"
					y="0"
					z="0" />
			</Shape>
		</Geometry>
		<AudioArrayVoice>
			<AudioEntry
				Sound="NOD_CraneSelect"
				AudioType="voiceSelect" />
		</AudioArrayVoice>
		<AudioArraySound>
			<AudioEntry Sound="HumanFaction_SmallBuilding_LightDamageMS" AudioType="soundOnDamaged" />
			<AudioEntry Sound="HumanFaction_SmallBuilding_HeavyDamageMS" AudioType="soundOnReallyDamaged" />
		</AudioArraySound>
		<ShadowInfo
			Type="VOLUME" />
		<VisionInfo
			VisionRange="100"
			ShroudClearingRange="400" />
		<ProjectedBuildabilityInfo
			Radius="150"
			BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
	</GameObject>
</AssetDeclaration>