"Deagol"
This commit is contained in:
@@ -106,7 +106,7 @@ public abstract class AbstractAttachable extends AbstractLotroCardBlueprint {
|
||||
return getPlayCardAction(playerId, game, self, Filters.any, twilightModifier);
|
||||
}
|
||||
|
||||
public AttachPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, Filter additionalAttachmentFilter, int twilightModifier) {
|
||||
public AttachPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, Filterable additionalAttachmentFilter, int twilightModifier) {
|
||||
return new AttachPermanentAction(game, self, Filters.and(getFullAttachValidTargetFilter(playerId, game, self), additionalAttachmentFilter), getAttachCostModifiers(playerId, game, self), twilightModifier);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.gempukku.lotro.cards.set13.gollum;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractAttachable;
|
||||
import com.gempukku.lotro.cards.AbstractFollower;
|
||||
import com.gempukku.lotro.cards.ExtraFilters;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.AddBurdenEffect;
|
||||
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
|
||||
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.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.ChooseArbitraryCardsEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifierFlag;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Bloodlines
|
||||
* Side: Free
|
||||
* Culture: Gollum
|
||||
* Twilight Cost: 0
|
||||
* Type: Follower
|
||||
* Resistance: +1
|
||||
* Game Text: To play, spot Smeagol. Aid - Add a burden. Skirmish: If bearer is not assigned to a skirmish, discard this
|
||||
* from play to play an artifact or possession from your draw deck on bearer.
|
||||
*/
|
||||
public class Card13_046 extends AbstractFollower {
|
||||
public Card13_046() {
|
||||
super(Side.FREE_PEOPLE, 0, 0, 0, 1, Culture.GOLLUM, "Deagol", 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, Filters.smeagol);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canPayAidCost(LotroGame game, PhysicalCard self) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Effect getAidCost(LotroGame game, PhysicalCard self) {
|
||||
return new AddBurdenEffect(self, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(final String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
|
||||
&& PlayConditions.canSpot(game, Filters.hasAttached(self), Filters.notAssignedToSkirmish)
|
||||
&& PlayConditions.canSelfDiscard(self, game)) {
|
||||
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new SelfDiscardEffect(self));
|
||||
if (!game.getModifiersQuerying().hasFlagActive(game.getGameState(), ModifierFlag.CANT_PLAY_FROM_DISCARD_OR_DECK)) {
|
||||
action.appendEffect(
|
||||
new ChooseArbitraryCardsEffect(playerId, "Choose card to play", game.getGameState().getDeck(playerId),
|
||||
Filters.and(
|
||||
Filters.or(CardType.ARTIFACT, CardType.POSSESSION),
|
||||
ExtraFilters.attachableTo(game, self.getAttachedTo())), 1, 1) {
|
||||
@Override
|
||||
protected void cardsSelected(LotroGame game, Collection<PhysicalCard> selectedCards) {
|
||||
if (selectedCards.size() > 0) {
|
||||
PhysicalCard selectedCard = selectedCards.iterator().next();
|
||||
game.getActionsEnvironment().addActionToStack(((AbstractAttachable) selectedCard.getBlueprint()).getPlayCardAction(playerId, game, selectedCard, self.getAttachedTo(), 0));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user