Hi people.
I was trying to make a skill but I realized there was some issues in it, and one way to fix them was to make the skill non-lethal. The thing is I don't know to make a skill not lethal.
If you do, please tell me!
Thanks and have a good day!
What do you mean? Maybe if you could tell us what the skill is we could tell you how to fix it. Right now with what you posted the only way to make it non-lethal is to guarantee the damage is never more than the target's HP, which comes down to math, and we'd need to see your damage formula to tell you what the math is.
The skill formulae is :
Variable X * 500
But I want it to never kill the opponent.
(The true problem behind this is when the characther can use this skill is only upon dying. But IF this skill does kill the opponent, my hero's health is 0 on whatever is Max HP is, but he is not considered dying. And when I start another battle, he automaticly use this skill. Thus, if the skill dosen't kill the opponent, now he is considered dead. If not, he is alive at 0 HP.)
Not sure if this is clear... :S
Hmmm...First, I think you need to fix it so that the hero cannot use the skill at the start of the battle when KO'd. That seems illogical to me. That might take a tweak to whatever condition you have that lets the hero use the skill only when they die. However, if that is not possible, this should work (I'm assuming you are in ACE per your profile).
[Variable X* 500, b.hp - 1].min
That way the attack always leaves 1 HP. Change the 1 to another number if you wish it to leave more HP than 1.
Edit: If you're using MV for this, it should be close to this, I'm just not sure if that is the right format for the function min so you may need to go to the thread dedicated to damage formulas for MV for more on that.