First of all, it isn't necessary to use all that duplicate code, all you need to do is pass a negative value as the amount of damage.
Then you'll need an additional line after those two:
This should solve your other problem, too.
I'm not sure how it is caused exactly, though.
Then you'll need an additional line after those two:
This should solve your other problem, too.
I'm not sure how it is caused exactly, though.