- "Unreasonable Choice" now first makes the player choose the condition to discard, then the other player can decide if he/she wants to prevent it.

This commit is contained in:
marcins78@gmail.com
2012-03-26 06:41:02 +00:00
parent 6d7cb3713e
commit 66dd992996
4 changed files with 28 additions and 31 deletions

View File

@@ -4,12 +4,10 @@ import com.gempukku.lotro.common.Filterable;
import com.gempukku.lotro.filters.Filter;
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.SubAction;
import com.gempukku.lotro.logic.effects.ChooseActiveCardsEffect;
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collection;
@@ -25,12 +23,9 @@ public class ChooseAndDiscardCardsFromPlayEffect extends ChooseActiveCardsEffect
@Override
protected Filter getExtraFilterForPlaying(LotroGame game) {
return new Filter() {
@Override
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
return (_action.getActionSource() == null || modifiersQuerying.canBeDiscardedFromPlay(gameState, physicalCard, _action.getActionSource()));
}
};
if (_action.getActionSource() == null)
return Filters.any;
return Filters.canBeDiscarded(_action.getActionSource());
}
@Override

View File

@@ -4,7 +4,6 @@ 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.PreventableEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
@@ -14,6 +13,8 @@ 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.AddTwilightEffect;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.timing.Effect;
/**
@@ -38,22 +39,24 @@ public class Card15_119 extends AbstractEvent {
@Override
public PlayEventAction getPlayCardAction(String playerId, final LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
PlayEventAction action = new PlayEventAction(self);
final PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new PreventableEffect(action,
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Side.FREE_PEOPLE, CardType.CONDITION) {
@Override
public String getText(LotroGame game) {
return "Discard a Free Peoples condition";
}
}, game.getGameState().getCurrentPlayerId(),
new PreventableEffect.PreventionCost() {
@Override
public Effect createPreventionCostForPlayer(SubAction subAction, String playerId) {
return new AddTwilightEffect(self, 2 * Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Side.FREE_PEOPLE, CardType.CONDITION));
}
}
));
new ChooseActiveCardEffect(self, playerId, "Choose a card to discard", Side.FREE_PEOPLE, CardType.CONDITION, Filters.canBeDiscarded(self)) {
@Override
protected void cardSelected(final LotroGame game, PhysicalCard card) {
action.appendEffect(
new PreventableEffect(action,
new DiscardCardsFromPlayEffect(self, card),
game.getGameState().getCurrentPlayerId(),
new PreventableEffect.PreventionCost() {
@Override
public Effect createPreventionCostForPlayer(SubAction subAction, String playerId) {
return new AddTwilightEffect(self, 2 * Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Side.FREE_PEOPLE, CardType.CONDITION));
}
}
));
}
});
return action;
}
}

View File

@@ -3,11 +3,11 @@ package com.gempukku.lotro.logic.effects;
import com.gempukku.lotro.common.Filterable;
import com.gempukku.lotro.common.Zone;
import com.gempukku.lotro.filters.Filter;
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.GameUtils;
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.results.DiscardCardsFromPlayResult;
@@ -42,12 +42,9 @@ public class DiscardCardsFromPlayEffect extends AbstractPreventableCardEffect {
@Override
protected Filter getExtraAffectableFilter() {
return new Filter() {
@Override
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
return (_source == null || modifiersQuerying.canBeDiscardedFromPlay(gameState, physicalCard, _source));
}
};
if (_source == null)
return Filters.any;
return Filters.canBeDiscarded(_source);
}
public String getPerformingPlayer() {

View File

@@ -3,6 +3,8 @@
- "Pillage of Rohan" and other similar cards should be active at the right time now (only on your turn).
- "Let Her Deal With Them" now correctly requires to spot Gollum or Smeagol to be able to play it (both from hand
and discard).
- "Unreasonable Choice" now first makes the player choose the condition to discard, then the other player can decide
if he/she wants to prevent it.
<b>16 Mar. 2012</b>
- When "Mountain-troll" is played with discarding 5 minions, now it should properly gain Fierce.