From a271bb3efc4a93757d2562f6839ec3e47c27b046 Mon Sep 17 00:00:00 2001 From: PhallenCassidy Date: Wed, 30 Nov 2016 12:57:25 -0500 Subject: [PATCH] The Short Rest: Moria culture --- .../lotro/cards/set31/moria/Card31_031.java | 60 ++++++++++++++ .../lotro/cards/set31/moria/Card31_032.java | 54 +++++++++++++ .../lotro/cards/set31/moria/Card31_033.java | 59 ++++++++++++++ .../lotro/cards/set31/moria/Card31_034.java | 78 +++++++++++++++++++ .../lotro/cards/set31/moria/Card31_035.java | 74 ++++++++++++++++++ .../lotro/cards/set31/moria/Card31_036.java | 67 ++++++++++++++++ 6 files changed, 392 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_031.java create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_032.java create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_033.java create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_034.java create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_035.java create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_036.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_031.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_031.java new file mode 100644 index 000000000..fd4e81682 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_031.java @@ -0,0 +1,60 @@ +package com.gempukku.lotro.cards.set31.moria; + +import com.gempukku.lotro.cards.AbstractAttachable; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.filters.Filter; +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.DrawCardsEffect; +import com.gempukku.lotro.logic.modifiers.Modifier; +import com.gempukku.lotro.logic.modifiers.StrengthModifier; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: The Fellowship of the Ring + * Side: Shadow + * Culture: Moria + * Twilight Cost: 0 + * Type: Possession • Hand Weapon + * Strength: +2 + * Game Text: To play, spot a [MORIA] card. Bearer must be an Orc. When you play this possession, + * you may draw a card. + */ +public class Card31_031 extends AbstractAttachable { + public Card31_031() { + super(Side.SHADOW, CardType.POSSESSION, 0, Culture.MORIA, PossessionClass.HAND_WEAPON, "Goblin Scimitar"); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, Filter additionalAttachmentFilter, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, additionalAttachmentFilter, twilightModifier) + && PlayConditions.canSpot(game, 1, Culture.MORIA); + } + + @Override + public Modifier getAlwaysOnModifier(LotroGame game, PhysicalCard self) { + return new StrengthModifier(self, Filters.hasAttached(self), 2); + } + + @Override + protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { + return Race.ORC; + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.played(game, effectResult, self)) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendEffect(new DrawCardsEffect(action, playerId, 1)); + return Collections.singletonList(action); + } + return null; + } +} \ No newline at end of file diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_032.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_032.java new file mode 100644 index 000000000..5e1817594 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_032.java @@ -0,0 +1,54 @@ +package com.gempukku.lotro.cards.set31.moria; + +import com.gempukku.lotro.cards.AbstractMinion; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.PutCardFromDiscardOnBottomOfDeckEffect; +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.ChooseArbitraryCardsEffect; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * Set: The Short Rest + * Side: Shadow + * Culture: Moria + * Twilight Cost: 1 + * Type: Minion • Orc + * Strength: 5 + * Vitality: 1 + * Site: 4 + * Game Text: When you play this minion, you may place an Orc (or two Orcs at an underground site) + * from your discard pile beneath your draw deck. + */ +public class Card31_032 extends AbstractMinion { + public Card31_032() { + super(1, 5, 1, 4, Race.ORC, Culture.MORIA, "Goblin Sneak"); + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.played(game, effectResult, self)) { + final OptionalTriggerAction action = new OptionalTriggerAction(self); + int checkUnderground = game.getModifiersQuerying().hasKeyword(game.getGameState(), game.getGameState().getCurrentSite(), Keyword.UNDERGROUND) ? 2 : 1; + action.appendEffect( + new ChooseArbitraryCardsEffect(playerId, "Choose Orc (or two if at an underground site)", game.getGameState().getDiscard(playerId), Race.ORC, checkUnderground, checkUnderground) { + @Override + protected void cardsSelected(LotroGame game, Collection selectedCards) { + for (PhysicalCard selectedCard : selectedCards) { + action.appendEffect( + new PutCardFromDiscardOnBottomOfDeckEffect(selectedCard)); + } + } + }); + return Collections.singletonList(action); + } + return null; + } +} \ No newline at end of file diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_033.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_033.java new file mode 100644 index 000000000..f9ee13528 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_033.java @@ -0,0 +1,59 @@ +package com.gempukku.lotro.cards.set31.moria; + +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.choose.ChooseAndDiscardCardsFromPlayEffect; +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.timing.Action; + +import java.util.Collections; +import java.util.List; + +/** + * Set: The Short Rest + * Side: Shadow + * Culture: Moria + * Twilight Cost: 1 + * Type: Event + * Game Text: You may exert The Great Goblin twice to play this event from your discard pile. Exert 2 Orcs + * to discard a possession or artifact borne by a [DWARVEN] companion. + */ +public class Card31_033 extends AbstractEvent { + public Card31_033() { + super(Side.SHADOW, 1, Culture.MORIA, "Goblin Song", 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.canExert(self, game, 1, 2, Race.ORC); + } + + @Override + public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + PlayEventAction action = new PlayEventAction(self); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 2, 2, Race.ORC)); + action.appendEffect( + new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Filters.or(CardType.POSSESSION, CardType.ARTIFACT), Filters.attachedTo(Filters.and(CardType.COMPANION, Race.DWARF)))); + return action; + } + + @Override + public List getPhaseActionsFromDiscard(String playerId, LotroGame game, final PhysicalCard self) { + if (PlayConditions.isPhase(game, Phase.SKIRMISH) + && PlayConditions.canExert(self, game, 2, Filters.name("The Great Goblin")) + && PlayConditions.canPlayFromDiscard(playerId, game, self)) { + final PlayEventAction action = getPlayCardAction(playerId, game, self, 0, false); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Filters.name("The Great Goblin"))); + return Collections.singletonList(action); + } + return null; + } +} \ No newline at end of file diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_034.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_034.java new file mode 100644 index 000000000..8bfd05fbe --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_034.java @@ -0,0 +1,78 @@ +package com.gempukku.lotro.cards.set31.moria; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.StackCardFromPlayEffect; +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.effects.ChooseActiveCardEffect; +import com.gempukku.lotro.logic.effects.ChooseArbitraryCardsEffect; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * Set: The Short Rest + * Side: Shadow + * Culture: Moria + * Twilight Cost: 1 + * Type: Condition + * Game Text: To play, spot a [MORIA] card. Response: If your Orc wins a skirmish, discard cards and wounds on + * that Orc and stack that Orc on this condition. Shadow: Play an Orc stacked here as if played from hand. + */ +public class Card31_034 extends AbstractPermanent { + public Card31_034() { + super(Side.SHADOW, 1, CardType.CONDITION, Culture.MORIA, Zone.SUPPORT, "Goblin Swarms"); + } + + @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, 1, Culture.MORIA); + } + + @Override + public List getExtraPhaseActions(final String playerId, final LotroGame game, PhysicalCard self) { + List stackedCards = game.getGameState().getStackedCards(self); + if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 0) + && Filters.filter(stackedCards, game.getGameState(), game.getModifiersQuerying(), Filters.playable(game)).size() > 0) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendEffect( + new ChooseArbitraryCardsEffect(playerId, "Choose an Orc to play", stackedCards, Filters.playable(game), 1, 1) { + @Override + protected void cardsSelected(LotroGame game, Collection stackedOrcs) { + if (stackedOrcs.size() > 0) { + PhysicalCard stackedOrc = stackedOrcs.iterator().next(); + game.getActionsEnvironment().addActionToStack(stackedOrc.getBlueprint().getPlayCardAction(playerId, game, stackedOrc, 0, false)); + } + } + }); + return Collections.singletonList(action); + } + return null; + } + + @Override + public List getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) { + if (TriggerConditions.winsSkirmish(game, effectResult, Race.ORC) + && Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Race.ORC, Filters.inSkirmish)) { + final ActivateCardAction action = new ActivateCardAction(self); + action.appendEffect( + new ChooseActiveCardEffect(self, playerId, "Choose an Orc", Race.ORC, Filters.inSkirmish) { + @Override + protected void cardSelected(LotroGame game, PhysicalCard skirmishOrc) { + action.appendEffect(new StackCardFromPlayEffect(skirmishOrc, self)); + } + }); + return Collections.singletonList(action); + } + return null; + } +} \ No newline at end of file diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_035.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_035.java new file mode 100644 index 000000000..ffce0487c --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_035.java @@ -0,0 +1,74 @@ +package com.gempukku.lotro.cards.set31.moria; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.PreventCardEffect; +import com.gempukku.lotro.cards.effects.SelfDiscardEffect; +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.RequiredTriggerAction; +import com.gempukku.lotro.logic.effects.AddTwilightEffect; +import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; +import com.gempukku.lotro.logic.effects.WoundCharactersEffect; +import com.gempukku.lotro.logic.timing.Effect; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * Set: The Short Rest + * Side: Shadow + * Culture: Moria + * Twilight Cost: 0 + * Type: Condition + * Game Text: To play, spot a [MORIA] card. Each time you play a weapon, add (1). Response: If an Orc is + * about to take a wound, discard this condition to prevent that wound. + */ +public class Card31_035 extends AbstractPermanent { + public Card31_035() { + super(Side.SHADOW, 0, CardType.CONDITION, Culture.MORIA, Zone.SUPPORT, "Great Goblin's Power"); + } + + @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, 1, Culture.MORIA); + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.played(game, effectResult, Filters.and(Filters.owner(self.getOwner()), Filters.weapon))) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect(new AddTwilightEffect(self, 1)); + return Collections.singletonList(action); + } + return null; + } + + @Override + public List getOptionalInPlayBeforeActions(String playerId, LotroGame game, final Effect effect, final PhysicalCard self) { + if (TriggerConditions.isGettingWounded(effect, game, Race.ORC)) { + final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect; + final Collection cardsToBeWounded = woundEffect.getAffectedCardsMinusPrevented(game); + final ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new SelfDiscardEffect(self)); + action.appendEffect( + new ChooseActiveCardEffect(self, playerId, "Choose an Orc", Race.ORC, Filters.in(cardsToBeWounded)) { + @Override + protected void cardSelected(LotroGame game, PhysicalCard woundedOrc) { + action.appendEffect( + new PreventCardEffect(woundEffect, woundedOrc)); + } + }); + return Collections.singletonList(action); + } + return null; + } +} \ No newline at end of file diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_036.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_036.java new file mode 100644 index 000000000..0fcee0b90 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set31/moria/Card31_036.java @@ -0,0 +1,67 @@ +package com.gempukku.lotro.cards.set31.moria; + +import com.gempukku.lotro.cards.AbstractMinion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.effects.RevealAndChooseCardsFromOpponentHandEffect; +import com.gempukku.lotro.cards.effects.SelfExertEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseOpponentEffect; +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.RequiredTriggerAction; +import com.gempukku.lotro.logic.effects.DiscardCardsFromHandEffect; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: The Short Rest + * Side: Shadow + * Culture: Moria + * Twilight Cost: 4 + * Type: Minion • Orc + * Strength: 10 + * Vitality: 3 + * Site: 4 + * Game Text: Fierce. Maneuver: Exert The Great Goblin twice to reveal the Free Peoples player's hand. Choose and + * discard a revealed [DWARVEN] event. + */ +public class Card31_036 extends AbstractMinion { + public Card31_036() { + super(4, 10, 3, 4, Race.ORC, Culture.MORIA, "The Great Goblin", "Chieftain of the Misty Mountains", true); + addKeyword(Keyword.FIERCE); + } + + @Override + protected List getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.MANEUVER, self, 0) + && PlayConditions.canSelfExert(self, 2, game)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new SelfExertEffect(action, self)); + action.appendCost( + new SelfExertEffect(action, self)); + action.appendEffect( + new ChooseOpponentEffect(playerId) { + @Override + protected void opponentChosen(final String opponentId) { + action.appendEffect( + new RevealAndChooseCardsFromOpponentHandEffect(action, playerId, opponentId, self, "Choose a DWARVEN event", Filters.and(Culture.DWARVEN, CardType.EVENT), 0, 1) { + @Override + protected void cardsSelected(List selectedCards) { + if (selectedCards.size() > 0) { + action.appendEffect(new DiscardCardsFromHandEffect(self, opponentId, selectedCards, true)); + } + } + }); + } + }); + return Collections.singletonList(action); + } + return null; + } +} \ No newline at end of file