"Smeagol"
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
package com.gempukku.lotro.cards.set11.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.CancelSkirmishEffect;
|
||||
import com.gempukku.lotro.cards.effects.SelfExertEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
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.effects.PlaySiteEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Shadows
|
||||
* 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 play the fellowship's next
|
||||
* site. Skirmish: If Smeagol is at a marsh, exert him to cancel a skirmish involving him.
|
||||
*/
|
||||
public class Card11_051 extends AbstractCompanion {
|
||||
public Card11_051() {
|
||||
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) {
|
||||
PlayPermanentAction permanentAction = super.getPlayCardAction(playerId, game, self, twilightModifier, ignoreRoamingPenalty);
|
||||
permanentAction.appendCost(
|
||||
new AddBurdenEffect(self, 1));
|
||||
return permanentAction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.winsSkirmish(game, effectResult, self)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new PlaySiteEffect(action, playerId, null, game.getGameState().getCurrentSiteNumber() + 1));
|
||||
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.canSelfExert(self, game)
|
||||
&& Filters.and(Keyword.MARSH).accepts(game.getGameState(), game.getModifiersQuerying(), game.getGameState().getCurrentSite())) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new SelfExertEffect(self));
|
||||
action.appendEffect(
|
||||
new CancelSkirmishEffect(self));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user