diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/includes/changeLog.html b/gemp-lotr/gemp-lotr-async/src/main/web/includes/changeLog.html index 9eeec2ca1..defcd13d0 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/includes/changeLog.html +++ b/gemp-lotr/gemp-lotr-async/src/main/web/includes/changeLog.html @@ -16,7 +16,8 @@ - "Smaug's Den" now points to a correct image address. - Corrected the deck validation rules, including added restricted cards by name (Bilbo, Gandalf). - "Thorin" now has a correct resistance. - +- Added "The Eagles Are Coming". + 17 Dec. 2015 - "Armor of Khazad" no longer allows to return itself from discard and can now be transferred. diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/gandalf/Card31_014.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/gandalf/Card31_014.java new file mode 100644 index 000000000..4ae6e8c2f --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/gandalf/Card31_014.java @@ -0,0 +1,59 @@ +package com.gempukku.lotro.cards.set31.gandalf; + +import com.gempukku.lotro.cards.AbstractEvent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayEventAction; +import com.gempukku.lotro.cards.effects.ChoiceEffect; +import com.gempukku.lotro.cards.effects.OptionalEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDeckEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDiscardEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndTransferAttachableEffect; +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.timing.Effect; + +import java.util.LinkedList; +import java.util.List; + +public class Card31_014 extends AbstractEvent { + public Card31_014() { + super(Side.FREE_PEOPLE, 3, Culture.GANDALF, "The Eagles Are Coming", Phase.SKIRMISH); + addKeyword(Keyword.SPELL); + } + + @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.canExert(self, game, Filters.name("Gandalf")); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + PlayEventAction action = new PlayEventAction(self); + + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.name("Gandalf"))); + + List possibleEffects = new LinkedList(); + possibleEffects.add( + new ChooseAndPlayCardFromDiscardEffect(playerId, game, Culture.GANDALF, CardType.FOLLOWER)); + possibleEffects.add( + new ChooseAndPlayCardFromDeckEffect(playerId, Culture.GANDALF, CardType.FOLLOWER)); + + action.appendEffect( + new ChoiceEffect(action, playerId, possibleEffects)); + action.appendEffect( + new OptionalEffect(action, playerId, + new ChooseAndTransferAttachableEffect(action, playerId, true, Filters.and(Culture.GANDALF, CardType.FOLLOWER, Zone.SUPPORT), Filters.any, CardType.COMPANION)) { + @Override + public String getText(LotroGame game) { + return "Attach a [GANDALF] follower"; + } + }); + + return action; + } +}