"What Is This New Devilry?"
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
package com.gempukku.lotro.cards.set1.moria;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndExertCharacterEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filter;
|
||||
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.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
import com.gempukku.lotro.logic.modifiers.TwilightCostModifier;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Shadow
|
||||
* Culture: Moria
|
||||
* Twilight Cost: 2
|
||||
* Type: Condition
|
||||
* Game Text: Search. To play, exert a [MORIA] Orc. Plays to your support area. While the fellowship is at site 5 or
|
||||
* higher, each companion's twilight cost is +2.
|
||||
*/
|
||||
public class Card1_202 extends AbstractLotroCardBlueprint {
|
||||
public Card1_202() {
|
||||
super(Side.SHADOW, CardType.CONDITION, Culture.MORIA, "What Is This New Devilry?");
|
||||
addKeyword(Keyword.SEARCH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
return PlayConditions.canPayForShadowCard(game, self, twilightModifier)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.MORIA), Filters.keyword(Keyword.ORC), Filters.canExert());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Action getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
PlayPermanentAction action = new PlayPermanentAction(self, Zone.SHADOW_SUPPORT, twilightModifier);
|
||||
action.addCost(
|
||||
new ChooseAndExertCharacterEffect(action, playerId, "Choose a MORIA Orc", true, Filters.culture(Culture.MORIA), Filters.keyword(Keyword.ORC), Filters.canExert()));
|
||||
return action;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTwilightCost() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayCardDuringPhase(game, Phase.SHADOW, self)
|
||||
&& checkPlayRequirements(playerId, game, self, 0))
|
||||
return Collections.singletonList(getPlayCardAction(playerId, game, self, 0));
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Modifier getAlwaysOnEffect(PhysicalCard self) {
|
||||
return new TwilightCostModifier(self,
|
||||
Filters.and(
|
||||
Filters.type(CardType.COMPANION),
|
||||
new Filter() {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
||||
return gameState.getCurrentSiteNumber() >= 5;
|
||||
}
|
||||
}
|
||||
)
|
||||
, 2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user