Merge branch 'foul' into 'master'

Foul Emissary: Fix NPE

See merge request core-developers/forge!4739
This commit is contained in:
Michael Kamensky
2021-05-25 06:21:36 +00:00

View File

@@ -80,13 +80,17 @@ public class TriggerSacrificed extends Trigger {
// When cast with Emerge, the cost instance is there
IndividualCostPaymentInstance currentPayment = (IndividualCostPaymentInstance) runParams.get(AbilityKey.IndividualCostPaymentInstance);
SpellAbility sa = currentPayment.getPayment().getAbility();
SpellAbility sa;
if (currentPayment != null) {
sa = currentPayment.getPayment().getAbility();
if (sa != null && sa.getHostCard() != null) {
if (sa.isSpell() && sa.getHostCard().hasStartOfUnHiddenKeyword(keyword)) {
withKeyword = true;
}
}
}
if (!withKeyword) {
// When done for another card to get the Mana, the Emerge card is there