From 0ac7c1e2855469739e0ddb671a04ef6090433279 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Sun, 20 Nov 2011 02:05:43 +0000 Subject: [PATCH] "Boromir" --- .../lotro/cards/set9/dwarven/Card9_004.java | 2 - .../lotro/cards/set9/gondor/Card9_031.java | 72 +++++++++++++++++++ 2 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/gondor/Card9_031.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/dwarven/Card9_004.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/dwarven/Card9_004.java index f350406e3..03557680f 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/dwarven/Card9_004.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/dwarven/Card9_004.java @@ -76,6 +76,4 @@ public class Card9_004 extends AbstractCompanion { } return null; } - - } diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/gondor/Card9_031.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/gondor/Card9_031.java new file mode 100644 index 000000000..2529d5d1e --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/gondor/Card9_031.java @@ -0,0 +1,72 @@ +package com.gempukku.lotro.cards.set9.gondor; + +import com.gempukku.lotro.cards.AbstractCompanion; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.AddBurdenEffect; +import com.gempukku.lotro.cards.effects.ChoiceEffect; +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.RequiredTriggerAction; +import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect; +import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect; +import com.gempukku.lotro.logic.timing.Effect; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +/** + * Set: Reflections + * Side: Free + * Culture: Gondor + * Twilight Cost: 3 + * Type: Companion • Man + * Strength: 7 + * Vitality: 3 + * Resistance: 6 + * Game Text: While Boromir is the Ring-bearer, at the start of each skirmish involving him, add 3 burdens or wound him + * twice. Each time Boromir wins a skirmish, discard each minion he is skirmishing. + */ +public class Card9_031 extends AbstractCompanion { + public Card9_031() { + super(3, 7, 3, Culture.GONDOR, Race.MAN, null, "Boromir", true); + addKeyword(Keyword.CAN_START_WITH_RING); + } + + @Override + public int getResistance() { + return 6; + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (effectResult.getType() == EffectResult.Type.START_OF_PHASE + && game.getGameState().getCurrentPhase() == Phase.SKIRMISH + && Filters.and(Filters.inSkirmish, Keyword.RING_BEARER).accepts(game.getGameState(), game.getModifiersQuerying(), self)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + List possibleEffects = new LinkedList(); + possibleEffects.add( + new AddBurdenEffect(self, 3)); + possibleEffects.add( + new ChooseAndWoundCharactersEffect(action, self.getOwner(), 1, 1, 2, self) { + @Override + public String getText(LotroGame game) { + return "Wound Boromir twice"; + } + }); + action.appendEffect( + new ChoiceEffect(action, self.getOwner(), possibleEffects)); + return Collections.singletonList(action); + } + if (TriggerConditions.winsSkirmish(game, effectResult, self)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new DiscardCardsFromPlayEffect(self, CardType.MINION, Filters.inSkirmishAgainst(self))); + return Collections.singletonList(action); + } + return null; + } +}