<?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" xmlns:xai="uri:ea.com:eala:asset:instance">
	<Tags></Tags>
	<Includes>
		<Include
			type="all"
			source="ART:GBBunker.W3X" />
		<Include
			type="all"
			source="ART:GBBunker_D1.w3x" />
		<Include
			type="all"
			source="ART:GBBunker_D2.w3x" />
		<Include
			type="all"
			source="ART:GBBunker_D3.w3x" />
		<Include
			type="all"
			source="ART:GBBunker_DOOR.W3X" />			
		<!-- Base Object -->
		<Include
			type="instance"
			source="DATA:BaseObjects/BaseStructure.xml" />
	</Includes>
	<GameObject
		id="GDI_Bunker"
		inheritFrom="BaseStructure"
		SelectPortrait="Portrait_GDIBunker"
		ButtonImage="Portrait_GDIBunker"
		EditorName="GDI_Bunker"
		Side="GDI"
		EditorSorting="STRUCTURE"
		BuildTime="15"
		CommandSet="AllUnitsConstruct_CommandSet"
		RadarPriority="STRUCTURE"
		KindOf="PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE NEED_BASE_FOUNDATION FS_FACTORY AUTO_RALLYPOINT FS_WAR_FACTORY CAN_CAST_REFLECTIONS COVER NOT_AUTOACQUIRABLE AUTO_ACQUIRABLE_BY_AI DONT_HIDE_IF_FOGGED"
		Browser="REGION GDI_STRUCTURES STRUCTURE">
		<DisplayName
			xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">NAME:GDIBunkerExit</DisplayName>
		<ArmorSet                                         
			Armor="GDIWarFactoryArmor"                    
			DamageFX="FactionStructureDamageFX" />        

		<Draws>
			<ScriptedModelDraw
				id="ModuleTag_Draw"
				AlphaCameraFadeOuterRadius="400.0"
				AlphaCameraFadeInnerRadius="5.0"
				AlphaCameraAtInnerRadius="10"
				AffectedByStealth="false"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="GBBunker" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE">
					<Model
						Name="GBBunker_D3" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED">
					<Model
						Name="GBBunker_D2" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="GDIImpFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="GDIImpSmoke"
						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="GBBunker_D1" />
					<ParticleSysBone
						BoneName="FXBone02"
						FXParticleSystemTemplate="GDIImpSmoke"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="FXBone01"
						FXParticleSystemTemplate="GDIImpSmoke"
						FollowBone="true" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT">
					<!-- no anim -->
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE"
					StateName="STATE_Rubble"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="GBBunker_D3"
						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="GBBunker_D2"
						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="GBBunker_D2"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_IntoRubble">
					<Animation
						AnimationName="GBBunker_D3"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
			</ScriptedModelDraw>
			
<!-- DRAW DOOR -->
			<ScriptedModelDraw
				id="ModuleTag_Draw_Door"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="GBBunker_DOOR" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Model
						Name="NBEmpty_ABLD" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DYING">
					<Model
						Name="NBEmpty_ABLD" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT"
					Flags="START_FRAME_FIRST">
					<Animation
						AnimationName="GBBunker_DOOR"
						AnimationMode="ONCE_BACKWARDS" />
				</AnimationState>
				<!-- BUILDUP ANIMATION -->
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Animation
						AnimationName="NBEmpty_ABLD"
						AnimationMode="ONCE" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DOOR_1_WAITING_OPEN"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="GBBunker_DOOR"
						AnimationMode="ONCE" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DOOR_1_OPENING"
					StateName="STATE_Open">
					<Animation
						AnimationName="GBBunker_DOOR"
						AnimationMode="ONCE" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DOOR_1_CLOSING"
					Flags="START_FRAME_LAST"
					StateName="STATE_Closed">
					<Animation
						AnimationName="GBBunker_DOOR"
						AnimationMode="ONCE_BACKWARDS" />
				</AnimationState>
			</ScriptedModelDraw>		
						
			<xi:include
				href="../../Includes/GarrisonFlagArmorDraw.xml"
				xpointer="xmlns(n=uri:ea.com:eala:asset) xpointer(/n:CommonArmorDraws/child::*)" />
		</Draws>
		<Behaviors>
<!--
			<SlowDeath
				id="ModuleTag_Death"
				SinkDelay="3s"
				SinkRate="2.4"
				DestructionDelay="8s">
				<DieMuxData
					DeathTypes="ALL" />
			</SlowDeath>
-->			
			<FXListBehavior
				id="ModuleTag_FXList"
				xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">
				<DieMuxData
					DeathTypes="ALL" />
				<Event
					Index="onTransitionToDamaged"
					FX="FX_BuildDamaged_Large" />
				<Event
					Index="onTransitionToReallyDamaged"
					FX="FX_BuildDamaged_Large" />
				<Event
					Index="onTransitionToRubble"
					FX="FX_BuildRubble_Large" />
				<Event
					Index="onDeath"
					ForceUseDoFXObj="true"
					FX="FX_ScorchMedium" />
			</FXListBehavior>
			
			<xi:include
				href="../../Includes/GenericBuildingRepair.xml" />
		
			<ProductionUpdate
				id="ModuleTag_ProductionUpdate"
				GiveNoXP="true"
				Type="INVALID"
				NumDoorAnimations="1"
				DoorOpeningTime="0.66s"
				DoorWaitOpenTime="1.66s"
				DoorCloseTime="0.66s"
				IgnorePreReqs="true"
				ProductionTimeDelayScalar=".5s">
				<ProductionModifier
					CostMultiplier="0"
					TimeMultiplier="0">
					<ModifierFilter
						Rule="ANY"
						Include="VEHICLE HUGE_VEHICLE INFANTRY AIRCRAFT HARVESTER" />
				</ProductionModifier>
			</ProductionUpdate>
			
			<QueueProductionExitUpdate
				id="ModuleTag_QueueProduction"
				ExitDelay="4">
				<UnitCreatePoint
					x="0.0"
					y="5.0"
					z="0.0" />
				<NaturalRallyPoint
					x="0.0"
					y="-120.0"
					z="0.0" />
			</QueueProductionExitUpdate>
				
		</Behaviors>
		<AI>
			<AIUpdate
				id="ModuleTag_AI" />
		</AI>
		<Body>
			<ActiveBody
				id="ModuleTag_02"
				MaxHealth="20000.0" />
		</Body>
    <Geometry
			IsSmall="false">
      <Shape
				Type="CYLINDER"
				MajorRadius="33.393"
				MinorRadius="33.393"
				Height="41.7847"
				ContactPointGeneration="INFANTRY">
        <Offset
					x="-30.6066"
					y="1.40201"
					z="0.0" />
      </Shape>
      <Shape
				Type="CYLINDER"
				MajorRadius="49.1624"
				MinorRadius="49.1624"
				Height="49.5653"
				ContactPointGeneration="INFANTRY">
        <Offset
					x="28.4683"
					y="0.249331"
					z="0.0" />
      </Shape>
    </Geometry>
    <AudioArraySound>
      <AudioEntry Sound="HumanFaction_MediumBuilding_LightDamageMS" AudioType="soundOnDamaged" />
      <AudioEntry Sound="HumanFaction_MediumBuilding_HeavyDamageMS" AudioType="soundOnReallyDamaged" />
    </AudioArraySound>
    <ShadowInfo
			Type="VOLUME" />
    <VisionInfo
			VisionRange="350"
			ShroudClearingRange="320" />
	</GameObject>
</AssetDeclaration>