fix Yasharn, Implacable Earth and Angel of Jubilation
This fixes Angel of Jubilation and Yasharn, Implacable Earth incorrectly allowing/preventing sacrifice costs. Angel of Jubilation was blocking sacrifice costs for triggered abilities and Yasharn was not preventing sacrifice and life costs.
I fixed some of the Yasharn tests and added a couple of new tests to each. These tests should cover most scenarios. I created a common effect and just replaced the logic in Yasharn, so I figured it should be a PR first.
closes #9650 closes #13422
[[Yasharn, Implacable Earth]] [[Angel of Jubilation]]
Yasharn, Implacable Earth - (Gatherer) (Scryfall) (EDHREC)
{2}{G}{W} Legendary Creature — Elemental Boar 4/4 When Yasharn enters, search your library for a basic Forest card and a basic Plains card, reveal those cards, put them into your hand, then shuffle. Players can't pay life or sacrifice nonland permanents to cast spells or activate abilities.
Angel of Jubilation - (Gatherer) (Scryfall) (EDHREC)
{1}{W}{W}{W} Creature — Angel 3/3 Flying Other nonblack creatures you control get +1/+1. Players can't pay life or sacrifice creatures to cast spells or activate abilities.
Ok, I created the new PAY_SACRIFICE_COST event and updated canPaySacrificeCost to use it. I also converted the effect into an ability to combine both the cant pay life and cant pay sacrifice costs into one. This works correctly now if you have Karn's Sylex + Yasharn/Jubilation and I added test coverage.
I also updated Thran Portal since it wasn't applying the pay life cost correctly.
@Jmlundeen can you look at #13901? Maybe it can be related to current PR