"Wealth of Moria"
This commit is contained in:
@@ -2,11 +2,15 @@ package com.gempukku.lotro.cards.set1.dwarven;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -30,9 +34,29 @@ public class Card1_028 extends AbstractLotroCardBlueprint {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFPCardDuringPhase(game, Phase.FELLOWSHIP, self)) {
|
||||
// TODO
|
||||
public List<? extends Action> getPlayablePhaseActions(final String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.DWARF))) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.addEffect(
|
||||
new UnrespondableEffect() {
|
||||
@Override
|
||||
public void playEffect(LotroGame game) {
|
||||
List<? extends PhysicalCard> deck = game.getGameState().getDeck(playerId);
|
||||
int cardCount = Math.min(deck.size(), 3);
|
||||
List<? extends PhysicalCard> cards = deck.subList(0, cardCount);
|
||||
|
||||
for (PhysicalCard card : cards) {
|
||||
game.getGameState().removeCardFromZone(card);
|
||||
if (card.getBlueprint().getSide() == Side.FREE_PEOPLE)
|
||||
game.getGameState().addCardToZone(card, Zone.HAND);
|
||||
else
|
||||
game.getGameState().addCardToZone(card, Zone.DISCARD);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user