"Where Now The Horse"
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
package com.gempukku.lotro.cards.set17.rohan;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseActionProxyEffect;
|
||||
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.AbstractActionProxy;
|
||||
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.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Rise of Saruman
|
||||
* Side: Free
|
||||
* Culture: Rohan
|
||||
* Twilight Cost: 1
|
||||
* Type: Event • Skirmish
|
||||
* Game Text: Spot a [ROHAN] companion to make Frodo strength +5. If Frodo loses the skirmish, discard that
|
||||
* [ROHAN] companion.
|
||||
*/
|
||||
public class Card17_103 extends AbstractEvent {
|
||||
public Card17_103() {
|
||||
super(Side.FREE_PEOPLE, 1, Culture.ROHAN, "Where Now The Horse", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@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, Culture.ROHAN, CardType.COMPANION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendCost(
|
||||
new ChooseActiveCardEffect(self, playerId, "Choose a ROHAN companion", Culture.ROHAN, CardType.COMPANION) {
|
||||
@Override
|
||||
protected void cardSelected(LotroGame game, final PhysicalCard card) {
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfPhaseModifierEffect(
|
||||
new StrengthModifier(self, Filters.frodo, 5), Phase.SKIRMISH));
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfPhaseActionProxyEffect(
|
||||
new AbstractActionProxy() {
|
||||
@Override
|
||||
public List<? extends RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult) {
|
||||
if (TriggerConditions.losesSkirmish(game, effectResult, Filters.frodo)) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new DiscardCardsFromPlayEffect(self, card));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}, Phase.SKIRMISH));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user