Fix to 8R77 "Morgul Squealer"

Properly allows the Shadow player to play up to 2 minions from draw deck
This commit is contained in:
PhallenCassidy
2018-03-10 23:08:52 -05:00
committed by GitHub
parent 82e7aa09b0
commit e8ed8b8347

View File

@@ -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<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
protected List<? extends Action> getExtraPhaseActions(final String playerId, final LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 0)) {
List<ActivateCardAction> actions = new LinkedList<ActivateCardAction>();
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;