"Gil-galad"
This commit is contained in:
@@ -3,8 +3,11 @@ package com.gempukku.lotro.cards.set18.elven;
|
||||
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.ChoiceEffect;
|
||||
import com.gempukku.lotro.cards.effects.PutCardsFromDeckOnTopOfDrawDeckEffect;
|
||||
import com.gempukku.lotro.cards.effects.ShuffleDeckEffect;
|
||||
import com.gempukku.lotro.cards.effects.SpotEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
@@ -13,10 +16,12 @@ import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.effects.ChooseArbitraryCardsEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -43,6 +48,24 @@ public class Card18_006 extends AbstractEvent {
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
List<Effect> possibleCosts = new LinkedList<Effect>();
|
||||
possibleCosts.add(
|
||||
new SpotEffect(1, Filters.arwen) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Spot Arwen";
|
||||
}
|
||||
});
|
||||
possibleCosts.add(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.ELVEN, CardType.COMPANION) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Exert ELVEN companion";
|
||||
}
|
||||
});
|
||||
action.appendCost(
|
||||
new ChoiceEffect(action, playerId, possibleCosts));
|
||||
|
||||
action.appendEffect(
|
||||
new UnrespondableEffect() {
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.gempukku.lotro.cards.set18.elven;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractCompanion;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromDiscardEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndPutCardFromDiscardIntoHandEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndRemoveCultureTokensFromCardEffect;
|
||||
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.effects.AddThreatsEffect;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Treachery & Deceit
|
||||
* Side: Free
|
||||
* Culture: Elven
|
||||
* Twilight Cost: 5
|
||||
* Type: Companion • Elf
|
||||
* Strength: 9
|
||||
* Vitality: 4
|
||||
* Resistance: 7
|
||||
* Game Text: To play, spot 2 [ELVEN] companions. Maneuver: Add a threat to take an [ELVEN] skirmish event into hand
|
||||
* from your discard pile. Regroup: Remove an [ELVEN] token to play an [ELVEN] condition from your discard pile.
|
||||
*/
|
||||
public class Card18_012 extends AbstractCompanion {
|
||||
public Card18_012() {
|
||||
super(5, 9, 4, 7, Culture.ELVEN, Race.ELF, null, "Gil-galad", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
|
||||
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
|
||||
&& PlayConditions.canSpot(game, 2, Culture.ELVEN, CardType.COMPANION);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<ActivateCardAction> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self)
|
||||
&& PlayConditions.canAddThreat(game, self, 1)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new AddThreatsEffect(playerId, self, 1));
|
||||
action.appendEffect(
|
||||
new ChooseAndPutCardFromDiscardIntoHandEffect(action, playerId, 1, 1, Culture.ELVEN, CardType.EVENT, Keyword.SKIRMISH));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self)
|
||||
&& PlayConditions.canRemoveTokens(game, Token.ELVEN, 1, Filters.any)
|
||||
&& PlayConditions.canPlayFromDiscard(playerId, game, Culture.ELVEN, CardType.CONDITION)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndRemoveCultureTokensFromCardEffect(self, playerId, Token.ELVEN, 1, Filters.any));
|
||||
action.appendEffect(
|
||||
new ChooseAndPlayCardFromDiscardEffect(playerId, game, Culture.ELVEN, CardType.CONDITION));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user