When you discard a card with madness, a triggered ability exiles it instead of putting it in your graveyard, and then gives you the opportunity to cast it for its madness cost (CR 702.35). This is a casting opportunity — not a way to apply the card as a payment for something else.
Costs that require discarding a card (like activating Liliana's ability or paying for Firestorm) are satisfied the moment you discard. The card leaving your hand fulfills the cost. After that, madness triggers and offers you the chance to cast the discarded card for its madness cost. The discard itself was the payment; madness is a separate, subsequent event.
You cannot, for example, discard a madness card to pay a life cost, a mana cost, or any non-discard cost. Madness only interacts with the act of discarding — it replaces where the card goes (exile instead of graveyard) and grants a special casting permission (CR 702.35b, 702.35c).
Concrete example: Your opponent activates Squee's Wisdom requiring you to discard a card. You discard Fiery Temper (madness {R}). The discard pays the cost normally. Then madness triggers: Fiery Temper is exiled and you may cast it for {R}. The madness did not help pay the original cost — it only gave you a cheap casting option afterward.
In short, madness is purely a casting mechanic triggered by discarding, governed by CR 702.35. It cannot substitute for or contribute to any cost other than paying the madness cost itself when casting the card.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.