"Sam's Pipe"
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
package com.gempukku.lotro.cards.set20.shire;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.ForEachYouSpotEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
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.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 1
|
||||
* •Sam's Pipe
|
||||
* Shire Possession • Pipe
|
||||
* Bearer must be Sam.
|
||||
* Fellowship: Discard a pipeweed possession and spot X pipes to heal X Hobbit allies.
|
||||
*/
|
||||
public class Card20_409 extends AbstractAttachableFPPossession {
|
||||
public Card20_409() {
|
||||
super(1, 0, 0, Culture.SHIRE, PossessionClass.PIPE, "Sam's Pipe", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.sam;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Action> getExtraInPlayPhaseActions(final String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, CardType.POSSESSION, Keyword.PIPEWEED)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.POSSESSION, Keyword.PIPEWEED));
|
||||
action.appendCost(
|
||||
new ForEachYouSpotEffect(playerId, PossessionClass.PIPE) {
|
||||
@Override
|
||||
protected void spottedCards(int spotCount) {
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, spotCount, spotCount, CardType.ALLY, Race.HOBBIT));
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user