Minor refactoring of damage mechanics.