{
	"@type": "Powers.BehaviorTree",
	"name": "tesla_sphere",
	"RootNode": {
		"@type": "Retrodreamer.Monocles.WhileAlive",
		"ParentName": "parent",
		"Child": {
			"@type": "Powers.SequenceNode",
			"Children": [
				{
					"@type": "Retrodreamer.Monocles.WhileValueEmpty",
					"ToCheck": "target",
					"Child": {
						"@type": "Retrodreamer.Monocles.Idle"
					}
				},
				{
					"@type": "Retrodreamer.Monocles.WhileValueExists",
					"ToCheck": "target",
					"Child": {
						"@type": "Powers.SequenceNode",
						"Children": [
							{
								"@type": "Retrodreamer.Monocles.MaintainRangeFromTarget",
								"MinRange": 4,
								"MaxRange": 6
							},

							{
								"@type": "Retrodreamer.Monocles.UpdateCollisionState",
								"ParentName": "parent",
								"KnockbackEnabled": false,
								"CollisionEnabled": true
							},

							{
								"@type": "Retrodreamer.Monocles.PlayAnimation",
								"ParentName": "parent",
								"AnimationName": "attack-start",
								"FinishEvent": "OnAnimationComplete"
							},
							{
								"@type": "Retrodreamer.Monocles.PlayAnimation",
								"ParentName": "parent",
								"AnimationName": "attack-loop",
								"WaitForCompletion": false
							},
							{
								"@type": "Retrodreamer.Monocles.CreateBeam",
								"ParentName": "parent",
								"BeamName": "beam",
								"Animated": true,
								"BeamAsset": "base-tesla_sphere-beam",
								"BeamStartCapAsset": "base-tesla_sphere-beam_start_cap",
								"BeamEndCapAsset": "base-tesla_sphere-beam_end_cap",
								"BeamDamage": 350,
								"BeamEndParticles" : "base-tesla_sphere-beam_end_particles",
								"MaxBeamLength": 6,
								"BeamSFX" : "base-enemy-teslasphere-laser",
								"XOffset": -0.1,
								"YOffset": 1.85,
								"TagsToHit": [
									"player",
									"prop"
								]
							},
							{
								"@type": "Retrodreamer.Monocles.FireBeam",
								"ParentName": "parent",
								"BeamName": "beam",
								"Duration": 1.2,
								"SweepAngle": 120
							},
							{
								"@type": "Retrodreamer.Monocles.PlayAnimation",
								"ParentName": "parent",
								"AnimationName": "attack-finish",
								"FinishEvent": "OnAnimationComplete"
							},


							{
								"@type": "Retrodreamer.Monocles.UpdateCollisionState",
								"ParentName": "parent",
								"KnockbackEnabled": true,
								"CollisionEnabled": true
							},

							{
								"@type": "Retrodreamer.Monocles.IdleForDuration",
								"ChangeAnimation": true,
								"IdleDuration": 1
							}
						]
					}
				}
			]
		}
	}
}
