"Coif"
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
package com.gempukku.lotro.cards.set12.rohan;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
|
||||
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.choose.ChooseAndExertCharactersEffect;
|
||||
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.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
|
||||
import com.gempukku.lotro.logic.effects.PreventEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Black Rider
|
||||
* Side: Free
|
||||
* Culture: Rohan
|
||||
* Twilight Cost: 0
|
||||
* Type: Possession • Armor
|
||||
* Vitality: +1
|
||||
* Game Text: Bearer must be a [ROHAN] Man. Each time a Shadow card adds any number of twilight tokens, you may exert
|
||||
* bearer to prevent that. Each time the fellowship moves from a forest site, exert a companion.
|
||||
*/
|
||||
public class Card12_111 extends AbstractAttachableFPPossession {
|
||||
public Card12_111() {
|
||||
super(0, 0, 1, Culture.ROHAN, PossessionClass.ARMOR, "Coif");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.and(Culture.ROHAN, Race.MAN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalBeforeTriggers(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (TriggerConditions.isAddingTwilight(effect, game, Side.SHADOW)
|
||||
&& PlayConditions.canExert(self, game, self.getAttachedTo())) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendCost(
|
||||
new ExertCharactersEffect(self, self.getAttachedTo()));
|
||||
action.appendEffect(
|
||||
new PreventEffect((AddTwilightEffect) effect));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.movesFrom(game, effectResult, Keyword.FOREST)) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndExertCharactersEffect(action, self.getOwner(), 1, 1, CardType.COMPANION));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user