[STX] fixed Dragon's Approach (fixes #7796)

This commit is contained in:
Evan Kranzler 2021-05-02 22:49:07 -04:00
parent 7665977434
commit f33b333e13
2 changed files with 2 additions and 4 deletions

View file

@ -41,7 +41,7 @@ public final class DragonsApproach extends CardImpl {
this.getSpellAbility().addEffect(new DoIfCostPaid( this.getSpellAbility().addEffect(new DoIfCostPaid(
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)), new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)),
new CompositeCost( new CompositeCost(
new ExileSourceCost(), new ExileFromGraveCost(new TargetCardInYourGraveyard(filter2)), new ExileSourceCost(), new ExileFromGraveCost(new TargetCardInYourGraveyard(4, filter2)),
"exile {this} and four cards named Dragon's Approach from your graveyard" "exile {this} and four cards named Dragon's Approach from your graveyard"
) )
)); ));

View file

@ -8,7 +8,6 @@ import mage.abilities.costs.Cost;
import mage.abilities.costs.CostImpl; import mage.abilities.costs.CostImpl;
import mage.cards.Card; import mage.cards.Card;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.util.CardUtil; import mage.util.CardUtil;
@ -64,8 +63,7 @@ public class ExileSourceCost extends CostImpl {
@Override @Override
public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) { public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) {
Permanent permanent = game.getPermanent(source.getSourceId()); return source.getSourceObjectIfItStillExists(game) instanceof Card;
return permanent != null;
} }
@Override @Override