"Galadriel"

This commit is contained in:
marcins78@gmail.com
2011-10-20 15:23:41 +00:00
parent d1b885347f
commit fcc56cd8be

View File

@@ -0,0 +1,69 @@
package com.gempukku.lotro.cards.set6.elven;
import com.gempukku.lotro.cards.AbstractAlly;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.DiscardTopCardFromDeckEffect;
import com.gempukku.lotro.cards.effects.ExertCharactersEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
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.effects.HealCharactersEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Free
* Culture: Elven
* Twilight Cost: 3
* Type: Ally • Home 6 • Elf
* Strength: 3
* Vitality: 3
* Site: 6
* Game Text: At the start of each turn, heal Galadriel. Skirmish: Exert Galadriel to discard the top card of your
* draw deck. If it is a Shadow card, make a minion skirmishing an Elf strength -3.
*/
public class Card6_018 extends AbstractAlly {
public Card6_018() {
super(3, Block.FELLOWSHIP, 6, 3, 3, Race.ELF, Culture.ELVEN, "Galadriel", true);
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (effectResult.getType() == EffectResult.Type.START_OF_TURN) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new HealCharactersEffect(self.getOwner(), self));
return Collections.singletonList(action);
}
return null;
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(final String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)
&& PlayConditions.canSelfExert(self, game)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ExertCharactersEffect(self, self));
action.appendEffect(
new DiscardTopCardFromDeckEffect(self, playerId, false) {
@Override
protected void cardDiscardedCallback(PhysicalCard card) {
if (card.getBlueprint().getSide() == Side.SHADOW)
action.appendEffect(
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, -3, CardType.MINION, Filters.inSkirmishAgainst(Race.ELF)));
}
});
return Collections.singletonList(action);
}
return null;
}
}