forked from External/mage
Refactor: improved choose cards method to use source param (fixed NPE like #10233, #9974 and other bugs with choose cards)
This commit is contained in:
parent
5474787641
commit
689b93d005
280 changed files with 341 additions and 342 deletions
|
|
@ -52,7 +52,7 @@ public class DrawDiscardOneOfThemEffect extends OneShotEffect {
|
|||
if (!drawnCards.isEmpty()) {
|
||||
TargetCard cardToDiscard = new TargetCard(Zone.HAND, new FilterCard("card to discard"));
|
||||
cardToDiscard.setNotTarget(true);
|
||||
if (controller.choose(Outcome.Discard, drawnCards, cardToDiscard, game)) {
|
||||
if (controller.choose(Outcome.Discard, drawnCards, cardToDiscard, source, game)) {
|
||||
Card card = controller.getHand().get(cardToDiscard.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
return controller.discard(card, false, source, game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue