Hi,
I'm trying to make a skill script where the result changes depending on 2 possible conditions that can be met (I used variables c and d).
I want it so that:
if both conditions are met, it inflicts states c and d, and does damage according to the formula.
if only condition c is met, it inflicts state c, and does damage according to the formula.
if only condition d is met, it inflicts state d, and does damage according to the formula.
if neither condition is met, it only does damage according to the formula.
Attached is the code I'm using. Note that I've also included some tp adjustment formulas, as I want every attack/skill in my game to take away 10 tp from the attacker, and add 10 tp to the defender.
Unfortunately when I test it in my game, the skill yields 0 damage. Any help would be greatly appreciated!
EDIT - I think I figured out my problem - my "c" condition was not a valid expression for the way I called the variable in the rest of the script.
Need to test a bit, but damage is returning now.
However, I have a hunch that because of my newbishness, this script is very awkwardly put together...if someone knows a much simpler way of doing this kind of thing, I'd love to learn!
customformulascript.txt
I'm trying to make a skill script where the result changes depending on 2 possible conditions that can be met (I used variables c and d).
I want it so that:
if both conditions are met, it inflicts states c and d, and does damage according to the formula.
if only condition c is met, it inflicts state c, and does damage according to the formula.
if only condition d is met, it inflicts state d, and does damage according to the formula.
if neither condition is met, it only does damage according to the formula.
Attached is the code I'm using. Note that I've also included some tp adjustment formulas, as I want every attack/skill in my game to take away 10 tp from the attacker, and add 10 tp to the defender.
Unfortunately when I test it in my game, the skill yields 0 damage. Any help would be greatly appreciated!
EDIT - I think I figured out my problem - my "c" condition was not a valid expression for the way I called the variable in the rest of the script.
Need to test a bit, but damage is returning now.
However, I have a hunch that because of my newbishness, this script is very awkwardly put together...if someone knows a much simpler way of doing this kind of thing, I'd love to learn!
customformulascript.txt