"Golradir"

This commit is contained in:
marcins78@gmail.com
2011-09-30 12:26:02 +00:00
parent 724748b393
commit a467b2912b

View File

@@ -0,0 +1,64 @@
package com.gempukku.lotro.cards.set3.elven;
import com.gempukku.lotro.cards.AbstractAlly;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.costs.ExertCharactersCost;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
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.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: Realms of Elf-lords
* Side: Free
* Culture: Elven
* Twilight Cost: 2
* Type: Ally • Home 3 • Elf
* Strength: 4
* Vitality: 3
* Site: 3
* Game Text: To play, spot an Elf. Skirmish: Exert Golradir to make an Orc strength -1.
*/
public class Card3_020 extends AbstractAlly {
public Card3_020() {
super(2, 3, 4, 3, Race.ELF, Culture.ELVEN, "Golradir", true);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.race(Race.ELF));
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)
&& PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), self)) {
final ActivateCardAction action = new ActivateCardAction(self, Keyword.SKIRMISH);
action.appendCost(
new ExertCharactersCost(self, self));
action.appendEffect(
new ChooseActiveCardEffect(playerId, "Choose an Orc", Filters.race(Race.ORC)) {
@Override
protected void cardSelected(PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), -1), Phase.SKIRMISH));
}
});
return Collections.singletonList(action);
}
return null;
}
}