I have a state called bloodlust and a skill called bloodlust. The skill adds the state to the character (self only).
While the state is in effect, the character's normal attack is supposed to heal him/her for 1/5 of the damage dealt.
... so I tried to change the attack formula but I can't get it quite right.
c = (a.atk * a.mdf) - b.def; a.state?(100)? c && a.hp = a.hp + c/5: c
instead of healing the character, it changes 2 damage to 55 damage (which is her max hp)
While the state is in effect, the character's normal attack is supposed to heal him/her for 1/5 of the damage dealt.
... so I tried to change the attack formula but I can't get it quite right.
c = (a.atk * a.mdf) - b.def; a.state?(100)? c && a.hp = a.hp + c/5: c
instead of healing the character, it changes 2 damage to 55 damage (which is her max hp)