New version of "Better Than Nothing"
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
package com.gempukku.lotro.cards.set31.gollum;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.effects.AddBurdenEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDeckEffect;
|
||||
@@ -10,9 +11,15 @@ import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDiscardEffec
|
||||
import com.gempukku.lotro.common.*;
|
||||
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.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -21,44 +28,53 @@ import java.util.List;
|
||||
* Side: Shadow
|
||||
* Culture: Gollum
|
||||
* Twilight Cost: 0
|
||||
* Type: Event • Shadow
|
||||
* Game Text: Discard an orc to play Gollum from your draw deck or discard pile.
|
||||
* Type: Condition • Support Area
|
||||
* Game Text: While you can spot Gollum, each [GANDALF] event gains this cost: "add a doubt." At the end of
|
||||
* your Shadow phase, you may discard an Orc from play to play Gollum from your draw deck or discard pile.
|
||||
*/
|
||||
public class Card31_019 extends AbstractEvent {
|
||||
public class Card31_019 extends AbstractPermanent {
|
||||
public Card31_019() {
|
||||
super(Side.SHADOW, 0, Culture.GOLLUM, "Better Than Nothing", Phase.SHADOW);
|
||||
super(Side.SHADOW, 0, CardType.CONDITION, Culture.GOLLUM, Zone.SUPPORT, "Better Than Nothing", null, true);
|
||||
}
|
||||
|
||||
@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.canDiscardFromPlay(self, game, Race.ORC);
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.played(game, effectResult, Filters.owner(game.getGameState().getCurrentPlayerId()), Culture.GANDALF, CardType.EVENT)) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(new AddBurdenEffect(self.getOwner(), self, 1));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Race.ORC));
|
||||
List<Effect> possibleEffects = new LinkedList<Effect>();
|
||||
possibleEffects.add(
|
||||
new ChooseAndPlayCardFromDeckEffect(playerId, Filters.gollum) {
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(final String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.endOfPhase(game, effectResult, Phase.SHADOW)
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, Race.ORC)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Race.ORC));
|
||||
List<Effect> possibleEffects = new LinkedList<Effect>();
|
||||
possibleEffects.add(
|
||||
new ChooseAndPlayCardFromDeckEffect(playerId, Filters.gollum) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Play Gollum from your draw deck";
|
||||
}
|
||||
});
|
||||
if (PlayConditions.canPlayFromDiscard(playerId, game, Filters.gollum)) {
|
||||
possibleEffects.add(
|
||||
new ChooseAndPlayCardFromDiscardEffect(playerId, game, Filters.gollum) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Play Gollum from your draw deck";
|
||||
return "Play Gollum from your discard pile";
|
||||
}
|
||||
});
|
||||
if (PlayConditions.canPlayFromDiscard(playerId, game, Filters.gollum)) {
|
||||
possibleEffects.add(
|
||||
new ChooseAndPlayCardFromDiscardEffect(playerId, game, Filters.gollum) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Play Gollum from your discard pile";
|
||||
}
|
||||
});
|
||||
}
|
||||
action.appendEffect(
|
||||
new ChoiceEffect(action, playerId, possibleEffects));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
action.appendEffect(
|
||||
new ChoiceEffect(action, playerId, possibleEffects));
|
||||
return action;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user