From 9f804eb47026531628e47f78e2ab53ce2cd7b00c Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Mon, 5 Dec 2011 14:30:23 +0000 Subject: [PATCH] "Border Patrol" --- .../lotro/cards/set11/rohan/Card11_144.java | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/rohan/Card11_144.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/rohan/Card11_144.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/rohan/Card11_144.java new file mode 100644 index 000000000..9021f58fe --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set11/rohan/Card11_144.java @@ -0,0 +1,76 @@ +package com.gempukku.lotro.cards.set11.rohan; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.*; +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.timing.Effect; +import com.gempukku.lotro.logic.timing.EffectResult; +import com.gempukku.lotro.logic.timing.results.PlayCardResult; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +/** + * Set: Shadows + * Side: Free + * Culture: Rohan + * Twilight Cost: 1 + * Type: Condition • Support Area + * Game Text: When you play this condition, spot a mounted [ROHAN] Man to add 3 [ROHAN] tokens here. + * Response: If a minion is played at a plains site, discard this condition or remove a [ROHAN] token from here to exert + * that minion. + */ +public class Card11_144 extends AbstractPermanent { + public Card11_144() { + super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.ROHAN, Zone.SUPPORT, "Border Patrol", true); + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.played(game, effectResult, self) + && PlayConditions.canSpot(game, Filters.mounted, Culture.ROHAN, Race.MAN)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new AddTokenEffect(self, self, Token.ROHAN, 3)); + return Collections.singletonList(action); + } + return null; + } + + @Override + public List getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.played(game, effectResult, CardType.MINION) + && PlayConditions.location(game, Keyword.PLAINS)) { + ActivateCardAction action = new ActivateCardAction(self); + List possibleCosts = new LinkedList(); + possibleCosts.add( + new RemoveTokenEffect(self, self, Token.ROHAN) { + @Override + public String getText(LotroGame game) { + return "Remove a ROHAN token from here"; + } + }); + possibleCosts.add( + new SelfDiscardEffect(self) { + @Override + public String getText(LotroGame game) { + return "Discard this condition"; + } + }); + action.appendCost( + new ChoiceEffect(action, playerId, possibleCosts)); + action.appendEffect( + new ExertCharactersEffect(self, ((PlayCardResult) effectResult).getPlayedCard())); + return Collections.singletonList(action); + } + return null; + } +}