How To Make A Damage Formula Where Luck Boost The Amount Of Damage?

I thought I asked this question but apparently not. I need help making a damage formula where Luck boost the amount of damage dealt. In my game, the Luck Stat maxes out at 100 and increases the amount of damage done up to 100%.
(Ex. If Luck is at 50, it increases a skill's total damage dealt by 50%)

The damage formula I've been using so far is :
Code:
(a.atk * 2 - b.def * 2) * (1 + (a.luk/100))

It functions but it occasionally will either crash the game, or just flat out do 0 damage about a third of the time.

I've been thinking about a way to just add it to one of the Damage Steps using Yanfly's Damage Core Plugin, but I'm not tech savvy enough to do something like that.

Any help? Either solution helps. I have a majority of Yanfly's plugins if using the default engine doesn't work.
can you replicate it and show an error trace from the console when it happens alongside a screenshot of your plugin manager?

i dont see any scenario where that formula would result in a 0 outside of a.atk and b.def being equal. Luck is set to have a minimum value of 1, so theres no value it could have that would cause it to decrease damage. similarly, i dont see how that formula could cause a crash when its just using default engine parameters.
can you replicate it and show an error trace from the console when it happens alongside a screenshot of your plugin manager?

i dont see any scenario where that formula would result in a 0 outside of a.atk and b.def being equal. Luck is set to have a minimum value of 1, so theres no value it could have that would cause it to decrease damage. similarly, i dont see how that formula could cause a crash when its just using default engine parameters.
I could definitely try, from what I've seen it's really only a problem when I use Yanfly's Armor Scaling but not sure what would be causing the problem from that plugin specifically. So I presume it's from another plugin that's clashing with that Yanfly's I could only guess.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-damage-formula-where-luck-boost-the-amount-of-damage.168599/