[Thing Template=AAGBRBuildingConstructed]
{
	IDS = gbr_bunker_artillery
	name = "#gbr_bunker_artillery_Thing_name"
	editor_name = "#gbr_bunker_artillery_Thing_editor_name"

	[BodyComponent]
	{
		health = 500
		defense = 100
	}

	[DefenderComponent]
	{
		control_range = 144

		[Ability Template=AAAttackLocal]
		{
			turret_ids = Turret 
			
			[AbilityDefinition Template=AABunkerAttackArtilleryDefender]
			{
				name = "#gbr_bunker_artillery_DefenderComponent_AbilityDefinition_name"
				recharge_time = 9
				range = 144
				area = 2
				
				[Effect Template=BlastDamageEffect]
				amount = 3600

				[Effect Template=MoraleLossEffect]
				amount = 4.0

				[WhenDo template=FXC_PlaySFX]
				audio_ids = gbr_artillery_heavy
								
				[WhenDo Template=FXC_PlayObjectAnimation]
				object_animation_IDS = Recoil1
			}
		}
	}

	[DetectionComponent]
	{
		detection_range = 76
	}

	[EconomyComponent]
	{
		[Cost]
		money = 100
		
		[Production]
		
		[Upkeep]
		ammo = 10
	}

	[ElementComponent]
	{
		morale_value = 10
		required_structures = gbr_brigade_artillery
	}

	[Flags]
	{
		axis_locked = false
	}	
	
	[PerformerComponent]
	{
		[Turret]
		{
			turret_ids = Turret
			yaw_rotation_per_sec_degrees = 30
			yaw_rotation_range_degrees = 360
			yaw_start_degrees = 0
			offset = 0.464, 1.102	
		}
	}

	[MobileDeploymentComponent]
	{
		packing_length = 8
		unpacking_length = 8
		pack_health_min = 1
	}

	[PropertiesComponent]
	{			
		[Property]
		property_IDS = artillery		

		[Property]
		property_IDS = property_bunker_artillery

		[Property]
		property_IDS = military_building
	}	
	
	[Size]
	{
		blocking_shape = CIRCLE
		blocking_radius = 2
		
		soft_shape = CIRCLE
		soft_radius = 2.1
	}
	
	[Stance Template=StanceDisabled]
	
	[Stance Template=StanceDeath]
	
	[View]
	{
		resource_prefix = GBRBunkerArtillery/GBRBunkerArtillery
		icon = /UI/Game/BuildingButtons/IconBunkerArtillery.png
		
		[AspectNormal]
		{						
			[Animation Template=ObjectAnimationCustomPlay]
			ids = Recoil1
			length = 1
			kf = GBRBunkerArtillery/GBRBunkerArtilleryRecoil1.kf
		}
		
		[Aspect Template=AAAspectDisabled]
		{						
			[Animation Template=ObjectAnimationCustomPlay]
			ids = Recoil1
			length = 1
			kf = GBRBunkerArtillery/GBRBunkerArtilleryDisabledRecoil1.kf
		}
		
		[Aspect Template=AAAspectDeath]
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = ground_bunker_dirt
			terrain_group_filter = dirt
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = ground_bunker_desert
			terrain_group_filter = desert
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = ground_bunker_snow
			terrain_group_filter = snow
		}
		
		[WhenSelected Template=FXC_PlaySFX]
		{
			audio_ids = bunker_artillery_select
		}
	}

	[WhenLeave Template=FXC_PlaySFX]
	{
		audio_ids = bunker_artillery_construction_complete
		actor_state = construction
	}
}