made it so character can only take damage if alive