From 10c5517c03ada455ccc241d204adbbc20717920e Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Sat, 22 Oct 2011 17:13:28 +0000 Subject: [PATCH] "Banner of the Mark" --- .../lotro/cards/set6/rohan/Card6_090.java | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/rohan/Card6_090.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/rohan/Card6_090.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/rohan/Card6_090.java new file mode 100644 index 000000000..f5e92f178 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/rohan/Card6_090.java @@ -0,0 +1,76 @@ +package com.gempukku.lotro.cards.set6.rohan; + +import com.gempukku.lotro.cards.AbstractAttachableFPPossession; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.LiberateASiteEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Filterable; +import com.gempukku.lotro.common.PossessionClass; +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.OptionalTriggerAction; +import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Ents of Fangorn + * Side: Free + * Culture: Rohan + * Twilight Cost: 1 + * Type: Possession • Hand Weapon + * Game Text: Bearer must be a [ROHAN] companion. Each time bearer wins a skirmish, you may exert a minion. + * Response: If bearer wins a skirmish, discard this possession to liberate a site. + */ +public class Card6_090 extends AbstractAttachableFPPossession { + public Card6_090() { + super(1, 0, 0, Culture.ROHAN, PossessionClass.HAND_WEAPON, "Banner of the Mark"); + } + + @Override + protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { + return Filters.and(Culture.ROHAN, CardType.COMPANION); + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (PlayConditions.winsSkirmish(game, effectResult, self.getAttachedTo())) { + OptionalTriggerAction action = new OptionalTriggerAction(self) { + @Override + public String getText(LotroGame game) { + return "Exert a minion"; + } + }; + action.appendEffect( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.MINION)); + return Collections.singletonList(action); + } + return null; + } + + @Override + public List getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (PlayConditions.winsSkirmish(game, effectResult, self.getAttachedTo()) + && PlayConditions.canSelfDiscard(self, game)) { + ActivateCardAction action = new ActivateCardAction(self) { + @Override + public String getText(LotroGame game) { + return "Discard this to liberate a site"; + } + }; + action.appendCost( + new DiscardCardsFromPlayEffect(self, self)); + action.appendEffect( + new LiberateASiteEffect(self)); + return Collections.singletonList(action); + } + return null; + } +}