"Resourcefulness"
This commit is contained in:
@@ -25,7 +25,7 @@ public class PutPlayedEventIntoHandEffect extends AbstractEffect {
|
||||
|
||||
@Override
|
||||
public boolean isPlayableInFull(LotroGame game) {
|
||||
return true;
|
||||
return _action.getEventPlayed().getZone() == Zone.VOID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.gempukku.lotro.cards.effects;
|
||||
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.common.Zone;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.GameUtils;
|
||||
import com.gempukku.lotro.logic.timing.AbstractEffect;
|
||||
@@ -24,7 +25,7 @@ public class PutPlayedEventOnBottomOfDeckEffect extends AbstractEffect {
|
||||
|
||||
@Override
|
||||
public boolean isPlayableInFull(LotroGame game) {
|
||||
return true;
|
||||
return _action.getEventPlayed().getZone() == Zone.VOID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.gempukku.lotro.cards.effects;
|
||||
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.common.Zone;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.GameUtils;
|
||||
import com.gempukku.lotro.logic.timing.AbstractEffect;
|
||||
@@ -24,7 +25,7 @@ public class PutPlayedEventOnTopOfDeckEffect extends AbstractEffect {
|
||||
|
||||
@Override
|
||||
public boolean isPlayableInFull(LotroGame game) {
|
||||
return true;
|
||||
return _action.getEventPlayed().getZone() == Zone.VOID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,7 +25,7 @@ public class RemovePlayedEventFromGameEffect extends AbstractEffect {
|
||||
|
||||
@Override
|
||||
public boolean isPlayableInFull(LotroGame game) {
|
||||
return true;
|
||||
return _action.getEventPlayed().getZone() == Zone.VOID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.gempukku.lotro.cards.effects;
|
||||
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.common.Zone;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.GameUtils;
|
||||
import com.gempukku.lotro.logic.timing.AbstractEffect;
|
||||
|
||||
public class StackPlayedEventOnACardEffect extends AbstractEffect {
|
||||
private PlayEventAction _action;
|
||||
private PhysicalCard _stackOn;
|
||||
|
||||
public StackPlayedEventOnACardEffect(PlayEventAction action, PhysicalCard stackOn) {
|
||||
_action = action;
|
||||
_stackOn = stackOn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Stack " + GameUtils.getCardLink(_action.getEventPlayed()) + " on "+GameUtils.getCardLink(_stackOn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type getType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPlayableInFull(LotroGame game) {
|
||||
return _stackOn.getZone().isInPlay() && _action.getEventPlayed().getZone() == Zone.VOID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FullEffectResult playEffectReturningResult(LotroGame game) {
|
||||
if (isPlayableInFull(game)) {
|
||||
game.getGameState().sendMessage(_action.getPerformingPlayer() + " stacks " + GameUtils.getCardLink(_action.getEventPlayed()) + " on "+GameUtils.getCardLink(_stackOn));
|
||||
_action.skipDiscardPart();
|
||||
game.getGameState().stackCard(game, _action.getEventPlayed(), _stackOn);
|
||||
return new FullEffectResult(true);
|
||||
}
|
||||
return new FullEffectResult(false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.gempukku.lotro.cards.set20.dwarven;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseActionProxyEffect;
|
||||
import com.gempukku.lotro.cards.effects.StackPlayedEventOnACardEffect;
|
||||
import com.gempukku.lotro.cards.results.PlayEventResult;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.AbstractActionProxy;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 2
|
||||
* Resourcefulness
|
||||
* Dwarven Event • Manuever
|
||||
* Until the start of the regroup phase, each time you play a [Dwarven] event, stack that event on
|
||||
* a [Dwarven] support area condition.
|
||||
*/
|
||||
public class Card20_063 extends AbstractEvent {
|
||||
public Card20_063() {
|
||||
super(Side.FREE_PEOPLE, 2, Culture.DWARVEN, "Resourcefulness", Phase.MANEUVER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new AddUntilStartOfPhaseActionProxyEffect(
|
||||
new AbstractActionProxy() {
|
||||
@Override
|
||||
public List<? extends RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult) {
|
||||
if (TriggerConditions.played(game, effectResult, Filters.owner(playerId), Culture.DWARVEN, CardType.EVENT)) {
|
||||
final PlayEventResult playEventResult = (PlayEventResult) effectResult;
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.setVirtualCardAction(true);
|
||||
action.appendEffect(
|
||||
new ChooseActiveCardEffect(self, playerId, "Choose DWARVEN condition in your support area", Culture.DWARVEN, CardType.CONDITION, Zone.SUPPORT) {
|
||||
@Override
|
||||
protected void cardSelected(LotroGame game, PhysicalCard card) {
|
||||
action.appendEffect(
|
||||
new StackPlayedEventOnACardEffect(playEventResult.getPlayEventAction(), card));
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}, Phase.REGROUP));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user