function main(self)
	local claw = GetClaw()

    if self.State == 0 then
		self.Flags.AlwaysActive = true
        self.State = 1
	end

	if self.State == 1 then
		if claw.I == 27 or claw.I == 76 or claw.I == 283 then
			CreateObject{
				X = (2*claw.X + claw.AttackRect.Left + claw.AttackRect.Right)/2,
				Y = (2*claw.Y + claw.AttackRect.Top + claw.AttackRect.Bottom)/2,
				Z = 4400,
				name = "ArtifactPower:MagicRingProjectile",
				Direction = claw.DrawFlags.Mirror == true and 4 or 6
			}
			PlaySound("CUSTOM_MAGICBULLETS")
			self.cooldown = GetTime() + 9000
			self.State = 2
		end
	end

	if self.State == 2 and GetTime() > self.cooldown then
		self.State = 1
	end
end
