<?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:NBDHub.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_ASN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_AAN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_D2SN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_D2AN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_D3SN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_D3AN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_QLBld_SKN.w3x" />	
		<Include
			type="all"
			source="ART:NBDHub_QLBld_AAN.w3x" />			
		<Include
			type="all"
			source="ART:NBDHub_QL_D1_SKN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_QL_D2_SKN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_QL_D3_SKN.w3x" />
		<Include
			type="all"
			source="ART:FXspotlight.w3x" />
		<Include
			type="all"
			source="ART:wire.xml" />
		<!-- Base Object -->
		<Include
			type="instance"
			source="DATA:BaseObjects/BaseStructure.xml" />
	</Includes>
	<GameObject
		id="NODLaserCannon"
		inheritFrom="BaseStructure"
		SelectPortrait="Portrait_NODHub"
		ButtonImage="Portrait_NODLaserTurret"
		Side="NOD"
		EditorSorting="STRUCTURE"
		BuildCost="1200"
		BuildTime="12"
		EnergyProduction="-10"
		CommandSet="NODLaserCannonCommandSet"
		KindOf="STRUCTURE SELECTABLE IMMOBILE CAN_ATTACK CAN_CAST_REFLECTIONS FS_BASE_DEFENSE POWERED AUTO_ACQUIRABLE_BY_AI COVER ATTACK_NEEDS_LINE_OF_SIGHT CAN_SEE_THROUGH_STRUCTURE"
		RadarPriority="STRUCTURE"
		PlacementViewAngle="225d"
		ProductionQueueType="OTHER_STRUCTURE"
		BuildPlacementTypeFlag="OTHER_STRUCTURE"
		EditorName="NODLaserCannon"
		WeaponCategory="CANNON"
		Description="Desc:NODLaserCannon"
		TypeDescription="Type:NODLaserCannon">
		<DisplayName
			xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:NODLaserCannon</DisplayName>
		<DisplayUpgrade
			id="Tag_DisplayUpgrade1">Upgrade_NODTechCenterLaserCapacitor</DisplayUpgrade>
		<DisplayUpgrade>Upgrade_NODQuadTurrets</DisplayUpgrade>
		<GameDependency>
			<RequiredObject>NODHandOfNOD</RequiredObject>
		</GameDependency>
		<ArmorSet
			Armor="NODBaseDefenceArmor"
			DamageFX="FactionStructureDamageFX" />
		<SkirmishAIInformation
			BaseBuildingLocation="SPREAD" />
		<Draws>
			<ScriptedModelDraw
				id="ModuleTag_Draw"
				OkToChangeModelColor="true"
				ExtraPublicBone="FX_Weapon01 FX_Weapon02">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="NBDHub_QLBld_SKN" />
					<WeaponFireFXBone
						WeaponSlotType="PRIMARY_WEAPON"
						BoneName="FX_Weapon" />
					<WeaponLaunchBone
						WeaponSlotType="PRIMARY_WEAPON"
						BoneName="FX_Weapon" />
					<Turret
						TurretNameKey="Turret"
						TurretPitch="Turret_Pitch"
						TurretID="1" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="BUILD_PLACEMENT_CURSOR">
					<Model
						Name="NBDHub" />
				</ModelConditionState>				
				
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING USER_5">
					<Model
						Name="NBDHub_QLBld_SKN" />
				</ModelConditionState>				
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Model
						Name="NBDHub_ASN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE">
					<Model
						Name="NBDHub_D3SN" />
				</ModelConditionState>
				
				
				<!-- quads states-->
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED USER_5">
					<Model
						Name="NBDHub_QL_D2_SKN" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerDist"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerSmoke"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED USER_5">
					<Model
						Name="NBDHub_QL_D1_SKN" />
					<Texture
						Original="NBDHub"
						New="NBDHub_D" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerSmoke"
						FollowBone="true" />
				</ModelConditionState>
				
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="USER_5">
					<Model
						Name="NBDHub_QLBld_SKN" />
				</ModelConditionState>
				<!-- normal d states-->
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED USER_7">
					<Model
						Name="NBDHub_D2SN" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerDist"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerSmoke"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED USER_7">
					<Model
						Name="NBDHub" />
					<Texture
						Original="NBDHub"
						New="NBDHub_D" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerSmoke"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="USER_7">
					<Model
						Name="NBDHub" />
				</ModelConditionState>
				
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT">
					<!-- no anim -->
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING USER_5">
					<Animation
						AnimationName="NBDHub_QLBld_AAN"
						AnimationMode="ONCE" />
				</AnimationState>				
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING USER_7">
					<Animation
						AnimationName="NBDHub_AAN"
						AnimationMode="ONCE" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE"
					StateName="STATE_Rubble"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="NBDHub_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="NBDHub_QLBld_SKN"
						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="NBDHub_QLBld_SKN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_IntoRubble">
					<Animation
						AnimationName="NBDHub_D3AN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
			</ScriptedModelDraw>
			<SpotlightDraw
				id="ModuleTag_Spotlight"
				AttachToBoneInAnotherModule="bone_stealthdetector"
				RefreshTime="2.0s"
				SweepTime="1.0s">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="FXspotlight" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="BUILD_PLACEMENT_CURSOR">
					<Model
						Name="" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="BUILD_PLACEMENT_CURSOR">
					<Script>
						CurDrawableHideSubObject("Plane01")
					</Script>	
				</AnimationState>		
			</SpotlightDraw>
			<LaserDraw
				id="ModuleTag_LaserDraw"
				Texture1_UTile="1"
				Texture1_VTile=".5"
				Texture1_UScrollRate="0"
				Texture1_VScrollRate=".2"
				Texture1_NumFrames="1"
				Texture1_FrameRate="30"
				Texture2_UTile="1"
				Texture2_VTile=".03"
				Texture2_UScrollRate="0"
				Texture2_VScrollRate="1"
				Texture2_NumFrames="1"
				Texture2_FrameRate="30"
				LaserWidth="20">
				<FXShader
					ShaderName="Laser.fx"
					TechniqueIndex="0">
					<Constants>
						<Texture
							Name="Texture1">
							<Value>FXObeliskLaser</Value>
						</Texture>
						<Texture
							Name="Texture2">
							<Value>FXLaserOverlay</Value>
						</Texture>
					</Constants>
				</FXShader>
				<ObjectStatusValidation
					RequiredStatus="WEAPON_UPGRADED_01" />					
			</LaserDraw>			
		</Draws>
		<Behaviors>
			<WeaponSetUpdate
				id="ModuleTag_WeaponSetUpdate">
				<WeaponSlotTurret
					ID="1">				
					<Weapon
						Ordering="PRIMARY_WEAPON"
						Template="NODLaserCannonHubWeapon" 
						ObjectStatus="WEAPON_UPGRADED_01" />
					<Weapon
						Ordering="PRIMARY_WEAPON"
						Template="NODLaserCannonCapacitorsWeapon" 
						ObjectStatus="WEAPON_UPGRADED_01 WEAPON_UPGRADED_02" />

					<TurretSettings
						TurretTurnRate="360"
						TurretPitchRate="100"
						AllowsPitch="true"
						MinimumPitch="-60d"
						PitchHeight="90%"
						MinIdleScanTime="1.0s"
						MaxIdleScanTime="5.0s"
						MinIdleScanAngle="0.0"
						MaxIdleScanAngle="180.0">
						<TurretAITargetChooserData />
					</TurretSettings>
				</WeaponSlotTurret>
			</WeaponSetUpdate>
			<LaserState
				id="ModuleTag_LaserState"
				LaserId="0"></LaserState>
			<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="onDeath"
					FX="FX_BuildDamaged_Small" />
				<Event
					Index="onTransitionToDamaged"
					FX="FX_BuildDamaged_Small" />
				<Event
					Index="onTransitionToReallyDamaged"
					FX="FX_BuildDamaged_Small" />
				<Event
					Index="onTransitionToRubble"
					FX="FX_BuildRubble_Small" />
			</FXListBehavior>
			<StealthDetectorUpdate
				id="ModuleTag_StealthDetect"
				DetectionRange="200" />
			<StructureUnpackUpdate
				UnpackTime="1.5s" />
			<CompositeStructureInfoModule
				id="ModuleTag_CompositeStructureInfoModule"
				ThingTemplate="NODLaserCannonSpawn"
				Count="3"
				BuildableDistance="150">
				<ConnectionShadowInfo
					Type="ALPHA_DECAL_DYNAMIC"
					SizeX="256"
					SizeY="32"
					OpacityStart="0"
					OpacityFadeInTime="3s"
					OpacityPeak="1"
					OpacityFadeOutTime="3s"
					OpacityEnd="0"
					OverrideLODVisibility="true"
					Texture="wire" />
			</CompositeStructureInfoModule>
			<StatusBitsUpgrade
				id="ModuleTag_UpgradeWeapon01"
				StatusToSet="WEAPON_UPGRADED_01">
				<TriggeredBy>Upgrade_NODQuadTurrets</TriggeredBy>
			</StatusBitsUpgrade>
			
			<StatusBitsUpgrade
				id="ModuleTag_UpgradeWeapon02"
				StatusToSet="WEAPON_UPGRADED_02">
				<TriggeredBy>Upgrade_NODTechCenterLaserCapacitor</TriggeredBy>
			</StatusBitsUpgrade>
			
			<ModelConditionUpgrade
				id="ModuleTag_ShowQuadTurretShredderHub"
				AddConditionFlags="USER_5"
				RemoveConditionFlags="USER_7">
				<TriggeredBy>Upgrade_NODQuadTurrets</TriggeredBy>
			</ModelConditionUpgrade>
			
		<!-- hide quad turret -->
			
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretNOD"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_NODFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretBH"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_BlackHandFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretMOK"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_MarkedOfKaneFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretGDI"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_GDIFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretZOCOM"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_ZOCOMFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretST"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_SteelTalonsFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretSCRIN"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_AlienFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretTRAV"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_Traveler59Faction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretREAP"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_Reaper17Faction</TriggeredBy>
			</ModelConditionUpgrade>
			
			
		<!-- causing weird animation bug
			<AttributeModifierUpgrade
				id="Upgrade_LaserROF"
				AttributeModifier="AttributeModifier_LaserROF"
				Permanent="true">
				<TriggeredBy>Upgrade_NODTechCenterLaserCapacitor</TriggeredBy>
			</AttributeModifierUpgrade>
		-->
			<GatherSlavesUpdate
				id="ModuleTag_GatherSlaves"
				SlaveTemplate="NODLaserCannonSpawn"
				Radius="500.0"
				Amount="3" /> 
			<xi:include
				href="../../Includes/GenericBuildingRepair.xml" />
			<xi:include
				href="../../Includes/GenericNODBuildingSuicide.xml" />
			<xi:include
				href="../../Includes/RepairAlliesEngineerContain.xml" />
			<AudioLoopUpgrade id="NOD_QuadTurrets_LaserHubUpgrade" SoundToPlay="NOD_QuadTurrets_LaserHubUpgrade">
				<TriggeredBy>Upgrade_NODQuadTurrets</TriggeredBy>
			</AudioLoopUpgrade> 
		</Behaviors>
		<AI>
			<AIUpdate
				id="AIUpdate"
				AutoAcquireEnemiesWhenIdle="YES">
				<UnitAITargetChooserData
					CanPickDynamicTargets="false"
					CheckVisionRange="false" />
			</AIUpdate>
		</AI>
		<Body>
			<ActiveBody
				id="ModuleTag_Body"
				MaxHealth="3600" />
		</Body>
		<Geometry
			IsSmall="false">
			<Shape
				Type="CYLINDER"
				MajorRadius="25.0"
				Height="30.0"></Shape>
		</Geometry>
		<AudioArrayVoice>
			<AudioEntry
				Sound="NOD_LaserTurret"
				AudioType="voiceSelect" />
		</AudioArrayVoice>
		<AudioArraySound>
			<AudioEntry Sound="NOD_GenericTurret_MoveStart" AudioType="soundTurretMoveLoop" />
			<AudioEntry Sound="NOD_GenericTurret_Deploy" AudioType="soundPrepositioned" />
			<AudioEntry Sound="HumanFaction_SmallBuilding_LightDamageMS" AudioType="soundOnDamaged" />
			<AudioEntry Sound="HumanFaction_SmallBuilding_HeavyDamageMS" AudioType="soundOnReallyDamaged" />
		</AudioArraySound>
		<ShadowInfo
			Type="VOLUME" />
		<VisionInfo
			VisionRange="450"
			ShroudClearingRange="500" />
		<ProjectedBuildabilityInfo
			Radius="0.0"
			BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
	</GameObject>
</AssetDeclaration>
