#So I have an issue...

6 messages · Page 1 of 1 (latest)

grizzled basalt
#

So I have an issue...

primal osprey
#
global.grant_hp -= global.dmg;
#

?

primal osprey
#

You've already calculated the damage so just apply it to the hp afterwards.

global.dmg = max(0, global.dmg - global.grant_hp);
global.grant_hp -= global.dmg;
#

ah oops, try

global.dmg = max(0, global.dmg);

instead

#

If we're using this global.dmg = max(0, global.dmg - global.grant_hp); with global.dmg set to 30 and global.grant_hp set to 100.

global.dmg will be set to 0 because -70 is smaller, which is why the hp didn't change