Hello!
I am trying to make a Chain Lightning skill, where the skill will automatically trigger another version of it depending on RNG.
Currently, what I have is this:
(I know it's not exactly the most robust script in the world...)
I am using the Yanfly Skill Core.
The skill here is skill 94, 95 is a slightly weaker version that has no MP cost and targets one random enemy, where as 94 allows you to select a specific target.
Both have a 35% chance of leaving the enemy with a 'Stunned' state.
And it... technically works, sort of, evidenced by the playing of the animation. But it doesn't display or register damage until the very last target is hit, which as you may imagine is a problem.
[Edit: after testing a bit I have confirmed damage does indeed register it just is not displayed. Additionally and more strangely, if a target reaches 0 hp when hit by anything other than whatever ends up being the last hit, they will remain "alive" and able to attack. Very strange.]
It does, however, leave targeted enemies with the state as you'd expect.
Would anyone happen to have any advice on how I might better go about it?
I am trying to make a Chain Lightning skill, where the skill will automatically trigger another version of it depending on RNG.
Currently, what I have is this:
JavaScript:
<After Eval>
var chance = (Math.randomInt(10) +1);
if (chance >= 5){
BattleManager.queueForceAction(user, 95, target);
}
</After Eval>
(I know it's not exactly the most robust script in the world...)
I am using the Yanfly Skill Core.
The skill here is skill 94, 95 is a slightly weaker version that has no MP cost and targets one random enemy, where as 94 allows you to select a specific target.
Both have a 35% chance of leaving the enemy with a 'Stunned' state.
And it... technically works, sort of, evidenced by the playing of the animation. But it doesn't display or register damage until the very last target is hit, which as you may imagine is a problem.
[Edit: after testing a bit I have confirmed damage does indeed register it just is not displayed. Additionally and more strangely, if a target reaches 0 hp when hit by anything other than whatever ends up being the last hit, they will remain "alive" and able to attack. Very strange.]
It does, however, leave targeted enemies with the state as you'd expect.
Would anyone happen to have any advice on how I might better go about it?