"Mablung"

This commit is contained in:
marcins78@gmail.com
2011-10-08 16:06:19 +00:00
parent 8aee2eec87
commit b2bd3a6ebb

View File

@@ -0,0 +1,62 @@
package com.gempukku.lotro.cards.set4.gondor;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.ExertCharactersEffect;
import com.gempukku.lotro.cards.effects.ExhaustCharacterEffect;
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.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: The Two Towers
* Side: Free
* Culture: Gondor
* Twilight Cost: 2
* Type: Companion • Man
* Strength: 6
* Vitality: 3
* Resistance: 6
* Game Text: Ring-bound. Ranger. To play, spot a Ring-bound Man. Skirmish: Exert Mablung to exhaust a roaming minion
* he is skirmishing.
*/
public class Card4_127 extends AbstractCompanion {
public Card4_127() {
super(2, 6, 3, Culture.GONDOR, Race.MAN, null, "Mablung", true);
addKeyword(Keyword.RING_BOUND);
addKeyword(Keyword.RANGER);
}
@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.MAN), Filters.keyword(Keyword.RING_BOUND));
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(final String playerId, LotroGame game, 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 ExertCharactersEffect(self, self));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose roaming minion", Filters.type(CardType.MINION), Filters.keyword(Keyword.ROAMING), Filters.inSkirmishAgainst(Filters.sameCard(self))) {
@Override
protected void cardSelected(PhysicalCard card) {
action.insertEffect(
new ExhaustCharacterEffect(playerId, action, card));
}
});
return Collections.singletonList(action);
}
return null;
}
}