"Fell Beast"

This commit is contained in:
marcins78@gmail.com
2011-10-22 16:46:20 +00:00
parent 8ab8994bdc
commit ee523548ee
2 changed files with 65 additions and 0 deletions

View File

@@ -41,6 +41,10 @@ public class PlayConditions {
return false;
}
public static boolean canDiscardCardsFromHandToPlay(PhysicalCard source, LotroGame game, String playerId, int count, Filterable... cardFilter) {
return Filters.filter(game.getGameState().getHand(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.and(cardFilter, Filters.not(source))).size() >= count;
}
public static boolean canPlayCardDuringPhase(LotroGame game, Phase phase, PhysicalCard self) {
return (phase == null || game.getGameState().getCurrentPhase() == phase)
&& self.getZone() == Zone.HAND

View File

@@ -0,0 +1,61 @@
package com.gempukku.lotro.cards.set6.wraith;
import com.gempukku.lotro.cards.AbstractAttachable;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.AttachPermanentAction;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromHandEffect;
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
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.LotroGame;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 0
* Type: Possession • Mount
* Strength: +2
* Game Text: To play, discard 2 cards from hand. Bearer must be a Nazgul. Bearer is fierce.
*/
public class Card6_083 extends AbstractAttachable {
public Card6_083() {
super(Side.SHADOW, CardType.POSSESSION, 0, Culture.WRAITH, PossessionClass.MOUNT, "Fell Beast");
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, Filter additionalAttachmentFilter, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, additionalAttachmentFilter, twilightModifier)
&& PlayConditions.canDiscardCardsFromHandToPlay(self, game, playerId, 2, Filters.any);
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Race.NAZGUL;
}
@Override
public AttachPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, Filter additionalAttachmentFilter, int twilightModifier) {
AttachPermanentAction action = super.getPlayCardAction(playerId, game, self, additionalAttachmentFilter, twilightModifier);
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 2));
return action;
}
@Override
public List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<Modifier>();
modifiers.add(
new StrengthModifier(self, Filters.hasAttached(self), 2));
modifiers.add(
new KeywordModifier(self, Filters.hasAttached(self), Keyword.FIERCE));
return modifiers;
}
}