"Sam", "Dropper of Eaves"
This commit is contained in:
@@ -0,0 +1,69 @@
|
|||||||
|
package com.gempukku.lotro.cards.set20.shire;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.cards.AbstractCompanion;
|
||||||
|
import com.gempukku.lotro.cards.PlayConditions;
|
||||||
|
import com.gempukku.lotro.cards.TriggerConditions;
|
||||||
|
import com.gempukku.lotro.cards.effects.MakeRingBearerEffect;
|
||||||
|
import com.gempukku.lotro.cards.effects.SelfExertEffect;
|
||||||
|
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||||
|
import com.gempukku.lotro.cards.modifiers.ResistanceModifier;
|
||||||
|
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.actions.OptionalTriggerAction;
|
||||||
|
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||||
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2
|
||||||
|
* •Sam, Dropper of Eaves
|
||||||
|
* Shire Companion • Hobbit
|
||||||
|
* 3 4 9
|
||||||
|
* Ring-bound.
|
||||||
|
* While bearing The One Ring, Sam is resistance -4.
|
||||||
|
* Fellowship: Exert Sam twice to discard a Shadow condition borne by a companion.
|
||||||
|
* Response: If Frodo dies, make Sam the Ring-bearer.
|
||||||
|
*/
|
||||||
|
public class Card20_407 extends AbstractCompanion {
|
||||||
|
public Card20_407() {
|
||||||
|
super(2, 3, 4, 9, Culture.SHIRE, Race.HOBBIT, null, "Sam", "Dropper of Eaves", true);
|
||||||
|
addKeyword(Keyword.RING_BOUND);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Modifier getAlwaysOnModifier(LotroGame game, PhysicalCard self) {
|
||||||
|
return new ResistanceModifier(self, Filters.and(self, Filters.hasAttached(CardType.THE_ONE_RING)), -4);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<ActivateCardAction> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
|
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||||
|
&& PlayConditions.canSelfExert(self, 2, game)) {
|
||||||
|
ActivateCardAction action = new ActivateCardAction(self);
|
||||||
|
action.appendCost(
|
||||||
|
new SelfExertEffect(action, self));
|
||||||
|
action.appendCost(
|
||||||
|
new SelfExertEffect(action, self));
|
||||||
|
action.appendEffect(
|
||||||
|
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.CONDITION, Filters.attachedTo(CardType.COMPANION)));
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||||
|
if (TriggerConditions.forEachKilled(game, effectResult, Filters.frodo, Filters.ringBearer)) {
|
||||||
|
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||||
|
action.appendEffect(new MakeRingBearerEffect(self));
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user