So, in my current project, I've designed an skill, Stitch Up, that deals damage in it's own unique element, Torn. All enemies have a 0% Rate to torn because the skill is supposed to be a follow up kind of attack that only works if the Torn State is applied to the target. I've set the Torn State to have Element Rate: Torn * 100%. I get the message saying "*Enemy*'s soul was reassembled" so I know the skill worked, but the enemy took no damage. I've made sure that the Torn State is applied every time. What am I doing wrong and how can I fix it?
Element Rate Problem
RPG Maker VXAce SupportThe enemy's rate is 0%. 0% means immunity.
The state doesn't overwrite the trait the enemy already has. It accounts for both, meaning it reads the rate as 0% * 100%, which is still zero.
You need an if statement to make this work. This can be done in the damage formula. I think it's something like this:
b.isStateAffected(Torn ID State) ? damage effect : 0
Replace Torn ID State with the ID of the state you're checking for (keep the parentheses), and replace damage effect with the formula for that attack. 0 occurs if the condition is false.
You need an if statement to make this work. This can be done in the damage formula. I think it's something like this:
b.isStateAffected(Torn ID State) ? damage effect : 0
Replace Torn ID State with the ID of the state you're checking for (keep the parentheses), and replace damage effect with the formula for that attack. 0 occurs if the condition is false.
That code is for MV and this is Ace.
If no one has given the correct formula by the time I'm back on my computer, I'll edit this post with it.
EDIT
if b.state?(x); a.atk * 4 - b.def * 2; end; 0
where x is the ID number of the state 'Torn'. Change the a.atk * 4 - b.def to whatever damage formula you want.
If no one has given the correct formula by the time I'm back on my computer, I'll edit this post with it.
EDIT
if b.state?(x); a.atk * 4 - b.def * 2; end; 0
where x is the ID number of the state 'Torn'. Change the a.atk * 4 - b.def to whatever damage formula you want.
Original thread: https://forums.rpgmakerweb.com/threads/element-rate-problem.83313/