"Black Steed"
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
package com.gempukku.lotro.cards.set1;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractAttachable;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
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.actions.DefaultCostToEffectAction;
|
||||
import com.gempukku.lotro.logic.effects.DiscardCardFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.AbstractModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifierEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Shadow
|
||||
* Culture: Wraith
|
||||
* Twilight Cost: 1
|
||||
* Type: Possession • Mount
|
||||
* Strength: +2
|
||||
* Game Text: Bearer must be a Nazgul. While at a plains site, bearer is strength +2. Discard this possession when at
|
||||
* an underground site.
|
||||
*/
|
||||
public class Card1_208 extends AbstractAttachable {
|
||||
public Card1_208() {
|
||||
super(Side.SHADOW, CardType.POSSESSION, 1, Culture.WRAITH, "Black Steed");
|
||||
addKeyword(Keyword.MOUNT);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.and(Filters.keyword(Keyword.NAZGUL), Filters.not(Filters.hasAttached(Filters.keyword(Keyword.MOUNT))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Modifier getAlwaysOnEffect(PhysicalCard self) {
|
||||
return new AbstractModifier(self, "Strength +2, While at a Plains site, bearer is Strength +2", Filters.attachedTo(self), new ModifierEffect[]{ModifierEffect.STRENGTH_MODIFIER}) {
|
||||
@Override
|
||||
public int getStrength(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard, int result) {
|
||||
int bonus = (modifiersQuerying.hasKeyword(gameState, gameState.getCurrentSite(), Keyword.PLAINS)) ? 4 : 2;
|
||||
return result + bonus;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (game.getModifiersQuerying().hasKeyword(game.getGameState(), game.getGameState().getCurrentSite(), Keyword.UNDERGROUND)) {
|
||||
DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, null, "Discard this possession");
|
||||
action.addEffect(new DiscardCardFromPlayEffect(self, self));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -62,13 +62,10 @@ public class Card1_031 extends AbstractAttachableFPPossession {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (effectResult.getType() == EffectResult.Type.WHEN_MOVE_TO) {
|
||||
boolean isUnderground = game.getModifiersQuerying().hasKeyword(game.getGameState(), game.getGameState().getCurrentSite(), Keyword.UNDERGROUND);
|
||||
if (isUnderground) {
|
||||
DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, null, "Discard when Underground");
|
||||
action.addEffect(new DiscardCardFromPlayEffect(self, self));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
if (game.getModifiersQuerying().hasKeyword(game.getGameState(), game.getGameState().getCurrentSite(), Keyword.UNDERGROUND)) {
|
||||
DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, null, "Discard when Underground");
|
||||
action.addEffect(new DiscardCardFromPlayEffect(self, self));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user