Reduce code duplication. Also verify that our target is alive before trying to damage them.

Fixes #1403