"Not Feared in Sunlight"

This commit is contained in:
marcins78@gmail.com
2011-09-30 02:26:53 +00:00
parent dfc31b77fb
commit 504489094f

View File

@@ -0,0 +1,54 @@
package com.gempukku.lotro.cards.set2.shire;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
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.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Mines of Moria
* Side: Free
* Culture: Shire
* Twilight Cost: 1
* Type: Condition
* Game Text: To play, spot 2 Hobbits. Plays to your support area. Each Nazgul is strength -4. Discard this condition
* during the regroup phase.
*/
public class Card2_107 extends AbstractPermanent {
public Card2_107() {
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.SHIRE, Zone.FREE_SUPPORT, "Not Feared in Sunlight");
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.race(Race.HOBBIT)) >= 2;
}
@Override
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
return Collections.singletonList(
new StrengthModifier(self, Filters.race(Race.NAZGUL), -4));
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (effectResult.getType() == EffectResult.Type.START_OF_PHASE
&& game.getGameState().getCurrentPhase() == Phase.REGROUP) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new DiscardCardsFromPlayEffect(self, self));
return Collections.singletonList(action);
}
return null;
}
}