- Joined
- Sep 12, 2015
- Messages
- 1
- Reaction score
- 0
- First Language
- Portuguese
- Primarily Uses
Hi, guys...
I was trying to make a skill that deals more damage according to the target's HP situation, the lower its current HP, the higher is the skill's damage. The problem is that the formula isnt workin. Here's what I'm using (the whole code):
((b.hp / b.mhp) + 1) * a.atk * 3 - b.def * 2The reason I've used that:
"(b.hp / b.mhp)" is where I should get the health situation (ranging from 0.0000... to 1, the later being full HP). Then I add the valor 1 to it. So I can boost the a.atk.
So "((b.hp / b.mhp) + 1) * a.atk" means that the maximum boost is something near 100% of that damage.
The problem is that it is not working. In fact the first hit on an enemy is doing way more damage than the subsequent hits on the same enemy. Right after the first hit on the same target, the subsequent hits keep doing the same damage, like a bug.
Where am I doing wrong?
I was trying to make a skill that deals more damage according to the target's HP situation, the lower its current HP, the higher is the skill's damage. The problem is that the formula isnt workin. Here's what I'm using (the whole code):
((b.hp / b.mhp) + 1) * a.atk * 3 - b.def * 2The reason I've used that:
"(b.hp / b.mhp)" is where I should get the health situation (ranging from 0.0000... to 1, the later being full HP). Then I add the valor 1 to it. So I can boost the a.atk.
So "((b.hp / b.mhp) + 1) * a.atk" means that the maximum boost is something near 100% of that damage.
The problem is that it is not working. In fact the first hit on an enemy is doing way more damage than the subsequent hits on the same enemy. Right after the first hit on the same target, the subsequent hits keep doing the same damage, like a bug.
Where am I doing wrong?

