diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/isengard/Card4_141.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/isengard/Card4_141.java new file mode 100644 index 000000000..4a55d2b37 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/isengard/Card4_141.java @@ -0,0 +1,57 @@ +package com.gempukku.lotro.cards.set4.isengard; + +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.AddBurdenEffect; +import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Phase; +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.timing.EffectResult; +import com.gempukku.lotro.logic.timing.results.KillResult; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * Set: The Two Towers + * Side: Shadow + * Culture: Isengard + * Twilight Cost: 0 + * Type: Event + * Game Text: Response: If a companion or ally is killed, exert an [ISENGARD] minion to add a burden (or 2 burdens + * if Aragorn, Gandalf, or Theoden is killed). + */ +public class Card4_141 extends AbstractResponseEvent { + public Card4_141() { + super(Side.SHADOW, Culture.ISENGARD, "Beyond Dark Mountains"); + } + + @Override + public int getTwilightCost() { + return 0; + } + + @Override + public List getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (effectResult.getType() == EffectResult.Type.KILL + && PlayConditions.canPlayCardDuringPhase(game, (Phase) null, self)) { + KillResult killResult = (KillResult) effectResult; + Collection killedChars = Filters.filter(killResult.getKilledCards(), game.getGameState(), game.getModifiersQuerying(), Filters.or(Filters.type(CardType.ALLY), Filters.type(CardType.COMPANION))); + if (killedChars.size() > 0) { + PlayEventAction action = new PlayEventAction(self); + + boolean hasSpecific = Filters.filter(killedChars, game.getGameState(), game.getModifiersQuerying(), Filters.or(Filters.name("Aragorn"), Filters.name("Gandalf"), Filters.name("Theoden"))).size() > 0; + action.appendEffect( + new AddBurdenEffect(self, hasSpecific ? 2 : 1)); + return Collections.singletonList(action); + } + } + return null; + } +}