From 86cfaac5b3512cbf92c9df94d69ebbe0b5dc7513 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 25 Jan 2012 16:18:37 +0000 Subject: [PATCH] "Gandalf" --- .../lotro/cards/set15/gandalf/Card15_029.java | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/gandalf/Card15_029.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/gandalf/Card15_029.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/gandalf/Card15_029.java new file mode 100644 index 000000000..06aea26bb --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/gandalf/Card15_029.java @@ -0,0 +1,64 @@ +package com.gempukku.lotro.cards.set15.gandalf; + +import com.gempukku.lotro.cards.AbstractCompanion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.AddBurdenEffect; +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.OptionalTriggerAction; +import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect; +import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect; +import com.gempukku.lotro.logic.effects.DrawCardsEffect; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: The Hunters + * Side: Free + * Culture: Gandalf + * Twilight Cost: 4 + * Type: Companion • Wizard + * Strength: 8 + * Vitality: 4 + * Resistance: 7 + * Game Text: To play, spot 2 Hobbits. Each time you play a spell, you may add a burden to wound a minion. At the start + * of each skirmish involving Gandalf, you may draw a card and then discard a card from your hand. + */ +public class Card15_029 extends AbstractCompanion { + public Card15_029() { + super(4, 8, 4, 7, Culture.GANDALF, Race.WIZARD, null, "Gandalf", true); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) { + return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile) + && PlayConditions.canSpot(game, 2, Race.HOBBIT); + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.played(game, effectResult, Filters.owner(playerId), Keyword.SPELL)) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendCost( + new AddBurdenEffect(self, 1)); + action.appendEffect( + new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.MINION)); + return Collections.singletonList(action); + } + if (TriggerConditions.startOfPhase(game, effectResult, Phase.SKIRMISH) + && PlayConditions.canSpot(game, self, Filters.inSkirmish)) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendEffect( + new DrawCardsEffect(action, playerId, 1)); + action.appendEffect( + new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1)); + return Collections.singletonList(action); + } + return null; + } +}