From 0e8b977cf928a630f3aa75641e5931d0ad13ac30 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Fri, 27 Jan 2012 15:48:36 +0000 Subject: [PATCH] "Grieving the Fallen" --- .../lotro/cards/set15/men/Card15_081.java | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/men/Card15_081.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/men/Card15_081.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/men/Card15_081.java new file mode 100644 index 000000000..6603897c6 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/men/Card15_081.java @@ -0,0 +1,69 @@ +package com.gempukku.lotro.cards.set15.men; + +import com.gempukku.lotro.cards.AbstractAttachable; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.SelfDiscardEffect; +import com.gempukku.lotro.cards.modifiers.CantTakeWoundsModifier; +import com.gempukku.lotro.cards.modifiers.ResistanceModifier; +import com.gempukku.lotro.cards.modifiers.conditions.PhaseCondition; +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.actions.RequiredTriggerAction; +import com.gempukku.lotro.logic.modifiers.Modifier; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +/** + * Set: The Hunters + * Side: Shadow + * Culture: Men + * Twilight Cost: 1 + * Type: Condition + * Resistance: -1 + * Game Text: To play, spot a [MEN] Man. Bearer must be a companion. Bearer cannot take wounds during the archery phase. + * At the start of the regroup phase, discard this condition. + */ +public class Card15_081 extends AbstractAttachable { + public Card15_081() { + super(Side.SHADOW, CardType.CONDITION, 1, Culture.MEN, null, "Grieving the Fallen"); + } + + @Override + protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { + return CardType.COMPANION; + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, Filter additionalAttachmentFilter, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, additionalAttachmentFilter, twilightModifier) + && PlayConditions.canSpot(game, Culture.MEN, Race.MAN); + } + + @Override + public List getAlwaysOnModifiers(LotroGame game, PhysicalCard self) { + List modifiers = new LinkedList(); + modifiers.add( + new ResistanceModifier(self, Filters.hasAttached(self), -1)); + modifiers.add( + new CantTakeWoundsModifier(self, new PhaseCondition(Phase.ARCHERY), Filters.hasAttached(self))); + return modifiers; + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.startOfPhase(game, effectResult, Phase.REGROUP)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new SelfDiscardEffect(self)); + return Collections.singletonList(action); + } + return null; + } +}