diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/rohan/Card20_315.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/rohan/Card20_315.java new file mode 100644 index 000000000..645d38fca --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/rohan/Card20_315.java @@ -0,0 +1,64 @@ +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.actions.PlayPermanentAction; +import com.gempukku.lotro.cards.effects.SelfDiscardEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.cards.modifiers.CantTakeMoreThanXWoundsModifier; +import com.gempukku.lotro.common.*; +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.List; + +/** + * 2 + * Causeway Gate + * Rohan Possession • Support Area + * Fortification. + * To play exert a [Rohan] Man. + * Each [Rohan] Man takes no more than one wound during each skirmish phase. + * Discard this condition at the start of the regroup phase + */ +public class Card20_315 extends AbstractPermanent { + public Card20_315() { + super(Side.FREE_PEOPLE, 2, CardType.POSSESSION, Culture.ROHAN, Zone.SUPPORT, "Causeway Gate"); + 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.canExert(self, game, Culture.ROHAN, Race.MAN); + } + + @Override + public PlayPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) { + final PlayPermanentAction action = super.getPlayCardAction(playerId, game, self, twilightModifier, ignoreRoamingPenalty); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.ROHAN, Race.MAN)); + return action; + } + + @Override + public Modifier getAlwaysOnModifier(PhysicalCard self) { + return new CantTakeMoreThanXWoundsModifier(self, Phase.SKIRMISH, 1, Culture.ROHAN, Race.MAN); + } + + @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; + } +}