I've been conceptualizing an idea for how to implement something like this for a bit now;
1) A skill is executed, and the actor runs up to the target
2) A visual of some sort appears to display the result of their Accuracy Roll, contesting the opponents Evasion or "Armor Class"
3) If the Accuracy Roll is equal to or higher than the Evasion/Armor Class, the attack proceeds as usual
4) If the Accuracy Roll is lower than the Evasion/Armor Class, the attack animation changes to a special whiff animation, and the skill is not successfully executed (like bouncing off armor or being deflected)
I'm considering using something like Yanfly's Act Sequence Packs in order to be able to do this, but I'm not sure how to make the Evasion and Accuracy Roll visible. One idea I had was to use a special damage formula to determine this:
if (b.eva * 100 <= (Math.randomInt(20) + 1 + a.agi)) Math.randomInt(a.atk * 2) + 1 - b.def; else 0
I've tested this formula before, so it does work as intended (with the "Whiff" animation being 0 damage when the attack fails) but only as far as damage goes. If the skill has a chance to do something like inflicting ailments, those would still have a shot at being applied...
Ultimately what I seek is a way to make the 4 mentioned criteria happen: the run up (easily accomplishable with ActSeq), the dice roll, and then the branching between hitting and whiffing. If anyone knows where to get started with this or how to make it work in some way, I'd appreciate the help.
1) A skill is executed, and the actor runs up to the target
2) A visual of some sort appears to display the result of their Accuracy Roll, contesting the opponents Evasion or "Armor Class"
3) If the Accuracy Roll is equal to or higher than the Evasion/Armor Class, the attack proceeds as usual
4) If the Accuracy Roll is lower than the Evasion/Armor Class, the attack animation changes to a special whiff animation, and the skill is not successfully executed (like bouncing off armor or being deflected)
I'm considering using something like Yanfly's Act Sequence Packs in order to be able to do this, but I'm not sure how to make the Evasion and Accuracy Roll visible. One idea I had was to use a special damage formula to determine this:
if (b.eva * 100 <= (Math.randomInt(20) + 1 + a.agi)) Math.randomInt(a.atk * 2) + 1 - b.def; else 0
I've tested this formula before, so it does work as intended (with the "Whiff" animation being 0 damage when the attack fails) but only as far as damage goes. If the skill has a chance to do something like inflicting ailments, those would still have a shot at being applied...
Ultimately what I seek is a way to make the 4 mentioned criteria happen: the run up (easily accomplishable with ActSeq), the dice roll, and then the branching between hitting and whiffing. If anyone knows where to get started with this or how to make it work in some way, I'd appreciate the help.