Add common function for damaging a player.