diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_235.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_235.java new file mode 100644 index 000000000..cfab39822 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set20/isengard/Card20_235.java @@ -0,0 +1,74 @@ +package com.gempukku.lotro.cards.set20.isengard; + +import com.gempukku.lotro.cards.AbstractAttachable; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.actions.AttachPermanentAction; +import com.gempukku.lotro.cards.effects.SelfDiscardEffect; +import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; +import com.gempukku.lotro.cards.modifiers.SidePlayerCantPlayPhaseEventsOrSpecialAbilitiesModifier; +import com.gempukku.lotro.cards.modifiers.conditions.AndCondition; +import com.gempukku.lotro.cards.modifiers.conditions.InitiativeCondition; +import com.gempukku.lotro.cards.modifiers.conditions.LocationCondition; +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.List; + +/** + * 1 + * •Ten Thousand Strong + * Isengard Condition + * To play exert an Uruk-hai. + * Plays on a site. + * If the Shadow player has initiative, the Free Peoples Player may not play skirmish events or use skirmish special + * abilities at this site. Discard this condition at the end of the turn. + */ +public class Card20_235 extends AbstractAttachable { + public Card20_235() { + super(Side.SHADOW, CardType.CONDITION, 1, Culture.ISENGARD, null, "Ten Thousand Strong", null, true); + } + + @Override + protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { + return CardType.SITE; + } + + @Override + public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, Filter additionalAttachmentFilter, int twilightModifier) { + return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, additionalAttachmentFilter, twilightModifier) + && PlayConditions.canExert(self, game, Race.URUK_HAI); + } + + @Override + public AttachPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, Filterable additionalAttachmentFilter, int twilightModifier) { + AttachPermanentAction action = super.getPlayCardAction(playerId, game, self, additionalAttachmentFilter, twilightModifier); + action.appendCost( + new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.URUK_HAI)); + return action; + } + + @Override + public Modifier getAlwaysOnModifier(PhysicalCard self) { + return new SidePlayerCantPlayPhaseEventsOrSpecialAbilitiesModifier( + self, new AndCondition(new LocationCondition(Filters.hasAttached(self)), new InitiativeCondition(Side.SHADOW)), Side.FREE_PEOPLE, Phase.SKIRMISH); + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.endOfTurn(game, effectResult)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new SelfDiscardEffect(self)); + return Collections.singletonList(action); + } + return null; + } +}