Damage Formula depending on how low the enemies AGI is

Right I have been stuck with this damage formula for quite sometime now, what I want is a damage formula which deals more damage the lower the enemies AGI is.

I already tried: 750 + a.mat * b. agi

but then the damage deals like 54k damage which is WAY too high.

then I tried the opposite: 750 + a.mat / b. agi

but the damage never goes higher then 750, just goes lower and lower.

Anyone know the correct formula for this damage equation?
(750 + a.mat) * (1000/b.agi) ?

I'm not sure what you mean with "Lower agi" but this might work out if average AGI is in between the 200-700. You can lower the 1000 to anything.
* b.agi + b.def ?

Im not sure.
"4 * a.atk - b.agi + b.def" West Mains has the right idea from adding a def value in otherwise you'd make mince meat out of giant enemy crabs and island turtles~ 😛
Hmm tried your Formula but I get a script (eval) error when the spell hits the enemy.
Hmm tried your Formula but I get a script (eval) error when the spell hits the enemy.
I'll have a fanny around with rpm and see what I can come up with.
Thanks that would be much appreciated, this formula has been killing me and it is really needed for my characters niche.

EDIT

WAIT!! I found the problem in why I keep getting the error! I looked closer into the formula box and saw a tiny ' in between the formula's XD

Tested it and check the damage differences by changing enemy agility and it works great, thanks for the help everyone.
Well, I added - b.agi * 1 to test it and it definitely changed based on their agility. The higher their agility was the lower the overall damage. Took the default Fire Breath spell, took a slime and gave it 20 Agil. Initially did little under 20 damage, gave it about 5 Agility and suddenly it's taking around 30 or so damage.

I think the game freaks out if you add a + b.x, so I guess for the enemy side it can only be minus. 

Full formula used was this:

10 + a.atk * 0.72 + a.mat * 0.2 - b.def * 0.36 - b.mdf * 0.2 - b.agi * 1

If that helps at all.

EDIT:

Ah! Those problems can arise!! 

I remember once I was trying to learn python and the script wouldn't work. Turned out I had accidentally type ( where I should have put a {. 
I will give this a test as well and see which one fairs better, thanks for all the assistance.

Original thread: https://forums.rpgmakerweb.com/threads/damage-formula-depending-on-how-low-the-enemies-agi-is.20884/