This commit is contained in:
marcins78
2013-03-25 10:45:16 +00:00
parent 12de9b945d
commit d62c4641cd
2 changed files with 23 additions and 14 deletions

View File

@@ -152,7 +152,7 @@ var set20 = {
'20_155': 'http://lotrtcg.org/coreset/gandalf/discernment.jpg',
'20_156': 'http://lotrtcg.org/coreset/gandalf/gandalfdotp.jpg',
'20_157': 'http://lotrtcg.org/coreset/gandalf/gandalfwoti(r1).jpg',
'20_158': 'http://lotrtcg.org/coreset/gandalf/gandalfspipe.jpg',
'20_158': 'http://www.lotrtcg.org/coreset/gandalf/gandalfspipe(r2).jpg',
'20_159': 'http://lotrtcg.org/coreset/gandalf/gandalfsstaffdod.jpg',
'20_160': 'http://lotrtcg.org/coreset/gandalf/glamdringtb.jpg',
'20_161': 'http://lotrtcg.org/coreset/gandalf/graceofthevalar.jpg',

View File

@@ -2,13 +2,15 @@ package com.gempukku.lotro.cards.set20.gandalf;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.CheckTurnLimitEffect;
import com.gempukku.lotro.cards.effects.CheckPhaseLimitEffect;
import com.gempukku.lotro.cards.effects.ForEachYouSpotEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
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.DrawCardsEffect;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
@@ -17,9 +19,10 @@ import java.util.List;
/**
* 1
* •Gandalf's Pipe
* Gandalf Possession • Pipe
* Bearer must be Gandalf.
* At the start of the Fellowship phase, you may discard a pipeweed possession and spot 2 other pipes to discard up to 2 Shadow conditions.
* Possession • Pipe
* Bearer must be a Wizard.
* Maneuver: If bearer is Gandalf, discard a pipeweed possession and spot X pipes to draw X cards (limit once per phase).
* http://www.lotrtcg.org/coreset/gandalf/gandalfspipe(r2).jpg
*/
public class Card20_158 extends AbstractAttachableFPPossession {
public Card20_158() {
@@ -28,20 +31,26 @@ public class Card20_158 extends AbstractAttachableFPPossession {
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.gandalf;
return Race.WIZARD;
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
&& PlayConditions.canDiscardFromPlay(self, game, CardType.POSSESSION, Keyword.PIPEWEED)
&& PlayConditions.canSpot(game, 2, PossessionClass.PIPE)) {
ActivateCardAction action = new ActivateCardAction(self);
protected List<? extends Action> getExtraInPlayPhaseActions(final String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self)
&& PlayConditions.isActive(game, Filters.gandalf, Filters.hasAttached(self))
&& PlayConditions.canDiscardFromPlay(self, game, CardType.POSSESSION, Keyword.PIPEWEED)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.POSSESSION, Keyword.PIPEWEED));
action.appendEffect(
new CheckTurnLimitEffect(action, self, 1,
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 0, 2, Side.SHADOW, CardType.CONDITION)));
action.appendCost(
new ForEachYouSpotEffect(playerId, PossessionClass.PIPE) {
@Override
protected void spottedCards(int spotCount) {
action.appendEffect(
new CheckPhaseLimitEffect(action, self, 1,
new DrawCardsEffect(action, playerId, spotCount)));
}
});
return Collections.singletonList(action);
}
return null;