"Naith Troop"

This commit is contained in:
marcins78@gmail.com
2011-10-20 15:43:53 +00:00
parent 817bc0a29f
commit 9750ffb6b8

View File

@@ -0,0 +1,64 @@
package com.gempukku.lotro.cards.set6.elven;
import com.gempukku.lotro.cards.AbstractCompanion;
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.CardType;
import com.gempukku.lotro.common.Culture;
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.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Free
* Culture: Elven
* Twilight Cost: 3
* Type: Companion • Elf
* Strength: 8
* Vitality: 3
* Resistance: 6
* Game Text: To play, spot 3 Elf companions. Skirmish: Exert Naith Troop to discard the top card of your draw deck.
* If it is an [ELVEN] card, make a minion skirmishing Naith Troop strength -2.
*/
public class Card6_022 extends AbstractCompanion {
public Card6_022() {
super(3, 8, 3, Culture.ELVEN, Race.ELF, null, "Naith Troop", true);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& PlayConditions.canSpot(game, 3, Race.ELF, CardType.COMPANION);
}
@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().getCulture() == Culture.ELVEN)
action.appendEffect(
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, -2, CardType.MINION, Filters.inSkirmishAgainst(self)));
}
});
return Collections.singletonList(action);
}
return null;
}
}