Yanfly Lunatic Power Charge help?

Hello,

I'm using Yanfly's lunatic code to simulate the Power Charge and Mind Charge skills from the SMT series.

The video can be found here:
http://yanfly.moe/2016/09/29/tips-tricks-power-charge-mind-charge-shin-megami-tensei-rpg-maker-mv/

For those of you not familiar, power charge is a move that gives the next physical skill you use a damage multiplier.

However, my issue with the code is that the power charge or physical attack boost, only applies for the basic attack skill. I want this buff to apply to physical skills, as well as the basic attack.

Currently, the physical attack skills aren't getting buffed.

Here's the code, I'm using:
<Custom Action Start Effect>

// Get the current action.

var action = user.currentAction();

// Check if the action is physical, is a basic attack, and deals HP damage.

if (action.isPhysical() && action.isAttack() && action.isHpEffect()) {

// Play an animation to indicate the effect is taking off.

user.startAnimation(2);

}

</Custom Action Start Effect>



<Custom Confirm Effect>

// Check if the action is physical, is a basic attack, and deals HP damage.

if (this.isPhysical() && this.isAttack() && this.isHpEffect() && value > 0) {

// Increase the damage by a multiplier.

value *= 3.0;

// Round up the damage.

value = Math.ceil(value);

// Remove the state.

user.removeState(stateId);

}

</Custom Confirm Effect>

Can anyone help me apply this code to both physical skills and the basic attack?
Did you label the physical skills as physical? I just tested it and it's working fine for me.
Yup, all physical skills are labeled physical, yet the charge only works for basic attacks not skills.
@Lonewulf123 And it's a state right? Is the actor inflicted with that state when you use it?
@Lonewulf123 And it's a state right? Is the actor inflicted with that state when you use it?
Correct, it's setup as a state.

I don't know if this is affecting it, but I'm using yanfly's skill unleash and when the skills are set as the default attack, the code works. But using them from the skill menu is a no go.
Can you show some picturesof the skills and state? I've been using it and it's working fine for basic and skill attacks.
I was able to solve this! Basically, there's a line in the power charge code that checks to see if a basic attack is being used.

I solved this by removing the two lines that check for that:
  • && action.isAttack()
  • && this.isAttack()
Not sure, how you got it to work without removing those, but hey at least its working for me now!

This can be closed.
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-lunatic-power-charge-help.84132/