updated how the player takes damage from the enemy