This commit is contained in:
marcins78@gmail.com
2012-02-10 12:30:15 +00:00
parent ad42994137
commit 31ee50e5c9

View File

@@ -0,0 +1,67 @@
package com.gempukku.lotro.cards.set17.gondor;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.cards.modifiers.MinionSiteNumberModifier;
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.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.modifiers.CantDiscardFromPlayModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.SpotCondition;
import java.util.Collections;
import java.util.List;
/**
* Set: Rise of Saruman
* Side: Free
* Culture: Gondor
* Twilight Cost: 3
* Type: Companion • Man
* Strength: 6
* Vitality: 3
* Resistance: 6
* Game Text: Ranger. Hunter 1. While you can spot a roaming minion, your [GONDOR] conditions cannot be discarded from
* play by Shadow cards. Maneuver: Exert 2 rangers to make a minion site number +2 until the regroup phase.
*/
public class Card17_030 extends AbstractCompanion {
public Card17_030() {
super(3, 6, 3, 6, Culture.GONDOR, Race.MAN, null, "Madril", true);
addKeyword(Keyword.RANGER);
addKeyword(Keyword.HUNTER, 1);
}
@Override
public Modifier getAlwaysOnModifier(PhysicalCard self) {
return new CantDiscardFromPlayModifier(self, "Cannot be discarded from play by Shadow cards",
new SpotCondition(CardType.MINION, Keyword.ROAMING),
Filters.and(Filters.owner(self.getOwner()), Culture.GONDOR, CardType.CONDITION), Side.SHADOW);
}
@Override
protected List<ActivateCardAction> getExtraInPlayPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self)
&& PlayConditions.canExert(self, game, 1, 2, Keyword.RANGER)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 2, 2, Keyword.RANGER));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a minion", CardType.MINION) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new MinionSiteNumberModifier(self, card, null, 2), Phase.REGROUP));
}
});
return Collections.singletonList(action);
}
return null;
}
}