From f16767570d3f3a82d3303adad7b2e814e93891be Mon Sep 17 00:00:00 2001 From: marcins78 Date: Fri, 8 Feb 2013 11:20:43 +0000 Subject: [PATCH] "Feasting and Smoking" --- .../lotro/cards/set20/shire/Card20_386.java | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/shire/Card20_386.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/shire/Card20_386.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/shire/Card20_386.java new file mode 100644 index 000000000..f8de28ef9 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/shire/Card20_386.java @@ -0,0 +1,56 @@ +package com.gempukku.lotro.cards.set20.shire; + +import com.gempukku.lotro.cards.AbstractEvent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayEventAction; +import com.gempukku.lotro.cards.effects.CancelSkirmishEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.filters.Filter; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.GameState; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.modifiers.ModifiersQuerying; + +/** + * 1 + * Feasting and Smoking + * Shire Event • Skirmish + * Tale. + * At sites 1-5, spot 2 Hobbits and discard a pipeweed possession to cancel a skirmish involving a Hobbit. + * At any other site, make a Hobbit strength +2. + */ +public class Card20_386 extends AbstractEvent { + public Card20_386() { + super(Side.FREE_PEOPLE, 1, Culture.SHIRE, "Feasting and Smoking", Phase.SKIRMISH); + addKeyword(Keyword.TALE); + } + + @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.location(game, + new Filter() { + @Override + public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) { + return physicalCard.getSiteNumber() > 5; + } + }) || (PlayConditions.canSpot(game, 2, Race.HOBBIT) && PlayConditions.canDiscardFromPlay(self, game, CardType.POSSESSION, Keyword.PIPEWEED))); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + PlayEventAction action = new PlayEventAction(self); + if (game.getGameState().getCurrentSite().getSiteNumber() <= 5) { + action.appendCost( + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.POSSESSION, Keyword.PIPEWEED)); + action.appendEffect( + new CancelSkirmishEffect(Race.HOBBIT)); + } else { + action.appendEffect( + new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, 2, Race.HOBBIT)); + } + return action; + } +}