"Long Prepared"

This commit is contained in:
marcins78@gmail.com
2011-11-02 17:52:16 +00:00
parent e02accaa93
commit 48a1fdb4a7

View File

@@ -0,0 +1,78 @@
package com.gempukku.lotro.cards.set7.gondor;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
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.AddThreatsEffect;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Return of the King
* Side: Free
* Culture: Gondor
* Twilight Cost: 2
* Type: Condition • Support Area
* Game Text: To play, add 2 threats. Skirmish: Exert a [GONDOR] Man to wound a roaming minion that Man is skirmishing.
* Discard this condition at the start of the regroup phase.
*/
public class Card7_109 extends AbstractPermanent {
public Card7_109() {
super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.GONDOR, Zone.SUPPORT, "Long Prepared");
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& PlayConditions.canAddThreat(game, self, 2);
}
@Override
public PlayPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
final PlayPermanentAction playCardAction = super.getPlayCardAction(playerId, game, self, twilightModifier);
playCardAction.appendCost(
new AddThreatsEffect(playerId, self, 2));
return playCardAction;
}
@Override
protected List<? extends Action> getExtraPhaseActions(final String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)
&& PlayConditions.canExert(self, game, Culture.GONDOR, Race.MAN)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.GOLLUM, Race.MAN) {
@Override
protected void forEachCardExertedCallback(PhysicalCard character) {
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.MINION, Keyword.ROAMING, Filters.inSkirmishAgainst(character)));
}
});
return Collections.singletonList(action);
}
return null;
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (PlayConditions.startOfPhase(game, effectResult, Phase.REGROUP)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new DiscardCardsFromPlayEffect(self, self));
return Collections.singletonList(action);
}
return null;
}
}