diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set40/set40-gandalf.json b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set40/set40-gandalf.json index 374af788e..6bdc06e1a 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/cards/set40/set40-gandalf.json +++ b/gemp-lotr/gemp-lotr-async/src/main/web/cards/set40/set40-gandalf.json @@ -65,6 +65,8 @@ "type": "ally", "race": "man", "keyword": "bree", + "strength": 1, + "vitality": 2, "allyHome": "second ed,2", "condition": { "type": "canSpot", @@ -401,7 +403,7 @@ }, "cost": { "type": "exert", - "filter": "self", + "filter": "choose(name(Gandalf))", "times": 2 }, "effect": { diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/Card40_001.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/Card40_001.java deleted file mode 100644 index 900aadcb5..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/Card40_001.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.gempukku.lotro.cards.set40; - -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.*; -import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect; -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.LinkedList; -import java.util.List; - -/** - * Title: The One Ring, Doom of Free Peoples - * Set: Second Edition - * Side: Free - * Culture: Ring - * Twilight Cost: 0 - * Type: The One Ring - * Strength: +1 - * Vitality: +1 - * Resistance: +1 - * Card Number: 1R1 - * Game Text: While wearing The One Ring, each time the Ring-bearer is about to take a wound, add a burden instead. - * Maneuver: Exert bearer or discard a card at random from hand to wear The One Ring until the regroup phase. - */ -public class Card40_001 extends AbstractAttachable { - public Card40_001() { - super(null, CardType.THE_ONE_RING, 0, null, null, "The One Ring", "Doom of Free Peoples", true); - } - - @Override - public Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { - return Filters.none; - } - - @Override - public int getStrength() { - return 1; - } - - @Override - public int getVitality() { - return 1; - } - - @Override - public int getResistance() { - return 1; - } - - @Override - public List getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) { - if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self) - && (PlayConditions.canExert(self, game, Filters.hasAttached(self)) - || PlayConditions.canDiscardFromHand(game, self.getOwner(), 1, Filters.any))) { - ActivateCardAction action = new ActivateCardAction(self); - List possibleCosts = new LinkedList(); - possibleCosts.add( - new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.hasAttached(self))); - possibleCosts.add( - new DiscardCardAtRandomFromHandEffect(self, self.getOwner(), false)); - - ChoiceEffect choiceEffect = new ChoiceEffect(action, self.getOwner(), possibleCosts); - action.appendCost(choiceEffect); - 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)) { - RequiredTriggerAction action = new RequiredTriggerAction(self); - action.appendEffect(new NegateWoundEffect((WoundCharactersEffect) effect, 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/set40/Card40_002.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/Card40_002.java deleted file mode 100644 index 7e1bbf98c..000000000 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set40/Card40_002.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.gempukku.lotro.cards.set40; - -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.TriggerConditions; - -import java.util.Collections; -import java.util.List; - -/** - * Title: The One Ring, The Ruling Ring - * Set: Second Edition - * Side: Free - * Culture: Ring - * Twilight Cost: 0 - * Type: The One Ring - * Strength: +1 - * Card Number: 1C2 - * Game Text: While wearing The One Ring, each time the Ring-bearer is about to take a wound during a skirmish, add a burden instead. Response: If bearer is about to take a wound in a skirmish, he wears The One Ring until the regroup phase. - */ -public class Card40_002 extends AbstractAttachable { - public Card40_002() { - super(null, CardType.THE_ONE_RING, 0, null, null, "The One Ring", "The Ruling Ring", true); - } - - @Override - public Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { - return Filters.none; - } - - @Override - public int getStrength() { - return 1; - } - - @Override - public List getOptionalInPlayBeforeActions(final String playerId, LotroGame game, Effect effect, final PhysicalCard self) { - if (game.getGameState().getCurrentPhase() == Phase.SKIRMISH - && TriggerConditions.isGettingWounded(effect, game, Filters.hasAttached(self)) - && !game.getModifiersQuerying().hasFlagActive(game, ModifierFlag.RING_TEXT_INACTIVE)) { - ActivateCardAction action = new ActivateCardAction(self); - action.appendEffect(new NegateWoundEffect((WoundCharactersEffect) effect, self.getAttachedTo())); - action.appendEffect(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)) { - RequiredTriggerAction action = new RequiredTriggerAction(self); - action.appendEffect(new NegateWoundEffect((WoundCharactersEffect) effect, self.getAttachedTo())); - action.appendEffect(new AddBurdenEffect(self.getOwner(), self, 1)); - return Collections.singletonList(action); - } - return null; - } -}