2 Expanded answer a lot
source | link

No matter how your opponent decides to assign theassigns damage, your opponent will gain four life when damage is dealt.

Assigning damage

510.1. First, the active player announces how each attacking creature assigns its combat damage

702.19b The controller of an attacking creature with trample first assigns damage to the creature(s) blocking it. Once all those blocking creatures are assigned lethal damage, any remaining damage is assigned as its controller chooses among those blocking creatures and the player or planeswalker the creature is attacking

When you assign damage, you must assign all of it. In the case of trample damage is assigned, you must assign at least lethal damage to anyall blocking creatures, and the remainderany remaining can be assigned to the player or planeswalker. That means your opponent has the following options:

  • Assign 3 to Liliana, and 1 to Liliana
  • Assign 4 to Liliana

In this caseAs you can see, the blocking creature and the planeswalkeroptions in this case all add up to whom trample damage would be assigned are the same objectresult: Lilianaall four damage gets assigned to Liliana of the Veil. So, in this odd case

Dealing damage

510.2. Second, all combat damage that’s been assigned is dealt simultaneously

When the 4/4 lifelink trample creature deals damage, it deals four all at once, rather than dealing three followed by one. Simultaneously, its controller gains four life.

Note that because Liliana was dealt four damage in total, she loses four loyalty counters. This is going to be assigned tobecause Liliana anywayis still a planeswalker even though she is also an enchantment and a creature. Even if Liliana were indestructible, she would still die if she loses all of her loyalty. Gideon, Battle-Forged has an ability that specifically protects him from losing loyalty like this.

No matter how your opponent decides to assign the damage, your opponent will gain four life.

When you assign damage, you must assign all of it. In the case of trample, you must assign at least lethal damage to any blocking creatures, and the remainder can be assigned to the player or planeswalker.

In this case, the blocking creature and the planeswalker to whom trample damage would be assigned are the same object: Liliana. So, in this odd case, all four damage is going to be assigned to Liliana anyway.

No matter how your opponent assigns damage, your opponent will gain four life when damage is dealt.

Assigning damage

510.1. First, the active player announces how each attacking creature assigns its combat damage

702.19b The controller of an attacking creature with trample first assigns damage to the creature(s) blocking it. Once all those blocking creatures are assigned lethal damage, any remaining damage is assigned as its controller chooses among those blocking creatures and the player or planeswalker the creature is attacking

When trample damage is assigned, you must assign at least lethal to all blocking creatures, and any remaining can be assigned to the player or planeswalker. That means your opponent has the following options:

  • Assign 3 to Liliana, and 1 to Liliana
  • Assign 4 to Liliana

As you can see, the options in this case all add up to the same result: all four damage gets assigned to Liliana of the Veil.

Dealing damage

510.2. Second, all combat damage that’s been assigned is dealt simultaneously

When the 4/4 lifelink trample creature deals damage, it deals four all at once, rather than dealing three followed by one. Simultaneously, its controller gains four life.

Note that because Liliana was dealt four damage in total, she loses four loyalty counters. This is because Liliana is still a planeswalker even though she is also an enchantment and a creature. Even if Liliana were indestructible, she would still die if she loses all of her loyalty. Gideon, Battle-Forged has an ability that specifically protects him from losing loyalty like this.

1
source | link

No matter how your opponent decides to assign the damage, your opponent will gain four life.

When you assign damage, you must assign all of it. In the case of trample, you must assign at least lethal damage to any blocking creatures, and the remainder can be assigned to the player or planeswalker.

In this case, the blocking creature and the planeswalker to whom trample damage would be assigned are the same object: Liliana. So, in this odd case, all four damage is going to be assigned to Liliana anyway.