From b152be1af4db2d46c487cee42d92db19a229737a Mon Sep 17 00:00:00 2001 From: marcins78 Date: Wed, 6 Feb 2013 13:24:08 +0000 Subject: [PATCH] "Fortress of Rohan" --- .../lotro/cards/set20/rohan/Card20_326.java | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/rohan/Card20_326.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/rohan/Card20_326.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/rohan/Card20_326.java new file mode 100644 index 000000000..cd16ac598 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/rohan/Card20_326.java @@ -0,0 +1,56 @@ +package com.gempukku.lotro.cards.set20.rohan; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.ExertCharactersEffect; +import com.gempukku.lotro.cards.effects.SelfDiscardEffect; +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.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * 2 + * Fortress of Rohan + * Rohan Possession • Support Area + * Fortification. + * To play spot Theoden. + * At the start of each skirmish involving a [Rohan] Man, each minion must exert. + * Discard this condition at the start of the regroup phase. + */ +public class Card20_326 extends AbstractPermanent { + public Card20_326() { + super(Side.FREE_PEOPLE, 2, CardType.POSSESSION, Culture.ROHAN, Zone.SUPPORT, "Fortress of Rohan"); + addKeyword(Keyword.FORTIFICATION); + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) { + return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile) + && PlayConditions.canSpot(game, Filters.name(Names.theoden)); + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.startOfPhase(game, effectResult, Phase.SKIRMISH) + && PlayConditions.isActive(game, Culture.ROHAN, Race.MAN, Filters.inSkirmish)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new ExertCharactersEffect(action, self, CardType.MINION)); + return Collections.singletonList(action); + } + if (TriggerConditions.startOfPhase(game, effectResult, Phase.REGROUP)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new SelfDiscardEffect(self)); + return Collections.singletonList(action); + } + return null; + } +}