From 7e8a777a9794eec60ae5303b75f59a91ec1550f8 Mon Sep 17 00:00:00 2001 From: marcins78 Date: Wed, 20 Nov 2013 17:10:44 +0000 Subject: [PATCH] Weapons of the East --- .../src/main/web/js/gemp-019/set20.js | 3 +- .../cards/set20/fallenRealms/Card20_485.java | 65 +++++++++++++++++++ .../src/main/resources/set20-rarity.txt | 3 +- 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/fallenRealms/Card20_485.java diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-019/set20.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-019/set20.js index b91751504..f7717c5fb 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-019/set20.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-019/set20.js @@ -472,5 +472,6 @@ var set20 = { '20_481': 'http://lotrtcg.org/coreset/fallenrealms/easterlingplotter(r3).jpg', '20_482': 'http://lotrtcg.org/coreset/fallenrealms/easterlingschemer(r3).jpg', '20_483': 'http://lotrtcg.org/coreset/fallenrealms/rhunishhelm(r3).jpg', - '20_484': 'http://lotrtcg.org/coreset/fallenrealms/serratedaxe(r3).jpg' + '20_484': 'http://lotrtcg.org/coreset/fallenrealms/serratedaxe(r3).jpg', + '20_485': 'http://lotrtcg.org/coreset/fallenrealms/weaponsoftheeast(r3).jpg' } \ No newline at end of file diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/fallenRealms/Card20_485.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/fallenRealms/Card20_485.java new file mode 100644 index 000000000..d94ee7bf9 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/fallenRealms/Card20_485.java @@ -0,0 +1,65 @@ +package com.gempukku.lotro.cards.set20.fallenRealms; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.RemoveTwilightEffect; +import com.gempukku.lotro.cards.effects.StackCardFromDiscardEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromStackedEffect; +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.actions.OptionalTriggerAction; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.EffectResult; +import com.gempukku.lotro.logic.timing.results.DiscardCardsFromPlayResult; + +import java.util.Collections; +import java.util.List; + +/** + * ❶ Weapons of the East [Fal] + * Condition • Support Area + * To play, spot an Easterling. + * Each time a [Fal] possession is discarded, you may spot an Easterling stack it here instead. + * Shadow: Remove ❷ to play a [Fal] possession stacked here as if from hand. + *

+ * http://lotrtcg.org/coreset/fallenrealms/weaponsoftheeast(r3).jpg + */ +public class Card20_485 extends AbstractPermanent { + public Card20_485() { + super(Side.SHADOW, 1, CardType.CONDITION, Culture.FALLEN_REALMS, Zone.SUPPORT, "Weapons of the East"); + } + + @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, Keyword.EASTERLING); + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.forEachDiscardedFromPlay(game, effectResult, Culture.FALLEN_REALMS, CardType.POSSESSION) + && PlayConditions.canSpot(game, Keyword.EASTERLING)) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendEffect( + new StackCardFromDiscardEffect(((DiscardCardsFromPlayResult) effectResult).getDiscardedCard(), self)); + return Collections.singletonList(action); + } + return null; + } + + @Override + protected List getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 2) + && PlayConditions.canPlayFromStacked(playerId, game, 2, self, Culture.FALLEN_REALMS, CardType.POSSESSION)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost(new RemoveTwilightEffect(3)); + action.appendEffect( + new ChooseAndPlayCardFromStackedEffect(playerId, self, Culture.FALLEN_REALMS, CardType.POSSESSION)); + return Collections.singletonList(action); + } + return null; + } +} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/set20-rarity.txt b/gemp-lotr/gemp-lotr-cards/src/main/resources/set20-rarity.txt index dea8bd076..e78bb9a10 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/set20-rarity.txt +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/set20-rarity.txt @@ -471,4 +471,5 @@ 20S481 20S482 20S483 -20S484 \ No newline at end of file +20S484 +20S485 \ No newline at end of file