<?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:GBIonCan.w3x" />
		<Include
			type="all"
			source="ART:GBIonCanX_SKN.w3x" />
		<Include
			type="all"
			source="ART:GBIonCanXD_SKN.w3x" />
		<Include
			type="all"
			source="ART:GBIonCanX_IDL.w3x" />
		<Include
			type="all"
			source="ART:GBIonCanX_RDY.w3x" />
		<Include
			type="all"
			source="ART:GBIonCanX_ATKA.w3x" />
		<Include
			type="all"
			source="ART:GBIonCanX_CLS.w3x" />
		<Include
			type="all"
			source="ART:GBIonCan_A.w3x" />
		<Include
			type="all"
			source="ART:GBIonCan_D2SN.w3x" />
		<Include
			type="all"
			source="ART:GBIonCan_D2AN.w3x" />
		<Include
			type="all"
			source="ART:GBIonCan_D3SN.w3x" />
		<Include
			type="all"
			source="ART:GBIonCan_D3AN.w3x" />
		<Include
			type="all"
			source="ART:GBIonCanX_A.w3x" />
		<!-- Base Object -->
		<Include
			type="instance"
			source="DATA:BaseObjects/BaseStructure.xml" />
	</Includes>
	<GameObject
		id="GDIIonCannonControl"
		inheritFrom="BaseStructure"
		ButtonImage="Portrait_GDIIonCannon"
		SelectPortrait="Portrait_GDIIonCannon"
		Side="GDI"
		EditorSorting="STRUCTURE"
		TransportSlotCount="1"
		BuildCost="5000"
		BuildTime="50"
		EnergyProduction="-20"
		CommandSet="GDIIonCannonControlCommandSet"
		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="225d"
		ProductionQueueType="OTHER_STRUCTURE"
		BuildPlacementTypeFlag="OTHER_STRUCTURE"
		EditorName="GDIIonCannonControl"
		Description="Desc:GDIIonCannon"
		TypeDescription="Type:GDIIonCannon"
		MaxSimultaneousOfType="1">
		<DisplayName
			xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:GDIIonCannon</DisplayName>
		<GameDependency>
			<RequiredObject>GDIArmory</RequiredObject>
		</GameDependency>
		<ArmorSet
			Armor="GDIIonCannonControlArmor" />
		<SkirmishAIInformation
			BaseBuildingLocation="CENTER" />
		<Draws>
			<ScriptedModelDraw
				id="ModuleTag_Draw"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="GBIonCan" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Model
						Name="GBIonCan_A" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE">
					<Model
						Name="GBIonCan_D3SN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED">
					<Model
						Name="GBIonCan_D2SN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED">
					<Model
						Name="GBIonCan" />
					<Texture
						Original="GBIonCannon"
						New="GBIonCannonD" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT"></AnimationState>
				<!-- BUILDUP ANIMATION -->
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Animation
						AnimationName="GBIonCan_A"
						AnimationMode="ONCE" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE"
					StateName="STATE_Rubble"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="GBIonCan_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="GBIonCan_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="GBIonCan_D2AN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_IntoRubble">
					<Animation
						AnimationName="GBIonCan_D3AN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
					<ParticleSysBone
						BoneName="NONE"
						FXParticleSystemTemplate="Des_Medium"
						FollowBone="false" />
				</AnimationState>
				
			</ScriptedModelDraw>
			<!-- DRAW CANNON -->
			<ScriptedModelDraw
				id="ModuleTag_Draw_Cannon"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="GBIonCanX_SKN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Model
						Name="GBIonCanX_A" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED">
					<Model
						Name="GBIonCanXD_SKN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED">
					<Model
						Name="GBIonCanXD_SKN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DYING">
					<Model
						Name="GBIonCanXD_SKN" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT">
					<Animation
						AnimationName="GBIonCanX_IDL"
						AnimationMode="LOOP" />
				</AnimationState>
				<!-- BUILDUP ANIMATION -->
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Animation
						AnimationName="GBIonCanX_A"
						AnimationMode="ONCE" />
					<ParticleSysBone
						BoneName="NONE"
						FXParticleSystemTemplate="Con_Medium"
						FollowBone="true" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="UNPACKING">
					<Animation
						AnimationName="GBIonCanX_ATKA"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="SPECIALPOWER1_READY">
					<Animation
						AnimationName="GBIonCanX_RDY"
						AnimationMode="ONCE"	
						AnimationBlendTime="0" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="PACKING">
					<Animation
						AnimationName="GBIonCanX_CLS"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
			</ScriptedModelDraw>
		</Draws>
		<Behaviors>
			<BuildingBehavior
				id="ModuleTag_BuildingBehavior"
				NightWindowObject="LIGHT_01" />
		
			<SlowDeath
				id="ModuleTag_Death"
				SinkDelay="3s"
				SinkRate="6.0"
				DestructionDelay="9.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_Medium" />
				<Event
					Index="onTransitionToReallyDamaged"
					FX="FX_BuildDamaged_Medium" />
				<Event
					Index="onTransitionToRubble"
					FX="FX_BuildRubble_Medium" />
			</FXListBehavior>
			<StructureUnpackUpdate
				UnpackTime="1.5s" />

			<OCLSpecialPower
				id="ModuleTag_IonCannon"
				SpecialPowerTemplate="SpecialPowerIonCannonControlIonCannon"
				UpdateModuleStartsAttack="true"
				AvailableAtStart="false" 
				OCL="OCL_SuperweaponDestroyCiviliansHumanelyObject"
				CreateLocation="CREATE_AT_LOCATION"
			/>
			<WeaponFireSpecialAbilityUpdate
				id="ModuleTag_IonCannonUpdate"
				SpecialPowerTemplate="SpecialPowerIonCannonControlIonCannon"
				SpecialWeapon="IonCannonWeapon"
				UnpackTime="0s"				
				PackTime="3s"
				WhichSpecialWeapon="1" 
			/>
			<AISpecialPowerUpdate
				id="ModuleTag_IonCannonSpecialPower"
				CommandButtonName="Command_IonCannonSuperweapon"
				SpecialPowerRadius="999999.0"
				SpecialPowerAIType="SPECIAL_POWER_SUPERWEAPON"
				UnitKindOf="STRUCTURE"
			/>

			<!--Monitors when this special power template is ready to fire and sets a model condition-->
			<MonitorSpecialPowerTimerUpdate
				id="ModuleTag_IonCannonReadyToFireUpdate"
				SpecialPowerTemplate="SpecialPowerIonCannonControlIonCannon"
				ReadyCondition="SPECIALPOWER1_READY"
			/>
			<xi:include
				href="../../Includes/GenericBuildingRepair.xml" />
			<xi:include
				href="../../Includes/GenericEngineerContain.xml" />
			<xi:include
				href="../../Includes/GenericGDIBuildingDestruction.xml" />
			<xi:include
				href="../../Includes/GenericGDIBuildingSuicide.xml" />
		</Behaviors>
		<AI>
			<AIUpdate
				id="ModuleTag_AI" />
		</AI>
		<Body>
			<ActiveBody
				id="ModuleTag_Body"
				MaxHealth="20000.0" />
		</Body>
   		<ClientBehaviors>
			<ModelConditionAudioLoopClientBehavior id="ModuleTag_GDI_IonCannon_StartUp">
				<ModelConditionSound Sound="GDI_IonCannon_StartUp" RequiredFlags="SPECIALPOWER1_READY" />
			</ModelConditionAudioLoopClientBehavior>
		</ClientBehaviors>
    <ClientUpdates>
		<EvaAnnounceSpecialPowerReadyClientUpdate
			id="IonCannonReady"
			AnnouncementEventOwner="IonCannonReady"
			SpecialPowerTemplate="SpecialPowerIonCannonControlIonCannon"
			JustMonitorPercentReady="true" 
			/>
		<EvaAnnounceClientCreate
          id="IonCannonDetected" 
          AnnouncementEventEnemy="EnemyIonCannonDetected"
          AnnouncementEventAlly="AlliedIonCannonDetected"
          UseObjectsPosition="true" />
    </ClientUpdates>
    
		<Geometry
			IsSmall="false">
			<Shape
				Type="BOX"
				MajorRadius="45.0"
				MinorRadius="32.5"
				Height="17.5">
				<Offset
					x="0.0"
					y="0.0"
					z="0" />
			</Shape>
			<Shape
				Type="BOX"
				MajorRadius="22.0"
				MinorRadius="39.0"
				Height="17.5">
				<Offset
					x="0.0"
					y="0.0"
					z="0" />
			</Shape>
			<Shape
				Type="CYLINDER"
				MajorRadius="19.0"
				Height="81.0">
				<Offset
					x="0.0"
					y="0.0"
					z="0.0" />
			</Shape>
			<ContactPoint>
				<Pos
					x="-36.0"
					y="32.0"
					z="25" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="36.0"
					y="32.0"
					z="0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="36.0"
					y="-32.0"
					z="25" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="36.0"
					y="32.0"
					z="0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-36.0"
					y="-32.0"
					z="25" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="36.0"
					y="32.0"
					z="0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-36.0"
					y="-32.0"
					z="25" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-36.0"
					y="32.0"
					z="0" />
			</ContactPoint>
		</Geometry>
		<AudioArrayVoice>
			<AudioEntry
				Sound="AudioEvent:GDI_IonCannonSelect"
				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>