I have made a coupon [coupon_code = SWIMFREE] if category is swimming equipment and hobby is swimming will be discount b
category
swimming equipment
hobby
swimming
You should implement your custom collector for collecting totals. It could be based on Mage_SalesRule_Model_Quote_Discount. How to create custom collectors: see stackoverflow answer, or you can check this article.
Mage_SalesRule_Model_Quote_Discount