Hey there! I'm working on something of a vampire game and one of the mechanics is a "feed" attack that, as I'm sure you can assume drains the HP of the enemy and gains it to yourself. However, as you level up you gain more powerful versions of the attack that can add states to the effected opponent.
Why I can't just use the "add state" effect is because there are certain enemies that you cannot use your feed on until you gain the more powerful versions. I've accomplished this by setting each "feed" to its own "element" (I have no other need for elements in this game) and if an enemy shouldn't be effected then it just has immunity to attacks with that element. This all works fine, except of course the "add state" will always come into effect regardless of if the attack did damage.
So, I assume the solution is to write a script that's basically:
if (attack does damage) then b.add_state(feed #)
but I have a somewhat tentative grasp on scripting and don't know how to go about this...and of course if anyone knows an easier/better way of doing this let me know! I'd prefer to avoid more plugins but if you have one that does *exactly this* I wouldn't be against it.
Why I can't just use the "add state" effect is because there are certain enemies that you cannot use your feed on until you gain the more powerful versions. I've accomplished this by setting each "feed" to its own "element" (I have no other need for elements in this game) and if an enemy shouldn't be effected then it just has immunity to attacks with that element. This all works fine, except of course the "add state" will always come into effect regardless of if the attack did damage.
So, I assume the solution is to write a script that's basically:
if (attack does damage) then b.add_state(feed #)
but I have a somewhat tentative grasp on scripting and don't know how to go about this...and of course if anyone knows an easier/better way of doing this let me know! I'd prefer to avoid more plugins but if you have one that does *exactly this* I wouldn't be against it.