<?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:NBHand.w3x" />
		<Include
			type="all"
			source="ART:NBHand_LF.w3x" />			
		<Include
			type="all"
			source="ART:NBHand_ASN.w3x" />
		<Include
			type="all"
			source="ART:NBHand_AAN.w3x" />
		<Include
			type="all"
			source="ART:NBHandD2_SN.w3x" />
		<Include
			type="all"
			source="ART:NBHandD2_AN.w3x" />
		<Include
			type="all"
			source="ART:NBHandD3_SN.w3x" />
		<Include
			type="all"
			source="ART:NBHandD3_AN.w3x" />
		<!-- Base Object -->
		<Include
			type="instance"
			source="DATA:BaseObjects/BaseStructure.xml" />
	</Includes>
	<GameObject
		id="NODHandOfNOD"
		inheritFrom="BaseStructure"
		SelectPortrait="Portrait_NODHandofNod"
		ButtonImage="Portrait_NODHandofNod"
		Side="NOD"
		EditorSorting="STRUCTURE"
		TransportSlotCount="1"
		BuildCost="500"
		BuildTime="5"
		EnergyProduction="-5"
		CommandSet="NODHandOfNODCommandSet"
		KindOf="STRUCTURE SELECTABLE IMMOBILE CAN_CAST_REFLECTIONS FS_FACTORY AUTO_RALLYPOINT FS_BARRACKS NOT_AUTOACQUIRABLE AUTO_ACQUIRABLE_BY_AI COVER"
		RadarPriority="STRUCTURE"
		PlacementViewAngle="315d"
		ProductionQueueType="MAIN_STRUCTURE"
		BuildPlacementTypeFlag="MAIN_STRUCTURE"
		EditorName="NODHandOfNOD"
		Description="Desc:NODHandofNOD"
		TypeDescription="Type:NODHandofNod">
		<DisplayName
			xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:NODHandofNod</DisplayName>
		<GameDependency>
			<RequiredObject>NODPowerPlant</RequiredObject>
		</GameDependency>
		<ArmorSet
			Armor="NODHandOfNODArmor"
			DamageFX="FactionStructureDamageFX" />
		<ArmorSet
			Conditions="PLAYER_UPGRADE"
			Armor="NODHandOfNODLaserFencingArmor"
			DamageFX="NormalDamageFX" />			
		<SkirmishAIInformation
			BaseBuildingLocation="FRONT" />
		<Draws>
			<ScriptedModelDraw
				id="ModuleTag_Draw"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="NBHand" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Model
						Name="NBHand_ASN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED">
					<Model
						Name="NBHandD2_SN" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="GDIWTDamagedSmoke"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED">
					<Model
						Name="NBHandD2_SN" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="GDIWTDamagedSmoke"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="GDIWTDamagedFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="GDIWTDamagedSmoke"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="GDIWTDamagedDist"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DYING">
					<Model
						Name="NBHandD3_SN" />
				</ModelConditionState>
				<!-- BUILDUP ANIMATION -->
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Animation
						AnimationName="NBHand_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="NBHandD2_AN"
						AnimationMode="MANUAL" />
				</AnimationState>
				<!-- REALLY DAMAGED ANIMATION -->
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED"
					StateName="STATE_ReallyDamaged"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="NBHandD2_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="NBHandD3_AN"
						AnimationMode="ONCE" />
					<ParticleSysBone
						BoneName="NONE"
						FXParticleSystemTemplate="Des_Medium"
						FollowBone="false" />
				</AnimationState>
				<!-- Transitions -->
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_DamagedToReallyDamaged">
					<Animation
						AnimationName="NBHandD2_AN"
						AnimationMode="ONCE" />
				</AnimationState>
			</ScriptedModelDraw>

	<!-- Laser fencing -->		
			<ScriptedModelDraw
				id="ModuleTag_DrawNodHandOfNODLF"
				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="NBHand_LF" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DOOR_1_OPENING">
					<Script>
						CurDrawableHideSubObject("Gate01")
						CurDrawableHideSubObject("Gate02")
					</Script>
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DOOR_1_CLOSING"
					StateName="STATE_Closed">
					<Script>
						CurDrawableShowSubObject("Gate01")
						CurDrawableShowSubObject("Gate02")
					</Script>
				</AnimationState>
			</ScriptedModelDraw>			
		</Draws>
		<Behaviors>
			<ProductionUpdate
				id="ModuleTag_06"
				GiveNoXP="true"
				Type="INFANTRY" 
				NumDoorAnimations="1"
				DoorOpeningTime="0.1s"
				DoorWaitOpenTime="2.0s"
				DoorCloseTime="0.1s" />
			<QueueProductionExitUpdate
				id="ModuleTag_07"
				PlacementViewAngle="45d"
				ExitDelay="1">
				<UnitCreatePoint
					x="0.0"
					y="0.0" />
				<NaturalRallyPoint
					x="68.0"
					y="0.0" />
			</QueueProductionExitUpdate>
			<SlowDeath
				id="ModuleTag_Death"
				SinkDelay="3.0s"
				SinkRate="4.0"
				DestructionDelay="8.0s">
				<!--This weapon is fired so that the ball that falls from the hand as this structure collapses kills things in its path-->
				<Weapon>
					<Weapon>NODHandOfNodDeathWeapon</Weapon>
				</Weapon>
				<Sound Type="INITIAL" List="HumanFaction_MediumBuilding_DieMS" />
				<DieMuxData
					DeathTypes="ALL" />
			</SlowDeath>
			<FXListBehavior
				id="ModuleTag_FXList">
				<DieMuxData
					DeathTypes="ALL" />
				<Event
					Index="onTransitionToDamaged"
					FX="FX_BuildDamaged_Large" />
				<Event
					Index="onTransitionToReallyDamaged"
					FX="FX_BuildDamaged_Large" />
				<Event
					Index="onTransitionToRubble"
					FX="FX_BuildRubble_Large" />
			</FXListBehavior>
			<StructureUnpackUpdate
				UnpackTime="1.5s" />

			<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" />
			<xi:include
				href="../../Includes/GenericNODBuildingDestruction.xml" />
			<xi:include
				href="../../Includes/GenericNODBuildingSuicide.xml" />
			<StancesBehavior
				id="ModuleTag_Stance"
				StanceTemplate="Generic" />
		</Behaviors>
		<AI>
			<AIUpdate
				id="ModuleTag_AI"
				AutoAcquireEnemiesWhenIdle="NO"
				AILuaEventsList="BuildingPowerFunctions">				
			</AIUpdate>
		</AI>
		<Body>
			<ActiveBody
				id="ModuleTag_Body"
				MaxHealth="2500.0">
				<DamageTrigger
					HealthLevelBelowPercent="66"
					RemoveUpgrade="Upgrade_LaserFencing"/>
			</ActiveBody>
		</Body>
		<Geometry
			IsSmall="false">
			<Shape
				Type="BOX"
				MajorRadius="50.0"
				MinorRadius="25.0"
				Height="8.0">
				<Offset
					x="-2.0"
					y="0.0"
					z="0" />
			</Shape>
			<Shape
				Type="BOX"
				MajorRadius="40.0"
				MinorRadius="20.0"
				Height="12.0">
				<Offset
					x="-10.0"
					y="0.0"
					z="8" />
			</Shape>
			<Shape
				Type="CYLINDER"
				MajorRadius="8.0"
				Height="40.0">
				<Offset
					x="-36.0"
					y="2.5"
					z="0" />
			</Shape>
			<Shape
				Type="CYLINDER"
				MajorRadius="14.0"
				Height="20.0">
				<Offset
					x="-36.0"
					y="2.5"
					z="40" />
			</Shape>
			<ContactPoint>
				<Pos
					x="32.0"
					y="-17.0"
					z="0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="27.0"
					y="17.0"
					z="20.0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-45.0"
					y="18.0"
					z="30.0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-45.0"
					y="-23.0"
					z="0.0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="40.0"
					y="-20.0"
					z="20" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="32.0"
					y="-17.0"
					z="0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="27.0"
					y="17.0"
					z="20.0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-45.0"
					y="-23.0"
					z="0.0" />
			</ContactPoint>
		</Geometry>
		<AudioArrayVoice>
			<AudioEntry
				Sound="NOD_HandOfNODSelect"
				AudioType="voiceSelect" />
		</AudioArrayVoice>
		<AudioArraySound>
			<AudioEntry Sound="HumanFaction_MediumBuilding_LightDamageMS" AudioType="soundOnDamaged" />
			<AudioEntry Sound="HumanFaction_MediumBuilding_HeavyDamageMS" AudioType="soundOnReallyDamaged" />
		</AudioArraySound>
		<ShadowInfo
			Type="VOLUME" />
		<VisionInfo
			VisionRange="100"
			ShroudClearingRange="400" />
		<ProjectedBuildabilityInfo
			Radius="0"
			BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
	</GameObject>
</AssetDeclaration>
