Automagic use it's own scripting syntax, it is not compatible with other. But as it influenced mainly by java and javascript, there are a lot of function that behaves similarly. There is a good documentation for the script, just look at the help page of the script/expression (tap the question mark icon at the right of the script window). I started there too before I started to use Automagic. You can also visit my index, at the general section, I have put the link there.
There is no pdf/book that explain step by step for Automagic scripting. I ever thought about creating ebook pdf, documenting various scripting technique I use in my flow. I have created so many scripting pattern, that sometimes I forgot how I did it and have to dig many flows just to see the examples.

I should started to document it now, for my own future reference too. But again, too many distraction. My ISP just give me trouble and I have to redesign all of my IP based flow to suit to the new network configuration for a month.
You can learn other programming language, and usually it will improve your automagic scripting skill at the same time. I recommend javascript and python, and if you want more, try java too. We will learn more as we create more flows. I learn most of the scripting technique while creating the flow and during some curious testing.