I think I may not have properly explained what the goal was, but I may have gotten the answer I needed.
If the attack hits, it's supposed to deal damage, then apply a debuff to evasion. However, I didn't think to use a state to lower evasion, which would make doing this a bit easier (unless I'm wrong, but I'm open to learning). I'm gonna try going with applying a state that changes the evasion rate of the affected enemy.
If the attack hits, it's supposed to deal damage, then apply a debuff to evasion. However, I didn't think to use a state to lower evasion, which would make doing this a bit easier (unless I'm wrong, but I'm open to learning). I'm gonna try going with applying a state that changes the evasion rate of the affected enemy.
If you check out the flow chart above, you'll see how each step is processed and when. States are added/removed after the damage is done, but must be processed before the actual damage calculation.
The above code:
b.addState(369); 200 + a.mat * 2 - b.mdf * 2should work, just replace 369 with the ID of your evasion reducing state.