From b354b96ec5bc26626bc0816cbd3640864152dbe7 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Thu, 20 Oct 2011 16:01:08 +0000 Subject: [PATCH] "Enraged" --- .../lotro/cards/set6/gandalf/Card6_026.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/gandalf/Card6_026.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/gandalf/Card6_026.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/gandalf/Card6_026.java new file mode 100644 index 000000000..b77d3f2e6 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set6/gandalf/Card6_026.java @@ -0,0 +1,52 @@ +package com.gempukku.lotro.cards.set6.gandalf; + +import com.gempukku.lotro.cards.AbstractAttachable; +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: Ents of Fangorn + * Side: Free + * Culture: Gandalf + * Twilight Cost: 2 + * Type: Condition + * Strength: +4 + * Game Text: Bearer must be an Ent. Limit 1 per bearer. Discard this condition at the end of the turn. + */ +public class Card6_026 extends AbstractAttachable { + public Card6_026() { + super(Side.FREE_PEOPLE, CardType.CONDITION, 2, Culture.GANDALF, null, "Enraged"); + } + + @Override + protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { + return Filters.and(Race.ENT, Filters.not(Filters.hasAttached(Filters.name("Enraged")))); + } + + @Override + public List getAlwaysOnModifiers(LotroGame game, PhysicalCard self) { + return Collections.singletonList( + new StrengthModifier(self, Filters.hasAttached(self), 4)); + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (effectResult.getType() == EffectResult.Type.END_OF_TURN) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new DiscardCardsFromPlayEffect(self, self)); + return Collections.singletonList(action); + } + return null; + } +}