From e8ed8b8347dbd7e1a20ddd4e7993160defb9f125 Mon Sep 17 00:00:00 2001 From: PhallenCassidy Date: Sat, 10 Mar 2018 23:08:52 -0500 Subject: [PATCH] Fix to 8R77 "Morgul Squealer" Properly allows the Shadow player to play up to 2 minions from draw deck --- .../lotro/cards/set8/wraith/Card8_077.java | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set8/wraith/Card8_077.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set8/wraith/Card8_077.java index 94bb583a8..8d2dce0c2 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set8/wraith/Card8_077.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set8/wraith/Card8_077.java @@ -12,6 +12,9 @@ import com.gempukku.lotro.common.Race; import com.gempukku.lotro.game.PhysicalCard; import com.gempukku.lotro.game.state.LotroGame; import com.gempukku.lotro.logic.actions.ActivateCardAction; +import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; +import com.gempukku.lotro.logic.decisions.IntegerAwaitingDecision; +import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect; import com.gempukku.lotro.logic.timing.Action; import java.util.LinkedList; @@ -35,12 +38,12 @@ public class Card8_077 extends AbstractMinion { } @Override - protected List getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + protected List getExtraPhaseActions(final String playerId, final LotroGame game, PhysicalCard self) { if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 0)) { List actions = new LinkedList(); if (PlayConditions.canSelfDiscard(self, game) && PlayConditions.canPlayFromDiscard(playerId, game, Culture.WRAITH, CardType.MINION)) { - ActivateCardAction action = new ActivateCardAction(self); + final ActivateCardAction action = new ActivateCardAction(self); action.setText("Play from discard"); action.appendCost( new SelfDiscardEffect(self)); @@ -50,14 +53,23 @@ public class Card8_077 extends AbstractMinion { } if (PlayConditions.canSelfDiscard(self, game) && PlayConditions.canSpot(game, 6, CardType.COMPANION)) { - ActivateCardAction action = new ActivateCardAction(self); + final ActivateCardAction action = new ActivateCardAction(self); action.setText("Play from deck"); action.appendCost( new SelfDiscardEffect(self)); action.appendEffect( - new ChooseAndPlayCardFromDeckEffect(playerId, -1, Culture.WRAITH, CardType.MINION)); - action.appendEffect( - new ChooseAndPlayCardFromDeckEffect(playerId, -1, Culture.WRAITH, CardType.MINION)); + new PlayoutDecisionEffect(playerId, + new IntegerAwaitingDecision(1, "How many WRAITH minions do you wish to play from your draw deck?", 0, 2) { + @Override + public void decisionMade(String result) throws DecisionResultInvalidException { + int count = getValidatedResult(result); + for (int i = 0; i < count; i++) + action.appendEffect( + new ChooseAndPlayCardFromDeckEffect(playerId, -1, Culture.WRAITH, CardType.MINION)); + + } + }) + ); actions.add(action); } return actions;