diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gollum/Card7_075.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gollum/Card7_075.java new file mode 100644 index 000000000..d4d203183 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/gollum/Card7_075.java @@ -0,0 +1,59 @@ +package com.gempukku.lotro.cards.set7.gollum; + +import com.gempukku.lotro.cards.AbstractResponseEvent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.actions.PlayEventAction; +import com.gempukku.lotro.cards.effects.PreventCardEffect; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Side; +import com.gempukku.lotro.filters.Filters; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; +import com.gempukku.lotro.logic.effects.WoundCharactersEffect; +import com.gempukku.lotro.logic.timing.Effect; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * Set: The Return of the King + * Side: Shadow + * Culture: Gollum + * Twilight Cost: 0 + * Type: Event • Response + * Game Text: If a minion is about to take a wound, spot Gollum to prevent that wound. + */ +public class Card7_075 extends AbstractResponseEvent { + public Card7_075() { + super(Side.SHADOW, 0, Culture.GOLLUM, "Sweeter Meats"); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, twilightModifier) + && PlayConditions.canSpot(game, Filters.gollum); + } + + @Override + public List getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) { + if (PlayConditions.isGettingWounded(effect, game, CardType.MINION) + && checkPlayRequirements(playerId, game, self, 0)) { + final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect; + final Collection woundedCharacters = woundEffect.getAffectedCardsMinusPrevented(game); + final PlayEventAction action = new PlayEventAction(self); + action.appendEffect( + new ChooseActiveCardEffect(self, playerId, "Choose a minion", CardType.MINION, Filters.in(woundedCharacters)) { + @Override + protected void cardSelected(LotroGame game, PhysicalCard card) { + action.insertEffect( + new PreventCardEffect(woundEffect, card)); + } + }); + return Collections.singletonList(action); + } + return null; + } +}