"Army of Udun"

This commit is contained in:
marcins78@gmail.com
2011-11-07 16:28:45 +00:00
parent 83c1cb648a
commit b02b5bd354
2 changed files with 80 additions and 1 deletions

View File

@@ -27,10 +27,10 @@ public class ChooseAndDiscardCardsFromPlayEffect extends ChooseActiveCardsEffect
@Override
protected void cardsSelected(LotroGame game, Collection<PhysicalCard> cards) {
cardsToBeDiscardedCallback(cards);
_resultSubAction = new SubAction(_action);
_resultSubAction.appendEffect(new DiscardCardsFromPlayEffect(_action.getActionSource(), Filters.in(cards)));
game.getActionsEnvironment().addActionToStack(_resultSubAction);
cardsToBeDiscardedCallback(cards);
}
protected void cardsToBeDiscardedCallback(Collection<PhysicalCard> cards) {

View File

@@ -0,0 +1,79 @@
package com.gempukku.lotro.cards.set7.sauron;
import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
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;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.effects.AddThreatsEffect;
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.effects.RemoveThreatsEffect;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* Set: The Return of the King
* Side: Shadow
* Culture: Sauron
* Twilight Cost: 9
* Type: Minion • Orc
* Strength: 19
* Vitality: 5
* Site: 6
* Game Text: Shadow: Discard a [SAURON] Orc to add a threat. Skirmish: Remove a threat to make Army of Udun
* strength +1. Regroup: Discard Army of Udun and X other [SAURON] Orcs to add X threats.
*/
public class Card7_264 extends AbstractMinion {
public Card7_264() {
super(9, 19, 5, 6, Race.ORC, Culture.SAURON, "Army of Udun", true);
}
@Override
protected List<? extends Action> getExtraPhaseActions(final String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 0)
&& PlayConditions.canDiscardFromPlay(self, game, Culture.SAURON, Race.ORC)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Culture.SAURON, Race.ORC));
action.appendEffect(
new AddThreatsEffect(playerId, self, 1));
return Collections.singletonList(action);
}
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SKIRMISH, self, 0)
&& PlayConditions.canRemoveThreat(game, self, 1)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new RemoveThreatsEffect(self, 1));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, self, 1), Phase.SKIRMISH));
return Collections.singletonList(action);
}
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.REGROUP, self, 0)
&& PlayConditions.canSelfDiscard(self, game)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new DiscardCardsFromPlayEffect(self, self));
action.appendCost(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 0, Integer.MAX_VALUE, Culture.SAURON, Race.ORC) {
@Override
protected void cardsToBeDiscardedCallback(Collection<PhysicalCard> cards) {
int count = cards.size();
action.appendEffect(
new AddThreatsEffect(playerId, self, count));
}
});
return Collections.singletonList(action);
}
return null;
}
}