[YEP_DamageCore][YEP_BuffStatesCore]Increase damage value before critical multiplier is applied

Hello!
I'm using the two Yanfly's plugins listed in the title in my project to better control how damage is calculated.
So, i made a State that increases the damage dealt by an ability based on the user's Luck parameter.
This is its Notetag:


Code:
<Custom Confirm Effect>
   if(value < 0)
   {
      value-=Math.floor((user.param(7) - 10) / 2);
   }
   else if(value >= 0)
   {
      value+=Math.floor((user.param(7) - 10) / 2);
   }
</Custom Confirm Effect>

So, while testing, i noticed that the critical multiplier is applied to the skill's damage BEFORE the boost from State. So instead of being like:

Code:
(base + luk) * cri

It's more like:

Code:
base * cri + luk

I know i could hard-code the change with Damage Core, but i would like to know if there is a more elegant way to do it with BuffStates's notetags. Thanks in advance!
I think you may be better off using a custom damage formula with an if/else statement dependent on whether the state is applied to the user.
I think you may be better off using a custom damage formula with an if/else statement dependent on whether the state is applied to the user.
The problem is that i have many States with which i should do this, and i don't think it would be worth it at that point.
Maybe not. It could be as simple as

user.isStateAffected(Id) || user.isStateAffected(Id) || user.isStateAffected(Id) || etc.
Maybe not. It could be as simple as

user.isStateAffected(Id) || user.isStateAffected(Id) || user.isStateAffected(Id) || etc.
Yeah, but the various States increment damage by different values, use different parameters etc.
Oh, okay, I see. Did you try custom establish effect?
Oh, okay, I see. Did you try custom establish effect?
Yeah, but in that case the damage has already been dealt to the target, so the bonus given by the State isn't even applied.
I was having an issue getting a skill to work properly when trying to set a variable before the damage took place. It would never work on the first use of the skill, but then it would work with subsequent uses. The answer I got that solved it was to use <Custom Execution>. This note tag would execute before pre-damage eval.

However, this is a skill core note tag so if you were to attempt this it would require using note tags in the skill and using if/else statements.

Sorry I couldn't be of more help.
I was having an issue getting a skill to work properly when trying to set a variable before the damage took place. It would never work on the first use of the skill, but then it would work with subsequent uses. The answer I got that solved it was to use <Custom Execution>. This note tag would execute before pre-damage eval.

However, this is a skill core note tag so if you were to attempt this it would require using note tags in the skill and using if/else statements.

Sorry I couldn't be of more help.
I see. It's not exactly the ideal solution, but is still something. Thanks for the help!

Original thread: https://forums.rpgmakerweb.com/threads/yep_damagecore-yep_buffstatescore-increase-damage-value-before-critical-multiplier-is-applied.124705/