Refined the damage logic.