Have an attack that cost the user 15% of their HP and needs to add the same % into the formula for damage. I have tried those below (was 35% at the time):
a.mat * a.mhp 35% - b.mdf
a.mph 35% + a.mat *2 - b.mdf
Pretty sure I am just doing something wrong with the formula. I have it reducing my HP by the amount currently.
It will be going into a branch of magic known as Sangromancy for my game.
Solution: Move percent amount before a.mhp
AH that might explain the slight change. I wonder why the % works in the formula?
I will test your change and see how it goes.
Works wonderfully. I want to add, as I had it, it was hitting for like 60 dmg at level 1 with a stat of like 12 lol so i didn't really notice an oddity.
Yours works much better.
Oh interesting. Will look more into that.
Curious, what if I wanted to make a skill that takes HP from the user, and heals the target by the same amount? It would be similar to above correct?
<HP Cost: X%> in note tage
and then 0.35 m.ahp in the formula for HP recover?
<HP Cost: 15%>
(in skill's notetag, you need a plugin for this, for example yanfly's skill core)
0.15 * a.mhp
(as damage formula)
For heal simply change 'hp damage' to 'hp recover'.
Yanfly's plugin (mentioned in the post above mine) is the best method because it presents the skill cost to the player in a way similar to how MP/TP costs are presented rather than making it something the player might miss if they don't fully read the skill description.