"Ring of Artifice"
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
package com.gempukku.lotro.cards.set17.dwarven;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndPutCardFromDiscardIntoHandEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.GameState;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.evaluator.Evaluator;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Rise of Saruman
|
||||
* Side: Free
|
||||
* Culture: Dwarven
|
||||
* Twilight Cost: 0
|
||||
* Type: Artifact • Ring
|
||||
* Game Text: Bearer must be a Dwarf. Bearer is damage +1. Bearer is strength +1 for each [DWARVEN] artifact in your
|
||||
* discard pile. Regroup: Discard this to take a non-event [DWARVEN] card into hand from your discard pile.
|
||||
*/
|
||||
public class Card17_004 extends AbstractAttachableFPPossession {
|
||||
public Card17_004() {
|
||||
super(0, 0, 0, Culture.DWARVEN, CardType.ARTIFACT, PossessionClass.RING, "Ring of Artifice", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Race.DWARF;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Modifier> getNonBasicStatsModifiers(final PhysicalCard self) {
|
||||
List<Modifier> modifiers = new LinkedList<Modifier>();
|
||||
modifiers.add(
|
||||
new KeywordModifier(self, Filters.hasAttached(self), Keyword.DAMAGE, 1));
|
||||
modifiers.add(
|
||||
new StrengthModifier(self, Filters.hasAttached(self), null,
|
||||
new Evaluator() {
|
||||
@Override
|
||||
public int evaluateExpression(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard cardAffected) {
|
||||
return Filters.filter(gameState.getDiscard(self.getOwner()), gameState, modifiersQuerying, Culture.DWARVEN, CardType.ARTIFACT).size();
|
||||
}
|
||||
}));
|
||||
return modifiers;
|
||||
}
|
||||
|
||||
@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 ChooseAndPutCardFromDiscardIntoHandEffect(action, playerId, 1, 1, Culture.DWARVEN, Filters.not(CardType.EVENT)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user