"Slaked Thirsts"

This commit is contained in:
marcins78@gmail.com
2011-10-27 16:05:26 +00:00
parent 39a9ef5383
commit 30fb48209c
2 changed files with 68 additions and 0 deletions

View File

@@ -75,10 +75,18 @@ public class PlayConditions {
&& twilightCost <= gameState.getTwilightPool();
}
public static boolean canUseStackedFPCardDuringPhase(GameState gameState, Phase phase, PhysicalCard self) {
return (phase == null || gameState.getCurrentPhase() == phase) && self.getZone() == Zone.STACKED;
}
public static boolean canUseSiteDuringPhase(GameState gameState, Phase phase, PhysicalCard self) {
return (phase == null || gameState.getCurrentPhase() == phase) && (gameState.getCurrentSite() == self);
}
public static boolean stackedOn(PhysicalCard card, LotroGame game, Filterable... filters) {
return Filters.and(filters).accepts(game.getGameState(), game.getModifiersQuerying(), card.getStackedOn());
}
public static boolean checkUniqueness(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard self) {
LotroCardBlueprint blueprint = self.getBlueprint();
return (!blueprint.isUnique()

View File

@@ -0,0 +1,60 @@
package com.gempukku.lotro.cards.set7.dwarven;
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.DiscardStackedCardsEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.effects.DrawCardEffect;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: The Return of the King
* Side: Free
* Culture: Dwarven
* Twilight Cost: 1
* Type: Event • Maneuver
* Game Text: Choose one: Spot a Dwarf to draw a card; or, if this card is stacked on a [DWARVEN] condition, spot
* a Dwarf companion and discard this event to exert a minion twice.
*/
public class Card7_014 extends AbstractEvent {
public Card7_014() {
super(Side.FREE_PEOPLE, 1, Culture.DWARVEN, "Slaked Thirsts", Phase.MANEUVER);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& PlayConditions.canSpot(game, Race.DWARF);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new DrawCardEffect(playerId, 1));
return action;
}
@Override
public List<? extends Action> getPhaseActionsFromStacked(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.MANEUVER, self)
&& PlayConditions.stackedOn(self, game, Culture.DWARVEN, CardType.CONDITION)
&& PlayConditions.canSpot(game, Race.DWARF)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new DiscardStackedCardsEffect(self, self));
action.appendEffect(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, CardType.MINION));
return Collections.singletonList(action);
}
return null;
}
}