Function to calculate damage taken is added. Placeholder for damage done also added.