I'm not sure what this code does anymore. Why does it check the invulnerability ticks before healing?
Also, parenthesis around comparisons in combined conditions.