diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set0/shire/Card0_060.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set0/shire/Card0_060.java new file mode 100644 index 000000000..9ac5ed3e6 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set0/shire/Card0_060.java @@ -0,0 +1,65 @@ +package com.gempukku.lotro.cards.set0.shire; + +import com.gempukku.lotro.cards.AbstractPermanent; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.AddTokenEffect; +import com.gempukku.lotro.cards.effects.RemoveBurdenEffect; +import com.gempukku.lotro.cards.effects.RemoveTokenEffect; +import com.gempukku.lotro.common.*; +import com.gempukku.lotro.game.PhysicalCard; +import com.gempukku.lotro.game.state.LotroGame; +import com.gempukku.lotro.logic.actions.ActivateCardAction; +import com.gempukku.lotro.logic.actions.RequiredTriggerAction; +import com.gempukku.lotro.logic.timing.Action; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: Promotional + * Side: Free + * Culture: Shire + * Twilight Cost: 1 + * Type: Possession • Support Area + * Game Text: To play, spot 2 [SHIRE] companions. Each time a Shadow card adds a burden or a threat, add a [SHIRE] token + * here. Fellowship: Remove 2 [SHIRE] tokens from here to remove a burden. + */ +public class Card0_060 extends AbstractPermanent { + public Card0_060() { + super(Side.FREE_PEOPLE, 1, CardType.POSSESSION, Culture.SHIRE, Zone.SUPPORT, "Tom Bombadil's Hat", true); + } + + @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, 2, Culture.SHIRE, CardType.COMPANION); + } + + @Override + public List getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.addedBurden(game, effectResult, Side.SHADOW) + || TriggerConditions.addedThreat(game, effectResult, Side.SHADOW)) { + RequiredTriggerAction action = new RequiredTriggerAction(self); + action.appendEffect( + new AddTokenEffect(self, self, Token.SHIRE)); + return Collections.singletonList(action); + } + return null; + } + + @Override + protected List getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self) + && PlayConditions.canRemoveTokens(game, self, Token.SHIRE, 2)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new RemoveTokenEffect(self, self, Token.SHIRE, 2)); + action.appendEffect( + new RemoveBurdenEffect(playerId, self, 1)); + return Collections.singletonList(action); + } + return null; + } +}