"Lorien Is Most Welcome"

This commit is contained in:
marcins78@gmail.com
2011-10-07 09:03:50 +00:00
parent 5fbb61986b
commit 25805de826

View File

@@ -0,0 +1,55 @@
package com.gempukku.lotro.cards.set4.elven;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.common.*;
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.RequiredTriggerAction;
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.RemoveKeywordModifier;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Two Towers
* Side: Free
* Culture: Elven
* Twilight Cost: 1
* Type: Condition
* Game Text: To play, spot 3 Elves. Plays to your support area. Each wounded minion loses all damage bonuses.
* Discard this condition during the regroup phase.
*/
public class Card4_077 extends AbstractPermanent {
public Card4_077() {
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.ELVEN, Zone.SUPPORT, "Lorien Is Most Welcome");
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), Filters.race(Race.ELF)) >= 3;
}
@Override
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
return Collections.singletonList(
new RemoveKeywordModifier(self,
Filters.and(Filters.type(CardType.MINION), Filters.wounded()),
Keyword.DAMAGE));
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (game.getGameState().getCurrentPhase() == Phase.REGROUP) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new DiscardCardsFromPlayEffect(self, self));
return Collections.singletonList(action);
}
return null;
}
}