# Attack Formula Debugging Problems

#### BlissAuthority

##### Dang, it feels good to be a Princess
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?

#### bgillisp

##### Global Moderators

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.

#### BlissAuthority

##### Dang, it feels good to be a Princess
My mistake, thanks.

#### Solar_Flare

##### Veteran
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.

### Latest Profile Posts

It's a Spanish devlog don't get scared!.
Just read the forum rules just for kicks and rule 14 reminds me of this:
I'm in the process of converting all locks and intimidate/persuade dialogue options into D20 DC based success/fail (modified by player skill). Before, it required a certain flat amount you had to meet, but with rolls, it offers more freedom. For instance, you can repeatedly try to unlock a door instead of just not meeting the requirement to unlock it.
Since we get very close: If you want to enjoy the advent calendar as it is intended, wait til your date and the day in the URL line up, so you have the final day on actual christmas and not the day before... time zones ;3

Crossover Inn is getting very crowded, and I love it