[Thing Inherit=AABuildingGroundPlane]
{
	name = "#iwo_jima_beach_bunker_artillery_ground_name"
	texture = IwoJimaBeachBunkerArtillery/IwoJimaBeachBunkerArtilleryTemperateGround.DDS	
	IDS = iwo_jima_beach_bunker_artillery_ground
	texture_size = 8
}

[Thing Template=AABuilding]
{
	IDS = IwoJimaBeachBunkerArtillery
	name = "#iwo_jima_beach_bunker_artillery_name"
	editor_name = "#iwo_jima_beach_bunker_artillery_editor_name"

	[BodyComponent]
	{
		captureable = true
		health = 1000
		defense = 70
	}
	
	[ConstructionComponent]
	{
		construction_node_name_prefix = Stage
		finished_node_name = Final
		can_sell = false
		can_raze = false
	}
	
	[DefenderComponent]
	{
		control_range = 30
			
		[Ability template=AAAttackLocal]
		{
			turret_ids = Turret

			[AbilityDefinition Template=AABunkerAttackArtilleryDefender]
			{
				name = "#iwo_jima_beach_bunker_artillery_DefenderComponent_AbilityDefinition_name"
				range = 40
				recharge_time = 4
				
				targets = +enemy, -air, -mine, -building


				[Effect Template=BlastDamageEffect]
				amount = 110

				[Effect Template=MoraleLossEffect]
				amount = 1.25

				[WhenDo Template=FXC_PlayObjectAnimation]
				object_animation_IDS = Recoil1

				[Flags]
				{
					spell = true
				}
			}
		}
	}

	[DetectionComponent]
	{
		detection_range = 30
	}

	[EconomyComponent]
	
	[Flags]
	{
		axis_locked = false
	}	
	
	[Placement]
	{
		placement_group_IDS = group_campaign
	}
	
	[PropertiesComponent]
	
	[Size]
	{
		height = 2
		blocking_shape = SQUARE
		square_size = 6
		fixed scale_min = 1.0
		fixed scale_max = 1.0
		
	}

	[Stance Template=StanceDeath]

	[View]
	{
		resource_prefix = IwoJimaBeachBunkerArtillery/IwoJimaBeachBunkerArtillery
		icon = /UI/Game/BuildingButtons/IconBunkerArtillery.png

		[AspectNormal]
		{						
			[Animation Template=ObjectAnimationCustomPlay]
			ids = Recoil1
			length = 1
			kf = IwoJimaBeachBunkerArtillery/IwoJimaBeachBunkerArtilleryRecoil1.kf
		}

		[Aspect Template=AAAspectDeath]

		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = iwo_jima_beach_bunker_artillery_ground
			terrain_group_filter = dirt
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = iwo_jima_beach_bunker_artillery_ground
			terrain_group_filter = desert
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = iwo_jima_beach_bunker_artillery_ground
			terrain_group_filter = snow
		}	
	}

	[PerformerComponent]
	{
		[Turret]
		{
			turret_ids = Turret
			yaw_rotation_per_sec_degrees = 20
			yaw_rotation_range_degrees = 360
			yaw_start_degrees = 0
			offset = 0.98,-2.327
		}
	}
}