"Lembas Bread"

This commit is contained in:
marcins78@gmail.com
2012-02-29 14:23:13 +00:00
parent 88cb225379
commit 9612982169

View File

@@ -0,0 +1,58 @@
package com.gempukku.lotro.cards.set18.elven;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.ReconcileHandEffect;
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Filterable;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.filters.Filter;
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 java.util.Collections;
import java.util.List;
/**
* Set: Treachery & Deceit
* Side: Free
* Culture: Elven
* Twilight Cost: 2
* Type: Possession
* Game Text: To play, spot 2 [ELVEN] companions. Bearer must be a companion. Regroup: Discard this possession from play
* to reconcile your hand.
*/
public class Card18_015 extends AbstractAttachableFPPossession {
public Card18_015() {
super(2, 0, 0, Culture.ELVEN, null, "Lembas Bread");
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, Filter additionalAttachmentFilter, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, additionalAttachmentFilter, twilightModifier)
&& PlayConditions.canSpot(game, 2, Culture.ELVEN, CardType.COMPANION);
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return CardType.COMPANION;
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self)
&& PlayConditions.canSelfDiscard(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfDiscardEffect(self));
action.appendEffect(
new ReconcileHandEffect(playerId));
return Collections.singletonList(action);
}
return null;
}
}