"Scroll of Isildur"

This commit is contained in:
marcins78@gmail.com
2011-11-20 02:26:41 +00:00
parent 7a5ba86f1b
commit 197fd807f7

View File

@@ -0,0 +1,60 @@
package com.gempukku.lotro.cards.set9.gondor;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDiscardEffect;
import com.gempukku.lotro.cards.modifiers.ResistanceModifier;
import com.gempukku.lotro.cards.modifiers.evaluator.CountSpottableEvaluator;
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.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: Reflections
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Artifact • Support Area
* Game Text: Tale.To play, spot a [GONDOR] Man. The Ring-bearer is resistance +1 for each [GONDOR] artifact you can
* spot (limit +3). Fellowship: Discard this artifact to play a ring from your discard pile.
*/
public class Card9_036 extends AbstractPermanent {
public Card9_036() {
super(Side.FREE_PEOPLE, 1, CardType.ARTIFACT, Culture.GONDOR, Zone.SUPPORT, "Scroll of Isildur", true);
addKeyword(Keyword.TALE);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier, ignoreRoamingPenalty)
&& PlayConditions.canSpot(game, Culture.GONDOR, Race.MAN);
}
@Override
public List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new ResistanceModifier(self, Keyword.RING_BEARER, new CountSpottableEvaluator(3, Culture.GONDOR, CardType.ARTIFACT)));
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
&& PlayConditions.canSelfDiscard(self, game)
&& PlayConditions.canPlayFromDiscard(playerId, game, PossessionClass.RING)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new DiscardCardsFromPlayEffect(self, self));
action.appendEffect(
new ChooseAndPlayCardFromDiscardEffect(playerId, game, PossessionClass.RING));
return Collections.singletonList(action);
}
return null;
}
}