Acrobatics Damage Formula

I'm trying to make a skill like the move Acrobatics in Pokemon. Where if the user is wearing no armor the power is increased drastically.

if ( a.hasArmor(true)) {a.atk * 5 - b.def * 2;} else {a.atk * 20 - b.def * 2;}
This is my current formula however no matter what I change about it it always returns the "else" result.
I tried writing just a.hasArmor() instead of a.hasArmor(true) or a.hasArmor(false) but the formula seems to just always ignore that section. I have checked other forums to make sure that hasArmor is an actual command and apparently it is, though I fear I am using it incorrectly. Any help would be amazing.
a.hasArmor(true)
that function doesnt check if an actor has any armor. you supply it with an armor and itll check if the actor is wearing it. there is no "true" armor, so itll always be false. use
Code:
if (a.armors().length > 0)
instead

Also warning that enemies dont have equipment of any kind, so you cant give enemies the skill as-is. youll get an error for trying to look at the enemy's non-existent armors() function
Hmmm, isn't the problem with that check that it counts accessories too @Robro33 ?
Thank you! That works perfectly! And yes the skill is only for an Actor's use.

Hmmm, isn't the problem with that check that it counts accessories too @Robro33 ?
In my case this is ok as in my game I have replaced all armors with "Runes"
{a.atk * 20 - b.def * 2;} isn´t a bit excesive? I mean, Acrobatics doubles the damage, but your attack cuadruples the damage. I think that would be too strong, even if the requirement is not having armor. You can do whatever you want, but remember that balance is important.
{a.atk * 20 - b.def * 2;} isn´t a bit excesive?
It's impossible to say, as we don't know what values the OP has for these parameters, nor for HP.

Note that the default formula is atk * 5, so this is only four times that - and it's clear that atk is either lower values than def, or intended to produce high numbers.
I think that would be too strong, even if the requirement is not having armor. You can do whatever you want, but remember that balance is important.
like always, "it depends". for all we know, damage is scaled around "a.atk * 10 - b.def * 2" and the skill has doubled atk compared to a regular skill when unarmored, or damage is logarithmic and x4 atk doesnt have a linear impact on damage. maybe its intended to be powerful but on a cooldown or a high cost.
Pokemon's balancing is its own separate ecosystem. Acrobatics *sucks* and is weaker than even Wing Attack when you have an item held, but has more power and acc than even Stone Edge without an item. Then flying gems also boost it while being consumed before the damage calc.
{a.atk * 20 - b.def * 2;} isn´t a bit excesive? I mean, Acrobatics doubles the damage, but your attack cuadruples the damage. I think that would be too strong, even if the requirement is not having armor. You can do whatever you want, but remember that balance is important.
Yes it is strong but honestly I was thinking of boosting it. I factored level into a lot of my damage calculations which ended up scaling all of the damage formulas to be higher. At the moment it's only like 3 or 4 times a normal attack, and it requires no runes which are a big part of the characters build in the game. So honestly it still kinda sucks.

Original thread: https://forums.rpgmakerweb.com/threads/acrobatics-damage-formula.174167/