Please use three backticks (```) in the future to present your code in a nice and organized way. You can read the FAQ (which you should have anyway) to see how exactly to do this.
To your problem.
At the first look I can’t see any problem with it. Please use
self.say(self.health) at the start of the loop. Maybe it is a bug with the variable not properly decreasing (I think there were some problems once, but I thought they were resolved…).
I solved the level once with pretty much the same code, but I die as well.
EDIT: Ah, I found the problem (kind of). I followed my own advice and added some say-commands. By the time were you are flung in the air, you received no damage. Your program still uses the old value, which is above the threshold. It selects the next mine and moves to it. During this move,
self.health is updated. But that is too late. You already move, and nothing will stop you (well, except the next mine of course).
I don’t really have a solution for this though right now. You could try with boots that use move rather than moveXY, or flags (though this is not the intended way). I contact @nick about it.