"Wild Men of the Hills"
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
package com.gempukku.lotro.cards.set5.dunland;
|
||||
|
||||
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.ChooseAndDiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.effects.DrawCardEffect;
|
||||
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
|
||||
|
||||
/**
|
||||
* Set: Battle of Helm's Deep
|
||||
* Side: Shadow
|
||||
* Culture: Dunland
|
||||
* Twilight Cost: 1
|
||||
* Type: Event
|
||||
* Game Text: Shadow: Spot 3 [DUNLAND] minions to shuffle your hand into your draw deck and draw 8 cards.
|
||||
* The Free Peoples player may discard 3 cards from hand to prevent this.
|
||||
*/
|
||||
public class Card5_003 extends AbstractEvent {
|
||||
public Card5_003() {
|
||||
super(Side.SHADOW, 1, Culture.DUNLAND, "Leaping Blaze", Phase.SHADOW);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
|
||||
&& PlayConditions.canSpot(game, 3, Culture.DUNLAND, CardType.MINION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new PreventableEffect(action,
|
||||
new UnrespondableEffect() {
|
||||
@Override
|
||||
protected void doPlayEffect(LotroGame game) {
|
||||
game.getGameState().shuffleCardsIntoDeck(game.getGameState().getHand(playerId), playerId);
|
||||
action.appendEffect(
|
||||
new DrawCardEffect(playerId, 8));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Shuffle hand into draw deck and draw 8 cards";
|
||||
}
|
||||
}, game.getGameState().getCurrentPlayerId(),
|
||||
new ChooseAndDiscardCardsFromHandEffect(action, game.getGameState().getCurrentPlayerId(), false, 3)));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.gempukku.lotro.cards.set5.dunland;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractMinion;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
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.decisions.MultipleChoiceAwaitingDecision;
|
||||
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Battle of Helm's Deep
|
||||
* Side: Shadow
|
||||
* Culture: Dunland
|
||||
* Twilight Cost: 6
|
||||
* Type: Minion • Man
|
||||
* Strength: 18
|
||||
* Vitality: 2
|
||||
* Site: 3
|
||||
* Game Text: The twilight cost of this minion is -2 during the skirmish phase. When you play this minion, the Free
|
||||
* Peoples player may discard 4 cards from hand to discard it.
|
||||
*/
|
||||
public class Card5_004 extends AbstractMinion {
|
||||
public Card5_004() {
|
||||
super(6, 18, 2, 3, Race.MAN, Culture.DUNLAND, "Wild Men of the Hills");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
if (game.getGameState().getCurrentPhase() == Phase.SKIRMISH)
|
||||
twilightModifier -= 2;
|
||||
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.MORIA), Filters.race(Race.ORC));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
if (game.getGameState().getCurrentPhase() == Phase.SKIRMISH)
|
||||
twilightModifier -= 2;
|
||||
return super.getPlayCardAction(playerId, game, self, twilightModifier);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(final LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))
|
||||
&& game.getGameState().getHand(game.getGameState().getCurrentPlayerId()).size() >= 4) {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), game.getGameState().getCurrentPlayerId(),
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you want to discard 4 cards from hand to discard this minion?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
if (result.equals("Yes")) {
|
||||
action.insertCost(
|
||||
new ChooseAndDiscardCardsFromHandEffect(action, game.getGameState().getCurrentPlayerId(), false, 4));
|
||||
action.appendEffect(
|
||||
new DiscardCardsFromPlayEffect(self, self));
|
||||
}
|
||||
}
|
||||
}));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -369,7 +369,7 @@ public class GameState {
|
||||
}
|
||||
}
|
||||
|
||||
public void shuffleCardsIntoDeck(Collection<PhysicalCard> cards, String playerId) {
|
||||
public void shuffleCardsIntoDeck(Collection<? extends PhysicalCard> cards, String playerId) {
|
||||
List<PhysicalCardImpl> zoneCards = _decks.get(playerId);
|
||||
|
||||
for (PhysicalCard card : cards) {
|
||||
|
||||
Reference in New Issue
Block a user