Help understanding projectile/ammo effects and monster AI

Where and how are defined projectiles/ammo effects? I saw that it has 1 method and one struct. One in ballistics.h and other in map.h. Is there any place with all the effects and what they do?
And if I wanted to implement a new one, is there any guidelines I should follow or just do it copying more or less the way the current ones are implemented?

Regarding the monster AI. I have a lot of assumptions and guesses and I’m a very noob programmer to get by with the comments and simply reading the code.
Out of all my testing, tweaking and playing with it, I get that monster::plan decides what a monster does, and monster::move how it does it. I think.
But I would love if someone could give me a little bit in depth explanation of how the general AI voodoo works. This is the first AI I touch, and it’s been an exercise of frustration and patience, and if you could help with it I would be very grateful.