{T}, Sacrifice another creature or artifact: Ayara, Widow of the Realm deals X damage to target opponent or battle and you gain X life, where X is the sacrificed permanent's mana value.
{5}{R/P}: Transform Ayara. Activate only as a sorcery. ({R/P} can be paid with either {R} or 2 life.)
The first activated ability of Ayara, Widow of the Realm uses the mana value of the permanent you sacrificed as it last existed on the battlefield, not its mana value in the graveyard.