diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/Card7_002.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/Card7_002.java deleted file mode 100644 index fe877a6da..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/Card7_002.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.gempukku.lotro.cards.set7; - -import com.gempukku.lotro.common.CardType; -import com.gempukku.lotro.common.Phase; -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.ActivateCardAction; -import com.gempukku.lotro.logic.actions.RequiredTriggerAction; -import com.gempukku.lotro.logic.cardtype.AbstractAttachable; -import com.gempukku.lotro.logic.effects.AddBurdenEffect; -import com.gempukku.lotro.logic.effects.NegateWoundEffect; -import com.gempukku.lotro.logic.effects.PutOnTheOneRingEffect; -import com.gempukku.lotro.logic.effects.WoundCharactersEffect; -import com.gempukku.lotro.logic.modifiers.ModifierFlag; -import com.gempukku.lotro.logic.timing.Effect; -import com.gempukku.lotro.logic.timing.PlayConditions; -import com.gempukku.lotro.logic.timing.TriggerConditions; - -import java.util.Collections; -import java.util.List; - -/** - * Set: The Return of the King - * Type: The One Ring - * Strength: +2 - * Game Text: Maneuver: Add a burden to wear The One Ring until the regroup phase. While wearing The One Ring, each time - * the Ring-bearer is about to take a wound, add a burden instead. - */ -public class Card7_002 extends AbstractAttachable { - public Card7_002() { - super(null, CardType.THE_ONE_RING, 0, null, null, "The One Ring", "Such a Weight to Carry", true); - } - - @Override - public Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { - return Filters.none; - } - - @Override - public int getStrength() { - return 2; - } - - @Override - public List getPhaseActionsInPlay(String playerId, LotroGame game, final PhysicalCard self) { - if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self) - && !game.getModifiersQuerying().hasFlagActive(game, ModifierFlag.RING_TEXT_INACTIVE)) { - ActivateCardAction action = new ActivateCardAction(self); - action.appendCost( - new AddBurdenEffect(self.getOwner(), self, 1)); - action.appendEffect( - new PutOnTheOneRingEffect()); - return Collections.singletonList(action); - } - return null; - } - - @Override - public List getRequiredBeforeTriggers(LotroGame game, Effect effect, PhysicalCard self) { - if (TriggerConditions.isGettingWounded(effect, game, Filters.hasAttached(self)) - && game.getGameState().isWearingRing() - && !game.getModifiersQuerying().hasFlagActive(game, ModifierFlag.RING_TEXT_INACTIVE)) { - WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect; - RequiredTriggerAction action = new RequiredTriggerAction(self); - action.appendEffect(new NegateWoundEffect(woundEffect, self.getAttachedTo())); - action.appendEffect(new AddBurdenEffect(self.getOwner(), self, 1)); - return Collections.singletonList(action); - } - return null; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_003.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_003.java deleted file mode 100644 index ac3b370b1..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_003.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.gempukku.lotro.cards.set7.dwarven; - -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.PlayEventAction; -import com.gempukku.lotro.logic.cardtype.AbstractEvent; -import com.gempukku.lotro.logic.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect; -import com.gempukku.lotro.logic.modifiers.SpotCondition; -import com.gempukku.lotro.logic.modifiers.evaluator.ConditionEvaluator; - -/** - * Set: The Return of the King - * Side: Free - * Culture: Dwarven - * Twilight Cost: 0 - * Type: Event • Skirmish - * Game Text: Make a Dwarf strength +2 (+4 if you spot a card stacked on a [DWARVEN] condition). - */ -public class Card7_003 extends AbstractEvent { - public Card7_003() { - super(Side.FREE_PEOPLE, 0, Culture.DWARVEN, "Battle Tested", Phase.SKIRMISH); - } - - @Override - public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) { - PlayEventAction action = new PlayEventAction(self); - action.appendEffect( - new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, - new ConditionEvaluator(2, 4, new SpotCondition(CardType.CONDITION, Culture.DWARVEN, Filters.hasStacked(Filters.any))), Race.DWARF)); - return action; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_004.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_004.java deleted file mode 100644 index f62214e62..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_004.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.gempukku.lotro.cards.set7.dwarven; - -import com.gempukku.lotro.common.Culture; -import com.gempukku.lotro.common.Phase; -import com.gempukku.lotro.common.Race; -import com.gempukku.lotro.common.Side; -import com.gempukku.lotro.game.PhysicalCard; -import com.gempukku.lotro.game.state.LotroGame; -import com.gempukku.lotro.logic.actions.PlayEventAction; -import com.gempukku.lotro.logic.cardtype.AbstractEvent; -import com.gempukku.lotro.logic.effects.AddThreatsEffect; -import com.gempukku.lotro.logic.effects.DrawCardsEffect; -import com.gempukku.lotro.logic.timing.PlayConditions; - -/** - * Set: The Return of the King - * Side: Free - * Culture: Dwarven - * Twilight Cost: 2 - * Type: Event • Fellowship - * Game Text: Spot a Dwarf and add a threat to draw 3 cards. - */ -public class Card7_004 extends AbstractEvent { - public Card7_004() { - super(Side.FREE_PEOPLE, 2, Culture.DWARVEN, "Calculated Risk", Phase.FELLOWSHIP); - } - - @Override - public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) { - return PlayConditions.canSpot(game, Race.DWARF) - && PlayConditions.canAddThreat(game, self, 1); - } - - @Override - public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) { - PlayEventAction action = new PlayEventAction(self); - action.appendCost( - new AddThreatsEffect(playerId, self, 1)); - action.appendEffect( - new DrawCardsEffect(action, playerId, 3)); - return action; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_005.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_005.java deleted file mode 100644 index 04857b375..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_005.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.gempukku.lotro.cards.set7.dwarven; - -import com.gempukku.lotro.common.*; -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.cardtype.AbstractPermanent; -import com.gempukku.lotro.logic.effects.AddThreatsEffect; -import com.gempukku.lotro.logic.effects.ChoiceEffect; -import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect; -import com.gempukku.lotro.logic.effects.SelfDiscardEffect; -import com.gempukku.lotro.logic.effects.choose.ChooseAndPutCardFromDiscardIntoHandEffect; -import com.gempukku.lotro.logic.timing.Effect; -import com.gempukku.lotro.logic.timing.EffectResult; -import com.gempukku.lotro.logic.timing.PlayConditions; -import com.gempukku.lotro.logic.timing.TriggerConditions; - -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; - -/** - * Set: The Return of the King - * Side: Free - * Culture: Dwarven - * Twilight Cost: 0 - * Type: Condition • Support Area - * Game Text: To play, spot a Dwarf. Each time the fellowship moves, add a threat or discard this condition. - * Regroup: Discard this condition to heal a Dwarf twice and take a [DWARVEN] skirmish event into hand from your - * discard pile. - */ -public class Card7_005 extends AbstractPermanent { - public Card7_005() { - super(Side.FREE_PEOPLE, 0, CardType.CONDITION, Culture.DWARVEN, "Dark Ways"); - } - - @Override - public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) { - return PlayConditions.canSpot(game, Race.DWARF); - } - - @Override - public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { - if (TriggerConditions.moves(game, effectResult)) { - RequiredTriggerAction action = new RequiredTriggerAction(self); - - List possibleEffects = new LinkedList<>(); - possibleEffects.add( - new AddThreatsEffect(self.getOwner(), self, 1)); - possibleEffects.add( - new SelfDiscardEffect(self)); - - action.appendEffect( - new ChoiceEffect(action, self.getOwner(), possibleEffects)); - return Collections.singletonList(action); - } - return null; - } - - @Override - public List getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) { - if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self) - && PlayConditions.canSelfDiscard(self, game)) { - ActivateCardAction action = new ActivateCardAction(self); - action.appendCost( - new SelfDiscardEffect(self)); - action.appendEffect( - new ChooseAndHealCharactersEffect(action, playerId, 1, 1, 2, Race.DWARF)); - action.appendEffect( - new ChooseAndPutCardFromDiscardIntoHandEffect(action, playerId, 1, 1, Culture.DWARVEN, CardType.EVENT, Keyword.SKIRMISH)); - return Collections.singletonList(action); - } - return null; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_006.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_006.java deleted file mode 100644 index 1c3ede8b4..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_006.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gempukku.lotro.cards.set7.dwarven; - -import com.gempukku.lotro.common.*; -import com.gempukku.lotro.game.PhysicalCard; -import com.gempukku.lotro.game.state.LotroGame; -import com.gempukku.lotro.logic.cardtype.AbstractCompanion; -import com.gempukku.lotro.logic.modifiers.Modifier; -import com.gempukku.lotro.logic.modifiers.StrengthModifier; -import com.gempukku.lotro.logic.modifiers.condition.InitiativeCondition; - -import java.util.Collections; -import java.util.List; - -/** - * Set: The Return of the King - * Side: Free - * Culture: Dwarven - * Twilight Cost: 2 - * Type: Companion • Dwarf - * Strength: 6 - * Vitality: 3 - * Resistance: 6 - * Signet: Theoden - * Game Text: Damage +1. While you have initiative, Gimli is strength +2. - */ -public class Card7_006 extends AbstractCompanion { - public Card7_006() { - super(2, 6, 3, 6, Culture.DWARVEN, Race.DWARF, Signet.THEODEN, "Gimli", "Faithful Companion", true); - addKeyword(Keyword.DAMAGE, 1); - } - - @Override - public List getInPlayModifiers(LotroGame game, PhysicalCard self) { - return Collections.singletonList( - new StrengthModifier(self, self, new InitiativeCondition(Side.FREE_PEOPLE), 2)); - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_007.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_007.java deleted file mode 100644 index 32e59603c..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_007.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.gempukku.lotro.cards.set7.dwarven; - -import com.gempukku.lotro.common.*; -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.cardtype.AbstractCompanion; -import com.gempukku.lotro.logic.effects.ChoiceEffect; -import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect; -import com.gempukku.lotro.logic.effects.PreventableCardEffect; -import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect; -import com.gempukku.lotro.logic.effects.choose.ChooseAndPreventCardEffect; -import com.gempukku.lotro.logic.timing.Effect; -import com.gempukku.lotro.logic.timing.PlayConditions; -import com.gempukku.lotro.logic.timing.TriggerConditions; - -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; - -/** - * Set: The Return of the King - * Side: Free - * Culture: Dwarven - * Twilight Cost: 2 - * Type: Companion • Dwarf - * Strength: 6 - * Vitality: 3 - * Resistance: 6 - * Signet: Aragorn - * Game Text: Damage +1. Response: if a [DWARVEN] condition is about to be discarded by an opponent, exert a Dwarf - * or discard a [DWARVEN] card from hand to prevent that. - */ -public class Card7_007 extends AbstractCompanion { - public Card7_007() { - super(2, 6, 3, 6, Culture.DWARVEN, Race.DWARF, Signet.ARAGORN, "Gimli", "Feared Axeman", true); - addKeyword(Keyword.DAMAGE, 1); - } - - @Override - public List getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) { - if (TriggerConditions.isGettingDiscardedByOpponent(effect, game, playerId, Culture.DWARVEN, CardType.CONDITION) - && (PlayConditions.canExert(self, game, Race.DWARF) - || PlayConditions.canDiscardFromHand(game, playerId, 1, Culture.DWARVEN))) { - final ActivateCardAction action = new ActivateCardAction(self); - List possibleCosts = new LinkedList<>(); - possibleCosts.add( - new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.DWARF) { - @Override - public String getText(LotroGame game) { - return "Exert a Dwarf"; - } - }); - possibleCosts.add( - new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1, Culture.DWARVEN) { - @Override - public String getText(LotroGame game) { - return "Discard a DWARVEN card"; - } - }); - action.appendCost( - new ChoiceEffect(action, playerId, possibleCosts)); - action.appendEffect( - new ChooseAndPreventCardEffect(self, (PreventableCardEffect) effect, playerId, "Choose DWARVEN condition", - Culture.DWARVEN, CardType.CONDITION)); - return Collections.singletonList(action); - } - return null; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_008.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_008.java deleted file mode 100644 index ec4cd984f..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_008.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.gempukku.lotro.cards.set7.dwarven; - -import com.gempukku.lotro.common.Culture; -import com.gempukku.lotro.common.Filterable; -import com.gempukku.lotro.common.PossessionClass; -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.actions.ActivateCardAction; -import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession; -import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; -import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect; -import com.gempukku.lotro.logic.effects.PreventCardEffect; -import com.gempukku.lotro.logic.effects.WoundCharactersEffect; -import com.gempukku.lotro.logic.timing.Effect; -import com.gempukku.lotro.logic.timing.PlayConditions; -import com.gempukku.lotro.logic.timing.TriggerConditions; - -import java.util.Collections; -import java.util.List; - -/** - * Set: The Return of the King - * Side: Free - * Culture: Dwarven - * Twilight Cost: 2 - * Type: Possession • Armor - * Game Text: Bearer must be Gimli. Response: If you have initiative and Gimli is about to take a wound, discard - * 2 cards from hand to prevent that wound. - */ -public class Card7_008 extends AbstractAttachableFPPossession { - public Card7_008() { - super(2, 0, 0, Culture.DWARVEN, PossessionClass.ARMOR, "Gimli's Armor", null, true); - } - - @Override - public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { - return Filters.gimli; - } - - @Override - public List getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) { - if (PlayConditions.hasInitiative(game, Side.FREE_PEOPLE) - && TriggerConditions.isGettingWounded(effect, game, Filters.gimli) - && PlayConditions.canDiscardFromHand(game, playerId, 2, Filters.any)) { - final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect; - - final ActivateCardAction action = new ActivateCardAction(self); - action.appendCost( - new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 2)); - action.appendEffect( - new ChooseActiveCardEffect(self, playerId, "Choose Gimli", Filters.gimli) { - @Override - protected void cardSelected(LotroGame game, PhysicalCard card) { - action.insertEffect( - new PreventCardEffect(woundEffect, card)); - } - }); - return Collections.singletonList(action); - } - return null; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_009.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_009.java deleted file mode 100644 index b711a23c1..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_009.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.gempukku.lotro.cards.set7.dwarven; - -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.cardtype.AbstractAttachableFPPossession; -import com.gempukku.lotro.logic.modifiers.ArcheryTotalModifier; -import com.gempukku.lotro.logic.modifiers.KeywordModifier; -import com.gempukku.lotro.logic.modifiers.Modifier; -import com.gempukku.lotro.logic.modifiers.StrengthModifier; -import com.gempukku.lotro.logic.modifiers.condition.MinThreatCondition; - -import java.util.LinkedList; -import java.util.List; - -/** - * Set: The Return of the King - * Side: Free - * Culture: Dwarven - * Twilight Cost: 2 - * Type: Possession • Hand Weapon - * Strength: +2 - * Game Text: Bearer must be a dwarf. While you can spot a threat, bearer is damage +1. While you can spot 2 threats, - * bearer is strength +1. While you can spot 3 threats, the fellowship archery total is +1. - */ -public class Card7_009 extends AbstractAttachableFPPossession { - public Card7_009() { - super(2, 2, 0, Culture.DWARVEN, PossessionClass.HAND_WEAPON, "Gimli's Battle Axe", "Trusted Weapon", true); - } - - @Override - public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { - return Race.DWARF; - } - - @Override - public List getInPlayModifiers(LotroGame game, PhysicalCard self) { - List modifiers = new LinkedList<>(); - modifiers.add( - new KeywordModifier(self, Filters.hasAttached(self), new MinThreatCondition(1), Keyword.DAMAGE, 1)); - modifiers.add( - new StrengthModifier(self, Filters.hasAttached(self), new MinThreatCondition(2), 1)); - modifiers.add( - new ArcheryTotalModifier(self, Side.FREE_PEOPLE, new MinThreatCondition(3), 1)); - return modifiers; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_010.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_010.java deleted file mode 100644 index 9d9e46fa6..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_010.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.gempukku.lotro.cards.set7.dwarven; - -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.cardtype.AbstractPermanent; -import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; -import com.gempukku.lotro.logic.effects.DrawCardsEffect; -import com.gempukku.lotro.logic.effects.SelfDiscardEffect; -import com.gempukku.lotro.logic.effects.choose.ChooseAndStackCardsFromHandEffect; -import com.gempukku.lotro.logic.modifiers.KeywordModifier; -import com.gempukku.lotro.logic.modifiers.StrengthModifier; -import com.gempukku.lotro.logic.timing.EffectResult; -import com.gempukku.lotro.logic.timing.PlayConditions; -import com.gempukku.lotro.logic.timing.TriggerConditions; - -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -/** - * Set: The Return of the King - * Side: Free - * Culture: Dwarven - * Twilight Cost: 1 - * Type: Condition • Support Area - * Game Text: When you play this condition, you may stack 2 cards from hand here and draw a card for each [DWARVEN] card - * you stack. Skirmish: Make a Dwarf strength +2. Also, make that Dwarf damage +2 for each [DWARVEN] card stacked - * on this condition. Discard this condition. - */ -public class Card7_010 extends AbstractPermanent { - public Card7_010() { - super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.DWARVEN, "Loyalty Unshaken"); - } - - @Override - public List getOptionalAfterTriggers(final String playerId, final LotroGame game, EffectResult effectResult, PhysicalCard self) { - if (TriggerConditions.played(game, effectResult, self)) { - final OptionalTriggerAction action = new OptionalTriggerAction(self); - action.appendEffect( - new ChooseAndStackCardsFromHandEffect(action, playerId, 2, 2, self, Filters.any) { - @Override - public void stackFromHandCallback(Collection cardsStacked) { - int count = Filters.filter(cardsStacked, game, Culture.DWARVEN).size(); - if (count > 0) - action.appendEffect( - new DrawCardsEffect(action, playerId, count)); - } - }); - return Collections.singletonList(action); - } - return null; - } - - @Override - public List getPhaseActionsInPlay(String playerId, LotroGame game, final PhysicalCard self) { - if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)) { - final ActivateCardAction action = new ActivateCardAction(self); - action.appendEffect( - new ChooseActiveCardEffect(self, playerId, "Choose a Dwarf", Race.DWARF) { - @Override - protected void cardSelected(LotroGame game, PhysicalCard card) { - game.getModifiersEnvironment().addUntilEndOfPhaseModifier( - new StrengthModifier(self, card, 2), Phase.SKIRMISH); - int stackedDwarf = Filters.filter(game.getGameState().getStackedCards(self), game, Culture.DWARVEN).size(); - if (stackedDwarf > 0) - game.getModifiersEnvironment().addUntilEndOfPhaseModifier( - new KeywordModifier(self, card, Keyword.DAMAGE, stackedDwarf * 2), Phase.SKIRMISH); - } - }); - 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/set7/dwarven/Card7_011.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_011.java deleted file mode 100644 index 07aefa7af..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_011.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.gempukku.lotro.cards.set7.dwarven; - -import com.gempukku.lotro.common.Culture; -import com.gempukku.lotro.common.Phase; -import com.gempukku.lotro.common.Race; -import com.gempukku.lotro.common.Side; -import com.gempukku.lotro.game.PhysicalCard; -import com.gempukku.lotro.game.state.LotroGame; -import com.gempukku.lotro.logic.actions.PlayEventAction; -import com.gempukku.lotro.logic.actions.SubAction; -import com.gempukku.lotro.logic.cardtype.AbstractEvent; -import com.gempukku.lotro.logic.decisions.MultipleChoiceAwaitingDecision; -import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect; -import com.gempukku.lotro.logic.effects.DrawCardsEffect; -import com.gempukku.lotro.logic.effects.ExertCharactersEffect; -import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect; -import com.gempukku.lotro.logic.modifiers.StrengthModifier; -import com.gempukku.lotro.logic.timing.PlayConditions; - -/** - * Set: The Return of the King - * Side: Free - * Culture: Dwarven - * Twilight Cost: 1 - * Type: Event • Skirmish - * Game Text: Make a Dwarf strength +2. You may also exert that Dwarf to draw 2 cards. - */ -public class Card7_011 extends AbstractEvent { - public Card7_011() { - super(Side.FREE_PEOPLE, 1, Culture.DWARVEN, "Out of Darkness", Phase.SKIRMISH); - } - - @Override - public PlayEventAction getPlayEventCardAction(final String playerId, LotroGame game, final PhysicalCard self) { - final PlayEventAction action = new PlayEventAction(self); - action.appendEffect( - new ChooseActiveCardEffect(self, playerId, "Choose a Dwarf", Race.DWARF) { - @Override - protected void cardSelected(final LotroGame game, final PhysicalCard card) { - game.getModifiersEnvironment().addUntilEndOfPhaseModifier( - new StrengthModifier(self, card, 2), Phase.SKIRMISH); - if (PlayConditions.canExert(self, game, card)) { - action.appendEffect( - new PlayoutDecisionEffect(playerId, - new MultipleChoiceAwaitingDecision(1, "Do you want to exert that Dwarf to draw 2 cards?", new String[]{"Yes", "No"}) { - @Override - protected void validDecisionMade(int index, String result) { - if (index == 0) { - SubAction subAction = new SubAction(action); - subAction.appendCost( - new ExertCharactersEffect(action, self, card)); - subAction.appendEffect( - new DrawCardsEffect(action, playerId, 2)); - game.getActionsEnvironment().addActionToStack(subAction); - } - } - })); - } - } - }); - return action; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_012.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_012.java deleted file mode 100644 index 3df24a69d..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_012.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.gempukku.lotro.cards.set7.dwarven; - -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.cardtype.AbstractPermanent; -import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect; -import com.gempukku.lotro.logic.effects.SelfDiscardEffect; -import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect; -import com.gempukku.lotro.logic.effects.choose.ChooseAndStackCardsFromDiscardEffect; -import com.gempukku.lotro.logic.timing.PlayConditions; - -import java.util.Collections; -import java.util.List; - -/** - * Set: The Return of the King - * Side: Free - * Culture: Dwarven - * Twilight Cost: 2 - * Type: Condition • Support Area - * Game Text: Regroup: Exert a Dwarf companion to stack a card from your discard pile here. Skirmish: Wound a minion - * skirmishing a Dwarf once for each [DWARVEN] card stacked here. Discard this condition. - */ -public class Card7_012 extends AbstractPermanent { - public Card7_012() { - super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.DWARVEN, "Preparations"); - } - - @Override - public List getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) { - if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self) - && PlayConditions.canExert(self, game, Race.DWARF, CardType.COMPANION)) { - ActivateCardAction action = new ActivateCardAction(self); - action.appendCost( - new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.DWARF, CardType.COMPANION)); - action.appendEffect( - new ChooseAndStackCardsFromDiscardEffect(action, playerId, 1, 1, self, Filters.any)); - return Collections.singletonList(action); - } - if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)) { - ActivateCardAction action = new ActivateCardAction(self); - int count = Filters.filter(game.getGameState().getStackedCards(self), game, Culture.DWARVEN).size(); - for (int i = 0; i < count; i++) - action.appendEffect( - new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.MINION, Filters.inSkirmishAgainst(Race.DWARF))); - 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/set7/dwarven/Card7_013.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_013.java deleted file mode 100644 index 211053817..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_013.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.gempukku.lotro.cards.set7.dwarven; - -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.GameUtils; -import com.gempukku.lotro.logic.actions.ActivateCardAction; -import com.gempukku.lotro.logic.cardtype.AbstractAttachable; -import com.gempukku.lotro.logic.effects.AssignmentEffect; -import com.gempukku.lotro.logic.effects.DrawCardsEffect; -import com.gempukku.lotro.logic.effects.SelfDiscardEffect; -import com.gempukku.lotro.logic.modifiers.AddActionToCardModifier; -import com.gempukku.lotro.logic.modifiers.Modifier; -import com.gempukku.lotro.logic.timing.PlayConditions; - -import java.util.Collections; -import java.util.List; - -/** - * Set: The Return of the King - * Side: Free - * Culture: Dwarven - * Twilight Cost: 2 - * Type: Condition - * Game Text: Bearer must be a [DWARVEN] companion. Each minion gains this ability: 'Assignment: Assign this minion - * to bearer of Reckless Pride.' Regroup: Discard this condition to draw 4 cards. - */ -public class Card7_013 extends AbstractAttachable { - public Card7_013() { - super(Side.FREE_PEOPLE, CardType.CONDITION, 2, Culture.DWARVEN, null, "Reckless Pride", null, true); - } - - @Override - public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { - return Filters.and(Culture.DWARVEN, CardType.COMPANION); - } - - @Override - public List getInPlayModifiers(final LotroGame game, final PhysicalCard self) { - return Collections.singletonList( - new AddActionToCardModifier(self, null, CardType.MINION) { - @Override - protected ActivateCardAction createExtraPhaseAction(LotroGame game, PhysicalCard matchingCard) { - if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.ASSIGNMENT, matchingCard, 0)) { - ActivateCardAction action = new ActivateCardAction(matchingCard); - action.setText("Assign to " + GameUtils.getFullName(self.getAttachedTo())); - action.appendEffect( - new AssignmentEffect(matchingCard.getOwner(), self.getAttachedTo(), matchingCard)); - return action; - } - return null; - } - }); - } - - @Override - public List getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) { - if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self) - && PlayConditions.canSelfDiscard(self, game)) { - ActivateCardAction action = new ActivateCardAction(self); - action.appendCost( - new SelfDiscardEffect(self)); - action.appendEffect( - new DrawCardsEffect(action, playerId, 4)); - return Collections.singletonList(action); - } - return null; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_014.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_014.java deleted file mode 100644 index da3db3e3e..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set7/dwarven/Card7_014.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.gempukku.lotro.cards.set7.dwarven; - -import com.gempukku.lotro.common.*; -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.PlayEventAction; -import com.gempukku.lotro.logic.cardtype.AbstractEvent; -import com.gempukku.lotro.logic.effects.DiscardStackedCardsEffect; -import com.gempukku.lotro.logic.effects.DrawCardsEffect; -import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect; -import com.gempukku.lotro.logic.timing.PlayConditions; - -import java.util.Collections; -import java.util.List; - -/** - * Set: The Return of the King - * Side: Free - * Culture: Dwarven - * Twilight Cost: 1 - * Type: Event • Maneuver - * Game Text: Choose one: Spot a Dwarf to draw a card; or, if this card is stacked on a [DWARVEN] condition, spot - * a Dwarf companion and discard this event to exert a minion twice. - */ -public class Card7_014 extends AbstractEvent { - public Card7_014() { - super(Side.FREE_PEOPLE, 1, Culture.DWARVEN, "Slaked Thirsts", Phase.MANEUVER); - } - - @Override - public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) { - return PlayConditions.canSpot(game, Race.DWARF); - } - - @Override - public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) { - PlayEventAction action = new PlayEventAction(self); - action.appendEffect( - new DrawCardsEffect(action, playerId, 1)); - return action; - } - - @Override - public List getPhaseActionsFromStacked(String playerId, LotroGame game, PhysicalCard self) { - if (PlayConditions.canUseStackedFPCardDuringPhase(game, Phase.MANEUVER, self) - && PlayConditions.isStackedOn(self, game, Culture.DWARVEN, CardType.CONDITION) - && PlayConditions.canSpot(game, Race.DWARF, CardType.COMPANION)) { - ActivateCardAction action = new ActivateCardAction(self); - action.appendCost( - new DiscardStackedCardsEffect(self, self)); - action.appendEffect( - new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, CardType.MINION)); - return Collections.singletonList(action); - } - return null; - } -} diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set07-Dwarven.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set07/set07-Dwarven.hjson similarity index 51% rename from gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set07-Dwarven.hjson rename to gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set07/set07-Dwarven.hjson index 6ddb3d558..df029ffe4 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set07-Dwarven.hjson +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set07/set07-Dwarven.hjson @@ -22,20 +22,24 @@ twilight: 0 type: Event keywords: Skirmish - /*requires: { - - } effects: { type: event - cost: { - - }, effect: [ { - + type: modifyStrength + filter: choose(dwarf) + amount: { + type: condition + condition: { + type: canSpot + filter: culture(dwarven),condition,hasStacked(any) + } + true: 4 + false: 2 + } } ] - }*/ + } gametext: Make a Dwarf strength +2 (+4 if you spot a card stacked on a [dwarven] condition). lore: We're going to follow you, lad – even on the dark Road....' promotext: "" @@ -69,20 +73,22 @@ twilight: 2 type: Event keywords: Fellowship - /*requires: { - - } effects: { type: event + requires: { + type: canSpot + filter: dwarf + } cost: { - + type: addThreats }, effect: [ { - + type: drawCards + count: 3 } ] - }*/ + } gametext: Spot a Dwarf and add a threat to draw 3 cards. lore: Beyond the eyes of Dwarves are such fortellings....' promotext: "" @@ -116,17 +122,56 @@ twilight: 0 type: Condition keywords: Support Area - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: toPlay + requires: { + type: canSpot + filter: dwarf + } + } + { + type: trigger + trigger: { + type: moves + } + effect: { + type: choice + texts: [ + Add a threat + Discard this condition + ] + effects: [ + { + type: addThreats + } + { + type: discard + filter: self + } + ] + } + } + { + type: activated + phase: regroup + cost: { + type: discard + filter: self + } + effect: [ + { + type: heal + filter: choose(dwarf) + times: 2 + } + { + type: putCardsFromDiscardIntoHand + filter: choose(culture(dwarven),skirmish,event) + } + ] + } + ] gametext: To play, spot a Dwarf.
Each time the fellowship moves, add a threat or discard this condition.
Regroup: Discard this condition to heal a Dwarf twice and take a [dwarven] skirmish event into hand from your discard pile. lore: "" promotext: "" @@ -166,17 +211,20 @@ signet: Theoden resistance: 6 keywords: Damage+1 - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: modifier + modifier: { + type: modifyStrength + filter: self + requires: { + type: haveInitiative + side: free people + } + amount: 2 + } + } + ] gametext: Damage +1.
While you have initiative, Gimli is strength +2. lore: I will go with you even on the Paths of the Dead, and to whatever end they may lead....' promotext: "" @@ -216,17 +264,38 @@ signet: Aragorn resistance: 6 keywords: Damage+1 - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: activatedTrigger + trigger: { + type: aboutToDiscard + filter: culture(dwarven),condition + opponent: true + } + cost: { + type: choice + texts: [ + Exert a Dwarf + Discard a {dwarven} card from hand + ] + effects: [ + { + type: exert + filter: choose(dwarf) + } + { + type: discardFromHand + forced: false + filter: choose(culture(dwarven)) + } + ] + } + effect: { + type: preventDiscard + filter: choose(culture(dwarven),condition) + } + } + ] gametext: Damage +1.
Response: If a [dwarven] condition is about to be discarded by an opponent, exert a Dwarf or discard a [dwarven] card from hand to prevent that. lore: There are countless things still to see in Middle-earth, and great works to do.' promotext: "" @@ -260,18 +329,29 @@ twilight: 2 type: Possession itemclass: Armor - #target: title(Gimli) - /*requires: { - - } + target: title(Gimli) effects: [ - { - - } - { - - } - ]*/ + { + type: activatedTrigger + requires: { + type: haveInitiative + side: free people + } + trigger: { + type: aboutToTakeWound + filter: name(Gimli) + } + cost: { + type: discardFromHand + forced: false + count: 2 + } + effect: { + type: preventWound + filter: all(name(Gimli)) + } + } + ] gametext: Bearer must be Gimli.
Response: If you have initiative and Gimli is about to take a wound, discard 2 cards from hand to prevent that wound. lore: I hope that the forgotten people will not have forgotten how to fight....' promotext: "" @@ -307,18 +387,46 @@ type: Possession strength: 2 itemclass: Hand weapon - #target: a Dwarf - /*requires: { - - } + target: dwarf effects: [ - { - - } - { - - } - ]*/ + { + type: modifier + modifier: { + type: addKeyword + requires: { + type: canSpotThreats + amount: 1 + } + filter: bearer + keyword: damage + amount: 1 + } + } + { + type: modifier + modifier: { + type: modifyStrength + requires: { + type: canSpotThreats + amount: 2 + } + filter: bearer + amount: 1 + } + } + { + type: modifier + modifier: { + type: modifyArcheryTotal + requires: { + type: canSpotThreats + amount: 3 + } + side: free people + amount: 1 + } + } + ] gametext: Bearer must be a Dwarf.
While you can spot a threat, bearer is damage +1.
While you can spot 2 threats, bearer is strength +1.
While you can spot 3 threats, the fellowship archery total is +1. lore: "" promotext: "" @@ -352,17 +460,58 @@ twilight: 1 type: Condition keywords: Support Area - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: trigger + optional: true + trigger: { + type: played + filter: self + } + effect: [ + { + type: stackCardsFromHand + where: self + count: 2 + memorize: stackedCards + } + { + type: drawCards + count: { + type: forEachInMemory + memory: stackedCards + } + } + ] + } + { + type: activated + phase: skirmish + effect: [ + { + type: modifyStrength + filter: choose(dwarf) + amount: 2 + memorize: chosenDwarf + } + { + type: addKeyword + filter: memory(chosenDwarf) + keyword: damage + amount: { + type: countStacked + on: self + filter: culture(dwarven) + multiplier: 2 + } + } + { + type: discard + filter: self + } + ] + } + ] gametext: When you play this condition, you may stack 2 cards from hand here and draw a card for each [dwarven] card you stack.
Skirmish: Make a Dwarf strength +2. Also, make that Dwarf damage +2 for each [dwarven] card stacked on this condition. Discard this condition. lore: "" promotext: "" @@ -396,20 +545,39 @@ twilight: 1 type: Event keywords: Skirmish - /*requires: { - - } effects: { type: event - cost: { - - }, effect: [ { - + type: modifyStrength + filter: choose(dwarf) + amount: 2 + memorize: chosenDwarf + } + { + type: conditional + requires: { + type: canSpot + filter: memory(chosenDwarf),canExert + } + effect: { + type: optional + text: Would you like to exert {chosenDwarf} to draw 2 cards? + effect: { + type: costToEffect + cost: { + type: exert + filter: memory(chosenDwarf) + } + effect: { + type: drawCards + count: 2 + } + } + } } ] - }*/ + } gametext: Make a Dwarf strength +2. You may also exert that Dwarf to draw 2 cards. lore: Had I known what was before me, I think that not for any friendship would I have taken the Paths of the Dead.' promotext: "" @@ -443,17 +611,39 @@ twilight: 2 type: Condition keywords: Support Area - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: activated + phase: regroup + cost: { + type: exert + filter: choose(dwarf) + } + effect: { + type: stackCardsFromDiscard + where: self + } + } + { + type: activated + phase: skirmish + effect: [ + { + type: wound + filter: choose(minion,inSkirmishAgainst(dwarf)) + times: { + type: countStacked + on: self + filter: culture(dwarven) + } + } + { + type: discard + filter: self + } + ] + } + ] gametext: Regroup: Exert a Dwarf companion to stack a card from your discard pile here.
Skirmish: Wound a minion skirmishing a Dwarf once for each [dwarven] card stacked here. Discard this condition. lore: "" promotext: "" @@ -486,17 +676,35 @@ culture: Dwarven twilight: 2 type: Condition - /*requires: { - - } + target: culture(dwarven),companion effects: [ - { - - } - { - - } - ]*/ + { + type: modifier + modifier: { + type: addActivated + filter: minion + phase: assignment + text: Assign this minion to bearer of Reckless Pride. + effect: { + type: assignFpCharacterToSkirmish + fpCharacter: choose(hasAttached(name(Reckless Pride))) + against: self + } + } + } + { + type: activated + phase: regroup + cost: { + type: discard + filter: self + } + effect: { + type: drawCards + count: 4 + } + } + ] gametext: Bearer must be a [dwarven] companion.
Each minion gains this ability: "Assignment: Assign this minion to bearer of Reckless Pride."
Regroup: Discard this condition to draw 4 cards. lore: "" promotext: "" @@ -530,20 +738,39 @@ twilight: 1 type: Event keywords: Maneuver - /*requires: { - - } - effects: { - type: event - cost: { - - }, - effect: [ - { - - } - ] - }*/ + effects: [ + { + type: event + requires: { + type: canSpot + filter: dwarf + } + effect: [ + { + type: drawCards + } + ] + } + { + type: activatedFromStacked + phase: maneuver + stackedOn: culture(dwarven),condition + requires: { + type: canSpot + filter: dwarf,companion + } + cost: { + type: discardStackedCards + filter: self + on: culture(dwarven),condition + } + effect: { + type: exert + filter: choose(minion) + times: 2 + } + } + ] gametext: Choose one: Spot a Dwarf to draw a card; or, if this card is stacked on a [dwarven] condition, spot a Dwarf companion and discard this event to exert a minion twice. lore: Food and drink would pay off some of my score against you.' promotext: "" diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/StackCardsFromHand.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/StackCardsFromHand.java index b09d77606..e2fa8eafe 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/StackCardsFromHand.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/StackCardsFromHand.java @@ -22,25 +22,26 @@ import java.util.List; public class StackCardsFromHand implements EffectAppenderProducer { @Override public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException { - FieldUtils.validateAllowedFields(effectObject, "filter", "where", "count"); + FieldUtils.validateAllowedFields(effectObject, "filter", "where", "count", "memorize"); final String filter = FieldUtils.getString(effectObject.get("filter"), "filter", "choose(any)"); final String where = FieldUtils.getString(effectObject.get("where"), "where"); final ValueSource valueSource = ValueResolver.resolveEvaluator(effectObject.get("count"), 1, environment); + final String memorize = FieldUtils.getString(effectObject.get("memorize"), "memorize", "_temp2"); MultiEffectAppender result = new MultiEffectAppender(); result.addEffectAppender( CardResolver.resolveCard(where, "_temp1", "you", "Choose card to stack on", environment)); result.addEffectAppender( - CardResolver.resolveCardsInHand(filter, valueSource, "_temp2", "you", "you", "Choose cards to stack", environment)); + CardResolver.resolveCardsInHand(filter, valueSource, memorize, "you", "you", "Choose cards to stack", environment)); result.addEffectAppender( new DelayedAppender() { @Override protected List createEffects(boolean cost, CostToEffectAction action, ActionContext actionContext) { final PhysicalCard card = actionContext.getCardFromMemory("_temp1"); if (card != null) { - final Collection cardsInHand = actionContext.getCardsFromMemory("_temp2"); + final Collection cardsInHand = actionContext.getCardsFromMemory(memorize); List result = new LinkedList<>(); for (PhysicalCard physicalCard : cardsInHand) { diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/resolver/ValueResolver.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/resolver/ValueResolver.java index 83f4a3564..167a4a23d 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/resolver/ValueResolver.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/resolver/ValueResolver.java @@ -210,16 +210,17 @@ public class ValueResolver { actionContext.getGame().getGameState().getCurrentPhase(), limitSource.getEvaluator(actionContext), valueSource.getEvaluator(actionContext)); } else if (type.equalsIgnoreCase("countStacked")) { - FieldUtils.validateAllowedFields(object, "on", "filter"); + FieldUtils.validateAllowedFields(object, "on", "filter", "multiplier"); final String on = FieldUtils.getString(object.get("on"), "on"); final String filter = FieldUtils.getString(object.get("filter"), "filter", "any"); final FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment); final FilterableSource onFilter = environment.getFilterFactory().generateFilter(on, environment); + final ValueSource multiplier = resolveEvaluator(object.get("multiplier"), 1, environment); return (actionContext) -> { final Filterable on1 = onFilter.getFilterable(actionContext); - return new CountStackedEvaluator(on1, filterableSource.getFilterable(actionContext)); + return new MultiplyEvaluator(multiplier.getEvaluator(actionContext), new CountStackedEvaluator(on1, filterableSource.getFilterable(actionContext))); }; } else if (type.equalsIgnoreCase("forEachYouCanSpot")) { FieldUtils.validateAllowedFields(object, "filter", "over", "limit", "multiplier", "divider"); diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/AboutToDiscardFromPlay.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/AboutToDiscard.java similarity index 96% rename from gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/AboutToDiscardFromPlay.java rename to gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/AboutToDiscard.java index b4292a6c0..831170619 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/AboutToDiscardFromPlay.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/AboutToDiscard.java @@ -8,7 +8,7 @@ import com.gempukku.lotro.cards.build.field.FieldUtils; import com.gempukku.lotro.logic.timing.TriggerConditions; import org.json.simple.JSONObject; -public class AboutToDiscardFromPlay implements TriggerCheckerProducer { +public class AboutToDiscard implements TriggerCheckerProducer { @Override public TriggerChecker getTriggerChecker(JSONObject value, CardGenerationEnvironment environment) throws InvalidCardDefinitionException { FieldUtils.validateAllowedFields(value, "source", "filter", "opponent"); diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/TriggerCheckerFactory.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/TriggerCheckerFactory.java index 9948b69dc..198dcf0f5 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/TriggerCheckerFactory.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/TriggerCheckerFactory.java @@ -15,7 +15,7 @@ public class TriggerCheckerFactory { triggerCheckers.put("abouttoaddburden", new AboutToAddBurden()); triggerCheckers.put("abouttoaddtwilight", new AboutToAddTwilight()); triggerCheckers.put("abouttobekilled", new AboutToBeKilled()); - triggerCheckers.put("abouttodiscard", new AboutToDiscardFromPlay()); + triggerCheckers.put("abouttodiscard", new AboutToDiscard()); triggerCheckers.put("abouttoexert", new AboutToExert()); triggerCheckers.put("abouttoheal", new AboutToHeal()); triggerCheckers.put("abouttomoveto", new AboutToMoveTo());