"Storied Homestead"
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
package com.gempukku.lotro.cards.set13.gondor;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.effects.*;
|
||||
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.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.results.ActivateCardResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Bloodlines
|
||||
* Side: Free
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 2
|
||||
* Type: Condition • Support Area
|
||||
* Game Text: When you play this, add a [GONDOR] token here for each [GONDOR] companion who has resistance 7 or more.
|
||||
* Response: If a minion’s special ability is used, discard this condition or remove 2 [GONDOR] tokens from here
|
||||
* to cancel its effect.
|
||||
*/
|
||||
public class Card13_076 extends AbstractPermanent {
|
||||
public Card13_076() {
|
||||
super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.GONDOR, Zone.SUPPORT, "Storied Homestead", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.played(game, effectResult, self)) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
int count = Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Culture.GONDOR, CardType.COMPANION, Filters.minResistance(7));
|
||||
if (count > 0)
|
||||
action.appendEffect(
|
||||
new AddTokenEffect(self, self, Token.GONDOR, count));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.activated(game, effectResult, CardType.MINION)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
List<Effect> possibleCosts = new LinkedList<Effect>();
|
||||
possibleCosts.add(
|
||||
new RemoveTokenEffect(self, self, Token.GONDOR, 2));
|
||||
possibleCosts.add(
|
||||
new SelfDiscardEffect(self));
|
||||
action.appendCost(
|
||||
new ChoiceEffect(action, playerId, possibleCosts));
|
||||
action.appendEffect(
|
||||
new CancelActivatedEffect(self, (ActivateCardResult) effectResult));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user