A player who has a card in hand can't choose to lose 3 life instead of discarding a card.
Liliana, Waker of the Dead
The value of X is determined only as Liliana's second ability resolves. Once that happens, the value of X won't change later in the turn even if the number of cards in your graveyard changes.
As Liliana's first ability resolves, first the player whose turn it is chooses a card in hand without revealing it, then each other player in turn order does the same. Then all the chosen cards are discarded at the same time. Finally, each opponent who couldn't discard a card loses 3 life.
Magic: The Gathering · ™ & © Wizards of the Coast · Illus. Magali Villeneuve
Card data via Scryfall. Rarix is fan-made; not endorsed by the rights holders.
