I asked this before along with another issue, but since it couldn't be resolved, I'm re-uploading just this problem.
Using Yanfly Buff&State Core's functionality, I set it up so that when an enemy takes damage from a skill, they take damage equal to (5 * atk)/100. (The skill uses the same calculation formula)
Since the player's attack is 100, they should take 5 damage,
and since the skill's damage is 7, both 7 and 5 damage should appear simultaneously for it to be correct.
However, in the right picture, you can see that 5 appears twice.
How should I modify the script to display this correctly?
(Skill formula)
Code:
<Reapply Add Turns>
<Category: debuff>
<Custom Respond Effect>
if (this.isDamage() && value > 0) {
target.gainHp(-Math.ceil((5 * origin.atk)/100 * target.elementRate(1)));
target.startDamagePopup();
if (target.isDead()) {
target.performCollapse();
}
target._stateTurns[19] -= 1;
}
</Custom Respond Effect>