"Isengard Mechanics"

This commit is contained in:
marcins78@gmail.com
2011-10-21 11:27:39 +00:00
parent ff6e8c2036
commit befae154f4
3 changed files with 78 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import com.gempukku.lotro.logic.timing.AbstractEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
@@ -16,6 +17,10 @@ public class DiscardStackedCardsEffect extends AbstractEffect {
private PhysicalCard _source;
private Collection<PhysicalCard> _cards;
public DiscardStackedCardsEffect(PhysicalCard source, PhysicalCard card) {
this(source, Collections.singleton(card));
}
public DiscardStackedCardsEffect(PhysicalCard source, Collection<PhysicalCard> cards) {
_source = source;
_cards = cards;

View File

@@ -1,8 +1,10 @@
package com.gempukku.lotro.cards.set6.isengard;
import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.DiscardStackedCardsEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
@@ -31,7 +33,8 @@ public class Card6_066 extends AbstractMinion {
@Override
public List<? extends Action> getPhaseActionsFromStacked(String playerId, LotroGame game, PhysicalCard self) {
if (self.getStackedOn().getBlueprint().getCulture() == Culture.ISENGARD) {
if (PlayConditions.canUseStackedShadowCardDuringPhase(game.getGameState(), Phase.REGROUP, self, 0)
&& self.getStackedOn().getBlueprint().getCulture() == Culture.ISENGARD) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new DiscardStackedCardsEffect(self, Collections.singleton(self)));

View File

@@ -0,0 +1,69 @@
package com.gempukku.lotro.cards.set6.isengard;
import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.DiscardStackedCardsEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.common.CardType;
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.ActivateCardAction;
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Shadow
* Culture: Isengard
* Twilight Cost: 6
* Type: Minion • Orc
* Strength: 11
* Vitality: 4
* Site: 4
* Game Text: Regroup: Discard an [ISENGARD] Orc to make the Free Peoples player wound a companion (or 2 companions if
* you spot 6 companions). Regroup: If this minion is stacked on an [ISENGARD] card, spot an [ISENGARD] Orc and discard
* this minion to add (3).
*/
public class Card6_068 extends AbstractMinion {
public Card6_068() {
super(6, 11, 4, 4, Race.ORC, Culture.ISENGARD, "Isengard Mechanics");
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.REGROUP, self, 0)
&& PlayConditions.canBeDiscarded(self, game, Culture.ISENGARD, Race.ORC)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Culture.ISENGARD, Race.ORC));
int count = (Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), CardType.COMPANION) >= 6) ? 2 : 1;
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, count, count, CardType.COMPANION));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends Action> getPhaseActionsFromStacked(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseStackedShadowCardDuringPhase(game.getGameState(), Phase.REGROUP, self, 0)
&& self.getStackedOn().getBlueprint().getCulture() == Culture.ISENGARD
&& PlayConditions.canSpot(game, Culture.ISENGARD, Race.ORC)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new DiscardStackedCardsEffect(self, self));
action.appendEffect(
new AddTwilightEffect(self, 3));
return Collections.singletonList(action);
}
return null;
}
}