"Goblin Swarms"
This commit is contained in:
@@ -0,0 +1,54 @@
|
|||||||
|
package com.gempukku.lotro.cards.set20.moria;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||||
|
import com.gempukku.lotro.cards.PlayConditions;
|
||||||
|
import com.gempukku.lotro.cards.TriggerConditions;
|
||||||
|
import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromStackedEffect;
|
||||||
|
import com.gempukku.lotro.cards.effects.choose.ChooseAndStackCardFromPlayEffect;
|
||||||
|
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.actions.ActivateCardAction;
|
||||||
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1
|
||||||
|
* Goblin Swarms
|
||||||
|
* Moria Condition • Support Area
|
||||||
|
* Response: If your [Moria] Goblin wins a skirmish, stack that Gobiln here.
|
||||||
|
* Shadow: Play a Goblin stacked here as if from hand.
|
||||||
|
*/
|
||||||
|
public class Card20_274 extends AbstractPermanent {
|
||||||
|
public Card20_274() {
|
||||||
|
super(Side.SHADOW, 1, CardType.CONDITION, Culture.MORIA, Zone.SUPPORT, "Goblin Swarms");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<? extends Action> getExtraPhaseActions(final String playerId, final LotroGame game, PhysicalCard self) {
|
||||||
|
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 0)
|
||||||
|
&& PlayConditions.canPlayFromStacked(playerId, game, self, Race.GOBLIN)) {
|
||||||
|
ActivateCardAction action = new ActivateCardAction(self);
|
||||||
|
action.appendEffect(
|
||||||
|
new ChooseAndPlayCardFromStackedEffect(playerId, self, Race.GOBLIN));
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||||
|
if (TriggerConditions.winsSkirmish(game, effectResult, Filters.and(Culture.MORIA, Race.GOBLIN))
|
||||||
|
&& PlayConditions.isActive(game, Culture.MORIA, Race.GOBLIN, Filters.inSkirmish)) {
|
||||||
|
final ActivateCardAction action = new ActivateCardAction(self);
|
||||||
|
action.appendEffect(
|
||||||
|
new ChooseAndStackCardFromPlayEffect(action, playerId, self, Culture.MORIA, Race.GOBLIN, Filters.inSkirmish));
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user