<?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:NBTPrime.w3x" />
		<Include
			type="all"
			source="ART:NBTPrime_LF.w3x" />				
		<Include
			type="all"
			source="ART:NBTPrime_ASN.w3x" />
		<Include
			type="all"
			source="ART:NBTPrime_AAN.w3x" />
		<Include
			type="all"
			source="ART:NBTPrime_D2SN.w3x" />
		<Include
			type="all"
			source="ART:NBTPrime_D2AN.w3x" />
		<Include
			type="all"
			source="ART:NBTPrime_D3SN.w3x" />
		<Include
			type="all"
			source="ART:NBTPrime_D3AN.w3x" />
		<Include
			type="all"
			source="ART:NBTPrimeMissle_SKN.w3x" />
		<Include
			type="all"
			source="ART:NBTPrimeMissle_IDLA.w3x" />
		<Include
			type="all"
			source="ART:NBTPrimeMissle_RDY.w3x" />
		<Include
			type="all"
			source="ART:NBTPrimeMissle_FIRA.w3x" />
		<Include
			type="all"
			source="ART:NBEmpty_ABLD.w3x" />
		<!-- Base Object -->
		<Include
			type="instance"
			source="DATA:BaseObjects/BaseStructure.xml" />
	</Includes>
	<GameObject
		id="NODTempleOfNOD"
		inheritFrom="BaseStructure"
		SelectPortrait="Portrait_NODTempleofNod"
		ButtonImage="Portrait_NODTempleofNod"
		Side="NOD"
		EditorSorting="STRUCTURE"
		TransportSlotCount="1"
		BuildCost="5000"
		BuildTime="50"
		EnergyProduction="-20"
		CommandSet="NODTempleOfNODCommandSet"
		KindOf="STRUCTURE SELECTABLE IMMOBILE CAN_CAST_REFLECTIONS POWERED REVEAL_TO_ALL UNIQUE_UNIT NOT_AUTOACQUIRABLE AUTO_ACQUIRABLE_BY_AI COVER SUPER_WEAPON"
		RadarPriority="STRUCTURE"
		PlacementViewAngle="315d"
		ProductionQueueType="OTHER_STRUCTURE"
		BuildPlacementTypeFlag="OTHER_STRUCTURE"
		EditorName="NODTempleOfNOD"
		Description="Desc:NODTempleofNod"
		TypeDescription="Type:NODTempleofNod"
		MaxSimultaneousOfType="1">
		<DisplayName
			xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:NODTempleofNod</DisplayName>
		<GameDependency>
			<RequiredObject>NODTechAssemblyPlant</RequiredObject>
		</GameDependency>
		<ArmorSet
			Armor="NODTempleOfNODArmor"
			DamageFX="FactionStructureDamageFX" />
		<ArmorSet
			Conditions="PLAYER_UPGRADE"
			Armor="NODTempleOfNODLaserFencingArmor"
			DamageFX="NormalDamageFX" />			
		<SkirmishAIInformation
			BaseBuildingLocation="HOMEBASE" />
		<Draws>
			<ScriptedModelDraw
				id="ModuleTag_Draw"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="NBTPrime" />
				</ModelConditionState>
				<!-- BUILDING -->
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Model
						Name="NBTPrime_ASN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE">
					<Model
						Name="NBTPrime_D3SN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED">
					<Model
						Name="NBTPrime_D2SN" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="GDIImpFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="GDIImpDist"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="GDIImpFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="GDIImpSmoke"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="GDIImpDist"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED">
					<Model
						Name="NBTPrime" />
					<Texture
						Original="NBTPrime"
						New="NBTPrimeD" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="GDIImpFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="GDIImpDist"
						FollowBone="true" />
				</ModelConditionState>
				<!-- ANIMATIONS -->
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT"></AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Animation
						AnimationName="NBTPrime_AAN"
						AnimationMode="ONCE" />
					<ParticleSysBone
						BoneName="NONE"
						FXParticleSystemTemplate="Con_Medium"
						FollowBone="true" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE"
					StateName="STATE_Rubble"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="NBTPrime_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="NBTPrime_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="NBTPrime_D2AN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_IntoRubble">
					<Animation
						AnimationName="NBTPrime_D3AN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
			</ScriptedModelDraw>
		</Draws>
		<Draws>
			<ScriptedModelDraw
				id="ModuleTag_Draw_Missle"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="NBTPrimeMissle_SKN" />
				</ModelConditionState>
				<!-- BUILDING -->
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Model
						Name="NBEmpty_ABLD" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DYING">
					<Model
						Name="NBEmpty_ABLD" />
				</ModelConditionState>
				<!-- ANIMATIONS -->
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT"
					StateName="STATE_Idle">
					<Animation
						AnimationName="NBTPrimeMissle_IDLA"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />					
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Animation
						AnimationName="NBEmpty_ABLD"
						AnimationMode="ONCE" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="SPECIAL_WEAPON_ONE UNPACKING">
					<Animation
						AnimationName="NBTPrimeMissle_FIRA"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
					<ParticleSysBone
						BoneName="FX_Rocket01"
						FXParticleSystemTemplate="NodNukeMissleSmoke"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FX_Rocket02"
						FXParticleSystemTemplate="NodNukeMissleSmoke"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FX_Rocket03"
						FXParticleSystemTemplate="NodNukeMissleSmoke"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FX_Rocket04"
						FXParticleSystemTemplate="NodNukeMissleSmoke"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FX_Rocket01"
						FXParticleSystemTemplate="NodNukeMissleFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FX_Rocket02"
						FXParticleSystemTemplate="NodNukeMissleFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FX_Rocket03"
						FXParticleSystemTemplate="NodNukeMissleFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FX_Rocket04"
						FXParticleSystemTemplate="NodNukeMissleFire"
						FollowBone="true" />
				</AnimationState>				
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="SPECIALPOWER1_READY"
					StateName="STATE_Ready">
					<Animation
						AnimationName="NBTPrimeMissle_RDY"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="PACKING">
					<Animation
						AnimationName="NBTPrimeMissle_IDLA"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>				
			</ScriptedModelDraw>
	<!-- Laser fencing -->		
			<ScriptedModelDraw
				id="ModuleTag_DrawNodTempleOfNODLF"
				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="NBTPrime_LF" />
				</ModelConditionState>
			</ScriptedModelDraw>			
		</Draws>
		<Behaviors>
			<SlowDeath
				id="ModuleTag_Death"
				SinkDelay="3.0s"
				SinkRate="4.0"
				DestructionDelay="8.0s">
				<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" />
			<SpecialPower
				id="ModuleTag_ComputerCounterMeasures"
				SpecialPowerTemplate="SpecialPowerComputerCounterMeasures"
			/>
			<WeaponFireSpecialAbilityUpdate
				id="ModuleTag_WeaponFireSpecialAbilityUpdateComputerCountermeasures"
				SpecialPowerTemplate="SpecialPowerComputerCounterMeasures"
				SpecialWeapon="ComputerCounterMeasures"
				WhichSpecialWeapon="1" 
			/>
			<AISpecialPowerUpdate
				id="ModuleTag_TempleOfNodComputerCountermeasures"
				CommandButtonName="Command_ComputerCounterMeasures"
				SpecialPowerAIType="SPECIAL_POWER_EMP_COUNTER" 
			/>

			<OCLSpecialPower
				id="ModuleTag_NuclearMissile"
				SpecialPowerTemplate="SpecialPowerNuclearMissile"
				AvailableAtStart="false"
				OCL="OCL_SuperweaponDestroyCiviliansHumanelyObject"
				CreateLocation="CREATE_AT_LOCATION"
			/>
			<WeaponFireSpecialAbilityUpdate
				id="ModuleTag_NuclearMissileUpdate"
				SpecialPowerTemplate="SpecialPowerNuclearMissile"
				SpecialWeapon="NuclearMissile"
				UnpackTime="5.0s"
				WhichSpecialWeapon="1" 
				DisabledTypesToProcess="USER_PARALYZED EMP HELD PARALYZED UNDERPOWERED TEMPORARILY_BUSY"
			/>
			<AISpecialPowerUpdate
				id="ModuleTag_TempleOfNodSpecialPower"
				CommandButtonName="Command_TempleOfNodNuclearMissile"
				SpecialPowerRadius="999999.0"
				SpecialPowerAIType="SPECIAL_POWER_SUPERWEAPON"
				UnitKindOf="STRUCTURE" 
			/>
			<MonitorSpecialPowerTimerUpdate
				id="ModuleTag_NuclearMissileReadyToFireUpdate"
				SpecialPowerTemplate="SpecialPowerNuclearMissile"
				ReadyCondition="SPECIALPOWER1_READY" />
      
      <!-- 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:MetaNodTempleofNod"
        MetaGameTypeDescription="Type:MetaNodTempleofNod"
        >
        <!-- you can list as many powers as you want here -->
        <Powers
          Image="Button_PlayerPowerNuclearMissile"
          Title="NAME:PlayerPowerMetaNuclearMissile"
          TypeDescription="TYPE:PlayerPowerMetaNuclearMissile"
          Description="DESC:PlayerPowerMetaNuclearMissile"
          MetaGameOp="NOD_POWER_NUCLEAR_MISSILE"
          />
<!--          
        <Powers
          Image="Button_PlayerPowerTraitor"
          Title="NAME:PlayerPowerTraitor"
          TypeDescription="TYPE:PlayerPowerTraitor"
          Description="DESC:PlayerPowerTraitor"
          MetaGameOp="NOD_POWER_TRAITOR"
          />
-->
      </MetaGameStratButtonInfo>

			<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/AdvancedNODBuildingDestruction.xml" />
			<xi:include
				href="../../Includes/AdvancedNODBuildingSuicide.xml" />
		</Behaviors>
		<AI>
			<AIUpdate
				id="ModuleTag_AI"
				AutoAcquireEnemiesWhenIdle="YES"
				AILuaEventsList="BuildingPowerFunctions">
			</AIUpdate>
		</AI>
		<Body>
		   <ActiveBody
		    id="ModuleTag_Body"
		    MaxHealth="20000.0">
		    <DamageTrigger
		     HealthLevelBelowPercent="66"
		     RemoveUpgrade="Upgrade_LaserFencing"/>
		   </ActiveBody>
  		</Body> 
		<ClientBehaviors>
			<ModelConditionAudioLoopClientBehavior
				id="ModuleTag_NOD_NuclearMissile_Launch">
				<ModelConditionSound Sound="NOD_NuclearMissile_Launch" RequiredFlags="SPECIAL_WEAPON_ONE UNPACKING" />
			</ModelConditionAudioLoopClientBehavior>
			<ModelConditionAudioLoopClientBehavior
				id="ModuleTag_NOD_NuclearMissile_Ready">
				<ModelConditionSound Sound="NOD_NuclearMissile_ReadyLoopMS" RequiredFlags="SPECIALPOWER1_READY" />
			</ModelConditionAudioLoopClientBehavior>
		</ClientBehaviors>
		<ClientUpdates>
			<EvaAnnounceSpecialPowerReadyClientUpdate
				id="NuclearMissileReady"
				AnnouncementEventOwner="NuclearMissileReady"
				SpecialPowerTemplate="SpecialPowerNuclearMissile"
				JustMonitorPercentReady="true" 
			/>
			<EvaAnnounceClientCreate
				id="TempleOfNodDetected"
				AnnouncementEventEnemy="EnemyTempleOfNodDetected"
				AnnouncementEventAlly="AlliedTempleOfNodDetected"
				UseObjectsPosition="true" />
		</ClientUpdates>
		<Geometry
			IsSmall="false">
			<Shape
				Type="BOX"
				MajorRadius="35.0"
				MinorRadius="35.0"
				Height="20.0">
				<Offset
					x="2.0"
					y="0.0"
					z="0" />
			</Shape>
			<Shape
				Type="BOX"
				MajorRadius="10.0"
				MinorRadius="10.0"
				Height="50.0">
				<Offset
					x="-42.0"
					y="0.0"
					z="0" />
			</Shape>
			<Shape
				Type="CYLINDER"
				MajorRadius="23.0"
				Height="10.0">
				<Offset
					x="47.0"
					y="0.0"
					z="0" />
			</Shape>
			<ContactPoint>
				<Pos
					x="-47"
					y="0"
					z="50" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="0"
					y="0"
					z="20" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="47"
					y="0"
					z="0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="0"
					y="30"
					z="5" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="0"
					y="-30"
					z="5" />
			</ContactPoint>
		</Geometry>
		<AudioArrayVoice>
			<AudioEntry
				Sound="NOD_TempleOfNODSelect"
				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="100" />
		<ProjectedBuildabilityInfo
			Radius="175"
			BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
	</GameObject>
</AssetDeclaration>
