From e5853e303b0a62d37549af23da7f6ed13e6d6a90 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Fri, 9 Mar 2012 11:21:08 +0000 Subject: [PATCH] "Not Bound To His Fate" --- .../lotro/cards/set19/gondor/Card19_014.java | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set19/gondor/Card19_014.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set19/gondor/Card19_014.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set19/gondor/Card19_014.java new file mode 100644 index 000000000..10802526d --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set19/gondor/Card19_014.java @@ -0,0 +1,68 @@ +package com.gempukku.lotro.cards.set19.gondor; + +import com.gempukku.lotro.cards.AbstractAttachable; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.ReturnCardsToHandEffect; +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.actions.OptionalTriggerAction; +import com.gempukku.lotro.logic.actions.RequiredTriggerAction; +import com.gempukku.lotro.logic.modifiers.Modifier; +import com.gempukku.lotro.logic.modifiers.StrengthModifier; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Ages End + * Side: Free + * Culture: Gondor + * Twilight Cost: 2 + * Type: Condition + * Strength: +1 + * Game Text: Bearer must be a [GONDOR] Man. Each time bearer wins a skirmish, you may transfer this condition + * to another [GONDOR] Man. At the end of each turn, if bearer is not Aragorn, return this condition to hand. + */ +public class Card19_014 extends AbstractAttachable { + public Card19_014() { + super(Side.FREE_PEOPLE, CardType.CONDITION, 2, Culture.GONDOR, null, "Not Bound To His Fate"); + } + + @Override + protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { + return Filters.and(Culture.GONDOR, Race.MAN); + } + + @Override + public Modifier getAlwaysOnModifier(PhysicalCard self) { + return new StrengthModifier(self, Filters.hasAttached(self), 1); + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.winsSkirmish(game, effectResult, self.getAttachedTo())) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendEffect( + new ChooseAndTransferAttachableEffect(action, playerId, self, null, Filters.and(Culture.GONDOR, Race.MAN))); + return Collections.singletonList(action); + } + return null; + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (effectResult.getType() == EffectResult.Type.END_OF_TURN + && !PlayConditions.canSpot(game, Filters.aragorn, Filters.hasAttached(self))) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new ReturnCardsToHandEffect(self, self)); + return Collections.singletonList(action); + } + return null; + } +}