From 0808a647f5197a636a0c88bceb3101f6d9d276e1 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Fri, 9 Mar 2012 11:04:10 +0000 Subject: [PATCH] "Gandalf" --- .../lotro/cards/set19/gandalf/Card19_008.java | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set19/gandalf/Card19_008.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set19/gandalf/Card19_008.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set19/gandalf/Card19_008.java new file mode 100644 index 000000000..1101e897b --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set19/gandalf/Card19_008.java @@ -0,0 +1,53 @@ +package com.gempukku.lotro.cards.set19.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.CancelEventEffect; +import com.gempukku.lotro.cards.effects.SelfExertEffect; +import com.gempukku.lotro.cards.results.PlayEventResult; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Keyword; +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.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Ages End + * Side: Free + * Culture: Gandalf + * Twilight Cost: 4 + * Type: Companion • Wizard + * Strength: 8 + * Vitality: 4 + * Resistance: 7 + * Game Text: Fellowship. Response: If an event is played, exert Gandalf twice to cancel that event. + */ +public class Card19_008 extends AbstractCompanion { + public Card19_008() { + super(4, 8, 4, 7, Culture.GANDALF, Race.WIZARD, null, "Gandalf", true); + addKeyword(Keyword.FELLOWSHIP); + } + + @Override + public List getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.played(game, effectResult, CardType.EVENT) + && PlayConditions.canSelfExert(self, 2, game)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new SelfExertEffect(self)); + action.appendCost( + new SelfExertEffect(self)); + action.appendEffect( + new CancelEventEffect(self, (PlayEventResult) effectResult)); + return Collections.singletonList(action); + } + return null; + } +}