diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_033.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_033.java new file mode 100644 index 000000000..a82732a97 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_033.java @@ -0,0 +1,59 @@ +package com.gempukku.lotro.cards.set40.elven; + +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.AddUntilEndOfPhaseModifierEffect; +import com.gempukku.lotro.cards.effects.ChoiceEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect; +import com.gempukku.lotro.cards.modifiers.ArcheryTotalModifier; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; +import com.gempukku.lotro.logic.decisions.IntegerAwaitingDecision; +import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect; +import com.gempukku.lotro.logic.timing.RuleUtils; + +/** + * Title: Arrows of Light + * Set: Second Edition + * Side: Free + * Culture: Elven + * Twilight Cost: 2 + * Type: Event - Archery + * Card Number: 1U33 + * Game Text: To play, spot an Elf archer companion. Make the fellowship archery total -X to discard X shadow conditions. + */ +public class Card40_033 extends AbstractEvent { + public Card40_033() { + super(Side.FREE_PEOPLE, 2, Culture.ELVEN, "Arrows of Light", Phase.ARCHERY); + } + + @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.canSpot(game, Race.ELF, Keyword.ARCHER, CardType.COMPANION); + } + + @Override + public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + final PlayEventAction action = new PlayEventAction(self); + int archeryTotal = RuleUtils.calculateFellowshipArcheryTotal(game); + if (archeryTotal > 0) { + action.appendCost( + new PlayoutDecisionEffect(playerId, new IntegerAwaitingDecision(1, "Choose number to limit the archery by", 0, archeryTotal, 1) { + @Override + public void decisionMade(String result) throws DecisionResultInvalidException { + int value = getValidatedResult(result); + action.appendCost( + new AddUntilEndOfPhaseModifierEffect( + new ArcheryTotalModifier(self, Side.FREE_PEOPLE, -value))); + action.appendEffect( + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, value, value, Side.SHADOW, CardType.CONDITION)); + } + })); + } + return action; + } +} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_034.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_034.java new file mode 100644 index 000000000..6edfd0157 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_034.java @@ -0,0 +1,43 @@ +package com.gempukku.lotro.cards.set40.elven; + +import com.gempukku.lotro.cards.AbstractCompanion; +import com.gempukku.lotro.cards.modifiers.conditions.LocationCondition; +import com.gempukku.lotro.common.Culture; +import com.gempukku.lotro.common.Keyword; +import com.gempukku.lotro.common.Race; +import com.gempukku.lotro.filters.Filters; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.modifiers.Modifier; +import com.gempukku.lotro.logic.modifiers.StrengthModifier; + +import java.util.Collections; +import java.util.List; + +/** + * Title: *Arwen, Fearless Rider + * Set: Second Edition + * Side: Free + * Culture: Elven + * Twilight Cost: 2 + * Type: Companion - Elf + * Strength: 6 + * Vitality: 3 + * Resistance: 8 + * Card Number: 1C34 + * Game Text: Ranger. While at a river or forest, Arwen is strength +3. + */ +public class Card40_034 extends AbstractCompanion{ + public Card40_034() { + super(2, 6, 3, 8, Culture.ELVEN, Race.ELF, null, "Arwen", + "Fearless Rider", true); + addKeyword(Keyword.RANGER); + } + + @Override + public List getAlwaysOnModifiers(LotroGame game, PhysicalCard self) { + StrengthModifier modifier = new StrengthModifier(self, self, + new LocationCondition(Filters.or(Keyword.RIVER, Keyword.FOREST)), 3); + return Collections.singletonList(modifier); + } +} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_035.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_035.java new file mode 100644 index 000000000..4bc4ec235 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_035.java @@ -0,0 +1,64 @@ +package com.gempukku.lotro.cards.set40.elven; + +import com.gempukku.lotro.cards.AbstractCompanion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.SelfExertEffect; +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.OptionalTriggerAction; +import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect; +import com.gempukku.lotro.logic.effects.HealCharactersEffect; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Title: *Arwen, Lady of Imladris + * Set: Second Edition + * Side: Free + * Culture: Elven + * Twilight Cost: 2 + * Type: Companion - Elf + * Strength: 6 + * Vitality: 3 + * Resistance: 8 + * Card Number: 1U35 + * Game Text: At the start of each of your turns, you may spot Elrond to heal Arwen. Fellowship: Exert Arwen to heal a Rivendell ally. + */ +public class Card40_035 extends AbstractCompanion{ + public Card40_035() { + super(2, 6, 3, 8, Culture.ELVEN, Race.ELF, null, "Arwen", + "Lady of Imladris", true); + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.startOfTurn(game, effectResult) + && PlayConditions.canSpot(game, Filters.name("Elrond"))) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendEffect(new HealCharactersEffect(self, self)); + return Collections.singletonList(action); + } + return null; + } + + @Override + protected List getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self) + && PlayConditions.canSelfExert(self, game)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new SelfExertEffect(action, self)); + action.appendEffect( + new ChooseAndHealCharactersEffect( + action, playerId, CardType.ALLY, Keyword.RIVENDELL)); + return Collections.singletonList(action); + } + return null; + } +} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_036.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_036.java new file mode 100644 index 000000000..cf7263d4e --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_036.java @@ -0,0 +1,53 @@ +package com.gempukku.lotro.cards.set40.elven; + +import com.gempukku.lotro.cards.AbstractAttachableFPPossession; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +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.OptionalTriggerAction; +import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Title: *Bow of the Galadhrim, Galadriel's Gift + * Set: Second Edition + * Side: Free + * Culture: Elven + * Twilight Cost: 1 + * Type: Possession - Ranged Weapon + * Strength: +1 + * Card Number: 1R36 + * Game Text: Bearer must be Legolas. At the beginning of the archery phase, you may exert Legolas to wound a minion. + */ +public class Card40_036 extends AbstractAttachableFPPossession{ + public Card40_036() { + super(1, 1, 0, Culture.ELVEN, PossessionClass.RANGED_WEAPON, "Bow of the Galadhrim", + "Galadriel's Gift", true); + } + + @Override + protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { + return Filters.name("Legolas"); + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.startOfPhase(game, effectResult, Phase.ARCHERY) + && PlayConditions.canExert(self, game, Filters.name("Legolas"))) { + OptionalTriggerAction action= new OptionalTriggerAction(self); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.name("Legolas"))); + action.appendEffect( + new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.MINION)); + return Collections.singletonList(action); + } + return null; + } +} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_037.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_037.java new file mode 100644 index 000000000..3a22741a0 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_037.java @@ -0,0 +1,57 @@ +package com.gempukku.lotro.cards.set40.elven; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.ExertCharactersEffect; +import com.gempukku.lotro.cards.effects.SelfDiscardEffect; +import com.gempukku.lotro.common.*; +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.timing.EffectResult; +import com.gempukku.lotro.logic.timing.results.PlayCardResult; + +import java.util.Collections; +import java.util.List; + +/** + * Title: *Bruinen Unleashed + * Set: Second Edition + * Side: Free + * Culture: Elven + * Twilight Cost: 1 + * Type: Condition - Support Area + * Card Number: 1U37 + * Game Text: To play, spot an Elf companion. Each time a Nazgul is played, that Nazgul must exert. + * Discard this condition at the beginning of the regroup phase. + */ +public class Card40_037 extends AbstractPermanent{ + public Card40_037() { + super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.ELVEN, Zone.SUPPORT, "Bruinen Unleashed", null, true); + } + + @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.canSpot(game, Race.ELF, CardType.COMPANION); + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.played(game, effectResult, Race.NAZGUL)) { + PlayCardResult playCardResult = (PlayCardResult) effectResult; + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new ExertCharactersEffect(action, self, playCardResult.getPlayedCard())); + return Collections.singletonList(action); + } + if (TriggerConditions.startOfPhase(game, effectResult, Phase.REGROUP)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new SelfDiscardEffect(self)); + return Collections.singletonList(action); + } + return null; + } +} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_038.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_038.java new file mode 100644 index 000000000..bda59b03f --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_038.java @@ -0,0 +1,73 @@ +package com.gempukku.lotro.cards.set40.elven; + +import com.gempukku.lotro.cards.AbstractAlly; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.DiscardTopCardFromDeckEffect; +import com.gempukku.lotro.cards.effects.RevealTopCardsOfDrawDeckEffect; +import com.gempukku.lotro.cards.effects.SelfExertEffect; +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.decisions.YesNoDecision; +import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect; +import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect; +import com.gempukku.lotro.logic.timing.Action; + +import java.util.Collections; +import java.util.List; + +/** + * Title: *Celeborn, Lord of the Golden Wood + * Set: Second Edition + * Side: Free + * Culture: Elven + * Twilight Cost: 2 + * Type: Ally - Elf - Lothlorien + * Strength: 6 + * Vitality: 3 + * Card Number: 1R38 + * Game Text: Maneuver: Exert Celeborn to reveal the top card of your draw deck. If it is an [ELVEN] card, + * you may discard it to wound a minion. + */ +public class Card40_038 extends AbstractAlly{ + public Card40_038() { + super(2, Block.SECOND_ED, 0, 6, 3, Race.ELF, Culture.ELVEN, "Celeborn", + "Lord of the Golden Wood", true); + addKeyword(Keyword.LOTHLORIEN); + } + + @Override + protected List getExtraInPlayPhaseActions(final String playerId, final LotroGame game, final PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self) + && PlayConditions.canSelfExert(self, game)) { + final ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new SelfExertEffect(action, self)); + action.appendEffect( + new RevealTopCardsOfDrawDeckEffect(self, playerId, 1) { + @Override + protected void cardsRevealed(List revealedCards) { + if (revealedCards.size()>0) { + PhysicalCard revealedCard = revealedCards.get(0); + if (Filters.and(Culture.ELVEN).accepts(game.getGameState(), game.getModifiersQuerying(), revealedCard)) { + action.appendEffect( + new PlayoutDecisionEffect(playerId, new YesNoDecision("Would you like to discard the card") { + @Override + protected void yes() { + action.appendEffect( + new DiscardTopCardFromDeckEffect(self, playerId, false)); + action.appendEffect( + new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.MINION)); + } + })); + } + } + } + }); + return Collections.singletonList(action); + } + return null; + } +} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_039.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_039.java new file mode 100644 index 000000000..57dfe0e27 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_039.java @@ -0,0 +1,59 @@ +package com.gempukku.lotro.cards.set40.elven; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect; +import com.gempukku.lotro.cards.effects.SelfDiscardEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.cards.modifiers.ArcheryTotalModifier; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.filters.Filters; +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.actions.ActivateCardAction; +import com.gempukku.lotro.logic.modifiers.ModifiersQuerying; +import com.gempukku.lotro.logic.timing.Action; + +import java.util.Collections; +import java.util.List; + +/** + * Title: Coordinated Strike + * Set: Second Edition + * Side: Free + * Culture: Elven + * Twilight Cost: 3 + * Type: Condition - Support Area + * Card Number: 1U39 + * Game Text: The twilight cost of this condition is -1 for each unwounded [ELVEN] archer companion you can spot. + * Archery: Exert 2 [ELVEN] archer companions an discard this condition to make the fellowship archery total +2. + */ +public class Card40_039 extends AbstractPermanent{ + public Card40_039() { + super(Side.FREE_PEOPLE, 3, CardType.CONDITION, Culture.ELVEN, Zone.SUPPORT, "Coordinated Strike"); + } + + @Override + public int getTwilightCostModifier(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard self) { + return -Filters.countSpottable(gameState, modifiersQuerying, Culture.ELVEN, Keyword.ARCHER, CardType.COMPANION, Filters.unwounded); + } + + @Override + protected List getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.ARCHERY, self) + && PlayConditions.canExert(self, game, 1, 2, Culture.ELVEN, Keyword.ARCHER, CardType.COMPANION) + && PlayConditions.canSelfDiscard(self, game)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 2, 2, 1, Culture.ELVEN, Keyword.ARCHER, CardType.COMPANION)); + action.appendCost( + new SelfDiscardEffect(self)); + action.appendEffect( + new AddUntilEndOfPhaseModifierEffect( + new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 2))); + return Collections.singletonList(action); + } + return null; + } +} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_040.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_040.java new file mode 100644 index 000000000..ac504f80b --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/elven/Card40_040.java @@ -0,0 +1,52 @@ +package com.gempukku.lotro.cards.set40.elven; + +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.AddUntilStartOfPhaseModifierEffect; +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.modifiers.RemoveKeywordModifier; +import com.gempukku.lotro.logic.timing.UnrespondableEffect; + +import java.util.Collection; + +/** + * Title: Crippling Arrows + * Set: Second Edition + * Side: Free + * Culture: Elven + * Twilight Cost: 2 + * Type: Event - Maneuver + * Card Number: 1C40 + * Game Text: To play, spot an Elf. Each wounded minion is prevented from being fierce until the regroup phase. + */ +public class Card40_040 extends AbstractEvent { + public Card40_040() { + super(Side.FREE_PEOPLE, 2, Culture.ELVEN, "Crippling Arrows", Phase.MANEUVER); + } + + @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.canSpot(game, Race.ELF); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + final PlayEventAction action = new PlayEventAction(self); + action.appendEffect( + new UnrespondableEffect() { + @Override + protected void doPlayEffect(LotroGame game) { + Collection woundedMinions = Filters.filterActive(game.getGameState(), game.getModifiersQuerying(), CardType.MINION, Filters.wounded); + action.appendEffect( + new AddUntilStartOfPhaseModifierEffect( + new RemoveKeywordModifier(self, Filters.in(woundedMinions), Keyword.FIERCE), Phase.REGROUP)); + } + }); + return action; + } +}