Fixed that some AlternativeCostSourceAbilities had no sourceId set.

This commit is contained in:
LevelX2 2020-09-17 10:00:46 +02:00
parent 0a66f1fca0
commit 4050631807
9 changed files with 113 additions and 37 deletions

View file

@ -16,6 +16,7 @@ import mage.players.Player;
import mage.util.CardUtil;
import java.util.Iterator;
import mage.MageObject;
/**
* @author LevelX2
@ -135,7 +136,6 @@ public class AlternativeCostSourceAbility extends StaticAbility implements Alter
} else {
costChoiceText = alternativeCostsToCheck.isEmpty() ? "Cast without paying its mana cost?" : "Pay alternative costs? (" + alternativeCostsToCheck.getText() + ')';
}
if (alternativeCostsToCheck.canPay(ability, ability.getSourceId(), ability.getControllerId(), game)
&& player.chooseUse(Outcome.Benefit, costChoiceText, this, game)) {
if (ability instanceof SpellAbility) {