Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Problem with <Custom Regenrate Effect> in State

Bishiba

Villager
Xy$
0.00
Hi guys!

I have a question regarding this particular state called burn and does what you'd expect burning to do, it does damage to whoever holds the state..
For some reason the damage is applied twice on the afflicted entity... Which I find rather odd.

Down below is the code for the event.

Code:
<Custom Regenerate Effect>
var damage = 2.5 * origin.atk;
var elementId = 1;
damage *= target.elementRate(elementId);
damage = Math.round(damage);
target.gainHp(-damage);
</Custom Regenerate Effect>
Thanks so much for any responses or discussion in advance!
 
Top