"Morgul on the March"

This commit is contained in:
marcins78@gmail.com
2011-11-06 16:41:17 +00:00
parent 5b16cd4606
commit 9f06454506

View File

@@ -0,0 +1,67 @@
package com.gempukku.lotro.cards.set7.wraith;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.common.*;
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.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.effects.AddThreatsEffect;
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Return of the King
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 1
* Type: Condition • Support Area
* Game Text: To play, spot a Nazgul. Each time the Free Peoples player draws a card (except during the regroup phase),
* add a threat. Regroup: Discard a Nazgul and this condition to add a threat.
*/
public class Card7_195 extends AbstractPermanent {
public Card7_195() {
super(Side.SHADOW, 1, CardType.CONDITION, Culture.WRAITH, Zone.SUPPORT, "Morgul on the March", true);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& PlayConditions.canSpot(game, Race.NAZGUL);
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (effectResult.getType() == EffectResult.Type.DRAW_CARD_OR_PUT_INTO_HAND
&& game.getGameState().getCurrentPhase() != Phase.REGROUP) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new AddThreatsEffect(self.getOwner(), self, 1));
return Collections.singletonList(action);
}
return null;
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.REGROUP, self, 0)
&& PlayConditions.canDiscardFromPlay(self, game, Race.NAZGUL)
&& PlayConditions.canSelfDiscard(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Race.NAZGUL));
action.appendCost(
new DiscardCardsFromPlayEffect(self, self));
action.appendEffect(
new AddThreatsEffect(playerId, self, 1));
return Collections.singletonList(action);
}
return null;
}
}