Attack Formula Debugging Problems

I have an attack formula of

a.atk + 15 + (a.lv * 5) - (b.atk + b.def / 2)

with zero variance, for various interesting and diverting hysterical raisins.

Plug in 30 strength and 30 defense for a 6th level character (and give monsters levels and the same stats) and this should be

(30+15+30) = 75 -
(30 + 30) / 2 = 15
= 60 damage.

(This is also an unusually high Defense at that level!)

What actually happens is that this universally results in zero damage.

I'm using several Yanfly battle engine plugins, which I can post if it's relevant.

The same thing results from a fireball with a.mat + 15 + (a.lv*5) - (b.mat + b.mdf / 2) for the formula (that hits all foes, with zero variance).

What the hell am I doing wrong?

I've moved this thread to MV Support. Thank you.



a.lv is undefined, so it is returning 0. Most places that define a level use a.level instead.
@bgillisp, it is first lol.

(a.lv * 5)
a.level
level - current level (Actor only by default)
luk - luck
My mistake, thanks.

Consider this asked and answered.
Also be aware that, unless you use a plugin that adds levels to enemies, this formula will still return 0 when an enemy uses the skill.

Original thread: https://forums.rpgmakerweb.com/threads/attack-formula-debugging-problems.124298/