"Smeagol"

This commit is contained in:
marcins78@gmail.com
2012-03-09 11:11:14 +00:00
parent ba20ffe4ef
commit 592c4d4a50

View File

@@ -0,0 +1,84 @@
package com.gempukku.lotro.cards.set19.gollum;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.AddBurdenEffect;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.ShuffleCardsFromDiscardIntoDeckEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseCardsFromDiscardEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
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.StrengthModifier;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* Set: Ages End
* Side: Free
* Culture: Gollum
* Twilight Cost: 0
* Type: Companion
* Strength: 3
* Vitality: 4
* Resistance: 5
* Game Text: Ring-bound. To play, add a burden. Each time Smeagol wins a skirmish, you may shuffle up to 2 [GOLLUM]
* cards from your discard pile into your draw deck. Skirmish: Exert a Ring-bound companion to make Smeagol strength +2.
*/
public class Card19_011 extends AbstractCompanion {
public Card19_011() {
super(0, 3, 4, 5, Culture.GOLLUM, null, null, "Smeagol", true);
addKeyword(Keyword.RING_BOUND);
}
@Override
public PlayPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
final PlayPermanentAction playCardAction = super.getPlayCardAction(playerId, game, self, twilightModifier, ignoreRoamingPenalty);
playCardAction.appendCost(
new AddBurdenEffect(self, 1));
return playCardAction;
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(final String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, self)) {
final OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new ChooseCardsFromDiscardEffect(playerId, 0, 2, Culture.GOLLUM) {
@Override
protected void cardsSelected(LotroGame game, Collection<PhysicalCard> cards) {
action.appendEffect(
new ShuffleCardsFromDiscardIntoDeckEffect(self, playerId, cards));
}
});
return Collections.singletonList(action);
}
return null;
}
@Override
protected List<ActivateCardAction> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canExert(self, game, CardType.COMPANION, Keyword.RING_BOUND)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.COMPANION, Keyword.RING_BOUND));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, self, 2), Phase.SKIRMISH));
return Collections.singletonList(action);
}
return null;
}
}