"Swear By the Precious"
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
package com.gempukku.lotro.cards.set15.gollum;
|
||||
|
||||
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.AddUntilEndOfTurnModifierEffect;
|
||||
import com.gempukku.lotro.cards.effects.PreventableEffect;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
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.SubAction;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
/**
|
||||
* Set: The Hunters
|
||||
* Side: Free
|
||||
* Culture: Gollum
|
||||
* Twilight Cost: 2
|
||||
* Type: Event • Maneuver
|
||||
* Game Text: Spot Frodo and Smeagol to discard a minion. That minion’s owner may make each minion strength -2 until
|
||||
* the end of the turn to prevent that.
|
||||
*/
|
||||
public class Card15_052 extends AbstractEvent {
|
||||
public Card15_052() {
|
||||
super(Side.FREE_PEOPLE, 2, Culture.GOLLUM, "Swear By the Precious", 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, Filters.frodo)
|
||||
&& PlayConditions.canSpot(game, Filters.smeagol);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseActiveCardEffect(self, playerId, "Choose a minion to discard", CardType.MINION, Filters.canBeDiscarded(self)) {
|
||||
@Override
|
||||
protected void cardSelected(LotroGame game, final PhysicalCard card) {
|
||||
action.appendEffect(
|
||||
new PreventableEffect(action,
|
||||
new DiscardCardsFromPlayEffect(self, card), card.getOwner(),
|
||||
new PreventableEffect.PreventionCost() {
|
||||
|
||||
@Override
|
||||
public Effect createPreventionCostForPlayer(SubAction subAction, String playerId) {
|
||||
return new AddUntilEndOfTurnModifierEffect(
|
||||
new StrengthModifier(self, CardType.MINION, -2)) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Make each minion strength -2";
|
||||
}
|
||||
};
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -357,6 +357,15 @@ public class Filters {
|
||||
};
|
||||
}
|
||||
|
||||
public static final Filter canBeDiscarded(final PhysicalCard source) {
|
||||
return new Filter() {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
||||
return modifiersQuerying.canBeDiscardedFromPlay(gameState, physicalCard, source);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static final Filter canTakeWound = canTakeWounds(1);
|
||||
|
||||
public static final Filter exhausted = new Filter() {
|
||||
|
||||
Reference in New Issue
Block a user