From dfe9721bae75f2beb8589f25c9c1b47ea4ccb331 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 2 Nov 2011 12:12:19 +0000 Subject: [PATCH] "Anduril" --- .../lotro/cards/set7/gondor/Card7_079.java | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gondor/Card7_079.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gondor/Card7_079.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gondor/Card7_079.java new file mode 100644 index 000000000..c3def2d4e --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gondor/Card7_079.java @@ -0,0 +1,77 @@ +package com.gempukku.lotro.cards.set7.gondor; + +import com.gempukku.lotro.cards.AbstractAttachableFPPossession; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.PlaySiteEffect; +import com.gempukku.lotro.cards.modifiers.MayNotBearModifier; +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.actions.RequiredTriggerAction; +import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect; +import com.gempukku.lotro.logic.modifiers.KeywordModifier; +import com.gempukku.lotro.logic.modifiers.Modifier; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +/** + * Set: The Return of the King + * Side: Free + * Culture: Gondor + * Twilight Cost: 3 + * Type: Artifact • Hand Weapon + * Strength: +2 + * Vitality: +1 + * Game Text: Bearer must be Aragorn. Discard any other weapon he bears. He is damage +1 and cannot bear other weapons. + * Fellowship or Regroup: If the fellowship is at any site 2 or any site 5, play the fellowship's next site (replacing + * opponent's site if necessary). + */ +public class Card7_079 extends AbstractAttachableFPPossession { + public Card7_079() { + super(3, 2, 1, Culture.GONDOR, CardType.ARTIFACT, PossessionClass.HAND_WEAPON, "Anduril", true); + } + + @Override + protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { + return Filters.aragorn; + } + + @Override + protected List getNonBasicStatsModifiers(PhysicalCard self) { + List modifiers = new LinkedList(); + modifiers.add( + new KeywordModifier(self, Filters.hasAttached(self), Keyword.DAMAGE, 1)); + modifiers.add( + new MayNotBearModifier(self, Filters.hasAttached(self), Filters.and(Filters.weapon, Filters.not(self)))); + return modifiers; + } + + @Override + protected List getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if ((PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self) || PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.REGROUP, self)) + && (game.getGameState().getCurrentSiteNumber() == 2 || game.getGameState().getCurrentSiteNumber() == 5)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendEffect( + new PlaySiteEffect(playerId, null, game.getGameState().getCurrentSiteNumber() + 1)); + return Collections.singletonList(action); + } + return null; + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (PlayConditions.played(game, effectResult, self)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new DiscardCardsFromPlayEffect(self, Filters.weapon, Filters.attachedTo(Filters.hasAttached(self)), Filters.not(self))); + return Collections.singletonList(action); + } + return null; + } +}